Bug 166601 - fence_apc fails on unrecognised menu response trying to fence on apc7901
Summary: fence_apc fails on unrecognised menu response trying to fence on apc7901
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Cluster Suite
Classification: Retired
Component: fence
Version: 3
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Marek Grac
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-08-23 18:52 UTC by Erick S. Crager
Modified: 2009-12-22 21:21 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-12-22 21:21:58 UTC
Embargoed:


Attachments (Terms of Use)

Description Erick S. Crager 2005-08-23 18:52:20 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4

Description of problem:
When I try to use the /sbin/fence_apc script to fence off a cluster member, the script fails with an unrecognised menu response message.  This script is invoked with the following parameters: /sbin/fence_apc -a <hostname of apc> -n 6 -l <username> -p <password> -T -v.  After looking at the code, I determined that the there seemed to be some differences between what the script's regex was looking for and what the unit's management application showed.  This may be due to a newer revision of the firmware on this particular unit.  I did extend the regex patterns for the navigate sub.  See Additional Information section for a diff of the files.

Version-Release number of selected component (if applicable):
rh-gfs-en-6.0-4

How reproducible:
Always

Steps to Reproduce:
1. Run fence_apc with arguments as above on an APC7901 PDU, v2.6.1 of firmware.
2. Get error message.
  

Actual Results:  # /sbin/fence_apc -a <hostname> -n 6 -l <username> -p <password> -T -v
failed: unrecognised menu response


Expected Results:  # /sbin/fence_apc -a <hostname> -n 6 -l <username> -p <password> -T -v
success: test outlet 6 reboot

Additional info:

218d217
<
248a248
>
250c250,260
<                       /--\s*Outlet $opt_n\D.*(\d+)\s*-\s*control outlet\s+$opt_n\D/ism
---
>                       /--\s*Outlet $opt_n\D.*(\d+)\s*-\s*control outlet\s+$opt_n\D/ism ||
>
>                       # ESC 08/2005
>                       # APC 7901 v2.6.1 Menus
>                       # Slightly different, but enough to break the original script.
>                       #
>                       # "#- Outlet #          ON"
>                       /--\s*Outlet Control.*($opt_n)\s*-\s+\D+\s*(?-i:ON|OFF)\*?\s/is ||
>
>                       # Outlet        : $opt_n
>                       /--.*Outlet\s*:\s+$opt_n.*(\d+)\s*-\s*control outlet\D/is
261d270
<

Comment 1 Adam "mantis" Manthei 2005-08-23 19:12:31 UTC
Could you please run this command again with the -v flag and then post the
/tmp/apclog files that are generated?  It would be most beneficial if you could
run both the original script and the modified script.  

Thanks.

Comment 2 Erick S. Crager 2005-08-23 19:23:30 UTC
Here you are, it's a lot of information.
Listed first is the output of the original script, invoked as:
/sbin/fence_apc_orig -a <hostname> -n 6 -l <user> -p <pass> -T -v

American Power Conversion               Network Management Card AOS      v2.6.1
(c) Copyright 2002 All Rights Reserved  Rack PDU APP                     v2.6.1
-------------------------------------------------------------------------------
Name      : <hostname>                                Date : 08/23/2005
Contact   : QDS - Systems                             Time : 14:16:13
Location  : West Allis                                User : Administrator
Up Time   : 180 Days 3 Hours 25 Minutes               Stat : P+ N+ A+

Switched Rack PDU: Communication Established

------- Control Console -------------------------------------------------------

     1- Device Manager
     2- Network
     3- System
     4- Logout

     <ESC>- Main Menu, <ENTER>- Refresh, <CTRL-L>- Event Log
>

------- Control Console -------------------------------------------------------

     1- Device Manager
     2- Network
     3- System
     4- Logout

     <ESC>- Main Menu, <ENTER>- Refresh, <CTRL-L>- Event Log
>


American Power Conversion               Network Management Card AOS      v2.6.1
(c) Copyright 2002 All Rights Reserved  Rack PDU APP                     v2.6.1
-------------------------------------------------------------------------------
Name      : <hostname>                                Date : 08/23/2005
Contact   : QDS - Systems                             Time : 14:16:13
Location  : West Allis                                User : Administrator
Up Time   : 180 Days 3 Hours 25 Minutes               Stat : P+ N+ A+

Switched Rack PDU: Communication Established

