Revert "Revert "Fix deadlock when deleting a host with running VMs""

This reverts commit ef260045a1.
This commit is contained in:
Ruben S. Montero committed 2013-11-12 14:09:58 +01:00
1 parent 1a91738f4e
commit 729ea754d4
1 file changed
+3
+3
View File
@@ -157,6 +157,9 @@ int HostDelete::drop(int oid, PoolObjectSQL * object, string& error_msg)
if ( host->get_share_running_vms() > 0 )
{
error_msg = "Can not remove a host with running VMs";
host->unlock();
return -1;
}