Bug 1268949 - Wrong error message while changing template of vm
Summary: Wrong error message while changing template of vm
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: RestAPI
Version: 4.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ovirt-4.0.0-alpha
: 4.0.0
Assignee: Marek Libra
QA Contact: meital avital
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-05 17:34 UTC by jniederm
Modified: 2016-08-17 14:37 UTC (History)
6 users (show)

Fixed In Version: ovirt 4.0.0 alpha1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-17 14:37:02 UTC
oVirt Team: Virt
Embargoed:
rule-engine: ovirt-4.0.0+
rule-engine: planning_ack+
michal.skrivanek: devel_ack+
mavital: testing_ack+


Attachments (Terms of Use)
part of engine log generated during the processing of the request (2.23 KB, text/plain)
2015-10-05 17:34 UTC, jniederm
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 51314 0 master MERGED core: The error msg for Template ID change was improved 2016-01-06 10:59:32 UTC

Description jniederm 2015-10-05 17:34:33 UTC
Created attachment 1080014 [details]
part of engine log generated during the processing of the request

Description of problem:
Misleading error message is printed as result of an attempt to change template of stopped (Down) vm:
"There was an attempt to change VM values while the VM is not down. Please shut down the VM in order to modify these properties."

Version-Release number of selected component (if applicable):
4.0 master, commit e94ce26

How reproducible:
100%

Steps to Reproduce:
1. Create a template with two versions
2. Create a vm based on the first version of the template (and let that vm in down state)
3. Execute following rest request
PUT /vms/{new-vm-id}
<vm>
  <template id="{id-if-the-second-versiton-of-the-template}"/>
</vm>

Actual results:
400 Bad Request
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<fault>
    <reason>Operation Failed</reason>
    <detail>[There was an attempt to change VM values while the VM is not down. Please shut down the VM in order to modify these properties.]</detail>
</fault>

Expected results:
Either real explanation of the reason why template can't be changed or the template of vm to be changed.

Comment 1 Juan Hernández 2015-10-05 17:39:46 UTC
Does this happen in 3.6 as well?

Comment 2 jniederm 2015-10-06 10:21:59 UTC
Yes, it does.

Comment 3 Marek Libra 2016-01-04 14:01:32 UTC
The template can be changed for pool VMs only with additional requirement on keeping the template version chain.

Patch improving the error message has been posted.

Comment 4 Michal Skrivanek 2016-01-05 10:16:08 UTC
it would be interesting to unblock changing of the template for any thin && stateless VM. It should work

Comment 5 Red Hat Bugzilla Rules Engine 2016-01-06 14:30:15 UTC
Fixed bug tickets must have version flags set prior to fixing them. Please set the correct version flags and move the bugs back to the previous status after this is corrected.

Comment 6 Red Hat Bugzilla Rules Engine 2016-01-06 14:43:11 UTC
Fixed bug tickets must have version flags set prior to fixing them. Please set the correct version flags and move the bugs back to the previous status after this is corrected.

Comment 7 Red Hat Bugzilla Rules Engine 2016-01-06 14:43:11 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 8 Red Hat Bugzilla Rules Engine 2016-01-06 14:44:37 UTC
Bug tickets must have version flags set prior to targeting them to a release. Please ask maintainer to set the correct version flags and only then set the target milestone.

Comment 9 meital avital 2016-08-16 14:10:35 UTC
Verified on version: 4.0.2.6-0.1.el7ev


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<fault>
    <reason>Operation Failed</reason>
    <detail>[Cannot edit VM. The Template can be changed for pool VMs only.]</detail>
</fault>


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