Bug 969765 - engine [TEXT]: CanDoAction reports vm status is illegal when trying to detach an inactive disk when vm is powering up
engine [TEXT]: CanDoAction reports vm status is illegal when trying to detach...
Status: CLOSED UPSTREAM
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
3.2.0
x86_64 Linux
unspecified Severity high
: ---
: 3.3.0
Assigned To: Allon Mureinik
Elad
storage
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-02 05:20 EDT by Dafna Ron
Modified: 2016-02-10 12:40 EST (History)
13 users (show)

See Also:
Fixed In Version: is18
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-12-10 08:55:02 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Storage
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Dafna Ron 2013-06-02 05:20:00 EDT
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 11:05:14 EDT
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 03:13:08 EST
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.