Bug 396581 - fence_apc script does not work on 3.x firmware.
fence_apc script does not work on 3.x firmware.
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: cman (Show other bugs)
All Linux
urgent Severity high
: ---
: ---
Assigned To: Marek Grac
Cluster QE
: Reopened
: 399711 (view as bug list)
Depends On:
Blocks: 391501
  Show dependency treegraph
Reported: 2007-11-23 06:37 EST by Bryn M. Reeves
Modified: 2010-10-22 16:39 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-01-20 16:50:12 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
patch to allow the menu to fall through to the correct options. (775 bytes, text/x-patch)
2007-11-29 02:15 EST, Wade Mealing
no flags Details

  None (edit)
Description Bryn M. Reeves 2007-11-23 06:37:14 EST
+++ This bug was initially created as a clone of Bug #245675 +++

Description of problem:

The fence_apc script works fine on the 2.7, 2.8 version of the firmware for apc
fencing devices, but seems to fail on 3.x upwards due to a menu change in telnet

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

Tested on cman-2.0.64-1.el5 (but this bug is for a customer on 4)

How reproducible:

Every time

Steps to Reproduce:
0. Install cman, configure an apc to fence a single machine.
1. Upgrade an APC power supply to firmware version 3.x from 2.X 
2. Fence_apc fails, because of unexpected (new)  menu options.
3. command /sbin/fence_apc.py -v  -a -l username -n 7 -p password -o

Actual results:

fence_apc fails with a traceback.. (cut for sanity)
agent "fence_apc" reports: known screen encountered in \n" + str(lines) + "\n"

unknown screen encountered in

['', '> 1', '', '', '------- Phase Management
------------------------------------------------------', '', '        Phase Load
:  2.4', '        Phase State: Normal Load ',

agent "fence_apc" reports:  '', '     1- Overload Alarm Threshold(amps)       :
16', '     2- Near Overload Warning Threshold(amps): 12', '     3- Low
LoadWarning Threshold(amps)     : 0', '     4- Accept Changes                  
    : ', '', '     ?- Help, <ESC>- Back, <ENTER>-

Expected results:

Power supply to be dropped to the node, then rebooted.\

Additional info:
Comment 2 Bryn M. Reeves 2007-11-23 06:40:32 EST
Patch in bug 245675
Comment 3 Wade Mealing 2007-11-29 02:15:15 EST
Created attachment 272321 [details]
patch to allow the menu to fall through to the correct options.

Looks like this patch doesn't work with low port numbers (power port) so, here
is my attempt to patch this so that it works the port number 1 and 2.
Comment 5 Wade Mealing 2007-11-29 02:20:48 EST
*** Bug 399711 has been marked as a duplicate of this bug. ***
Comment 7 Jim Parsons 2008-02-27 09:05:24 EST
I was informed by APC that the firmware version (AOS 3.3.4, PDU 3.3.3) had a
known race condition that rendered the telnet interface and the snmp stack
intermittantly inoperable. APCC issued a subsequent release to fix this issue
(AOS 3.5.6, PDU 3.5.5). Since then, there has been another release and there is
currently a beta pending release for March. I tested our agent on the release
listed above that fixed the race condition, as well as the current release(AOS
3.5.7, PDU3.5.6) and the beta (AOS 3.5.7, PDU 3.5.7A) and the agent worked
perfectly. Please upgrade to one of these newer releases if you are using APC
for fencing.

Thanks for the patch.
Comment 8 Thorsten Scherf 2008-03-27 09:30:22 EDT
I have this one on APC AOS_356 and APP_355:

Mar 27 10:46:17 suhbz0002 fenced[4734]: agent "fence_apc" reports: Traceback
(most recent call last):   F
ile "/sbin/fence_apc", line 829, in ?     main()   File "/sbin/fence_apc", line
303, in main     do_power
_off(sock)   File "/sbin/fence_apc", line 813, in do_power_off     x =
do_power_switch(sock, "off")   Fil
e "/sbi
Mar 27 10:46:17 suhbz0002 fenced[4734]: agent "fence_apc" reports: n/fence_apc",
line 611, in do_power_sw
itch     result_code, response = power_off(txt + ndbuf)   File
"/sbin/fence_apc", line 817, in power_off 
    x = power_switch(buffer, False, "2", "3");   File "/sbin/fence_apc", line
810, in power_switch     ra
ise "un
Mar 27 10:46:17 suhbz0002 fenced[4734]: agent "fence_apc" reports: known screen
encountered in \n" + str(
lines) + "\n" unknown screen encountered in  ['1', '', '', '------- Phase
Monitor -----------------------
----------------------------------', '', '                  Outlet           ---
Thresholds ---', '      
Mar 27 10:46:17 suhbz0002 fenced[4734]: agent "fence_apc" reports:   Restriction
  Load  Low  NearOver Ov
er     State', '       
-----------------------------------------------------------------', '          1 
   None           1.3    0     12     16      Normal Load ', '', '', '    
<ESC>- Back, <ENTER>- Refresh'
, '> ']
Mar 27 10:46:17 suhbz0002 fenced[4734]: agent "fence_apc" reports:   
Mar 27 10:46:17 suhbz0002 fenced[4734]: fence "suhbz0001-hb" failed

using cman-2.0.73-1.el5_1.5
Comment 9 Thorsten Scherf 2008-03-27 13:29:30 EDT
additional comment:
fence_apc_snmp works fine on the boxes.
Comment 10 Bryn M. Reeves 2008-04-03 08:08:03 EDT
Have a report that this doesn't work with the low ports on the device (port 2 in
this case), as Wade mentions in comment #3.

Will test with Wade's patch.

Comment 11 Bryn M. Reeves 2008-04-03 08:09:12 EDT
The switch with the problem on the low ports is running the current release - AOS
3.5.7, PDU3.5.6.
Comment 12 Jasper Capel 2008-04-29 10:10:26 EDT
I applied Wade's patch (https://bugzilla.redhat.com/attachment.cgi?id=272281) to
fence_apc from cman-2.0.73-1.el5_1.5.

Works for me, APC switched rack PDU 7952 (24 ports), firmware versions:
Network Management Card AOS      v3.5.7
Rack PDU APP                     v3.5.6

For me, it works for both high and low port numbers. Is this patch scheduled to
be released as errata?

Comment 13 Marek Grac 2008-09-11 11:13:11 EDT
I have tested new fence agent (in python, ssh support) on AP7941; AOS v3.5.7, PDU APP v3.5.6 and it works
Comment 16 errata-xmlrpc 2009-01-20 16:50:12 EST
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.


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