Red Hat Bugzilla – Bug 494587
fence_apc_snmp time wait
Last modified: 2016-04-26 12:04:48 EDT
Created attachment 338512 [details]
Patch to add a 5 seconds delay after issuing a poweron or poweroff command.
Description of problem:
How reproducible: Always
Steps to Reproduce:
1. Issue the fence_apc_snmp command to poweron an outlet
2. The script will return "Error turning outlet on"
3. Issue the fence_apc_snmp command to check status of an outlet
4. The script returns status as on.
The script does not read the correct status after a poweron or poweroff command through the fence_apc_snmp script.
The script immediately checks the status of the outlet after we issue a poweron of poweroff command in order to determine if the command was executed successfully. Due to delays of the PDU the status is not updated immediately so the command fails. The script should have a small delay before checking the status in order to allow the PDU to be updated with the status of the outlet.
On a cluster node issue the following commands against an APC AP7921 with the IP address 172.16.1.10 paired with a second APC AP7921 with the IP address 172.16.1.11.
[root@~]# fence_apc_snmp -a 172.16.1.10 -c privatetest -n 8 -o on
Error turning outlet on
[root@~]# fence_apc_snmp -a 172.16.1.10-c privatetest -n 8 -o status
Outlet "8" - 8 is on
[root@~]# fence_apc_snmp -a 172.16.1.10 -c privatetest -n 8 -o off
Error turning outlet off
[root@~]# fence_apc_snmp -a 172.16.1.10 -c privatetest -n 8 -o status
Outlet "8" - 8 is off
On the syslog server check the logs (to actually check that the commands for poweron and poweroff do work).
Apr 7 18:58:58 172.16.1.10 Switched Rack PDU: Outlet #8 (Uranus2 PS2) on. 0x0F09
Apr 7 18:58:58 172.16.1.11 Switched Rack PDU: Outlet #8 (Uranus2 PS2) on. 0x0F09
Apr 7 18:59:07 172.16.1.10 Switched Rack PDU: Outlet #8 (Uranus2 PS2) off. 0x0F0B
Apr 7 18:59:07 172.16.1.11 Switched Rack PDU: Outlet #8 (Uranus2 PS2) off. 0x0F0B
Attached there is simple patch to add a delay after a command for poweron or poweroff is executed on the PDUs before checking the status of the outlet.
Thanks for a patch.
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 therefore 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.