Fluentd config files are unreadable

Bug #1867754 reported by Doug Szumski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla-ansible
Fix Released
High
Doug Szumski
Stein
Fix Released
Medium
Mark Goddard
Train
Fix Released
High
Mark Goddard
Ussuri
Fix Released
High
Doug Szumski

Bug Description

Change ID I28f63ec81f1ea5bc4a213d053bfb2c04388d5925 sets Fluentd config folder permissions to 0600 which prevents Fluentd from reading the files in this directory. We want the folder to be 0700.

Someone observing this bug will see the Fluentd container start, but then not load any config. It will just hang indefinitely, not doing anything.

Revision history for this message
Doug Szumski (dszumski) wrote :

Currently affects master, stein and train.

Changed in kolla-ansible:
assignee: nobody → Doug Szumski (dszumski)
Changed in kolla-ansible:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Radosław Piliszek (yoctozepto) wrote :

How could we prevent that in the future?

Stein pending, change not yet landed.

Other branches not release - please do no reno change.

Revision history for this message
Doug Szumski (dszumski) wrote :

Indeed, finally a change which doesn't need a reno :)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla-ansible (master)

Fix proposed to branch: master
Review: https://review.opendev.org/713417

Changed in kolla-ansible:
status: Triaged → In Progress
Revision history for this message
Doug Szumski (dszumski) wrote :

You could have some check to make sure logs actually end up somewhere in CI. The Monasca CI job is one path. Checking fluent writes some logs to file could be another easy one.

Revision history for this message
Mark Goddard (mgoddard) wrote :

We discussed a while ago having an output plugin in CI that writes out anything ingested by fluentd to files. We could then check for the existence of these files, and possibly even match input and output log data.

Alternatively we know that some logs are gathered via syslog then written to a file. We could check for the existence of the file as a lighter weight check.

Revision history for this message
Mark Goddard (mgoddard) wrote :
Revision history for this message
Radosław Piliszek (yoctozepto) wrote :

Mark or Doug, please propose checking HAProxy log existence (and mark this bug related).

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla-ansible (master)

Reviewed: https://review.opendev.org/713417
Committed: https://git.openstack.org/cgit/openstack/kolla-ansible/commit/?id=c92378d7881927d46ff5d485edcf25989c0c4170
Submitter: Zuul
Branch: master

commit c92378d7881927d46ff5d485edcf25989c0c4170
Author: Doug Szumski <email address hidden>
Date: Tue Mar 17 11:16:38 2020 +0000

    Make Fluentd config folders readable

    Currently, config folders lack the execute bit so Fluentd
    cannot read the config and just does nothing when it starts up. This
    change explicitly sets the execute bit on folders which need it,
    rather than doing it in a more generic way which is more risky from
    a security perspective.

    Change-Id: Ia840f4b67043df4eaa654f47673dcdc973f13d9c
    Closes-Bug: #1867754

Changed in kolla-ansible:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla-ansible (stable/train)

Fix proposed to branch: stable/train
Review: https://review.opendev.org/713513

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla-ansible (stable/stein)

Fix proposed to branch: stable/stein
Review: https://review.opendev.org/713519

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla-ansible (stable/train)

Reviewed: https://review.opendev.org/713513
Committed: https://git.openstack.org/cgit/openstack/kolla-ansible/commit/?id=f80a10435448f5a5cdc16b5aab99ca84fec1d076
Submitter: Zuul
Branch: stable/train

commit f80a10435448f5a5cdc16b5aab99ca84fec1d076
Author: Doug Szumski <email address hidden>
Date: Tue Mar 17 11:16:38 2020 +0000

    Make Fluentd config folders readable

    Currently, config folders lack the execute bit so Fluentd
    cannot read the config and just does nothing when it starts up. This
    change explicitly sets the execute bit on folders which need it,
    rather than doing it in a more generic way which is more risky from
    a security perspective.

    Change-Id: Ia840f4b67043df4eaa654f47673dcdc973f13d9c
    Closes-Bug: #1867754
    (cherry picked from commit c92378d7881927d46ff5d485edcf25989c0c4170)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla-ansible (stable/stein)

Reviewed: https://review.opendev.org/713519
Committed: https://git.openstack.org/cgit/openstack/kolla-ansible/commit/?id=06fbffe44025919761252cba50dbaef74f95df98
Submitter: Zuul
Branch: stable/stein

commit 06fbffe44025919761252cba50dbaef74f95df98
Author: Will Szumski <email address hidden>
Date: Thu Feb 6 17:10:06 2020 +0000

    Combined fluentd fixes

    1. Delete stale fluent config on restart

    We already only include .conf files in fluent.conf:

    (fluentd)[fluentd@cpu-e-1041 /etc/fluentd]$ cat fluent.conf
    @include input/*.conf
    @include filter/*.conf
    @include format/*.conf
    @include output/*.conf

    so this change should not cause ill effect. This works because of the
    merge option in config files:

    merge: merges the source directory into the target directory instead of
    replacing it. Boolean, defaults to false.

    see https://docs.openstack.org/kolla/latest/admin/kolla_api.html#kolla-api-external-config

    Original Change-Id: I28f63ec81f1ea5bc4a213d053bfb2c04388d5925
    Closes-Bug: #1862211
    (cherry picked from commit e7870e9df9e416b1b342ad6264bb66378fe62b3f)

    2. Make Fluentd config folders readable

    Currently, config folders lack the execute bit so Fluentd
    cannot read the config and just does nothing when it starts up. This
    change explicitly sets the execute bit on folders which need it,
    rather than doing it in a more generic way which is more risky from
    a security perspective.

    Change-Id: Ia840f4b67043df4eaa654f47673dcdc973f13d9c
    Closes-Bug: #1867754
    (cherry picked from commit c92378d7881927d46ff5d485edcf25989c0c4170)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.