Bug 826059

Summary: If run multiple actions fails ,the object stays locked forever.
Product: Red Hat Enterprise Virtualization Manager Reporter: Leonid Natapov <lnatapov>
Component: ovirt-engineAssignee: mkublin <mkublin>
Status: CLOSED CURRENTRELEASE QA Contact: Leonid Natapov <lnatapov>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 3.1.0CC: acathrow, amureini, bazulay, dyasny, hateya, iheim, lpeer, mkublin, Rhev-m-bugs, yeylon, ykaul
Target Milestone: ---   
Target Release: 3.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: storage
Fixed In Version: SI6 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: --- Target Upstream Version:
Embargoed:

Description Leonid Natapov 2012-05-29 13:46:19 UTC
Scenario:
I am trying to delete quite big amount of disks (15) from the disks tab.
Backend executes Run multiple actions and acquires lock for each object.
If,for some reason,action fails at CanDoAction (in this case CanDoAction of action RemoveDisk failed) the objects stays locked forever. As a result I have several disks that can not be deleted.

The message in UI says:Error: Can't remove Virtual Machine disk. Same action in progress.

Here is the engine.log:
----------------------


2012-05-29 16:15:50,441 WARN  [org.ovirt.engine.core.bll.RemoveDiskCommand] (ajp--0.0.0.0-8009-39) CanDoAction of action RemoveDisk failed. Reasons:VAR__ACTI
ON__REMOVE,VAR__TYPE__VM_DISK,ACTION_TYPE_FAILED_OBJECT_LOCKED
2012-05-29 16:15:53,564 INFO  [org.ovirt.engine.core.bll.AsyncTaskManager] (QuartzScheduler_Worker-26) [797907a7] AsyncTaskManager::SetNewMap: The map contai
ns now 0 tasks
2012-05-29 16:15:53,566 INFO  [org.ovirt.engine.core.bll.AsyncTaskManager] (QuartzScheduler_Worker-26) [797907a7] AsyncTaskManager::RemoveOldAndCleanedTasks:
 Cleared all tasks of pool d4510c2d-8255-404d-a846-90a80842f91f.
2012-05-29 16:15:53,569 INFO  [org.ovirt.engine.core.bll.AsyncTaskManager] (QuartzScheduler_Worker-26) [797907a7] AsyncTaskManager::RemoveOldAndCleanedTasks:
 could not find vds that is spm and non-operational.
2012-05-29 16:16:26,278 INFO  [org.ovirt.engine.core.bll.RemoveDiskCommand] (ajp--0.0.0.0-8009-3) Failed to Acquire Lock to object EngineLock [exclusiveLocks
= key: DISK value: 77dd0642-efb2-40a6-ad5a-4298698eb2bf
, sharedLocks= key: TEMPLATE value: 8c4981b4-6441-403e-a5f9-e6ce229c65bb

Comment 1 mkublin 2012-05-30 08:56:58 UTC
http://gerrit.ovirt.org/#change,4671

Comment 2 Leonid Natapov 2012-06-17 08:54:05 UTC
si6. fixed. can't reproduce the problem.