Bug 975114 - engine: no CanDoAction for creating vm from snapshot when snapshot has a disk on a maintenance domain
Summary: engine: no CanDoAction for creating vm from snapshot when snapshot has a disk...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.2.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
: 3.4.0
Assignee: Daniel Erez
QA Contact: Elad
URL:
Whiteboard: storage
Depends On:
Blocks: rhev3.4beta 1142926
TreeView+ depends on / blocked
 
Reported: 2013-06-17 16:15 UTC by Dafna Ron
Modified: 2016-02-10 16:44 UTC (History)
11 users (show)

Fixed In Version: ovirt-3.4.0-beta3
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
oVirt Team: Storage
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
logs (1.12 MB, application/x-gzip)
2013-06-17 16:15 UTC, Dafna Ron
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 24072 0 None None None Never
oVirt gerrit 24073 0 None None None Never
oVirt gerrit 24229 0 None None None Never
oVirt gerrit 24230 0 None None None Never

Description Dafna Ron 2013-06-17 16:15:22 UTC
Created attachment 762099 [details]
logs

Description of problem:

I tried cloning a vm from a snapshot that has a disk on a domain in maintenance. 
the command is not blocked by engine and sent to vdsm 

although the command fails in vdsm on low level Image copy failed the error user gets in UI is: 

Error while executing action AddVmFromSnapshot: Error creating a new volume

also, in other commands (like preview) there is an engine CanDoAction.

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

sf18

How reproducible:

100%

Steps to Reproduce:
1. create two storage domains
2. create a vm with 2 disks, one disk on each domain
3. create a snapshot for the vm
4. put one of the domains in maintenance
5. clone a vm from the snapshot

Actual results:

the command is not blocked by CanDoAction and sent to vdsm
when it fails we get the following error in UI: 

Error while executing action AddVmFromSnapshot: Error creating a new volume

Expected results:

engine needs to add a CanDoAction 

Additional info: logs

2013-06-17 19:08:16,623 ERROR [org.ovirt.engine.core.bll.SPMAsyncTask] (QuartzScheduler_Worker-34) BaseAsyncTask::LogEndTaskFailure: Task 1b5040a0-bfe3-44af-993e-410410f0de75 (
Parent Command AddVmFromSnapshot, Parameters Type org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters) ended with failure:
-- Result: cleanSuccess
-- Message: VDSGenericException: VDSErrorException: Failed in vdscommand to HSMGetAllTasksStatusesVDS, error = 1b5040a0-bfe3-44af-993e-410410f0de75,
-- Exception: VDSGenericException: VDSErrorException: Failed in vdscommand to HSMGetAllTasksStatusesVDS, error = 1b5040a0-bfe3-44af-993e-410410f0de75
2013-06-17 19:08:16,623 INFO  [org.ovirt.engine.core.bll.EntityAsyncTask] (QuartzScheduler_Worker-34) EntityAsyncTask::EndActionIfNecessary: All tasks of entity acd56356-fd0b-4
e31-ac07-ef88087e07a4 has ended -> executing EndAction


1b5040a0-bfe3-44af-993e-410410f0de75::ERROR::2013-06-17 19:08:11,970::task::850::TaskManager.Task::(_setError) Task=`1b5040a0-bfe3-44af-993e-410410f0de75`::Unexpected error
Traceback (most recent call last):
  File "/usr/share/vdsm/storage/task.py", line 857, in _run
    return fn(*args, **kargs)
  File "/usr/share/vdsm/storage/task.py", line 318, in run
    return self.cmd(*self.argslist, **self.argsdict)
  File "/usr/share/vdsm/storage/securable.py", line 68, in wrapper
    return f(self, *args, **kwargs)
  File "/usr/share/vdsm/storage/sp.py", line 1708, in copyImage
    volType, volFormat, preallocate, postZero, force)
  File "/usr/share/vdsm/storage/image.py", line 878, in copy
    raise se.CopyImageError("src image=%s, dst image=%s: msg=%s" % (srcImgUUID, dstImgUUID, str(e)))

Comment 1 Elad 2014-02-17 15:59:41 UTC
Unable to clone a VM from a snapshot of VM which has one of its disks located on an inactive storage domain. I'm getting a CDA:
2014-02-17 17:51:43,067 WARN  [org.ovirt.engine.core.bll.AddVmFromSnapshotCommand] (ajp-/127.0.0.1:8702-8) CanDoAction of action AddVmFromSnapshot failed. Reasons:VAR__ACTION__ADD,VAR__TYPE__VM,ACTION_TYPE_FAILED_STORAGE_DOMAIN_STATUS_ILLEGAL2,Maintenance


Verified on RHEV3.4-av1
rhevm-3.4.0-0.2.master.el6ev.noarch

Comment 2 Sandro Bonazzola 2014-02-19 12:26:51 UTC
This bug is referenced in ovirt-engine-3.4.0-beta3 logs. Moving to ON_QA

Comment 4 Itamar Heim 2014-06-12 14:08:56 UTC
Closing as part of 3.4.0


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