Bug 974838 - Clean field of secondary power management via rest api failed
Clean field of secondary power management via rest api failed
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi (Show other bugs)
3.2.0
Unspecified Linux
unspecified Severity unspecified
: ---
: 3.3.0
Assigned To: Eli Mesika
Artyom
infra
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-16 07:08 EDT by Artyom
Modified: 2016-02-10 14:18 EST (History)
12 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-22 09:56:22 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Infra
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Artyom 2013-06-16 07:08:16 EDT
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 07:08:45 EDT
Created attachment 761826 [details]
log on local run
Comment 2 Michael Pasternak 2013-06-16 07:17:13 EDT
(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 07:19:21 EDT
(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 07:49:44 EDT
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 07:52:51 EDT
So I think give empty fields of secondary pm must just delete it from agents
Comment 6 Barak Dagan 2013-06-16 09:20:39 EDT
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 09:22:28 EDT
(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 09:30:35 EDT
(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 10:42:02 EDT
(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 04:56:01 EDT
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.