Bug 752409

Summary: "Detected running VMs" when removing DC with VMs all down, one locked.
Product: [Retired] oVirt Reporter: Jaroslav Henner <jhenner>
Component: ovirt-engine-coreAssignee: lpeer <lpeer>
Status: CLOSED WONTFIX QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: abaron, amureini, iheim, lpeer, michal.skrivanek, Rhev-m-bugs, yeylon, ykaul
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: virt
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-13 08:12:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Jaroslav Henner 2011-11-09 12:48:59 UTC
Description of problem:
I tried to remove DC when I was removing snapshot from one of my VMs. There was no running VM.

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

How reproducible:
always

Steps to Reproduce:
1.
2.
3.
  
Actual results:
In WPF GUI, slightly misleading error message is displayed. Something like "DC cannot be removed because there are running VMs in the DC".

2011-11-09 12:51:41,359 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.IsValidVDSCommand] (http-0.0.0.0-8443-12) FINISH, IsValidVDSCommand, return: true, log id: b15db21
2011-11-09 12:51:41,374 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.GetImageInfoVDSCommand] (http-0.0.0.0-8443-12) START, GetImageInfoVDSCommand(storagePoolId = 30d19b73-a5ef-473f-8572-6c0af141b351, ignoreFailoverLimit = false, compatabilityVersion = null, storageDomainId = 316bd254-27f9-4cc5-9a31-b1d5f6c1928d, imageGroupId = b2ddb454-93a1-405f-80fe-88a57cd06003, imageId = 7238ffbf-0715-4bc3-88bc-9d0216749742), log id: 720eca76
2011-11-09 12:51:41,402 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.GetImageInfoVDSCommand] (http-0.0.0.0-8443-12) FINISH, GetImageInfoVDSCommand, return: org.ovirt.engine.core.common.businessentities.DiskImage@489c7410, log id: 720eca76
2011-11-09 12:51:41,413 INFO  [org.ovirt.engine.core.bll.MergeSnapshotCommand] (http-0.0.0.0-8443-12) Running command: MergeSnapshotCommand internal: false. Entities affected :  ID: 60de3176-b4cd-41cc-9262-5c8292237be2 Type: VM
2011-11-09 12:51:41,415 INFO  [org.ovirt.engine.core.vdsbroker.SetVmStatusVDSCommand] (http-0.0.0.0-8443-12) START, SetVmStatusVDSCommand(vmId = 60de3176-b4cd-41cc-9262-5c8292237be2, status = ImageLocked), log id: 53344c5f
2011-11-09 12:51:41,424 INFO  [org.ovirt.engine.core.vdsbroker.SetVmStatusVDSCommand] (http-0.0.0.0-8443-12) FINISH, SetVmStatusVDSCommand, log id: 53344c5f
2011-11-09 12:51:41,435 INFO  [org.ovirt.engine.core.bll.MergeSnapshotSingleDiskCommand] (http-0.0.0.0-8443-12) Running command: MergeSnapshotSingleDiskCommand internal: true. Entities affected :  ID: 00000000-0000-0000-0000-000000000000 Type: Storage
2011-11-09 12:51:41,437 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.MergeSnapshotsVDSCommand] (http-0.0.0.0-8443-12) START, MergeSnapshotsVDSCommand(storagePoolId = 30d19b73-a5ef-473f-8572-6c0af141b351, ignoreFailoverLimit = false, compatabilityVersion = 3.0, storageDomainId = 316bd254-27f9-4cc5-9a31-b1d5f6c1928d, imageGroupId = b2ddb454-93a1-405f-80fe-88a57cd06003, imageId = 7247be75-70d9-4ef8-811d-7187c35aa947, imageId2 = 7238ffbf-0715-4bc3-88bc-9d0216749742, vmId = 60de3176-b4cd-41cc-9262-5c8292237be2, postZero = false), log id: 72daccc6
2011-11-09 12:51:41,485 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.MergeSnapshotsVDSCommand] (http-0.0.0.0-8443-12) FINISH, MergeSnapshotsVDSCommand, log id: 72daccc6
2011-11-09 12:51:41,486 INFO  [org.ovirt.engine.core.bll.SPMAsyncTask] (http-0.0.0.0-8443-12) BaseAsyncTask::AddOrUpdateTaskInDB: Adding task ec40ab47-8007-4a3d-af79-b80bdb04a934 to DataBase
2011-11-09 12:51:41,493 INFO  [org.ovirt.engine.core.bll.EntityAsyncTask] (http-0.0.0.0-8443-12) EntityAsyncTask::Adding EntityMultiAsyncTasks object for entity 60de3176-b4cd-41cc-9262-5c8292237be2
2011-11-09 12:51:41,493 INFO  [org.ovirt.engine.core.bll.EntityMultiAsyncTasks] (http-0.0.0.0-8443-12) EntityMultiAsyncTasks::AttachTask: Attaching task ec40ab47-8007-4a3d-af79-b80bdb04a934 to entity 60de3176-b4cd-41cc-9262-5c8292237be2.
2011-11-09 12:51:41,493 INFO  [org.ovirt.engine.core.bll.AsyncTaskManager] (http-0.0.0.0-8443-12) AsyncTaskManager::AddTaskToManager: Adding task ec40ab47-8007-4a3d-af79-b80bdb04a934 (Parent Command MergeSnapshot, Parameters Type org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters), polling hasn't started yet..
2011-11-09 12:51:41,511 INFO  [org.ovirt.engine.core.bll.SPMAsyncTask] (http-0.0.0.0-8443-12) BaseAsyncTask::StartPollingTask: Starting to poll task ec40ab47-8007-4a3d-af79-b80bdb04a934.
2011-11-09 12:51:41,511 INFO  [org.ovirt.engine.core.bll.EntityMultiAsyncTasks] (http-0.0.0.0-8443-12) EntityMultiAsyncTasks::StartPollingTask: Current Action Type for entity 60de3176-b4cd-41cc-9262-5c8292237be2 is MergeSnapshot (determined by task ec40ab47-8007-4a3d-af79-b80bdb04a934)
2011-11-09 12:51:41,513 INFO  [org.ovirt.engine.core.bll.LogoutUserCommand] (http-0.0.0.0-8443-12) Running command: LogoutUserCommand internal: false.
2011-11-09 12:51:41,709 INFO  [org.ovirt.engine.core.bll.LoginAdminUserCommand] (http-0.0.0.0-8443-12) Running command: LoginAdminUserCommand internal: false.
2011-11-09 12:51:41,724 INFO  [org.ovirt.engine.core.bll.LogoutUserCommand] (http-0.0.0.0-8443-12) Running command: LogoutUserCommand internal: false.
2011-11-09 12:51:44,040 WARN  [org.ovirt.engine.core.bll.RemoveVmCommand] (http-0.0.0.0-8443-15) CanDoAction of action RemoveVm failed. Reasons:VAR__ACTION__REMOVE,VAR__TYPE__VM,ACTION_TYPE_FAILED_VM_IMAGE_IS_LOCKED
2011-11-09 12:51:49,378 INFO  [org.ovirt.engine.core.bll.AsyncTaskManager] (QuartzScheduler_Worker-78) AsyncTaskManager::PollAndUpdateAsyncTasks: 1 tasks, 1 tasks to poll now
2011-11-09 12:51:49,390 INFO  [org.ovirt.engine.core.bll.SPMAsyncTask] (QuartzScheduler_Worker-78) SPMAsyncTask::PollTask: Polling task ec40ab47-8007-4a3d-af79-b80bdb04a934 (Parent Command MergeSnapshot, Parameters Type org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters) returned status running.
2011-11-09 12:51:49,391 INFO  [org.ovirt.engine.core.bll.AsyncTaskManager] (QuartzScheduler_Worker-78) AsyncTaskManager::_timer_Elapsed: Finished polling Tasks, will poll again in 10 seconds.
2011-11-09 12:51:49,954 INFO  [org.ovirt.engine.core.bll.LoginAdminUserCommand] (http-0.0.0.0-8443-3) Running command: LoginAdminUserCommand internal: false.
2011-11-09 12:51:49,972 INFO  [org.ovirt.engine.core.bll.LogoutUserCommand] (http-0.0.0.0-8443-3) Running command: LogoutUserCommand internal: false.
2011-11-09 12:51:55,329 INFO  [org.ovirt.engine.core.bll.LoginAdminUserCommand] (http-0.0.0.0-8443-3) Running command: LoginAdminUserCommand internal: false.
2011-11-09 12:51:55,340 INFO  [org.ovirt.engine.core.bll.LogoutUserCommand] (http-0.0.0.0-8443-3) Running command: LogoutUserCommand internal: false.
2011-11-09 12:51:55,535 WARN  [org.ovirt.engine.core.bll.storage.DeactivateStorageDomainCommand] (http-0.0.0.0-8443-15) CanDoAction of action DeactivateStorageDomain failed. Reasons:VAR__TYPE__STORAGE__DOMAIN,VAR__ACTION__DEACTIVATE,ACTION_TYPE_FAILED_DETECTED_RUNNING_VMS
2011-11-09 12:52:00,567 INFO  [org.ovirt.engine.core.bll.LoginAdminUserCommand] (http-0.0.0.0-8443-3) Running command: LoginAdminUserCommand internal: false.
2011-11-09 12:52:00,579 INFO  [org.ovirt.engine.core.bll.LogoutUserCommand] (http-0.0.0.0-8443-3) Running command: LogoutUserCommand internal: false.
2011-11-09 12:52:05,786 INFO  [org.ovirt.engine.core.bll.LoginAdminUserCommand] (http-0.0.0.0-8443-15) Running command: LoginAdminUserCommand internal: false.
2011-11-09 12:52:05,802 INFO  [org.ovirt.engine.core.bll.LogoutUserCommand] (http-0.0.0.0-8443-15) Running command: LogoutUserCommand internal: false.
2011-11-09 12:52:05,964 WARN  [org.ovirt.engine.core.bll.storage.DeactivateStorageDomainCommand] (http-0.0.0.0-8443-12) CanDoAction of action DeactivateStorageDomain failed. Reasons:VAR__TYPE__STORAGE__DOMAIN,VAR__ACTION__DEACTIVATE,ACTION_TYPE_FAILED_DETECTED_RUNNING_VMS
2011-11-09 12:52:11,003 INFO  [org.ovirt.engine.core.bll.LoginAdminUserCommand] (http-0.0.0.0-8443-15) Running command: LoginAdminUserCommand internal: false.
2011-11-09 12:52:11,019 INFO  [org.ovirt.engine.core.bll.LogoutUserCommand] (http-0.0.0.0-8443-15) Running command: LogoutUserCommand internal: false.
2011-11-09 12:52:16,404 INFO  [org.ovirt.engine.core.bll.LoginAdminUserCommand] (http-0.0.0.0-8443-15) Running command: LoginAdminUserCommand internal: false.
2011-11-09 12:52:16,416 INFO  [org.ovirt.engine.core.bll.LogoutUserCommand] (http-0.0.0.0-8443-15) Running command: LogoutUserCommand internal: false.

Expected results:
Cannot remove DC because there are Locked VMs or no error message and DC removed.

Additional info:

Comment 1 Itamar Heim 2012-12-13 08:12:13 UTC
Closing old bugs. If this issue is still relevant/important in current version, please re-open the bug.