mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
feature #2092: Changed PROLOG and EPILOG bypass to TransferManager.cc
This commit is contained in:
parent
3b269146bc
commit
ab85640c56
@ -21,8 +21,6 @@ void LifeCycleManager::deploy_action(int vid)
|
||||
{
|
||||
VirtualMachine * vm;
|
||||
ostringstream os;
|
||||
Host * host;
|
||||
bool host_is_hybrid;
|
||||
|
||||
vm = vmpool->get(vid,true);
|
||||
|
||||
@ -31,16 +29,6 @@ void LifeCycleManager::deploy_action(int vid)
|
||||
return;
|
||||
}
|
||||
|
||||
host = hpool->get(vm->get_hid(),true);
|
||||
host_is_hybrid=host->isHybrid();
|
||||
host->unlock();
|
||||
|
||||
if (host_is_hybrid)
|
||||
{
|
||||
trigger(PROLOG_SUCCESS,vid);
|
||||
return;
|
||||
}
|
||||
|
||||
if ( vm->get_state() == VirtualMachine::ACTIVE )
|
||||
{
|
||||
Nebula& nd = Nebula::instance();
|
||||
|
@ -436,6 +436,8 @@ void TransferManager::prolog_action(int vid)
|
||||
string error_str;
|
||||
|
||||
VirtualMachine * vm;
|
||||
Host * host;
|
||||
bool host_is_hybrid;
|
||||
Nebula& nd = Nebula::instance();
|
||||
|
||||
const TransferManagerDriver * tm_md;
|
||||
@ -460,9 +462,19 @@ void TransferManager::prolog_action(int vid)
|
||||
}
|
||||
|
||||
int uid = vm->get_uid();
|
||||
|
||||
vm->unlock();
|
||||
|
||||
host = hpool->get(vm->get_hid(),true);
|
||||
host_is_hybrid=host->isHybrid();
|
||||
host->unlock();
|
||||
|
||||
if (host_is_hybrid)
|
||||
{
|
||||
vm->unlock();
|
||||
(nd.get_lcm())->trigger(LifeCycleManager::PROLOG_SUCCESS,vid);
|
||||
return;
|
||||
}
|
||||
|
||||
User * user = Nebula::instance().get_upool()->get(uid, true);
|
||||
|
||||
if (user != 0)
|
||||
@ -1041,6 +1053,9 @@ void TransferManager::epilog_action(int vid)
|
||||
VirtualMachine * vm;
|
||||
Nebula& nd = Nebula::instance();
|
||||
|
||||
Host * host;
|
||||
bool host_is_hybrid;
|
||||
|
||||
const TransferManagerDriver * tm_md;
|
||||
|
||||
vector<const Attribute *> attrs;
|
||||
@ -1061,6 +1076,17 @@ void TransferManager::epilog_action(int vid)
|
||||
goto error_history;
|
||||
}
|
||||
|
||||
host = hpool->get(vm->get_hid(),true);
|
||||
host_is_hybrid=host->isHybrid();
|
||||
host->unlock();
|
||||
|
||||
if (host_is_hybrid)
|
||||
{
|
||||
vm->unlock();
|
||||
(nd.get_lcm())->trigger(LifeCycleManager::EPILOG_SUCCESS,vid);
|
||||
return;
|
||||
}
|
||||
|
||||
vm_tm_mad = vm->get_tm_mad();
|
||||
vm_ds_id = vm->get_ds_id();
|
||||
tm_md = get();
|
||||
|
@ -251,9 +251,7 @@ int VirtualMachine::insert(SqlDB * db, string& error_str)
|
||||
string value;
|
||||
int ivalue;
|
||||
float fvalue;
|
||||
|
||||
bool ec2_present;
|
||||
|
||||
|
||||
ostringstream oss;
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
|
Loading…
x
Reference in New Issue
Block a user