Bug 1099903 - After adding two power management agents to a host, impossible to remove/override second agent
Summary: After adding two power management agents to a host, impossible to remove/over...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi
Version: 3.4.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 3.5.0
Assignee: Eli Mesika
QA Contact: Shai Revivo
URL:
Whiteboard: infra
Depends On:
Blocks: rhev3.5beta 1156165
TreeView+ depends on / blocked
 
Reported: 2014-05-21 12:57 UTC by sefi litmanovich
Modified: 2016-02-10 19:26 UTC (History)
11 users (show)

Fixed In Version: ovirt-3.5.0-alpha2
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-17 17:16:03 UTC
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 28101 0 master MERGED core: Enable to modify/remove PM agents via API. Never

Description sefi litmanovich 2014-05-21 12:57:30 UTC
Description of problem:

1) add two power management to host:

--insecure \
--request PUT \
--header "Accept: application/xml" \
--header "Content-Type: application/xml" \
--user "${user}:${password}" \
--data "

url:https://10.35.xx.xx:8443/ovirt-engine/api/hosts/[host_id]
<host>
    <power_management type="ipmilan">
        <enabled>true</enabled>
        <address>{agent1_address}</address>
        <username>{agent_username}</username>
        <password>{agent_password}</password>
        <pm_proxies>
            <pm_proxy>
                <type>cluster</type>
            </pm_proxy>
            <pm_proxy>
                <type>dc</type>
            </pm_proxy>
        </pm_proxies>
        <agents>
            <agent type="ipmilan">
                <address>{agent1_address}</address>
                <username>{agent1_username}</username>
                <password>{agent1_password}</password>
                <concurrent>false</concurrent>
                <order>1</order>
            </agent>
            <agent type="apc_snmp">
                <address>{agent2_address}</address>
                <username>{agent2_username}</username>
                <password>{agent2_password}</password>
                <concurrent>false</concurrent>
                <order>2</order>
            </agent>
        </agents>
    </power_management>
</host>

two PM agents successfully added to the host.

2) now let's say I want only the first agent without the second. issued:

--insecure \
--request PUT \
--header "Accept: application/xml" \
--header "Content-Type: application/xml" \
--user "${user}:${password}" \
--data "

url:https://10.35.xx.xx:8443/ovirt-engine/api/hosts/[host_id]

<host>    
<power_management type="ipmilan">
            <enabled>true</enabled>
            <address>{agent1_address}</address>
            <username>{agent_username}</username>
            <password>{agent_password}</password>
            <pm_proxies>
                <pm_proxy>
                    <type>cluster</type>
                </pm_proxy>
                <pm_proxy>
                    <type>dc</type>
                </pm_proxy>
            </pm_proxies>
            <agents>
                <agent type="ipmilan">
                     <address>{agent1_address}</address>
                    <username>{agent1_username}</username>
                    <password>{agent1_password}</password>
                    <concurrent>false</concurrent>
                    <order>1</order>
                </agent>
            </agents>
        </power_management>
</host>

this had no effect at all, the second agent was still there with all it's credentials.

3) now let's say I want to try to remove both (disable power_management on the host) and then add only one pm agent:

a)
--insecure \
--request PUT \
--header "Accept: application/xml" \
--header "Content-Type: application/xml" \
--user "${user}:${password}" \
--data "

url:https://10.35.xx.xx:8443/ovirt-engine/api/hosts/[host_id]

<host>    
<power_management type="ipmilan">
        <enabled>false</enabled>
        </power_management>
</host>

b)
--insecure \
--request PUT \
--header "Accept: application/xml" \
--header "Content-Type: application/xml" \
--user "${user}:${password}" \
--data "

url:https://10.35.xx.xx:8443/ovirt-engine/api/hosts/[host_id]

<host>    
<power_management type="ipmilan">
            <enabled>true</enabled>
            <address>{agent1_address}</address>
            <username>{agent1_username}</username>
            <password>{agent1_password}</password>
            <pm_proxies>
                <pm_proxy>
                    <type>cluster</type>
                </pm_proxy>
                <pm_proxy>
                    <type>dc</type>
                </pm_proxy>
            </pm_proxies>
          </power_management>
</host>

this also results with last added pm as first agent and with the original second agent still there.



How reproducible:

always


Expected results:

There should be a way to remove the credentials of previously configured agent.
I would expect that a new request with new configurations will run over the old one.


Additional info:

Comment 1 sefi litmanovich 2014-06-24 16:00:04 UTC
Verified on ovirt-engine-3.5.0-0.0.master.20140605145557.git3ddd2de.el6.noarch.

Comment 2 Eyal Edri 2015-02-17 17:16:03 UTC
rhev 3.5.0 was released. closing.


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