Bug 1417597 - Failed to update template
Summary: Failed to update template
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Virt
Version: 4.1.0.3
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ovirt-4.1.0-rc
: ---
Assignee: Arik
QA Contact: meital avital
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-30 11:52 UTC by Kobi Hakimi
Modified: 2019-04-18 09:05 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-02-15 15:02:59 UTC
oVirt Team: Virt
Embargoed:
gklein: ovirt-4.1+
gklein: blocker+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 71561 0 master MERGED core: treat template's actual disk size as editable field 2017-02-02 10:18:40 UTC
oVirt gerrit 71566 0 ovirt-engine-4.1 MERGED core: treat template's actual disk size as editable field 2017-02-02 12:06:38 UTC
oVirt gerrit 71572 0 master MERGED core: VmTemplate.actualDiskSize property not cached 2017-02-06 14:51:30 UTC
oVirt gerrit 71591 0 ovirt-engine-4.1.0.z MERGED core: treat template's actual disk size as editable field 2017-02-02 14:13:06 UTC

Description Kobi Hakimi 2017-01-30 11:52:12 UTC
Description of problem:
Failed to update Template

Version-Release number of selected component (if applicable):
 Red Hat Virtualization Manager Version: 4.1.0.3-0.1.el7 
installed as part of rhvm-appliance-20170126.0-1

How reproducible:
100%

Steps to Reproduce:
1.Install the rhvm-appliance
2.Import Template from Glance
3.Go to Template tab and try to edit the above template.
In my case I tried to change the template name

Actual results:
Get the following error:
Error while executing action:

golden_mixed_virtio_template_:

    Failed updating the properties of the VM template.


in engine.log:
2017-01-30 06:31:19,454-05 WARN  [org.ovirt.engine.core.bll.UpdateVmTemplateCommand] (default task-21) [ad3f1480-4936-428a-bed8-fa5f3fccd8e2] Validation of action 'UpdateVmTemplate' failed for user admin@internal-authz. Reasons: VAR__ACTION__UPDATE,VAR__TYPE__VM_TEMPLATE,VMT_CANNOT_UPDATE_ILLEGAL_FIELD

Expected results:
Succeed to update without any error :)

Additional info:
 - Its working in the last build:
   Red Hat Virtualization Manager Version: 4.1.0.2-0.2.el7 

 - The hosted engine url is:
   https://hosted-engine-02.scl.lab.tlv.redhat.com

Comment 1 Tal Nisan 2017-01-30 12:31:33 UTC
Jakub, if I'm not mistaken it's a duplicate of a bug you fixed, can you please take a look?

Comment 2 jniederm 2017-01-30 13:40:12 UTC
Yes, it looks like duplicate of bug 1409579.

Comment 3 Tal Nisan 2017-01-30 13:41:22 UTC

*** This bug has been marked as a duplicate of bug 1409579 ***

Comment 4 sefi litmanovich 2017-02-01 13:09:59 UTC
Re opening as this bug keeps occurring regardless to bug 1409579 which was verified on this version (mysterious). 

Description of problem:
Edit template that was imported from a glance repository fails.

2017-02-01 14:18:19,256+02 WARN  [org.ovirt.engine.core.dal.job.ExecutionMessageDirector] (default task-16) [b270074f-ce4a-4771-b016-a71eddb93c96] The message key 'UpdateVmTemplate' is missing from 'bundles/ExecutionMessages'
2017-02-01 14:18:19,287+02 WARN  [org.ovirt.engine.core.bll.UpdateVmTemplateCommand] (default task-16) [b270074f-ce4a-4771-b016-a71eddb93c96] Validation of action 'UpdateVmTemplate' failed for user admin@internal-authz. Reasons: VAR__ACTION__UPDATE,VAR__TYPE__VM_TEMPLATE,VMT_CANNOT_UPDATE_ILLEGAL_FIELD

This is quite strange as this was the same issue with this previous bug:
https://bugzilla.redhat.com/show_bug.cgi?id=1409579

Only this time, cluster upgrade with these exact same templates will succeed, but normal edit template keeps failing

Version-Release number of selected component (if applicable):
rhevm-4.1.0.3-0.1.el7.noarch

How reproducible:
always

Steps to Reproduce:
1. Import an image from glance as template.
2. Edit template - any field in the template.
3.

Actual results:
Fails to update template with the error mentioned above

Expected results:
Succeeds to update template.

Additional info:

Comment 5 Yaniv Kaul 2017-02-01 14:37:20 UTC
Arik - is it related to your changes?

Comment 6 Arik 2017-02-01 14:51:12 UTC
(In reply to Yaniv Kaul from comment #5)
> Arik - is it related to your changes?

No, it seems like a side-effect of the solution to bz 1409579, but Jakub is investigating.

Comment 7 Michael Burman 2017-02-01 15:13:36 UTC
Hi

This bug is relevant for all templates. not only for the one's that create/imported as template from glance. 

A new template which created from a new VM will provide the same result and failure.

Comment 8 sefi litmanovich 2017-02-01 15:38:57 UTC
(In reply to Michael Burman from comment #7)
> Hi
> 
> This bug is relevant for all templates. not only for the one's that
> create/imported as template from glance. 
> 
> A new template which created from a new VM will provide the same result and
> failure.

Just to clarify, on my env I was able to create a new template from a new vm and then edit the template.. so not sure what exactly are the conditions for failure here.

Comment 9 Arik 2017-02-01 16:07:26 UTC
(In reply to sefi litmanovich from comment #8)
> (In reply to Michael Burman from comment #7)

Every template that is created from a VM that had at least one disk with actual size > 0 (that is, the VM was started and something was actually writing to the disk) will not be updatable in light of the fix for bz 1409579.
Sefi, it you had a template that you were able to update then this template had no disks or the actual size of all its disks is 0.

Comment 10 jniederm 2017-02-02 12:34:24 UTC
The bot is too eager regarding attaching patches.

Comment 11 Eyal Edri 2017-02-02 14:18:09 UTC
Is it possible to add a test to oVirt system tests that will catch such an error?
Maybe updating template name?

Comment 12 Arik 2017-02-02 14:49:09 UTC
(In reply to Eyal Edri from comment #11)
Sure, must be feasible. That's a good idea.

Comment 13 Eyal Edri 2017-02-05 14:56:13 UTC
Great, I've opened https://bugzilla.redhat.com/show_bug.cgi?id=1419341 to track adding the test.


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