Bug 1255405

Summary: User with VmImporterExport on system can't import vm
Product: [oVirt] ovirt-engine Reporter: Ondra Machacek <omachace>
Component: GeneralAssignee: Martin Sivák <msivak>
Status: CLOSED CURRENTRELEASE QA Contact: Ondra Machacek <omachace>
Severity: high Docs Contact:
Priority: high    
Version: 3.6.0CC: alukiano, amureini, bugs, dfediuck, gklein, lpeer, lsurette, mavital, mgoldboi, pstehlik, rbalakri, rgolan, Rhev-m-bugs, sbonazzo, v.astafiev, yeylon, ykaul, ylavi
Target Milestone: ovirt-3.6.3Flags: rule-engine: ovirt-3.6.z+
rule-engine: blocker+
mgoldboi: planning_ack+
rgolan: devel_ack+
pstehlik: testing_ack+
Target Release: 3.6.3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: The new Disk QoS policy permissions were not added to the Import/Export user. Consequence: User with correct Import permissions could not import disks when a QoS setting was associated with it. Fix: All users with Import/Export permissions at the time of update (both built in and custom) get the Disk profile permissions. Result: Importing VM with disk profiles now works properly.
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-18 11:11:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: SLA RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1108153    

Description Ondra Machacek 2015-08-20 13:41:53 UTC
Description of problem:


Version-Release number of selected component (if applicable):
3.6.0-9

How reproducible:
always

Steps to Reproduce:
0. create vm
1. Assign user VmImporterExport role on system
2. export vm with this user
3. import exported vm with this user

Actual results:
import fail

Expected results:
import succeed

Additional info:
https://bugzilla.redhat.com/show_bug.cgi?id=1108153#c25

User has VmImporterExport on system. Export worked fine. Import don't:

2015-07-30 18:20:16,199 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.GetVmsInfoVDSCommand] (default task-3) [] START, GetVmsInfoVDSCommand( GetVmsInfoVDSCommandParameters:{runAsync='true', storagePoolId='41816623-ced4-4661-84c4-d1a2fca396a8', ignoreFailoverLimit='false', storageDomainId='becdc5d5-b622-4fed-9eb2-d04da484cfeb', vmIdList='null'}), log id: 6a9ce136
2015-07-30 18:20:16,246 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.GetVmsInfoVDSCommand] (default task-3) [] FINISH, GetVmsInfoVDSCommand, log id: 6a9ce136
2015-07-30 18:20:22,064 INFO  [org.ovirt.engine.core.bll.ImportVmCommand] (default task-17) [7297c3e6] Lock Acquired to object 'EngineLock:{exclusiveLocks='[vm=<VM_NAME, ACTION_TYPE_FAILED_NAME_ALREADY_USED>, 9c89b6b9-3760-47a9-96a4-5262366de2ed=<VM, ACTION_TYPE_FAILED_VM_IS_BEING_IMPORTED$VmName vm>]', sharedLocks='[de18affc-cbff-42bd-9ced-b7e53f8be288=<REMOTE_VM, ACTION_TYPE_FAILED_VM_IS_BEING_IMPORTED$VmName vm>]'}'
2015-07-30 18:20:22,078 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.GetVmsInfoVDSCommand] (default task-17) [7297c3e6] START, GetVmsInfoVDSCommand( GetVmsInfoVDSCommandParameters:{runAsync='true', storagePoolId='41816623-ced4-4661-84c4-d1a2fca396a8', ignoreFailoverLimit='false', storageDomainId='becdc5d5-b622-4fed-9eb2-d04da484cfeb', vmIdList='null'}), log id: 68245fba
2015-07-30 18:20:22,115 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.GetVmsInfoVDSCommand] (default task-17) [7297c3e6] FINISH, GetVmsInfoVDSCommand, log id: 68245fba
2015-07-30 18:20:22,396 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.DoesImageExistVDSCommand] (default task-17) [7297c3e6] START, DoesImageExistVDSCommand( GetImageInfoVDSCommandParameters:{runAsync='true', storagePoolId='41816623-ced4-4661-84c4-d1a2fca396a8', ignoreFailoverLimit='false', storageDomainId='becdc5d5-b622-4fed-9eb2-d04da484cfeb', imageGroupId='2af451eb-6a65-4902-9016-eea91753db08', imageId='e47c2c29-3b30-436e-85f0-e9c3ed1857a4'}), log id: 66056f1
2015-07-30 18:20:22,441 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.DoesImageExistVDSCommand] (default task-17) [7297c3e6] FINISH, DoesImageExistVDSCommand, return: true, log id: 66056f1
2015-07-30 18:20:22,485 WARN  [org.ovirt.engine.core.bll.ImportVmCommand] (default task-17) [] CanDoAction of action 'ImportVm' failed for user user1@PROFILE. Reasons: VAR__ACTION__IMPORT,VAR__TYPE__VM,USER_NOT_AUTHORIZED_TO_ATTACH_DISK_PROFILE
2015-07-30 18:20:22,486 INFO  [org.ovirt.engine.core.bll.ImportVmCommand] (default task-17) [] Lock freed to object 'EngineLock:{exclusiveLocks='[vm=<VM_NAME, ACTION_TYPE_FAILED_NAME_ALREADY_USED>, 9c89b6b9-3760-47a9-96a4-5262366de2ed=<VM, ACTION_TYPE_FAILED_VM_IS_BEING_IMPORTED$VmName vm>]', sharedLocks='[de18affc-cbff-42bd-9ced-b7e53f8be288=<REMOTE_VM, ACTION_TYPE_FAILED_VM_IS_BEING_IMPORTED$VmName vm>]'}'

Comment 1 Sandro Bonazzola 2015-10-26 12:38:48 UTC
this is an automated message. oVirt 3.6.0 RC3 has been released and GA is targeted to next week, Nov 4th 2015.
Please review this bug and if not a blocker, please postpone to a later release.
All bugs not postponed on GA release will be automatically re-targeted to

- 3.6.1 if severity >= high
- 4.0 if severity < high

Comment 3 Roy Golan 2016-01-13 14:53:29 UTC
We need to make sure VmImportExport must have assign disk profile action group in its definition. should be and easy fix and not risky. Also we need to make sure that cpu profile behaves the same.

Meital I think this is regression from 3.5? I believe it was working. Can you help reproduce on 3.5?

Comment 4 Ondra Machacek 2016-01-25 09:31:03 UTC
VmImporterExport is role which was introduced in 3.6. So we can't try on 3.5.

Comment 5 Artyom 2016-01-25 12:40:47 UTC
Checked on rhevm-3.5.7-0.1.el6ev.noarch
We do not have such role under 3.5, so it is not regression.