mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-19 03:12:55 +09:00
bug #2487: Always use the current system ds when resuming
(cherry picked from commit bc98a3fa02)
Conflicts:
src/rm/RequestManagerVirtualMachine.cc
This commit is contained in:
1 parent
0203b7a3c5
commit
6a552f32fe
2 files changed
+36
No files matched your search
@@ -644,6 +644,16 @@ public:
|
||||
return previous_history->reason;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the action that closed the current history record. The hasHisto
|
||||
* function MUST be called before this one.
|
||||
* @return the action that closed the current history record
|
||||
*/
|
||||
const History::VMAction get_action() const
|
||||
{
|
||||
return history->action;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the action that closed the history record in the previous host
|
||||
* @return the action that closed the history record in the previous host
|
||||
|
||||
@@ -665,6 +665,32 @@ void VirtualMachineDeploy::request_execute(xmlrpc_c::paramList const& paramList,
|
||||
return;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Authorize request
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
auth = vm_authorization(id, 0, 0, att, &host_perms, 0, auth_op);
|
||||
|
||||
if (auth == false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ((vm = get_vm(id, att)) == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (vm->hasHistory() &&
|
||||
(vm->get_action() == History::STOP_ACTION ||
|
||||
vm->get_action() == History::UNDEPLOY_ACTION ||
|
||||
vm->get_action() == History::UNDEPLOY_HARD_ACTION))
|
||||
{
|
||||
ds_id = vm->get_ds_id();
|
||||
}
|
||||
|
||||
vm->unlock();
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Get information about the system DS to use (tm_mad)
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user