Bug 833900

Summary: ovirt-engine-backend: wrong error when attaching multiple bootable disks to VM [text]
Product: Red Hat Enterprise Virtualization Manager Reporter: vvyazmin <vvyazmin>
Component: ovirt-engineAssignee: Vered Volansky <vered>
Status: CLOSED DUPLICATE QA Contact: vvyazmin <vvyazmin>
Severity: low Docs Contact:
Priority: unspecified    
Version: 3.1.0CC: abaron, acathrow, amureini, bazulay, dron, dyasny, hateya, iheim, lpeer, Rhev-m-bugs, yeylon, ykaul
Target Milestone: ---Keywords: Reopened, ZStream
Target Release: 3.1.0   
Hardware: x86_64   
OS: Linux   
Whiteboard: storage
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-11-06 08:40:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Log none

Description vvyazmin@redhat.com 2012-06-20 14:07:56 UTC
Created attachment 593226 [details]
Log

Description of problem:
When I attache multiple bootable disks to VM, I get an error: “Error while executing action: Cannot attach Action to Virtual Machine Disk. Same action in progress”

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


How reproducible:
100%

Steps to Reproduce:
1. Create multiple floating bootable disks 
2. Select check box all relevant disks
3. Press “OK” button
  
Actual results:
I get an error: “Error while executing action: Cannot attach Action to Virtual Machine Disk. Same action in progress”

Expected results:
Get an error: “Error while executing action: Cannot attach Action to Virtual Machine Disk. Same action in progress”

Additional info:
2012-06-20 19:50:22,272 WARN  [org.ovirt.engine.core.bll.AttachDiskToVmCommand] (pool-3-thread-49) CanDoAction of action AttachDiskToVm failed. Reasons:VAR__ACTION__ATTACH_ACTION_TO,VAR__TYPE__VM_DISK,ACTION_TYPE_FAILED_OBJECT_LOCKED

Full log attached

Comment 1 mkublin 2012-06-21 06:55:35 UTC
These is not a bug, you tried to attach to the same vm simenteniously couple of bootable disks, and one of them is failed, the message is because the race was prevented

Comment 2 Yaniv Kaul 2012-06-21 07:17:51 UTC
English-wise, the error is strange. What is 'Cannot attach Action to Virtual Machine Disk.' ? The user did not attach an action, but a disk. The internals are insignificant. 
Also, either 'action' or 'Action' - be consistent.
Lastly, "in progress" -> "is in progress" or "is already in progress".

Comment 3 mkublin 2012-06-21 07:37:51 UTC
Regards error message I am agree it is not exactly correct, please reopen bug

Comment 4 vvyazmin@redhat.com 2012-06-21 07:45:39 UTC
***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** 
Better bug handling of events ....
***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** 

Actual results:
If I add multiple bootable disks to VM in one action, I get ONLY this error: 
“Error while executing action: Cannot attach Action to Virtual Machine Disk. Same action in progress”

and then, only one disk is attached.

There is NO error:
Error while executing action: Cannot attach Action to Virtual Machine Disk. Disk VM_Disk_001_A already marked as boot

------------------------------------------------
If I add multiple bootable disks to VM in two steps, I get this error: 
Error while executing action: Cannot attach Action to Virtual Machine Disk. Disk VM_Disk_001_A already marked as boot


------------------------------------------------
------------------------------------------------
------------------------------------------------

Expected results:
Get an error: “Error while executing action: Cannot attach Action to Virtual Machine Disk. Same action in progress”

Comment 5 Barak 2012-07-29 13:59:36 UTC
A vm should have 2 system disks.
AFAIU this action should fail with appropriate error.
The problem is with the error message.

Since adding specific error message to the generic inmemory locks sounds like a bit too much to this phase, I would go with a better error message in the log file.

Comment 7 Dafna Ron 2012-08-16 12:45:23 UTC
*** Bug 848793 has been marked as a duplicate of this bug. ***

Comment 8 Ayal Baron 2012-10-05 10:10:56 UTC
Need to fix: "Cannot attach Action to"
"Action" should be replaced with disk or whatever is relevant.

and "Dettach Action from"
Detach is with 1 't'
and 'Action' here to should be replaced with something relevant.

Comment 9 Vered Volansky 2012-11-06 08:40:58 UTC
A duplicate of bug 851198: https://bugzilla.redhat.com/show_bug.cgi?id=851198

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