Bug 1190843

Summary: Custom Fencing Agents Require CustomVdsFenceOptionMapping to be set to a value
Product: Red Hat Enterprise Virtualization Manager Reporter: Tobias Fiebig <tfiebig>
Component: ovirt-engineAssignee: Eli Mesika <emesika>
Status: CLOSED NOTABUG QA Contact:
Severity: low Docs Contact:
Priority: unspecified    
Version: 3.5.0CC: ecohen, eedri, emesika, gklein, iheim, lpeer, lsurette, rbalakri, Rhev-m-bugs, tfiebig, yeylon
Target Milestone: ---   
Target Release: 3.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-22 14:04:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tobias Fiebig 2015-02-09 18:03:52 UTC
Description of problem:
When adding a custom fencing agent following example two from http://www.ovirt.org/Custom_Fencing#oVirt_3.5 , a CustomVdsFenceOptionMapping has to be set. If it is unset, testing pm will fail with:

2015-02-05 19:31:08,963 ERROR [org.ovirt.engine.core.bll.FenceExecutor]
(ajp--127.0.0.1-8702-1) Failed to run Power Management command on Host ,
no running proxy Host was found.

In the logs and:

Test Failed, There is no other host in the data center that can be used
to test the power management settings.

In the web-interface.

Setting CustomVdsFenceOptionMapping in vdc_options resolves this issue, and the fencing-agent behaves as expected.
This is annoying, especially if no such mapping is needed, i.e. in case of intel-modular. A self-mapping however also works around the bug.

       682 | CustomVdsFenceOptionMapping         | intelmodular:port=port  | general

How reproducible:
Steps to Reproduce:
1. Create custom fence-script in /usr/sbin/fence_yyy
2. engine-config -s CustomVdsFenceType="yyy"
3. engine-config -s CustomFencePowerWaitParam="yyy=power_wait"

Actual results:
Fencing/Powermanagement is not performed, with the aforementioned error.

Expected results:
Powermanagement is performed as intended.

Comment 2 Eyal Edri 2015-02-11 12:53:30 UTC
removed 3.5.0 flag to allow tr 3.5.1, this still need a 3.5.z flag approved.

Comment 3 Eli Mesika 2015-02-22 10:54:51 UTC
By design each custom agent should appear in the CustomVdsFenceOptionMapping 
if you have no option for intelmodular then the value of CustomVdsFenceOptionMapping should be "intelmodular:"

Please try that and report your findings

Comment 4 Tobias Fiebig 2015-02-22 11:57:07 UTC
Working. Suggest closing this not-a-bug then. Still, it would kind of be nice to see this reflected in the corresponding documentation.

Comment 5 Tobias Fiebig 2015-02-22 12:01:34 UTC
revise that.
With options set as you suggested, i can configure it correctly (adding port=N in the options field), and a test succeedes. After saving the configuration, the port-parameter however disappears from the options list, and power-management fails as the plug-specification is missing.

Comment 6 Eli Mesika 2015-02-22 12:11:01 UTC
I had updated the documentation to include what you had suggested in comment #4

Can you please specify why you are sending the port field in the options and not using the dedicated port field with the corresponding mappings ?

Comment 7 Tobias Fiebig 2015-02-22 12:17:41 UTC
Because there is no port-field if CustomVdsFenceOptionMapping is set to "intelmodular:". If it is set to "intelmodular:port=port" a field labled "SSH-Port" appears.

Comment 8 Eli Mesika 2015-02-22 13:36:47 UTC
There are only two options 

1) If the PM card requires port then the value should be in the UI SSH Port field and the CustomVdsFenceOptionMapping should map the port to the real parameter of the fence agent ("intelmodular:port=port" for intel modular)

2) If the PM card does not require port then it should appear in CustomVdsFenceOptionMapping with empty settings ("yyy:")

Comment 9 Tobias Fiebig 2015-02-22 14:04:02 UTC
1), i guess. Closing not a bug. Seems like i did not really wrap my head around this mapping stuff yet. Sorry for bothering.