------- Control Console -------------------------------------------------------

     1- Device Manager
     2- Network
     3- System
     4- Logout

     <ESC>- Main Menu, <ENTER>- Refresh, <CTRL-L>- Event Log
>

------- Control Console -------------------------------------------------------

     1- Device Manager
     2- Network
     3- System
     4- Logout

     <ESC>- Main Menu, <ENTER>- Refresh, <CTRL-L>- Event Log
> 1

------- Device Manager --------------------------------------------------------

     1- Phase Monitor/Configuration
     2- Outlet Restriction Configuration
     3- Outlet Control/Configuration
     4- Power Supply Status

     <ESC>- Back, <ENTER>- Refresh, <CTRL-L>- Event Log
> 3

------- Outlet Control/Configuration ------------------------------------------

     1- WAMSPH21                 ON
     2- Outlet 2                 ON
     3- Outlet 3                 ON
     4- Outlet 4                 ON
     5- Outlet 5                 ON
     6- Outlet 6                 ON
     7- Outlet 7                 ON
     8- Network Switch           ON
     9- Master Control/Configuration

     <ESC>- Back, <ENTER>- Refresh, <CTRL-L>- Event Log
> 6

------- Outlet 6 --------------------------------------------------------------

        Name         : Outlet 6
        Outlet       : 6
        State        : ON

     1- Control Outlet
     2- Configure Outlet

     ?- Help, <ESC>- Back, <ENTER>- Refresh, <CTRL-L>- Event Log
>

------- Outlet 6 --------------------------------------------------------------

        Name         : Outlet 6
        Outlet       : 6
        State        : ON

     1- Control Outlet
     2- Configure Outlet

     ?- Help, <ESC>- Back, <ENTER>- Refresh, <CTRL-L>- Event Log
>

------- Outlet Control/Configuration ------------------------------------------

     1- WAMSPH21                 ON
     2- Outlet 2                 ON
     3- Outlet 3                 ON
     4- Outlet 4                 ON
     5- Outlet 5                 ON
     6- Outlet 6                 ON
     7- Outlet 7                 ON
     8- Network Switch           ON
     9- Master Control/Configuration

     <ESC>- Back, <ENTER>- Refresh, <CTRL-L>- Event Log
>

------- Device Manager --------------------------------------------------------

     1- Phase Monitor/Configuration
     2- Outlet Restriction Configuration
     3- Outlet Control/Configuration
     4- Power Supply Status

     <ESC>- Back, <ENTER>- Refresh, <CTRL-L>- Event Log
>

------- Control Console -------------------------------------------------------

     1- Device Manager
     2- Network
     3- System
     4- Logout

     <ESC>- Main Menu, <ENTER>- Refresh, <CTRL-L>- Event Log
> 



Now, the output from the modified version, invoked as:
./fence_apc_new -a <hostname> -n 6 -l <user> -p <pass> -T -v



American Power Conversion               Network Management Card AOS      v2.6.1
(c) Copyright 2002 All Rights Reserved  Rack PDU APP                     v2.6.1
-------------------------------------------------------------------------------
Name      : <hostname>                                Date : 08/23/2005
Contact   : QDS - Systems                             Time : 14:21:44
Location  : West Allis                                User : Administrator
Up Time   : 180 Days 3 Hours 31 Minutes               Stat : P+ N+ A+

Switched Rack PDU: Communication Established

------- Control Console -------------------------------------------------------

     1- Device Manager
     2- Network
     3- System
     4- Logout

     <ESC>- Main Menu, <ENTER>- Refresh, <CTRL-L>- Event Log
>

------- Control Console -------------------------------------------------------

     1- Device Manager
     2- Network
     3- System
     4- Logout

     <ESC>- Main Menu, <ENTER>- Refresh, <CTRL-L>- Event Log
>


American Power Conversion               Network Management Card AOS      v2.6.1
(c) Copyright 2002 All Rights Reserved  Rack PDU APP                     v2.6.1
-------------------------------------------------------------------------------
Name      : <hostname>                                Date : 08/23/2005
Contact   : QDS - Systems                             Time : 14:21:44
Location  : West Allis                                User : Administrator
Up Time   : 180 Days 3 Hours 31 Minutes               Stat : P+ N+ A+

Switched Rack PDU: Communication Established

------- Control Console -------------------------------------------------------

     1- Device Manager
     2- Network
     3- System
     4- Logout

     <ESC>- Main Menu, <ENTER>- Refresh, <CTRL-L>- Event Log
