Bug 1420416

Summary: Update template with virtio-scsi enabled fails
Product: [oVirt] ovirt-engine Reporter: Petr Matyáš <pmatyas>
Component: Backend.CoreAssignee: Shahar Havivi <shavivi>
Status: CLOSED WORKSFORME QA Contact: meital avital <mavital>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 4.1.0CC: bugs, ipinto, lbednar, mavital, tjelinek
Target Milestone: ---Keywords: AutomationBlocker
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-14 08:35:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
complete engine.log none

Description Petr Matyáš 2017-02-08 15:28:38 UTC
Description of problem:
When requesting an update of a template through v4 API with "<template><virtio_scsi><enabled>true</enabled></virtio_scsi></template>" it returns 400 Failed updating the properties of the VM template. and reason Operation Failed.
I'm also unable to change this through UI.

Version-Release number of selected component (if applicable):
4.1.0-12

How reproducible:
always

Steps to Reproduce:
1. have a template in rhevm
2. curl -v -u "$USERNAME@$DOMAIN:$PASSWORD" -H "Content-type: application/xml" --insecure -X PUT https://$HOSTNAME/ovirt-engine/api/templates/$TEMPLATEID -d "<template><virtio_scsi><enabled>true</enabled></virtio_scsi></template>"

Actual results:
400 operation failed

Expected results:
successfully changed parameter of a template

Additional info:
Only relevant lines in engine.log:
2017-02-08 17:21:09,206+02 INFO  [org.ovirt.engine.core.sso.utils.AuthenticationUtils] (default task-6) [570f8235] User admin@internal successfully logged in with scopes: ovirt-ap
p-api ovirt-ext=token-info:authz-search ovirt-ext=token-info:public-authz-search ovirt-ext=token-info:validate
2017-02-08 17:21:09,224+02 INFO  [org.ovirt.engine.core.bll.aaa.CreateUserSessionCommand] (default task-5) [61c17b4c] Running command: CreateUserSessionCommand internal: false.
2017-02-08 17:21:09,244+02 WARN  [org.ovirt.engine.core.dal.job.ExecutionMessageDirector] (default task-5) [bf6e796c-2998-41ea-8704-787943a7f42e] The message key 'UpdateVmTemplate
' is missing from 'bundles/ExecutionMessages'
2017-02-08 17:21:09,253+02 WARN  [org.ovirt.engine.core.bll.UpdateVmTemplateCommand] (default task-5) [bf6e796c-2998-41ea-8704-787943a7f42e] Validation of action 'UpdateVmTemplate
' failed for user admin@internal-authz. Reasons: VAR__ACTION__UPDATE,VAR__TYPE__VM_TEMPLATE,VMT_CANNOT_UPDATE_ILLEGAL_FIELD
2017-02-08 17:21:09,257+02 ERROR [org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (default task-5) [] Operation Failed: [Failed updating the properties of the VM te
mplate.]
2017-02-08 17:21:09,261+02 INFO  [org.ovirt.engine.core.bll.aaa.LogoutSessionCommand] (default task-5) [37ba3b68] Running command: LogoutSessionCommand internal: false.
2017-02-08 17:21:09,264+02 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-5) [37ba3b68] EVENT_ID: USER_VDC_LOGOUT(31), Correlation ID:
37ba3b68, Call Stack: null, Custom Event ID: -1, Message: User admin@internal-authz logged out.
2017-02-08 17:21:14,896+02 INFO  [org.ovirt.engine.core.sso.servlets.OAuthRevokeServlet] (default task-4) [] User admin@internal successfully logged out
2017-02-08 17:21:14,904+02 INFO  [org.ovirt.engine.core.bll.aaa.TerminateSessionsForTokenCommand] (default task-15) [77d85417] Running command: TerminateSessionsForTokenCommand in
ternal: true.
2017-02-08 17:21:14,920+02 INFO  [org.ovirt.engine.core.sso.servlets.OAuthRevokeServlet] (default task-12) [fab532a] User admin@internal successfully logged out
2017-02-08 17:21:14,926+02 INFO  [org.ovirt.engine.core.bll.aaa.TerminateSessionsForTokenCommand] (default task-8) [79875e4e] Running command: TerminateSessionsForTokenCommand int
ernal: true.

Comment 1 Yaniv Kaul 2017-02-09 07:41:26 UTC
Please provide complete engine log.
Did it work for you in the past?

Meital - did you encounter this?

Comment 2 Petr Matyáš 2017-02-09 08:36:01 UTC
Created attachment 1248748 [details]
complete engine.log

Comment 3 Tomas Jelinek 2017-02-13 07:43:35 UTC
will set targets once there will be an understanding of when have this regression have been introduced.

Comment 4 Israel Pinto 2017-02-14 07:34:35 UTC
I check it with version 4.1.1-0.1.el7 and it works.
(In reply to Yaniv Kaul from comment #1)
> Please provide complete engine log.
> Did it work for you in the past?
> 
> Meital - did you encounter this?

I check it with version 4.1.1-0.1.el7 and it works.

Comment 5 Petr Matyáš 2017-02-14 08:35:46 UTC
Yeah, as Israel says, this works on 4.1.1-1 so some patch must have fixed this.