diff --git a/src/rm/RequestManagerAllocate.cc b/src/rm/RequestManagerAllocate.cc index 776800d027..ef0b881594 100644 --- a/src/rm/RequestManagerAllocate.cc +++ b/src/rm/RequestManagerAllocate.cc @@ -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 { diff --git a/src/vm/VirtualMachine.cc b/src/vm/VirtualMachine.cc index 988391cd1d..305dee20dd 100644 --- a/src/vm/VirtualMachine.cc +++ b/src/vm/VirtualMachine.cc @@ -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; }