Bug 1286045

Summary: fence_ipmilan missing diag as reboot method
Product: Red Hat Enterprise Linux 7 Reporter: Dominique Martinet <dominique.martinet>
Component: fence-agentsAssignee: Marek Grac <mgrac>
Status: CLOSED ERRATA QA Contact: cluster-qe <cluster-qe>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.1CC: cluster-maint, mjuricek, mnovacek, oalbrigt, rmarigny, sbradley
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: fence-agents-4.0.11-34.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-04 04:48:26 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: 1203710    
Attachments:
Description Flags
suggested patch
none
Upstream patch updated for RHEL7 none

Description Dominique Martinet 2015-11-27 10:14:02 UTC
Created attachment 1099627 [details]
suggested patch

Description of problem:
The fence_ipmilan util got a 'diag' method added in el6 back in 2011, which got lost in the process of switching to a python version of the command for el7.

We feel that diag is still very useful and should be added back


Version-Release number of selected component (if applicable):
fence-agents-ipmilan-4.0.11-13.el7_1.1.x86_64
fence-agents-common-4.0.11-13.el7_1.1.x86_64

Steps to Reproduce:
1. Use fence_ipmilan with --method=diag
2.
3.

Actual results:
Option is refused and nothing is done

Expected results:
an ipmitool chassis power diag command is issued.
If your server is not configured to crash on this command (impitool chassis power diag), you will get something like this in dmesg (otherwise it'll take a kdump):
Uhhuh. NMI received for unknown reason 21 on CPU 0.
Do you have a strange power saving mode enabled?
Dazed and confused, but trying to continue


Additional info:
Patch suggestion from Bruno Travouillon (bruno.travouillon) is attached.

Comment 1 Marek Grac 2015-12-02 13:11:17 UTC
A bit differnt tatch is now in upstream:

https://github.com/ClusterLabs/fence-agents/commit/7e65180162a54ff8c6d4c883be73376a3385dfe7

use with --action=diag

main reason for --action=diag instead of --method=diag is that --action was used in older versions of fence_ipmilan

Comment 2 Dominique Martinet 2015-12-14 16:56:57 UTC
This patch does not work as expected, please see comment on github patch:
https://github.com/ClusterLabs/fence-agents/commit/7e65180162a54ff8c6d4c883be73376a3385dfe7#commitcomment-14964253

Quoting the interesting part here for posterity/notifications:
This does not behave as expected at all when I tried this?
I had to specify -m cycle to get the expected behavior, otherwise it does ipmitool chassis power off then waits till off then turns it back on (default -m offon)
e.g. 'fence_ipmilan -v -a IP -o diag -m cycle -P' worked but 'fence_ipmilan -v -a IP -o diag -P' did exactly the same as 'fence_ipmilan -v -a IP -o reboot -P'

Comment 3 Marek Grac 2015-12-16 09:45:08 UTC
@Dominique:

you are right, fixed in upstream. Now, I have access to ipmi which allows diag, so it was tested properly.

Comment 4 Dominique Martinet 2015-12-17 18:08:44 UTC
Fix works for me, thank you.

Comment 5 Oyvind Albrigtsen 2016-03-14 09:50:23 UTC
Created attachment 1136105 [details]
Upstream patch updated for RHEL7

Comment 6 Mike McCune 2016-03-28 23:04:30 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 8 Oyvind Albrigtsen 2016-06-01 14:01:03 UTC
*** Bug 1266599 has been marked as a duplicate of this bug. ***

Comment 11 errata-xmlrpc 2016-11-04 04:48:26 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-2373.html