Bug 2062764

Summary: [RHOSP 16.1] ceilometer-ipmi-agent logs to /var/log/ceilometer inside the container
Product: Red Hat OpenStack Reporter: David Hill <dhill>
Component: openstack-tripleo-heat-templatesAssignee: Yadnesh Kulkarni <ykulkarn>
Status: CLOSED ERRATA QA Contact: Leonid Natapov <lnatapov>
Severity: low Docs Contact: Joanne O'Flynn <joflynn>
Priority: high    
Version: 16.1 (Train)CC: lmadsen, mburns, mrunge, ykulkarn
Target Milestone: z9Keywords: Triaged, ZStream
Target Release: 16.1 (Train on RHEL 8.2)   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: openstack-tripleo-heat-templates-11.3.2-1.20220913053651.29a02c1.el8ost Doc Type: Bug Fix
Doc Text:
Cause: Missing volume mount for "/var/log/ceilometer/" on the host. Consequence: Ceilometer-agent-ipmi logs are written inside the container namespace which increases the container size over time as well as avoiding any kind of log rotation. Since the logs are accumulated inside the containers, they will be lost if the container is deleted or rebuilt. Fix: Add volume mount for "/var/log/ceilometer/" on the host under "/var/log/containers/ceilometer/" Result: Logs generated by ceilometer-agent-ipmi service get logged on the host and not inside the container
Story Points: ---
Clone Of:
: 2138395 (view as bug list) Environment:
Last Closed: 2022-12-07 20:29:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2138395    

Description David Hill 2022-03-10 14:31:18 UTC
Description of problem:
ceilometer-ipmi-agent logs to /var/log/ceilometer inside the container .  

Version-Release number of selected component (if applicable):
All

How reproducible:
Always

Steps to Reproduce:
1. Enable ceilometer
2.
3.

Actual results:
/var/log/ceilometer in the container will never be log rotated

Expected results:
it should be

Additional info:
[1] https://review.opendev.org/c/openstack/tripleo-heat-templates/+/833095

Comment 6 Matthias Runge 2022-05-03 12:20:20 UTC
Cherry-pick to victoria still pending

Comment 7 Leif Madsen 2022-06-07 13:21:25 UTC
Cherry pick to train merged now. Linked here and moving status to POST.

Comment 10 Matthias Runge 2022-08-30 05:51:01 UTC
This fixes a bug, the user impact would be that this component would log to the correct file.

Comment 15 Leonid Natapov 2022-11-06 04:18:26 UTC
log file ceilometer-polling.log created in /var/log/containers/ceilometer


volume mount present
-----------------------

"Name": "ceilometer_agent_ipmi",
                "Source": "/var/lib/config-data/puppet-generated/ceilometer",
                "Source": "/var/lib/kolla/config_files/ceilometer-agent-ipmi.json",
                "Source": "/var/log/containers/ceilometer",
                "Destination": "/var/log/ceilometer",
            "User": "ceilometer",
                "HOME=/var/lib/ceilometer"
            "Image": "undercloud-0.ctlplane.redhat.local:8787/rh-osbs/rhosp16-openstack-ceilometer-ipmi:16.1_20220907.1",
                "com.redhat.component": "openstack-ceilometer-ipmi-container",
                "config_data": "{\"environment\": {\"KOLLA_CONFIG_STRATEGY\": \"COPY_ALWAYS\", \"TRIPLEO_CONFIG_HASH\": \"354e121a6f9a7b1c6daca502f8fc9046\"}, \"healthcheck\": {\"test\": \"/openstack/healthcheck\"}, \"image\": \"undercloud-0.ctlplane.redhat.local:8787/rh-osbs/rhosp16-openstack-ceilometer-ipmi:16.1_20220907.1\", \"net\": \"host\", \"privileged\": false, \"restart\": \"always\", \"volumes\": [\"/etc/hosts:/etc/hosts:ro\", \"/etc/localtime:/etc/localtime:ro\", \"/etc/pki/ca-trust/extracted:/etc/pki/ca-trust/extracted:ro\", \"/etc/pki/ca-trust/source/anchors:/etc/pki/ca-trust/source/anchors:ro\", \"/etc/pki/tls/certs/ca-bundle.crt:/etc/pki/tls/certs/ca-bundle.crt:ro\", \"/etc/pki/tls/certs/ca-bundle.trust.crt:/etc/pki/tls/certs/ca-bundle.trust.crt:ro\", \"/etc/pki/tls/cert.pem:/etc/pki/tls/cert.pem:ro\", \"/dev/log:/dev/log\", \"/etc/puppet:/etc/puppet:ro\", \"/var/lib/kolla/config_files/ceilometer-agent-ipmi.json:/var/lib/kolla/config_files/config.json:ro\", \"/var/lib/config-data/puppet-generated/ceilometer:/var/lib/kolla/config_files/src:ro\", \"/var/log/containers/ceilometer:/var/log/ceilometer:z\"]}",

Comment 23 errata-xmlrpc 2022-12-07 20:29:31 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: Red Hat OpenStack 16.1.9 (openstack-tripleo-heat-templates) security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:8796