Description of problem: Impossible to edit HE VM via REST API Version-Release number of selected component (if applicable): rhevm-3.6.5.3-0.1.el6.noarch How reproducible: Always Steps to Reproduce: 1. Deploy hosted engine and add storage domain to engine to auto-import it 2. Try to edit HE VM via REST <vm> <name>HostedEngine1</name> </vm> 3. Actual results: <fault> <reason>Operation Failed</reason> <detail>[There was an attempt to change Hosted Engine VM values that are locked.]</detail> </fault> Expected results: Possible to edit HE VM values that we permit to edit via UI Additional info:
Please show the exact request you used.
I did PUT request, you can see it under step 2, but I also tried the same thing for memory and cpu: <vm> <memory>some_value</memory> </vm> <vm> <cpu> <topologysockets="4"cores="1"threads="1"/> </cpu> </vm>
Ok, the VM name should not be editable so that is correct. But the two others should be. I found out that the REST api change for memory tries to update the diskList attribute and that prevents the rest of the change from being applied.
Another check that fails in CanDoAction is isNumOfMonitorsLegal. And that happens although both db and params value of numOfMonitors is 1.
Both issues happen only when the edit is done over REST.
*** Bug 1327891 has been marked as a duplicate of this bug. ***
(In reply to Martin Sivák from comment #4) > Another check that fails in CanDoAction is isNumOfMonitorsLegal. And that > happens although both db and params value of numOfMonitors is 1. That's a different bug: https://bugzilla.redhat.com/show_bug.cgi?id=1328921
Checked on rhevm-3.6.6-0.1.el6.noarch PUT request: <vm> <memory>8589934592</memory> </vm> response: <fault> <reason>Operation Failed</reason> <detail>[Cannot edit VM. Illegal number of monitors is provided, max allowed number of monitors is 1 for VNC and the max number in the ValidNumOfMonitors configuration variable for SPICE., Cannot edit VM. Illegal number of monitors is provided, max allowed number of monitors is 1 for VNC and the max number in the ValidNumOfMonitors configuration variable for SPICE.]</detail> </fault>
Missed 3.6.6, moving to 3.6.7.
(In reply to Artyom from comment #8) > Checked on rhevm-3.6.6-0.1.el6.noarch > PUT request: > <vm> > <memory>8589934592</memory> > </vm> > > response: > <fault> > <reason>Operation Failed</reason> > <detail>[Cannot edit VM. Illegal number of monitors is provided, max allowed > number of monitors is 1 for VNC and the max number in the ValidNumOfMonitors > configuration variable for SPICE., Cannot edit VM. Illegal number of > monitors is provided, max allowed number of monitors is 1 for VNC and the > max number in the ValidNumOfMonitors configuration variable for > SPICE.]</detail> > </fault> @artyom What you witnessed is https://bugzilla.redhat.com/show_bug.cgi?id=1328921. Also try editing the HE VM from the GWT frontend and you will see that it does not work either. It leaves probably most of the hosted engine imports in an inconsistent state (important for the edit VM feature, HE itself will work as expeced). Make sure that you select SPICE as display device when doing the 'hosted-engine --deploy' procedure to work around that issue.
(In reply to Yaniv Kaul from comment #9) > Missed 3.6.6, moving to 3.6.7. I could not come up fast enough with a fix for https://bugzilla.redhat.com/show_bug.cgi?id=1328921 but this one should be fixed in 3.6.6. Another QA run with the additional info provided above should make the tests pass.
Artyom - please follow comment 10 so we'll be able to asses this bug inclusion to 3.6.6
I rechecked update of HE VM via REST on deploy over spice console, and still have the same error: [Cannot edit VM. Illegal number of monitors is provided, max allowed number of monitors is 1 for VNC and the max number in the ValidNumOfMonitors configuration variable for SPICE., Cannot edit VM. Illegal number of monitors is provided, max allowed number of monitors is 1 for VNC and the max number in the ValidNumOfMonitors configuration variable for SPICE.] Update via webadmin works fine.
(In reply to Artyom from comment #13) > I rechecked update of HE VM via REST on deploy over spice console, and still > have the same error: > [Cannot edit VM. Illegal number of monitors is provided, max allowed number > of monitors is 1 for VNC and the max number in the ValidNumOfMonitors > configuration variable for SPICE., Cannot edit VM. Illegal number of > monitors is provided, max allowed number of monitors is 1 for VNC and the > max number in the ValidNumOfMonitors configuration variable for SPICE.] > Why would we ever want to change the number of monitors for hosted-engine? I suggest we concentrate on the important stuff. Do they work? (I saw some comment from you on timezone, for example). > Update via webadmin works fine.
(In reply to Artyom from comment #13) > I rechecked update of HE VM via REST on deploy over spice console, and still > have the same error: > [Cannot edit VM. Illegal number of monitors is provided, max allowed number > of monitors is 1 for VNC and the max number in the ValidNumOfMonitors > configuration variable for SPICE., Cannot edit VM. Illegal number of > monitors is provided, max allowed number of monitors is 1 for VNC and the > max number in the ValidNumOfMonitors configuration variable for SPICE.] > > Update via webadmin works fine. Artyom what exactly is the change you're sending, num of monitors ?
I send update only for memory parameter <vm> <memory>8589934592</memory> </vm> I remember we had the same problem via UI, it also tried to update some additional stuff and not only parameters that I changed.
console is VNC? is changing to SPICE and editing works?
No, console is SPICE from HE deployment.
I could confirm it now too that it works neither with SPICE nor VNC. I am currently verifying a possible fix.
Should this be modified?
(In reply to Yaniv Dary from comment #20) > Should this be modified? 57298 is still on review
Required for HE upgrade to 4.0.
Not sure it can be in MODIFIED sate without a build (of 3.6.8).
(In reply to Yaniv Kaul from comment #23) > Not sure it can be in MODIFIED sate without a build (of 3.6.8). I thought it is modified when all patches are merged (they are in 3.6 branch now) but of course QE can just test it after the first build.
Moving back to post since there will be another 3.6.7 build I can catch.
Verified on rhevm-3.6.7.4-0.1.el6.noarch 1) Update VM memory - PASS 2) Update VM number of cores - PASS 3) Add VNIC to HE VM - PASS