Bug 1642521

Summary: Missing /var/log/btmp in rabbitmq container causes unnecessary logs in /var/log/secure.
Product: Red Hat OpenStack Reporter: Hervé Beraud <hberaud>
Component: openstack-tripleo-heat-templatesAssignee: Hervé Beraud <hberaud>
Status: CLOSED ERRATA QA Contact: Gurenko Alex <agurenko>
Severity: medium Docs Contact:
Priority: medium    
Version: 14.0 (Rocky)CC: mariel, mburns, tvignaud
Target Milestone: ---Keywords: Triaged, ZStream
Target Release: 14.0 (Rocky)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-tripleo-heat-templates-9.2.1-0.20190119154863.el7ost Doc Type: Bug Fix
Doc Text:
The location of Pacemaker log files for RabbitMQ containers was not set to the correct path, 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.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-03-18 13:03:10 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 Hervé Beraud 2018-10-24 15:15:06 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-03 13:50:06 UTC
Proposing a new upstream rocky release => https://review.openstack.org/621576

Comment 9 errata-xmlrpc 2019-03-18 13:03:10 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:0446