Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 525105

Summary: fence_apc fails to fence node: Failed: Unable to obtain correct plug status or plug is not available
Product: Red Hat Enterprise Linux 5 Reporter: Marek Grac <mgrac>
Component: cmanAssignee: Marek Grac <mgrac>
Status: CLOSED DUPLICATE QA Contact: Cluster QE <mspqa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.3CC: adas, cluster-maint, edamato, fdinitto
Target Milestone: rcKeywords: EasyFix
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: cman-2.0.115-17.el5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 517860 Environment:
Last Closed: 2009-11-09 13:28:05 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 517860    
Bug Blocks:    
Attachments:
Description Flags
Proposed patch none

Description Marek Grac 2009-09-23 11:56:43 UTC
+++ This bug was initially created as a clone of Bug #517860 +++

Spoke with marx on IRC and changing the regex in /usr/sbin/fence_apc fixed it.

--- fence_apc.broken    2009-08-17 09:28:34.000000000 -0500
+++ fence_apc   2009-08-17 09:28:48.000000000 -0500
@@ -70,7 +70,7 @@ def get_power_status(conn, options):
                while True:
                        exp_result = conn.log_expect(options, [ options["-c"],  "Press <ENTER>" ], SHELL_TIMEOUT)
                        lines = conn.before.split("\n");
-                       show_re = re.compile('^\s*(\d+)- (.*?)\s+(ON|OFF)\s*$')
+                       show_re = re.compile('^\s*(\d+)- (.*?)\s+(ON|OFF)\s*')
                        for x in lines:
                                res = show_re.search(x)
                                if (res != None):

--- Additional comment from mgrac on 2009-08-17 10:47:27 EDT ---

Device info and how line differs:

<abhi`> American Power Conversion               Web/SNMP Management Card AOS     v2.5.4
<abhi`> (c) Copyright 2000 All Rights Reserved  MasterSwitch plus APP            v2.0.0
<abhi`> -------------------------------------------------------------------------------


    1- Outlet 1:1  shell-01                ON        Graceful Shutdown

Comment 1 Marek Grac 2009-09-23 12:03:55 UTC
Created attachment 362282 [details]
Proposed patch

Comment 2 Marek Grac 2009-11-09 13:28:05 UTC

*** This bug has been marked as a duplicate of bug 532916 ***