Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 2233457

Summary: There are no log files in /var/log/containers/httpd/cinder-api/ of a controller node.
Product: Red Hat OpenStack Reporter: Ryo Hayakawa <rhayakaw>
Component: openstack-tripleo-heat-templatesAssignee: Alan Bishop <abishop>
Status: CLOSED ERRATA QA Contact: Yosi Ben Shimon <ybenshim>
Severity: medium Docs Contact:
Priority: high    
Version: 17.0 (Wallaby)CC: abishop, gbrinn, ltoscano, mariel, mburns, yrabl
Target Milestone: z2Keywords: Triaged, ZStream
Target Release: 17.1   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: openstack-tripleo-heat-templates-14.3.1-17.1.20231103010821.e7c7ce3.el9ost Doc Type: Bug Fix
Doc Text:
Before this update, the WSGI logs for the `cinder-api` service were not stored in a persistent location, which caused you to not be able to view the logs to troubleshoot issues. With this update, the WSGI logs are stored on the controller nodes where the `cinder-api` service runs in the `/var/log/containers/httpd/cinder-api` directory, which resolves the issue.
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-01-16 14:30:34 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:

Description Ryo Hayakawa 2023-08-22 09:27:35 UTC
Description of problem:

The customer reported that there were no log files in /var/log/containers/httpd/cinder-api/ of a controller node.
I think that `cinder_wsgi_error.log` and `cinder_wsgi_access.log` should exist in /var/log/containers/httpd/cinder-api/.

As far as I checked `podman inspect cinder_api` from the customer's sosreport, there was no definition of binding between `/var/log/containers/httpd/cinder-api` and `/var/log/httpd`.

In addition, as far as I checked /usr/share/openstack-tripleo-heat-templates/deployment/cinder/
cinder-api-container-puppet.yaml in OSP17.0.1 , the definition doesn't exist in `step_4`.

OSP17.1 also doesn't have it.

I guess that the above causes this issue.

FYI, OSP16.2 has the definition in step_4, and the logs are output in /var/log/containers/httpd/cinder-api/ properly in OSP16.2.


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

openstack-tripleo-heat-templates-14.3.1-0.20221208160327.feca772.el9ost.noarch

How reproducible:

Always

Actual results:

There are no log files in  /var/log/containers/httpd/cinder-api/ of a controller node.

Expected results:

`cinder_wsgi_error.log` and `cinder_wsgi_access.log` should exist in /var/log/containers/httpd/cinder-api/ of a controller node.

Additional info:

OSP17.1 also might have this issue.

Comment 1 Takashi Kajinami 2023-08-23 01:44:11 UTC
It seems the line was accidentally removed by https://review.opendev.org/c/openstack/tripleo-heat-templates/+/796723/1/deployment/cinder/cinder-api-container-puppet.yaml#b316 ?

Comment 3 Alan Bishop 2023-09-05 14:34:19 UTC
Thanks, Takashi, for triaging this!

I'm targeting the fix for 17.1, as I don't believe there will be another 17.0 maintenance release.

Comment 13 Yosi Ben Shimon 2023-12-04 11:33:33 UTC
Tested on OSP 17.1 with openstack-tripleo-heat-templates-14.3.1-17.1.20231103010823

From the controller node:
[root@controller-0 ~]# ll /var/log/containers/httpd/cinder-api/
total 17220
-rw-r--r--. 1 root root 5405313 Dec  4 11:09 cinder_wsgi_access.log
-rw-r--r--. 1 root root 7651790 Dec  4 00:00 cinder_wsgi_access.log.1
-rw-r--r--. 1 root root  234702 Dec  4 08:35 cinder_wsgi_error.log
-rw-r--r--. 1 root root 2326746 Dec  4 00:00 cinder_wsgi_error.log.1
-rw-r--r--. 1 root root       0 Dec  4 00:00 error_log
-rw-r--r--. 1 root root    1167 Dec  4 00:00 error_log.1


[root@controller-0 ~]# podman inspect cinder_api:
...
{
  "Type": "bind",
  "Source": "/var/log/containers/httpd/cinder-api",
  "Destination": "/var/log/httpd",
  "Driver": "",
  "Mode": "",
  "Options": [
    "rbind"
  ],
  "RW": true,
  "Propagation": "rprivate"
},
...

as for step-4 in /usr/share/openstack-tripleo-heat-templates/deployment/cinder/cinder-api-container-puppet.yaml,
there is the definition:
- /var/log/containers/httpd/cinder-api:/var/log/httpd:z

Moving to VERIFIED

Comment 22 errata-xmlrpc 2024-01-16 14:30:34 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 (Red Hat OpenStack Platform 17.1.2 bug fix and enhancement advisory), 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/RHBA-2024:0209