Bug 396581 - fence_apc script does not work on 3.x firmware.
Summary: fence_apc script does not work on 3.x firmware.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: cman
Version: 5.0
Hardware: All
OS: Linux
urgent
high
Target Milestone: ---
: ---
Assignee: Marek Grac
QA Contact: Cluster QE
URL:
Whiteboard:
: 399711 (view as bug list)
Depends On:
Blocks: 391501
TreeView+ depends on / blocked
 
Reported: 2007-11-23 11:37 UTC by Bryn M. Reeves
Modified: 2018-10-20 01:10 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-01-20 21:50:12 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:0189 0 normal SHIPPED_LIVE cman bug-fix and enhancement update 2009-01-20 16:05:55 UTC

Description Bryn M. Reeves 2007-11-23 11:37:14 UTC
+++ 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
 interface.

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 10.64.69.44 -l username -n 7 -p password -o
reboot

   
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 11:40:32 UTC
Patch in bug 245675

Comment 3 Wade Mealing 2007-11-29 07:15:15 UTC
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 07:20:48 UTC
*** Bug 399711 has been marked as a duplicate of this bug. ***

Comment 7 Jim Parsons 2008-02-27 14:05:24 UTC
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 13:30:22 UTC
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 ---', '      
  Phase
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 17:29:30 UTC
additional comment:
fence_apc_snmp works fine on the boxes.


Comment 10 Bryn M. Reeves 2008-04-03 12:08:03 UTC
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 12:09:12 UTC
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 14:10:26 UTC
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 15:13:11 UTC
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 21:50:12 UTC
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.

http://rhn.redhat.com/errata/RHBA-2009-0189.html


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