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

B #2849: Fix detach nic when onegate token is set. (#2850)

This commit is contained in:
Alejandro Huertas Herrero 2019-01-26 00:44:47 +01:00 committed by Ruben S. Montero
parent 214ec6b491
commit 0b416dcbac

View File

@ -2420,6 +2420,19 @@ void VirtualMachineManager::detach_nic_action(
return;
}
int uid = vm->get_created_by_uid();
int owner_id = vm->get_uid();
vm->unlock();
password = Nebula::instance().get_upool()->get_token_password(uid, owner_id);
vm = vmpool->get(vid);
if (vm == 0)
{
return;
}
if (!vm->hasHistory())
{
goto error_history;