Bug 1515354

Summary: failure is not logged anywhere when monitoring check of oracle resource agent fails with MONUSER user
Product: Red Hat Enterprise Linux 7 Reporter: Josef Zimek <pzimek>
Component: resource-agentsAssignee: Oyvind Albrigtsen <oalbrigt>
Status: CLOSED ERRATA QA Contact: cluster-qe <cluster-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.3CC: agk, cluster-maint, fdinitto, mlisik, sanyadav
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: resource-agents-4.1.1-1.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-30 11:39:23 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 Josef Zimek 2017-11-20 16:22:25 UTC
Description of problem:

Oracle resource agent has parameter monuser used for connectiong to database to perform monitoring operation check. If this user fails to login into database the sysdba user is used instead however this is not logged anywhere. 

Example: monuser is created with pcs command with password which doesn't match its password on database level. In such a case monitoring operation is in debug logs reported as successful but there is no mention that monitoring operation was finished by sysdba user and not monuser. This brings confusion and also involves generating of audit logs each time sysdba user access database. According to monuser description audit logs are not supposed to be generated when monuser is used:


--------------
monuser - Monitoring user name. Every connection as
sysdba is logged in an audit log. This can
result in a large number of new files created.
A new user is created (if it doesn't exist) in
the start action and subsequently used in monitor.
It should have very limited rights. Make sure
that the password for this user does not expire.
--------------




Version-Release number of selected component (if applicable):
resource-agents-3.9.5-105.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1. create oracle resource with monuser with invalid password 
2. monitor logs (monitoring op is successful - now failure/warning)
3.

Actual results:
sysdba user is used instead of monuser but there is no way how to find out (audit logs are generated)

Expected results:
warning gets printed in case monitoring operation is handled by sysdba user instead monuser

Additional info:

Comment 5 Oyvind Albrigtsen 2018-01-17 15:31:49 UTC
Patch: https://github.com/ClusterLabs/resource-agents/pull/1091

Comment 9 errata-xmlrpc 2018-10-30 11:39:23 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-2018:3278