Bug 1259254

Summary: fence_apc does not work with APC firmware 6.x
Product: Red Hat Enterprise Linux 6 Reporter: Hans Middelhoek <redhat-bugzilla>
Component: fence-agentsAssignee: Marek Grac <mgrac>
Status: CLOSED ERRATA QA Contact: cluster-qe <cluster-qe>
Severity: unspecified Docs Contact: Steven J. Levine <slevine>
Priority: unspecified    
Version: 6.8CC: cluster-maint, mjuricek, rbalakri
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: fence-agents-4.0.15-11.el6 Doc Type: Release Note
Doc Text:
Fence agent for APC now supports firmware 6.x The fence agent for APC now support firmware 6.x.
Story Points: ---
Clone Of:
: 1259319 (view as bug list) Environment:
Last Closed: 2016-05-10 21:34:08 UTC Type: Bug
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:    
Bug Blocks: 1259319    

Description Hans Middelhoek 2015-09-02 09:49:07 UTC
Description of problem:
We updated the firmware of our APC's (AP8653) to version 6.3.3 but now fencing doesn't work anymore.

Version-Release number of selected component (if applicable):
# fence_apc -V
4.0.10 (built Fri Jun 26 18:24:07 CEST 2015)

How reproducible:
# fence_apc -a xxx.xxx.xxx.xxx -l fenceuser -p pass -x -n 1 --ssh-options="-2 -c blowfish" --power-wait=10 -o status -c "apc>" -vvv
.....
DEBUG:root:Sent:

DEBUG:root:Received:


Schneider Electric                      Network Management Card AOS      v6.3.2
(c) Copyright 2015 All Rights Reserved  RPDU 2g                          v6.3.3
.....
apc>
DEBUG:root:Sent: 1

DEBUG:root:Received: 1
E101: Command Not Found

apc>
DEBUG:root:Sent: 2

DEBUG:root:Received: 2
E101: Command Not Found

apc>
DEBUG:root:Sent:

DEBUG:root:Sent:
ERROR:root:Connection timed out


Actual results:
Command doesn't work because old commands are send. The check for firmware version 5.x doesn't match for this newer 6.x firmware and therefore falls back to pre 5.x commands.

Expected results:
Port status should be reported by above command. The olStatus command should be send by fence_apc.

Additional info:
A simple change in fence_apc solves the problem.
Replace this line:
if (firmware_version != None) and (firmware_version.group(1) == "5"):
by this:
if (firmware_version != None) and (firmware_version.group(1) >= "5"):

This will check for firmware version 5.x and newer and solves our problem.

Comment 2 Marek Grac 2015-09-02 12:10:52 UTC
@Hans:

If I understand it correctly, commands are same only checking of firmware has to allow 6.x. Am I right?

Comment 3 Hans Middelhoek 2015-09-02 16:54:44 UTC
@Marek
You're right. Commands are the same for firmware 5 and 6 but firmware 6 can't be detected by fence_apc.

Comment 8 errata-xmlrpc 2016-05-10 21:34:08 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-0838.html