RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1904465 - ocf:heartbeat:mysql is sending stderr to /dev/null
Summary: ocf:heartbeat:mysql is sending stderr to /dev/null
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: resource-agents
Version: 8.4
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: rc
: 8.10
Assignee: Oyvind Albrigtsen
QA Contact: cluster-qe
URL:
Whiteboard:
Depends On:
Blocks: 2110038
TreeView+ depends on / blocked
 
Reported: 2020-12-04 14:48 UTC by Chad Newsom
Modified: 2024-05-22 09:20 UTC (History)
10 users (show)

Fixed In Version: resource-agents-4.9.0-48.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1771697
: 2110038 (view as bug list)
Environment:
Last Closed: 2024-05-22 09:14:39 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker KCSOPP-1707 0 None None None 2022-07-22 20:06:09 UTC
Red Hat Knowledge Base (Solution) 4741111 0 None None None 2020-12-14 15:59:05 UTC
Red Hat Product Errata RHSA-2024:2952 0 None None None 2024-05-22 09:14:47 UTC

Description Chad Newsom 2020-12-04 14:48:08 UTC
Description of problem:

The 'mysql_common_start()' function within the file "/usr/lib/ocf/lib/heartbeat/mysql-common.sh" is utilized by pacemaker to start 'ocf:heartbeat:mysql' resources. There are situations when MySQL fails to start and the error is sent to standard error/standard out and is not logged into the MySQL error log. The problem is pacemaker isn't seeing the standard error when the 'ocf:heartbeat:mysql' resource fails to start because the 'ocf:heartbeat:mysql' resource itself is sending all standard error and standard output to '/dev/null':

######
    ${OCF_RESKEY_binary} --defaults-file=$OCF_RESKEY_config \
    --pid-file=$OCF_RESKEY_pid \
    --socket=$OCF_RESKEY_socket \
    --datadir=$OCF_RESKEY_datadir \
    --log-error=$OCF_RESKEY_log \
    --user=$OCF_RESKEY_user $OCF_RESKEY_additional_parameters \
    $mysql_extra_params >/dev/null 2>&1 &
    pid=$!
######

The above snippet is from the 'mysql_common_start()' function within the file "/usr/lib/ocf/lib/heartbeat/mysql-common.sh". You can see that at the end of the startup line that all standard error is redirecting to standard out, and then that is sent to '/dev/null'.

The customer had System Admins spend hours trying to track down why a MySQL resource wasn't starting on a PCS Cluster, but the real error was being lost to '/dev/null'. The error was a very basic configuration issue, and MySQL was logging the error to standard error. The output from MySQL was telling you exactly what was wrong, however they weren't able to capture this error because it was sent to '/dev/null', resulting in hours of troubleshooting an issue that should have taken less than a minute to resolve.


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

resource-agents-4.1.1-68.el8.x86_64

How reproducible:

Anytime an 'ocf:heartbeat:mysql' resource produces standard error/standard out. 


Steps to Reproduce:

Start the mysql resource in any condition that would produce stderr/stdout

Actual results:

stderr goes to /dev/null


Expected results:


The ask is that the output from the attempt to start the 'ocf:heartbeat:mysql' resource be sent anywhere except '/dev/null'. It can go to a logfile, to syslog, or anywhere you choose, just not '/dev/null' as this makes troubleshooting for System Administrators very difficult.

Comment 4 Oyvind Albrigtsen 2023-09-06 09:43:59 UTC
https://github.com/ClusterLabs/resource-agents/pull/1887

Comment 13 errata-xmlrpc 2024-05-22 09:14:39 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: resource-agents security and bug fix 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-2024:2952


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