Bug 693428 - fence_ipmilan returns incorrect status on monitor op if chassis is powered off
fence_ipmilan returns incorrect status on monitor op if chassis is powered off
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: fence-agents (Show other bugs)
Unspecified Unspecified
medium Severity high
: rc
: ---
Assigned To: Marek Grac
Cluster QE
Depends On: 690735
Blocks: 693426 693427
  Show dependency treegraph
Reported: 2011-04-04 11:58 EDT by Marek Grac
Modified: 2011-12-06 07:22 EST (History)
5 users (show)

See Also:
Fixed In Version: fence-agents-3.1.4-1.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 690735
Last Closed: 2011-12-06 07:22:43 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Marek Grac 2011-04-04 11:58:43 EDT
+++ This bug was initially created as a clone of Bug #690735 +++

Description of problem:
There is a bug in fence_ipmilan agent: it exits with result code 2 on "monitor"/"status" command if chassis is powered off. Instead it should return 0 because "monitor" command should return fence device status, not chassis status.

Version-Release number of selected component (if applicable):

--- Additional comment from bubble@hoster-ok.com on 2011-03-25 04:24:11 EDT ---

Created attachment 487504 [details]
Patch to fix issue

--- Additional comment from mgrac@redhat.com on 2011-03-25 06:32:16 EDT ---

Created attachment 487518 [details]
Proposed patch


Thanks for reporting this bug. You are right, we should return 0 if the fence device is working. 

I have created a patch that should fix this. Yours patch will work correctly for 'monitor' but it will break 'status' as fence agent won't be able to return that chassis is powered off.

--- Additional comment from bubble@hoster-ok.com on 2011-03-25 08:11:02 EDT ---

Looking through the code, it was probably just forgotten (ret is set to 0 for both on and off states but not used then).

I agree, your patch is cleaner.
Comment 10 errata-xmlrpc 2011-12-06 07:22:43 EST
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.


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