Collect container healthchecks logs in a dedicated file

Bug #1856575 reported by Cédric Jeanneret
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Medium
Cédric Jeanneret

Bug Description

Hello,

Following https://bugs.launchpad.net/tripleo/+bug/1856573, it would be nice to collect the healthcheck logs in a dedicated logfile, so that we can expose it to any container wanting to read the healthcheck status (monitoring, metrics).

A simple rule such as this one should be sufficient:
if $programname == 'container-healthcheck' then /path/to/log/file.log
& stop

Location should probably be somewhere in /var/log/containers in order to keep things clean. Be careful to ensure the file location is covered by the logrotate_crond configuration!

summary: - Collectd container healthchecks logs in a dedicated file
+ Collect container healthchecks logs in a dedicated file
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (master)

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

Changed in tripleo:
assignee: Martin Mágr (mmagr) → Cédric Jeanneret (cjeanner)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (master)

Reviewed: https://review.opendev.org/699226
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=122929c21e33f13a1b3dd146076a6c00aea86637
Submitter: Zuul
Branch: master

commit 122929c21e33f13a1b3dd146076a6c00aea86637
Author: Cédric Jeanneret <email address hidden>
Date: Mon Dec 16 16:32:41 2019 +0100

    Create a dedicated log file for healthchecks for collectd

    This is a first step in order to get rid of the journalctl/systemctl
    calls from within collectd container.

    If CollectdEnableSensubility is set to true, the configuration will be
    added, and if set to false, it will remove it. The latter is in order to
    ensure we don't risk any disk space issue in case the operator wants to
    remove this feature.

    It depends on two patches that actually enable the SyslogIdentifier
    configuration in the healthcheck units.

    Change-Id: If4414c6ceced9200f9b0dc97be5043d7b2684ae1
    Closes-Bug: #1856575
    Depends-On: Icdc5caf4cedc46291a807c39c0a31c74955a4a74
    Depends-On: I6861baa287f2a8288b87be26aacecbcc061cd96f

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

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

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

Reviewed: https://review.opendev.org/701187
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=02f643cd9368c6af0a1c5458b93b5276b5de2c82
Submitter: Zuul
Branch: stable/train

commit 02f643cd9368c6af0a1c5458b93b5276b5de2c82
Author: Cédric Jeanneret <email address hidden>
Date: Mon Dec 16 16:32:41 2019 +0100

    Create a dedicated log file for healthchecks for collectd

    This is a first step in order to get rid of the journalctl/systemctl
    calls from within collectd container.

    If CollectdEnableSensubility is set to true, the configuration will be
    added, and if set to false, it will remove it. The latter is in order to
    ensure we don't risk any disk space issue in case the operator wants to
    remove this feature.

    It depends on two patches that actually enable the SyslogIdentifier
    configuration in the healthcheck units.

    Change-Id: If4414c6ceced9200f9b0dc97be5043d7b2684ae1
    Closes-Bug: #1856575
    Depends-On: https://review.opendev.org/701186
    (cherry picked from commit 122929c21e33f13a1b3dd146076a6c00aea86637)

tags: added: in-stable-train
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (stable/stein)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on tripleo-heat-templates (stable/stein)

Change abandoned by Cédric Jeanneret (Tengu) (<email address hidden>) on branch: stable/stein
Review: https://review.opendev.org/701524
Reason: Needs a Stein-only patch in order to edit the right file in the right way :/.

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

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

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

Reviewed: https://review.opendev.org/701561
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=80b62a18cee13093bc49929b7b49503b3b665aaf
Submitter: Zuul
Branch: stable/stein

commit 80b62a18cee13093bc49929b7b49503b3b665aaf
Author: Cédric Jeanneret <email address hidden>
Date: Wed Jan 8 16:23:04 2020 +0100

    [Stein-Only] Create a dedicated log file for healthchecks for collectd

    This is the Stein equivalent of https://review.opendev.org/701187.

    It creates a dedicated log file for the container healthchecks if we're
    running with podman container engine, and activate sensu client.

    It depends on a patch that actually add a new log identifier for the
    container healthcheck systemd units.

    Change-Id: I7143ba61f86263bba2fcd1013c74b075ac0d08b7
    Closes-Bug: #1856575
    Depends-On: https://review.opendev.org/701523

tags: added: in-stable-stein
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates 12.1.0

This issue was fixed in the openstack/tripleo-heat-templates 12.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates 11.4.0

This issue was fixed in the openstack/tripleo-heat-templates 11.4.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates stein-eol

This issue was fixed in the openstack/tripleo-heat-templates stein-eol release.

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.