Bug 969765 - engine [TEXT]: CanDoAction reports vm status is illegal when trying to detach an inactive disk when vm is powering up
Summary: engine [TEXT]: CanDoAction reports vm status is illegal when trying to detach...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.2.0
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
: 3.3.0
Assignee: Allon Mureinik
QA Contact: Elad
URL:
Whiteboard: storage
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-02 09:20 UTC by Dafna Ron
Modified: 2016-02-10 17:40 UTC (History)
13 users (show)

Fixed In Version: is18
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-10 13:55:02 UTC
oVirt Team: Storage
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
log (45.73 KB, application/x-xz)
2013-06-02 09:20 UTC, Dafna Ron
no flags Details

Description Dafna Ron 2013-06-02 09:20:00 UTC
Created attachment 755788 [details]
log

Description of problem:

I tried to detach an inactive disk from a vm during powering up of a vm. 
the error user is getting is: 

Cannot detach Virtual Machine Disk. The VM status is illegal.

I think that the phrasing of "vm Status is illegal" is incorrect and we should change the error message. 

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

sf17.2

How reproducible:

100%

Steps to Reproduce:
1. create a vm with two disks and deactivate the second disk (not the boot disk)
2. run the vm
3. while vm is powering up --> try to detach the inactive disk

Actual results:

Cannot detach Virtual Machine Disk. The VM status is illegal.

Expected results:

vm status is not illegal, operation is illegal when vm is in powering up. 

Additional info: log

2013-06-02 12:09:39,049 WARN  [org.ovirt.engine.core.bll.DetachDiskFromVmCommand] (ajp-/127.0.0.1:8702-2) CanDoAction of action DetachDiskFromVm failed. Reasons:VAR__ACTION__DETACH_ACTION_TO,VAR__TYPE__VM_DISK,ACTION_TYPE_FAILED_VM_STAT
US_ILLEGAL

Comment 1 Alissa 2013-06-24 15:05:14 UTC
The message should be changed for this specific use case to (as suggested by Cheryn):
"Cannot detach Virtual Machine disk. The VM's status must be either Up or Down"
Since the original message is used by several different commands in different scenarios and for different vm statuses - not always up/down (so the text cannot be overriden as it will wrongly influence all other cases), it's probably better to  solve it generically by dynamically filling the status name for at least most of the use cases instead of cloning it just for this use case. 
However it will have a broader influence than just this text bug.

Comment 2 Allon Mureinik 2013-12-03 08:13:08 UTC
This bug was fixed as part of the fix to bug 1000068.
Moving to ON_QA to verify.


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