Description of problem: agent.c is doing a fetch of all parameters for a given device name in a fence level for a specific node. So, what was happening is that the following would happen for say, off, off, on, on for the same APC device "foo": option=off port=8 switch=0 option=off port=7 switch=0 option=on port=8 switch=0 option=on port=7 switch=0 agent=fence_apc ipaddr=foo login=apc passwd=apc The net result of running this operation is that only "port 7, on" actually happens. Thus, fencing succeeds even though nothing has occurred to actually fence the node, even though the configuration is correct. The patch here fixes fenced and fence_node to call (in this case) fence_apc 4 times by using the index instead of the device name to determine parameters: option=off port=8 switch=0 agent=fence_apc ipaddr=foo login=apc passwd=apc <done> option=off port=7 switch=0 agent=fence_apc ipaddr=foo login=apc passwd=apc <done> option=on port=8 switch=0 agent=fence_apc ipaddr=foo login=apc passwd=apc <done> option=on port=7 switch=0 agent=fence_apc ipaddr=foo login=apc passwd=apc <done> This affects every configuration where off/on pairs are used. As I said, I don't think *any* of our agents do the "multi-operation" bit, and it would be significantly more work to make them work this way than it is to just use this patch ;) Version-Release number of selected component (if applicable): 1.32.1-1, CVS/STABLE, CVS/HEAD, CVS/RHEL4, CVS/RHEL4U2 How reproducible: 100% Steps to Reproduce: See above Actual results: One operation performed (in the above case, "port 7 on") Expected results: Four operations performed (port 8 off, port 7 off, port 8 on, port 7 on).
Created attachment 120704 [details] Fixes behavior
Fixes in CVS/head, CVS/STABLE, and CVS/RHEL4
Customer-tested and approved.
Fix committed.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2006-0174.html