Bug 974838 - Clean field of secondary power management via rest api failed
Summary: Clean field of secondary power management via rest api failed
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi
Version: 3.2.0
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: ---
: 3.3.0
Assignee: Eli Mesika
QA Contact: Artyom
URL:
Whiteboard: infra
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-16 11:08 UTC by Artyom
Modified: 2016-02-10 19:18 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-07-22 13:56:22 UTC
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
log on local run (437.87 KB, text/x-log)
2013-06-16 11:08 UTC, Artyom
no flags Details

Description Artyom 2013-06-16 11:08:16 UTC
Description of problem:
Clean field of secondary power management via rest api failed

Version-Release number of selected component (if applicable):
rhevm 3.3 is1

How reproducible:
1) Add host to rhevm
2) Fill power managers fields for primary and secondary
3) Try to clear fields of secondary power management via rest api

Steps to Reproduce:
1. See above
2.
3.

Actual results:
Error: Bad request 400

Expected results:
empty fields of secondary power management in GUI
(address='', user='', password='', port='', slot=''...)
No power management with order 2 in agents category in rest

Additional info:
log on local run

Comment 1 Artyom 2013-06-16 11:08:45 UTC
Created attachment 761826 [details]
log on local run

Comment 2 Michael Pasternak 2013-06-16 11:17:13 UTC
(In reply to Artyom from comment #0)
> Description of problem:
> Clean field of secondary power management via rest api failed
> 
> Version-Release number of selected component (if applicable):
> rhevm 3.3 is1
> 
> How reproducible:
> 1) Add host to rhevm
> 2) Fill power managers fields for primary and secondary
> 3) Try to clear fields of secondary power management via rest api
> 
> Steps to Reproduce:
> 1. See above
> 2.
> 3.
> 
> Actual results:
> Error: Bad request 400
> 
> Expected results:

not sure i understand what is the bug here, you send:

            <agent type="apc">
                <address></address>
                <username></username>
                <password></password>
                <concurrent>false</concurrent>
                <order>2</order>
            </agent>

and that's exactly what you see in UI:

> empty fields of secondary power management in GUI
> (address='', user='', password='', port='', slot=''...)
> No power management with order 2 in agents category in rest
> 
> Additional info:
> log on local run

Comment 3 Michael Pasternak 2013-06-16 11:19:21 UTC
(In reply to Michael Pasternak from comment #2)
> (In reply to Artyom from comment #0)
> > Description of problem:
> > Clean field of secondary power management via rest api failed
> > 
> > Version-Release number of selected component (if applicable):
> > rhevm 3.3 is1
> > 
> > How reproducible:
> > 1) Add host to rhevm
> > 2) Fill power managers fields for primary and secondary
> > 3) Try to clear fields of secondary power management via rest api
> > 
> > Steps to Reproduce:
> > 1. See above
> > 2.
> > 3.
> > 
> > Actual results:
> > Error: Bad request 400
> > 
> > Expected results:
> 
> not sure i understand what is the bug here, you send:
> 
>             <agent type="apc">
>                 <address></address>
>                 <username></username>
>                 <password></password>
>                 <concurrent>false</concurrent>
>                 <order>2</order>
>             </agent>
> 

i.e you've got a valid error:

<fault>
    <reason>Operation Failed</reason>
    <detail>[var  action  update, var  type  host, validation.vds.power mgmt.address.hostname or ip]</detail>
</fault>

i.e power mgmt.address.hostname/ip are mandatory for the PM

Comment 4 Artyom 2013-06-16 11:49:44 UTC
But we are talk about secondary pm, if you via rhevm gui will clear ip, username and password it will apply without any error, because you also have primary pm.

Comment 5 Artyom 2013-06-16 11:52:51 UTC
So I think give empty fields of secondary pm must just delete it from agents

Comment 6 Barak Dagan 2013-06-16 13:20:39 UTC
We couldn't find a way to delete PMs using the agent method. In the old method sending empty field results removing the PM.

Comment 7 Michael Pasternak 2013-06-16 13:22:28 UTC
(In reply to Artyom from comment #4)
> But we are talk about secondary pm, if you via rhevm gui will clear ip,
> username and password it will apply without any error, because you also have
> primary pm.

eli?

Comment 8 Michael Pasternak 2013-06-16 13:30:35 UTC
(In reply to Barak Dagan from comment #6)
> We couldn't find a way to delete PMs using the agent method. In the old
> method sending empty field results removing the PM.

this is incorrect way for doing DELETE, should be done by supplying an empty PM
agent e.g <agent type="ilo2"/> on host UPDATE.

also the behaviour should remain the same in 3.3, this ^ is the only way
for deleting it and should work in both 3.2 and 3.3

Comment 9 Eli Mesika 2013-06-16 14:42:02 UTC
(In reply to Michael Pasternak from comment #7)
> (In reply to Artyom from comment #4)
> > But we are talk about secondary pm, if you via rhevm gui will clear ip,
> > username and password it will apply without any error, because you also have
> > primary pm.
> 
> eli?

Please elaborate what is the information needed here ...

Comment 10 Barak 2013-07-01 08:56:01 UTC
The workaround to delete a power management device is actually send an empty collection of agents, and than re-add the PM agent he wants to leave.


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