>

------- Control Console -------------------------------------------------------

     1- Device Manager
     2- Network
     3- System
     4- Logout

     <ESC>- Main Menu, <ENTER>- Refresh, <CTRL-L>- Event Log
> 1

------- Device Manager --------------------------------------------------------

     1- Phase Monitor/Configuration
     2- Outlet Restriction Configuration
     3- Outlet Control/Configuration
     4- Power Supply Status

     <ESC>- Back, <ENTER>- Refresh, <CTRL-L>- Event Log
> 3

------- Outlet Control/Configuration ------------------------------------------

     1- WAMSPH21                 ON
     2- Outlet 2                 ON
     3- Outlet 3                 ON
     4- Outlet 4                 ON
     5- Outlet 5                 ON
     6- Outlet 6                 ON
     7- Outlet 7                 ON
     8- Network Switch           ON
     9- Master Control/Configuration

     <ESC>- Back, <ENTER>- Refresh, <CTRL-L>- Event Log
> 6

------- Outlet 6 --------------------------------------------------------------

        Name         : Outlet 6
        Outlet       : 6
        State        : ON

     1- Control Outlet
     2- Configure Outlet

     ?- Help, <ESC>- Back, <ENTER>- Refresh, <CTRL-L>- Event Log
> 1

------- Control Outlet --------------------------------------------------------

        Name         : Outlet 6
        Outlet       : 6
        State        : ON

     1- Immediate On
     2- Immediate Off
     3- Immediate Reboot
     4- Delayed On
     5- Delayed Off
     6- Delayed Reboot
     7- Cancel

     ?- Help, <ESC>- Back, <ENTER>- Refresh, <CTRL-L>- Event Log
> 3
        -----------------------------------------------------------------------
        Immediate Reboot

        This command will immediately shutdown
        outlet 6 named 'Outlet 6', delay for 5 seconds,
        and then restart.

        Enter 'YES' to continue or <ENTER> to cancel : NO

        Press <ENTER> to continue...


------- Control Outlet --------------------------------------------------------

        Name         : Outlet 6
        Outlet       : 6
        State        : ON

     1- Immediate On
     2- Immediate Off
     3- Immediate Reboot
     4- Delayed On
     5- Delayed Off
     6- Delayed Reboot
     7- Cancel

     ?- Help, <ESC>- Back, <ENTER>- Refresh, <CTRL-L>- Event Log
>

------- Control Outlet --------------------------------------------------------

        Name         : Outlet 6
        Outlet       : 6
        State        : ON

     1- Immediate On
     2- Immediate Off
     3- Immediate Reboot
     4- Delayed On
     5- Delayed Off
     6- Delayed Reboot
     7- Cancel

     ?- Help, <ESC>- Back, <ENTER>- Refresh, <CTRL-L>- Event Log
>

------- Outlet 6 --------------------------------------------------------------

        Name         : Outlet 6
        Outlet       : 6
        State        : ON

     1- Control Outlet
     2- Configure Outlet

     ?- Help, <ESC>- Back, <ENTER>- Refresh, <CTRL-L>- Event Log
>

------- Outlet Control/Configuration ------------------------------------------

     1- WAMSPH21                 ON
     2- Outlet 2                 ON
     3- Outlet 3                 ON
     4- Outlet 4                 ON
     5- Outlet 5                 ON
     6- Outlet 6                 ON
     7- Outlet 7                 ON
     8- Network Switch           ON
     9- Master Control/Configuration

     <ESC>- Back, <ENTER>- Refresh, <CTRL-L>- Event Log
>

------- Device Manager --------------------------------------------------------

     1- Phase Monitor/Configuration
     2- Outlet Restriction Configuration
     3- Outlet Control/Configuration
     4- Power Supply Status

     <ESC>- Back, <ENTER>- Refresh, <CTRL-L>- Event Log
>

------- Control Console -------------------------------------------------------

     1- Device Manager
     2- Network
     3- System
     4- Logout

     <ESC>- Main Menu, <ENTER>- Refresh, <CTRL-L>- Event Log
> 

Sorry for all the text, hope this helps. :) 

Comment 3 Jim Parsons 2005-12-05 21:29:53 UTC
this is fixed and in the U3 build.

Comment 4 Lon Hohberger 2009-12-22 21:21:58 UTC
https://rhn.redhat.com/errata/RHBA-2006-0174.html


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