Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1055224 - [engine-backend] Hotplug disk isn't blocked while VM is in illegal state for disk hotplug, when attaching a disk with active=true
Summary: [engine-backend] Hotplug disk isn't blocked while VM is in illegal state for ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-core
Version: 3.4
Hardware: x86_64
OS: Unspecified
unspecified
high
Target Milestone: ---
: 3.5.0
Assignee: Tal Nisan
QA Contact: Kevin Alon Goldblatt
URL:
Whiteboard: storage
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-19 16:21 UTC by Elad
Modified: 2016-02-10 17:01 UTC (History)
9 users (show)

Fixed In Version: ovirt-3.5.0-alpha2
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-17 12:37:13 UTC
oVirt Team: Storage


Attachments (Terms of Use)
engine.log and screenshot from UI (deleted)
2014-01-19 16:21 UTC, Elad
no flags Details


Links
System ID Priority Status Summary Last Updated
oVirt gerrit 28147 master MERGED webadmin: When adding a new VM disk, allow activation in certain VM statuses Never

Description Elad 2014-01-19 16:21:39 UTC
Created attachment 852429 [details]
engine.log and screenshot from UI

Description of problem:
I tried to attach a disk, with active=true, to a VM which was in 'powering-up' state. The operation wasn't blocked by backend, so it failed because hotplug disk is possible only when VM is in 'Up' state. 

Version-Release number of selected component (if applicable):
ovirt-3.4.0-alpha1
ovirt-engine-3.4.0-0.2.master.20140106180914.el6.noarch

How reproducible:
Always

Steps to Reproduce:
1. create a VM and install OS (RHEL6.X/Win7/Win8/WinServer2008)
2. restart the VM
3. during the time the VM is in 'powering-up' state, attach a second disk to it and check the 'Active' check-box

Actual results:
Operation is permitted. 

The operation failed with this error in engine.log:

2014-01-19 16:57:06,137 WARN  [org.ovirt.engine.core.bll.HotPlugDiskToVmCommand] (org.ovirt.thread.pool-6-thread-15) [1305ed6b] CanDoAction of action HotPlugDiskToVm failed. Reasons:VAR__ACTION__HOT_PLUG,VAR__TYPE
__VM_DISK,ACTION_TYPE_FAILED_VM_STATUS_ILLEGAL,VAR__VM_STATUS__POWERING_UP


Expected results:
Engine should block the option to add an active disk to a VM while the VM is in illegal hotplug state (powering-up/down, paused etc.)

Additional info: engine.log and screenshot from UI

Comment 1 Ayal Baron 2014-02-17 16:09:57 UTC
(In reply to Elad from comment #0)
> Created attachment 852429 [details]
> engine.log and screenshot from UI
> 
> Description of problem:
> I tried to attach a disk, with active=true, to a VM which was in
> 'powering-up' state. The operation wasn't blocked by backend, so it failed
> because hotplug disk is possible only when VM is in 'Up' state. 
> 
> Version-Release number of selected component (if applicable):
> ovirt-3.4.0-alpha1
> ovirt-engine-3.4.0-0.2.master.20140106180914.el6.noarch
> 
> How reproducible:
> Always
> 
> Steps to Reproduce:
> 1. create a VM and install OS (RHEL6.X/Win7/Win8/WinServer2008)
> 2. restart the VM
> 3. during the time the VM is in 'powering-up' state, attach a second disk to
> it and check the 'Active' check-box
> 
> Actual results:
> Operation is permitted. 
> 
> The operation failed with this error in engine.log:
> 
> 2014-01-19 16:57:06,137 WARN 
> [org.ovirt.engine.core.bll.HotPlugDiskToVmCommand]
> (org.ovirt.thread.pool-6-thread-15) [1305ed6b] CanDoAction of action
> HotPlugDiskToVm failed. Reasons:VAR__ACTION__HOT_PLUG,VAR__TYPE
> __VM_DISK,ACTION_TYPE_FAILED_VM_STATUS_ILLEGAL,VAR__VM_STATUS__POWERING_UP
> 
> 
> Expected results:
> Engine should block the option to add an active disk to a VM while the VM is
> in illegal hotplug state (powering-up/down, paused etc.)
> 
> Additional info: engine.log and screenshot from UI

I don't understand, engine failed the action with a canDoAction, which is the expected behaviour, what is the problem?

Comment 2 Elad 2014-02-19 16:20:08 UTC
I think that when the VM is in illegal state for hotplug, the 'Activate' check-box should be greyed out.

Anyway, I checked it again on the latest ovirt built (ovirt-engine-3.4.0-0.11.beta3.el6.noarch) and this CDA failure does not even trigger the error message in event log. 
The CDA failure in log is presented:

2014-02-19 18:06:22,212 WARN  [org.ovirt.engine.core.bll.HotPlugDiskToVmCommand] (org.ovirt.thread.pool-6-thread-44) [6742f946] CanDoAction of action HotPlugDiskToVm failed. Reasons:VAR__ACTION__HOT_PLUG,VAR__TYPE__VM_DISK,ACTION_TYPE_FAILED_VM_STATUS_ILLEGAL,VAR__VM_STATUS__POWERING_UP

Comment 3 Kevin Alon Goldblatt 2014-06-22 14:31:55 UTC
I tried to attach a disk to the VM while it was in the Powering up state, and received and error message informing the user that the operation could not be performed as the VM was in above state. Moving to Verified

Comment 4 Sandro Bonazzola 2014-10-17 12:37:13 UTC
oVirt 3.5 has been released and should include the fix for this issue.


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