Bug 975114 - engine: no CanDoAction for creating vm from snapshot when snapshot has a disk on a maintenance domain
engine: no CanDoAction for creating vm from snapshot when snapshot has a disk...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
3.2.0
x86_64 Linux
medium Severity medium
: ---
: 3.4.0
Assigned To: Daniel Erez
Elad
storage
:
Depends On:
Blocks: rhev3.4beta 1142926
  Show dependency treegraph
 
Reported: 2013-06-17 12:15 EDT by Dafna Ron
Modified: 2016-02-10 11:44 EST (History)
11 users (show)

See Also:
Fixed In Version: ovirt-3.4.0-beta3
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
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)
logs (1.12 MB, application/x-gzip)
2013-06-17 12:15 EDT, Dafna Ron
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 24072 None None None Never
oVirt gerrit 24073 None None None Never
oVirt gerrit 24229 None None None Never
oVirt gerrit 24230 None None None Never

  None (edit)
Description Dafna Ron 2013-06-17 12:15:22 EDT
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 10:59:41 EST
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 07:26:51 EST
This bug is referenced in ovirt-engine-3.4.0-beta3 logs. Moving to ON_QA
Comment 4 Itamar Heim 2014-06-12 10:08:56 EDT
Closing as part of 3.4.0

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