mirror of
https://github.com/OpenNebula/one.git
synced 2024-12-23 17:33:56 +03:00
Roll-back network leases when inserting in the VM in the DB, and a more descreptive error message
git-svn-id: http://svn.opennebula.org/one/trunk@244 3034c82b-c49b-4eb3-8279-a7acafdc01c0
This commit is contained in:
parent
8be88f795f
commit
92ec8ed659
@ -49,7 +49,7 @@ void RequestManager::VirtualMachineAllocate::execute(
|
||||
|
||||
if (rc == -1)
|
||||
{
|
||||
oss << "Error inserting VM in the database";
|
||||
oss << "Error inserting VM in the database, check oned.log";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -324,16 +324,18 @@ int VirtualMachine::insert(SqliteDB * db)
|
||||
return 0;
|
||||
|
||||
error_update:
|
||||
log("ONE", Log::ERROR, "Can not update vm");
|
||||
Nebula::log("ONE",Log::ERROR, "Can not update VM in the database");
|
||||
vm_template.drop(db);
|
||||
return -1;
|
||||
|
||||
error_template:
|
||||
log("ONE", Log::ERROR, "Can not insert template");
|
||||
Nebula::log("ONE",Log::ERROR, "Can not insert template in the database");
|
||||
release_leases();
|
||||
return -1;
|
||||
|
||||
error_leases:
|
||||
log("ONE", Log::ERROR, "Could not get lease for VM");
|
||||
Nebula::log("ONE",Log::ERROR, "Could not get network lease for VM");
|
||||
release_leases();
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user