1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-25 02:50:08 +03:00

feature #200: Release acquired images

This commit is contained in:
Ruben S. Montero 2010-06-25 19:34:31 +02:00
parent 774c8e0d58
commit 1eed13a479
3 changed files with 12 additions and 9 deletions

View File

@ -592,6 +592,8 @@ int DispatchManager::finalize(
vm->release_network_leases();
vm->release_disk_images();
vm->log("DiM", Log::INFO, "New VM state is DONE.");
break;

View File

@ -117,6 +117,8 @@ void DispatchManager::done_action(int vid)
vm->log("DiM", Log::INFO, "New VM state is DONE");
vm->release_network_leases();
vm->release_disk_images();
}
else
{

View File

@ -300,7 +300,7 @@ int VirtualMachine::insert(SqlDB * db)
if ( rc != 0 )
{
goto error_leases;
goto error_leases;
}
// ------------------------------------------------------------------------
@ -357,12 +357,11 @@ int VirtualMachine::insert(SqlDB * db)
error_update:
NebulaLog::log("ONE",Log::ERROR, "Can not update VM in the database");
vm_template.drop(db);
return -1;
goto error_common;
error_template:
NebulaLog::log("ONE",Log::ERROR, "Can not insert template in the database");
release_network_leases();
return -1;
goto error_common;
error_leases:
NebulaLog::log("ONE",Log::ERROR, "Could not get network lease for VM");
@ -371,17 +370,18 @@ error_leases:
error_images:
NebulaLog::log("ONE",Log::ERROR, "Could not get disk image for VM");
release_disk_images();
return -1;
goto error_common;
error_context:
NebulaLog::log("ONE",Log::ERROR, "Could not parse CONTEXT for VM");
release_network_leases();
return -1;
goto error_common;
error_requirements:
NebulaLog::log("ONE",Log::ERROR, "Could not parse REQUIREMENTS for VM");
error_common:
release_network_leases();
release_disk_images();
return -1;
}
@ -539,7 +539,6 @@ int VirtualMachine::parse_requirements()
}
return rc;
>>>>>>> master
}
/* ------------------------------------------------------------------------ */