From ef8d7a27ab5b7d6fce8a060b1bc2709b0d1bbb98 Mon Sep 17 00:00:00 2001 From: Michal Nasiadka Date: Fri, 9 Aug 2019 14:34:52 +0200 Subject: Change fluentd to td-agent on CentOS Fluentd packages in CentOS Opstools SIG repos is very old, because of old-ish ruby (2.0) packaged with CentOS 7. On the other hand - TreasureData packages for fluentd are packaged with embedded ruby as dependencies - so this change moves to those. Thanks to that we are able to move from fluentd 0.12 to 1.4.2. Still we need ruby-devel for non-td-agent distros, because we download monasca output plugin as source and build it during installation. * Bump up td.repo to version 3 * Merge sudoers into one file * Change fluentd plugin install macro to reflect changes Depends-On: https://review.opendev.org/679209/ Depends-On: https://review.opendev.org/679885/ Change-Id: I40a81103317ac044d9311b2505593056cf313bd2 --- docker/fluentd/extend_start.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docker/fluentd/extend_start.sh') diff --git a/docker/fluentd/extend_start.sh b/docker/fluentd/extend_start.sh index 93996766b..73f3d145e 100644 --- a/docker/fluentd/extend_start.sh +++ b/docker/fluentd/extend_start.sh @@ -6,7 +6,7 @@ # 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 [[ "${KOLLA_BASE_DISTRO}" =~ debian|ubuntu && "${KOLLA_BASE_ARCH}" == "x86_64" ]]; then +if [[ "${KOLLA_BASE_ARCH}" == "x86_64" && "${KOLLA_BASE_DISTRO}" != "debian" ]]; then USERGROUP="td-agent:kolla" FLUENTD="td-agent" else @@ -23,6 +23,6 @@ fi if [[ $(stat -c %a /var/log/kolla) != "2775" ]]; then sudo chmod 2775 /var/log/kolla fi -if [[ $(stat -c %U:%G /var/lib/${FLUENTD}) != "${USERGROUP}" ]]; then +if [[ (-d /var/lib/${FLUENTD}) && ($(stat -c %U:%G /var/lib/${FLUENTD}) != "${USERGROUP}") ]]; then sudo chown ${USERGROUP} /var/lib/${FLUENTD} fi -- cgit v1.2.3