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 532916

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 ERRATA QA Contact: Cluster QE <mspqa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.4CC: adas, cluster-maint, djansa, edamato, fdinitto, jkortus
Target Milestone: rc   
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: 2010-03-30 08:40:52 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:    

Description Marek Grac 2009-11-04 10:30:38 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

--- Additional comment from mgrac on 2009-09-23 08:04:19 EDT ---

Applied patch:

http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commit;h=e97692e42ffb901388ad2586ca93e91f6c509c8a

Comment 1 Marek Grac 2009-11-09 13:28:05 UTC
*** Bug 525105 has been marked as a duplicate of this bug. ***

Comment 4 Jaroslav Kortus 2010-03-11 16:08:49 UTC
Change present in cman-2.0.115-33.el5. Marking as verified.

Comment 6 errata-xmlrpc 2010-03-30 08:40:52 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-2010-0266.html