Bug 1639199 - Missing /var/log/btmp in rabbitmq container causes unnecessary logs in /var/log/secure.
Summary: Missing /var/log/btmp in rabbitmq container causes unnecessary logs in /var/l...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-heat-templates
Version: 13.0 (Queens)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 13.0 (Queens)
Assignee: Hervé Beraud
QA Contact: pkomarov
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-10-15 09:31 UTC by Keigo Noha
Modified: 2019-12-29 18:21 UTC (History)
6 users (show)

Fixed In Version: openstack-tripleo-heat-templates-8.0.7-19.el7ost
Doc Type: Bug Fix
Doc Text:
The location of Pacemaker log files for RabbitMQ containers was not set to the correct location, which caused unnecessary log files to be created in /var/log/secure. This fix adds mounting of the /var/log/btmp path during the start of the RabbitMQ container, which enables Pacemaker to create the logs in the correct location.
Clone Of:
Environment:
Last Closed: 2019-01-16 17:55:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1799716 0 None None None 2018-10-24 14:16:42 UTC
OpenStack gerrit 613054 0 None MERGED Remove unnecessary logs due to misconfiguration from pacemaker 2021-02-14 22:44:50 UTC
Red Hat Bugzilla 1642516 0 medium CLOSED Missing /var/log/btmp in rabbitmq container causes unnecessary logs in /var/log/secure. 2021-02-22 00:41:40 UTC
Red Hat Knowledge Base (Solution) 3664391 0 None None None 2018-10-24 06:54:30 UTC
Red Hat Product Errata RHBA-2019:0068 0 None None None 2019-01-16 17:55:20 UTC

Internal Links: 1642516

Description Keigo Noha 2018-10-15 09:31:01 UTC
Description of problem:
Missing /var/log/btmp in rabbitmq container causes unnecessary logs in /var/log/secure.

~~~
su:pam_lastlog(su:session): unable to open /var/log/btmp: No such file or directory
~~~

The message is written in every su option for rabbitmq user.
It makes /var/log/secure larger and hard to read useful logs.

Version-Release number of selected component (if applicable):
Current openstack-triple-heat-templates.

How reproducible:
Always.

Steps to Reproduce:
1. Deploy RHOSP13
2. Login controller nodes.
3. Check /var/log/secure

Actual results:
The following log is written to /var/log/secure in every su for rabbitmq.
~~~
su:pam_lastlog(su:session): unable to open /var/log/btmp: No such file or directory
~~~

Expected results:
The log should not be written.

Additional info:
A simple solution for this is touch /var/log/btmp file in the container or create an empty file on the host directory, /var/log/pacemaker/bundles/rabbitmq-bundle-0

Comment 1 Hervé Beraud 2018-12-10 10:23:20 UTC
Merged upstream on queens

Comment 2 Keigo Noha 2018-12-11 00:46:17 UTC
Hello Hervé,

Thank you for your work on this bugzilla.
Could you proceed the backport into RHOSP13 tree? If we can fix it at RHOSP13z4, many of our customer will be happy.

Best Regards,
Keigo Noha

Comment 3 Hervé Beraud 2018-12-11 09:54:13 UTC
Hello Keigo,

Sure.

Best Regards,

Hervé Beraud

Comment 15 Marian Krcmarik 2019-01-10 12:11:11 UTC
[heat-admin@controller-0 ~]$ sudo docker exec -it rabbitmq-bundle-docker-0 /bin/bash
()[root@controller-0 /]# ls /var/log/btmp 
/var/log/btmp

Comment 17 errata-xmlrpc 2019-01-16 17:55:05 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, 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-2019:0068


Note You need to log in before you can comment on or make changes to this bug.