Bug 1129596
Summary: | Custom fence agent works with script even if optionMapping parameter is false | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Retired] oVirt | Reporter: | sefi litmanovich <slitmano> | ||||||
Component: | ovirt-engine-core | Assignee: | Eli Mesika <emesika> | ||||||
Status: | CLOSED NOTABUG | QA Contact: | sefi litmanovich <slitmano> | ||||||
Severity: | unspecified | Docs Contact: | |||||||
Priority: | unspecified | ||||||||
Version: | 3.5 | CC: | acathrow, bugs, ecohen, gklein, iheim, oourfali, pstehlik, slitmano, yeylon | ||||||
Target Milestone: | --- | Keywords: | Triaged | ||||||
Target Release: | 3.5.0 | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Whiteboard: | infra | ||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2014-08-25 12:40:00 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: | |||||||||
Attachments: |
|
Can not reproduced om latest 3.5 branch Had two hosts h1 and h2 h1 has apc_snmp PM card h2 with no PM had copied in h2:/usr/sbin fence_apc_snmp to fence_custom run: engine-config -s CustomVdsFenceType="custom" engine-config -s CustomVdsFenceOptionMapping="custom:port=port" restarted engine defined h1 with the custom PM and click TEST => OK stopped engine run: engine-config -s CustomVdsFenceOptionMapping="custom:port=invalid" started engine Clicked TEST on h1 Edit PM TAB => FAILED Get error as expected (attached) Please test again with next build Created attachment 928869 [details]
TEST fails on invalid custom agent parameters
|
Created attachment 926349 [details] engine and vdsm logs Description of problem: When adding a fence agent and providing proxy hosts with fence script for that agent, if an option in CustomVdsFenceOptionMapping is set with a wrong value, no error is raised. Version-Release number of selected component (if applicable): ovirt-engine-3.5.0-0.0.master.20140804172041.git23b558e.el6.noarch How reproducible: always after adding a fence agent type name "test_fence_agent" and copied at the proxy host the ipmilan fence script to a new script "fence_test_fence_agent" I tried some configurations for CustomVdsFenceOptionMapping parameter. 1. CustomVdsFenceOptionMapping="test_fence_Agent:" (same as ipmilan mapping) - restart engine - mapping in ui is similar to ipmilan - test works. in proxy host vdsm.log: Thread-45::DEBUG::2014-08-12 12:29:08,838::API::1153::vds::(fenceNode) fenceNode(addr={ipmilan_agent_address},port=,agent=test_fence_agent,user=root,passwd=XXXX,action=status,secure=,options =) 2. CustomVdsFenceOptionMapping="test_fence_Agent:port=invalid" - restart engine - mapping in ui has ssh port field with no value. - test works. same message in vdsm.log (port=,agent.....), port didn't get the invalid value. 3. CustomVdsFenceOptionMapping="test_fence_Agent:port=ipport" - restart engine - mapping in ui has ssh port field with no value. - test works. same message in vdsm.log (port=,agent.....), port didn't get any value. 4. CustomVdsFenceOptionMapping="test_fence_Agent:blabla=invalid"- restart engine - mapping in ui is similar to ipmilan - test works. same vdsm message. 5. CustomVdsFenceOptionMapping="different_fence_Agent:" - restart engine - mapping has all the different fields (as default apc) - test fails with message: 'Power Management test failed for Host {PROXY_HOST_NAME}.There is no other host in the data center that can be used to test the power management settings.' Basically it seems that defining an agent of type name X and providing a script fence_X and configuring any sort of mapping is enough for the agent to work. Is this the expected functionality, when does 'CustomVdsFenceOptionMapping' values make a difference? Expected results: 1. when option port gets a false value or a non existing option is given e.g. blabla=invalid raise an error. or 2. if not an error then if port is defined with an illegal value (e.g. port=invalid) treat this case as if this parameter wasn't given and do not show this option in ui as well.