Hide Forgot
Description of problem: This is more of a feature request/usage improvement ticket. It will try to cover a summary of all current fence agents in RHEL6, but should not be taken as exhaustive. Currently, it seems like some fence agents do not implement the 'metadata' option in an ideal manner. For example, 'fence_ipmilan' requires an address in order to return the metadata XML. There is no need for this. Further, it's man page lists 'metadata' as an unknown action. Most (all?) fence agents' man pages list 'metadata' as "The operational behaviour of this is not known." I believe that a suitable description of this action would be: "Returns the valid syntax, command line switches and usage notes in XML format. The cluster references this action's output when validating fence agent configuration." The following agents do not seem to support the 'metadata' action at all. These agents can not be used (or at least, can't be validated) with the current cman or pacemaker given this. This should be updated or deprecated. fence_brocade fence_drac fence_egenera fence_na - This is my agent, I will fix it asap. fence_nss_wrapper - Has no man page at all fence_rsb fence_scsi supports '-o metadata', but has no mention of it in it's man page at all. fence_virt and fence_xvm *do* document '-o metadata', but it is minimal; "Print XML metadata to standard output." Version-Release number of selected component (if applicable): fence-agents-3.0.12-23.el6.x86_64 fence-virt-0.2.1-8.el6.x86_64 How reproducible: 100% Steps to Reproduce: 1. try running 'fence_$agent -o metadata' 2. read the man pages for the same. 3. Actual results: The metadata action is not documented (or supported, in some cases) Expected results: Explain what metadata is for (and add it where needed) Additional info:
Ignore 'fence_nss_wrapper'; Not a fence agent.
Test suite: cd fence/agents for i in `ls */*pl`; do echo $i; perl $i -o metadata; done [do not enter action; as there always should be default action] perl baytech/fence_baytech -l user -p pass -a host -n 1 perl brocade/fence_brocade.pl -a host -l login -p pass -n 1 perl bullpap/fence_bullpap.pl -a host -l login -d domain -p pass perl cpint/fence_cpint -u machine perl drac/fence_drac -a host -l login -p pass perl egenera/fence_egenera -c cs -l lpan -p pser perl mcdata/fence_mcdata -l login -p pass -n 1 -a host perl vixel/fence_vixel -n 1 -p pass -a host perl xcat/fence_xcat -n node perl zvm/fence_zvm -u userid -a host -p pass New code was added to place where it should be tested by either first or second block of tests. Second block of tests should not fail with errors like 'unknown argument', 'operation not specified'. It is correct if it fails after arguments are checked e.g. 'hostname not found'. This testing does not need an access to all those fencing devices.
Patches are now part of upstream and manual pages are generated directly. Only fence agent which do not have this ability should be fence manual. http://git.fedorahosted.org/git/?p=fence-agents.git;a=commit;h=664ccc6aa2fcd4b79459ca3083f8528969300a78 http://git.fedorahosted.org/git/?p=fence-agents.git;a=commit;h=68fad86de38494cd0927174da0a62732e89be1ff http://git.fedorahosted.org/git/?p=fence-agents.git;a=commit;h=9df455796b3a1298ec2f47935847d6e195b51058
Unit test & results: 1) test metadata option cd fence/agents for i in `ls */*pl`; do echo $i; perl $i -o metadata; done before: metadata option is not available for most of the perl fence agents and they will either print error message or end without printing any problem baytech/fence_baytech.pl failed: must specify hostname brocade/fence_brocade.pl bullpap/fence_bullpap.pl cpint/fence_cpint.pl drac/fence_drac.pl egenera/fence_egenera.pl failed: no cserver defined mcdata/fence_mcdata.pl ... after: metadata are correctly printed baytech/fence_baytech.pl <?xml version="1.0" ?> <resource-agent name="fence_baytech" shortdesc="I/O Fencing agent for Baytech RPC switches in combination with a Cyclades Terminal Server" > <longdesc> This fencing agent is written for the Baytech RPC27-20nc in combination with a Cyclades terminal server. The Cyclades TS exports the RPC's seria l port via a Telnet interface. Other interfaces, such as SSH, are possible. However, this script relies upon the assumption that Telnet is used. The other assumption that is made is that Outlet names do not end in space. The name "Foo" and "Foo " are identical when the RPC prints them wit h the status command. </longdesc> <vendor-url>http://www.baytech.net</vendor-url> <parameters> <parameter name="action" unique="1" required="1"> <getopt mixed="-o <action>" /> <content type="string" default="disable" /> <shortdesc lang="en">Fencing Action</shortdesc> </parameter> ... 2) perl baytech/fence_baytech -l user -p pass -a host -n 1 perl brocade/fence_brocade.pl -a host -l login -p pass -n 1 perl bullpap/fence_bullpap.pl -a host -l login -d domain -p pass perl cpint/fence_cpint -u machine perl drac/fence_drac -a host -l login -p pass perl egenera/fence_egenera -c cs -l lpan -p pser perl mcdata/fence_mcdata -l login -p pass -n 1 -a host perl vixel/fence_vixel -n 1 -p pass -a host perl xcat/fence_xcat -n node perl zvm/fence_zvm -u userid -a host -p pass Fence agents should not end with any difference in output against previous version. This should just test if there are no syntax errors and code works like before
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. http://rhn.redhat.com/errata/RHBA-2012-0943.html