kolla/docker/fluentd/extend_start.sh
Sven Kieske c0aee4adb6 bump td-agent lts from v4 to v5
notice that the td-agent command got renamed to fluentd.
see also the upgrade notes at[0].

for more details, refer to the changelog[1].

[0]: https://web.archive.org/web/20231006084137/https://www.fluentd.org/blog/upgrade-td-agent-v4-to-v5
[1]: b4b7017c09/CHANGELOG.md (release-v500---20230729)

Depends-On: https://review.opendev.org/c/openstack/kolla-ansible/+/901509
Change-Id: I5e95363c6c180e330945fe3d98e97c7049bbd6f7
Signed-off-by: Sven Kieske <kieske@osism.tech>
2023-11-30 07:07:31 +00:00

21 lines
719 B
Bash

#!/bin/bash
# Give processes executed with the "kolla" group the permission to create files
# and sub-directories in the /var/log/kolla directory.
#
# Also set the setgid permission on the /var/log/kolla directory so that new
# files and sub-directories in that directory inherit its group id ("kolla").
if [ ! -d /var/log/kolla ]; then
mkdir -p /var/log/kolla
fi
if [[ $(stat -c %U:%G /var/log/kolla) != "fluentd:kolla" ]]; then
sudo chown fluentd:kolla /var/log/kolla
fi
if [[ $(stat -c %a /var/log/kolla) != "2775" ]]; then
sudo chmod 2775 /var/log/kolla
fi
if [[ (-d /var/lib/fluentd) && ($(stat -c %U:%G /var/lib/fluentd) != "fluentd:kolla") ]]; then
sudo chown fluentd:kolla /var/lib/fluentd
fi