Bug 1128933 - add OCF exit reason string support
Summary: add OCF exit reason string support
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: resource-agents
Version: 7.1
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: rc
: ---
Assignee: David Vossel
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks: 1128931
TreeView+ depends on / blocked
 
Reported: 2014-08-11 21:25 UTC by David Vossel
Modified: 2015-08-24 06:36 UTC (History)
9 users (show)

Fixed In Version: resource-agents-3.9.5-31.el7
Doc Type: Bug Fix
Doc Text:
Clone Of: 1128931
Environment:
Last Closed: 2015-03-05 08:00:29 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0351 normal SHIPPED_LIVE resource-agents bug fix and enhancement update 2015-03-05 12:27:26 UTC

Description David Vossel 2014-08-11 21:25:15 UTC
+++ This bug was initially created as a clone of Bug #1128931 +++

Description of problem:

A common complaint we receive is that it is very difficult to debug why resource-agents fail. OCF scripts have a limited number of return codes available and those return codes can mean numerous things depending on each agent.

To fix this, the resource-agents have introduced the concept of an exit reason string. This string is returned on stderr and indicates to the calling process why a failure occurred.

Pacemaker needs the ability to both parse this string from the OCF output, and present the string to the user via crm_mon -1 and crm_mon --as-xml. From there tools like pcs should be able to present the user with useful information as to exactly why a resource failed rather than a generic return code.

Comment 1 David Vossel 2014-08-11 21:26:23 UTC
This bug is for the resource-agent's side of the OCF exit string feature.

We need to update the resource-agents package to support the exit string feature, and update all the agents we support to utilize this feature.

Comment 2 David Vossel 2014-08-25 18:38:56 UTC
There's an upstream pull request related to this issue.

https://github.com/ClusterLabs/resource-agents/pull/485

Comment 4 michal novacek 2014-12-15 15:29:12 UTC
I have verified that all the resource agents (except for Dummy) do contain ocf_exit_reason calls with resource-agents-3.9.5-38.el7.x86_64.

----

The patch affected only heartbeat agents.

before the patch: resource-agents-3.9.5-30.el7.x86_64
-----------------------------------------------------
# grep -l ocf_exit_reason /usr/lib/ocf/resource.d/heartbeat/* 
/usr/lib/ocf/resource.d/heartbeat/exportfs
/usr/lib/ocf/resource.d/heartbeat/IPaddr
/usr/lib/ocf/resource.d/heartbeat/IPaddr2
/usr/lib/ocf/resource.d/heartbeat/nfsnotify
/usr/lib/ocf/resource.d/heartbeat/nfsserver
/usr/lib/ocf/resource.d/heartbeat/VirtualDomain


patched resource-agents-3.9.5-38.el7.x86_64
-------------------------------------------

* all the agents are in the left column (output of 'ls -1
/usr/lib/ocf/resource.d/heartbeat/*')

* agents having calls to ocf_exit_reason are in the right column (output of
    'grep -l ocf_exit_reason /usr/lib/ocf/resource.d/heartbeat/*')

/usr/lib/ocf/resource.d/heartbeat/apache                        /usr/lib/ocf/resource.d/heartbeat/apache
/usr/lib/ocf/resource.d/heartbeat/clvm                          /usr/lib/ocf/resource.d/heartbeat/clvm
/usr/lib/ocf/resource.d/heartbeat/conntrackd                    /usr/lib/ocf/resource.d/heartbeat/conntrackd
/usr/lib/ocf/resource.d/heartbeat/CTDB                          /usr/lib/ocf/resource.d/heartbeat/CTDB
/usr/lib/ocf/resource.d/heartbeat/Delay                         /usr/lib/ocf/resource.d/heartbeat/Delay
/usr/lib/ocf/resource.d/heartbeat/dhcpd                         /usr/lib/ocf/resource.d/heartbeat/dhcpd
/usr/lib/ocf/resource.d/heartbeat/docker                        /usr/lib/ocf/resource.d/heartbeat/docker
/usr/lib/ocf/resource.d/heartbeat/Dummy                       <
/usr/lib/ocf/resource.d/heartbeat/ethmonitor                    /usr/lib/ocf/resource.d/heartbeat/ethmonitor
/usr/lib/ocf/resource.d/heartbeat/exportfs                      /usr/lib/ocf/resource.d/heartbeat/exportfs
/usr/lib/ocf/resource.d/heartbeat/Filesystem                    /usr/lib/ocf/resource.d/heartbeat/Filesystem
/usr/lib/ocf/resource.d/heartbeat/galera                        /usr/lib/ocf/resource.d/heartbeat/galera
/usr/lib/ocf/resource.d/heartbeat/IPaddr                        /usr/lib/ocf/resource.d/heartbeat/IPaddr
/usr/lib/ocf/resource.d/heartbeat/IPaddr2                       /usr/lib/ocf/resource.d/heartbeat/IPaddr2
/usr/lib/ocf/resource.d/heartbeat/IPsrcaddr                     /usr/lib/ocf/resource.d/heartbeat/IPsrcaddr
/usr/lib/ocf/resource.d/heartbeat/LVM                           /usr/lib/ocf/resource.d/heartbeat/LVM
/usr/lib/ocf/resource.d/heartbeat/MailTo                        /usr/lib/ocf/resource.d/heartbeat/MailTo
/usr/lib/ocf/resource.d/heartbeat/mysql                         /usr/lib/ocf/resource.d/heartbeat/mysql
/usr/lib/ocf/resource.d/heartbeat/named                         /usr/lib/ocf/resource.d/heartbeat/named
/usr/lib/ocf/resource.d/heartbeat/nfsnotify                     /usr/lib/ocf/resource.d/heartbeat/nfsnotify
/usr/lib/ocf/resource.d/heartbeat/nfsserver                     /usr/lib/ocf/resource.d/heartbeat/nfsserver
/usr/lib/ocf/resource.d/heartbeat/pgsql                         /usr/lib/ocf/resource.d/heartbeat/pgsql
/usr/lib/ocf/resource.d/heartbeat/postfix                       /usr/lib/ocf/resource.d/heartbeat/postfix
/usr/lib/ocf/resource.d/heartbeat/Route                         /usr/lib/ocf/resource.d/heartbeat/Route
/usr/lib/ocf/resource.d/heartbeat/rsyncd                        /usr/lib/ocf/resource.d/heartbeat/rsyncd
/usr/lib/ocf/resource.d/heartbeat/SendArp                       /usr/lib/ocf/resource.d/heartbeat/SendArp
/usr/lib/ocf/resource.d/heartbeat/slapd                         /usr/lib/ocf/resource.d/heartbeat/slapd
/usr/lib/ocf/resource.d/heartbeat/Squid                         /usr/lib/ocf/resource.d/heartbeat/Squid
/usr/lib/ocf/resource.d/heartbeat/symlink                       /usr/lib/ocf/resource.d/heartbeat/symlink
/usr/lib/ocf/resource.d/heartbeat/tomcat                        /usr/lib/ocf/resource.d/heartbeat/tomcat
/usr/lib/ocf/resource.d/heartbeat/VirtualDomain                 /usr/lib/ocf/resource.d/heartbeat/VirtualDomain
/usr/lib/ocf/resource.d/heartbeat/Xinetd                        /usr/lib/ocf/resource.d/heartbeat/Xinetd

Comment 6 errata-xmlrpc 2015-03-05 08:00:29 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://rhn.redhat.com/errata/RHBA-2015-0351.html


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