Bug 1328591

Summary: Unable to get Host power management options configured via rhevm-shell with Power Management Options Defined.
Product: Red Hat Enterprise Virtualization Manager Reporter: Sachin Raje <sraje>
Component: ovirt-engine-cliAssignee: Juan Hernández <juan.hernandez>
Status: CLOSED NOTABUG QA Contact: Pavel Stehlik <pstehlik>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.6.4CC: fdeutsch, gklein, lsurette, rbalakri, Rhev-m-bugs, srevivo, ykaul
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-04-20 09:38:52 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:

Comment 1 Sachin Raje 2016-04-19 19:29:32 UTC
Description of problem:
Unable to get Host power management options configured via rhevm-shell with Power Management Options Defined.


Version-Release number of selected component (if applicable):
rhevm-3.6.4.1-0.1.el6.noarch
vdsm-4.17.23-0.el7ev.noarch


How reproducible: Always


Steps to Reproduce:
1. Connect to rhevm shell
2. Below command to add host from rhevm-shell completed without any errors but host does not show any power management options added.

# add host --name x.x.x.x --address x.x.x.x --cluster-name Default --root_password redhat --power_management-enabled True --power_management-agents-agent "agent.type=drac7,agent.address=192.168.3.2,agent.username=pm_username,agent.password=pm_password" --power_management-options-option "option.name=privlvl:OPERATOR,option.value=lanplus:1,option.value=delay:10,option.value=power_wait:8"
3.

Actual results:
Host is getting added but power management options does not get configured.


Expected results:
Host power management options should be configured as per provided details.


Additional info:

Comment 2 Juan Hernández 2016-04-20 09:38:52 UTC
That command is using the support for multiple fencing agents introduced in 3.6, and then the old support for setting options for a single fencing agent, this it will never work. In addition the CLI doesn't support nested lists (the options are list inside the list of agents), see bug 977674.

Since version 3.6 the correct way to do this is to first add the host, without the fencing options:

  # add host --name x.x.x.x --address x.x.x.x --cluster-name Default --root_password redhat --power_management-enabled true

And then add the power management agent, with its options:

  # add fenceagent --parent-host-name x.x.x.x --order 1 --type drac7 --address 192.168.3.2 --username pm_username --password pm_password --options-option "option.name=privlvl,option.value=OPERATOR" --options-option "option.name=lanplus,option.value=1" --options-option "option.name=delay,option.value=10" --options-option "option.name=power_wait,option.value=8"