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

B #5960: Do not release VNC port if undeploy fails (#2272)

(cherry picked from commit 9b8487ec049fd15fa38a36480521d5495c4ada7b)
This commit is contained in:
Pavel Czerný 2022-09-16 11:30:26 +02:00 committed by Ruben S. Montero
parent 970b24722a
commit 4ac2cd4f77
No known key found for this signature in database
GPG Key ID: A0CEA6FA880A1D87

View File

@ -556,7 +556,6 @@ void LifeCycleManager::trigger_undeploy(int vid, bool hard,
int req_id = ra.req_id;
trigger([this, hard, vid, uid, gid, req_id] {
unsigned int port;
auto vm = vmpool->get(vid);
if ( vm == nullptr )
@ -602,14 +601,6 @@ void LifeCycleManager::trigger_undeploy(int vid, bool hard,
vmm->trigger_shutdown(vid);
}
VectorAttribute * graphics = vm->get_template_attribute("GRAPHICS");
if ( graphics != 0 && (graphics->vector_value("PORT", port) == 0))
{
graphics->remove("PORT");
clpool->release_vnc_port(vm->get_cid(), port);
}
vmpool->update_history(vm.get());
vmpool->update(vm.get());