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

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

This commit is contained in:
Pavel Czerný 2022-09-16 11:30:26 +02:00 committed by GitHub
parent a2caade29a
commit 9b8487ec04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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());