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
Created attachment 761826 [details] log on local run
(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
(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
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.
So I think give empty fields of secondary pm must just delete it from agents
We couldn't find a way to delete PMs using the agent method. In the old method sending empty field results removing the PM.
(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?
(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
(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 ...
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.