mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
B #5465: Do not free VNC ports on STOP and do not reassgin them on
resume
This commit is contained in:
parent
db12ffddd6
commit
ff731e8e5d
@ -924,15 +924,17 @@ void LifeCycleManager::epilog_success_action(int vid)
|
||||
vm->set_etime(the_time);
|
||||
|
||||
vm->set_vm_info();
|
||||
|
||||
|
||||
VectorAttribute * graphics = vm->get_template_attribute("GRAPHICS");
|
||||
|
||||
if ( graphics != 0 && (graphics->vector_value("PORT", port) == 0))
|
||||
//Do not free VNC ports for STOP as it is stored in checkpoint file
|
||||
if ( graphics != 0 && (graphics->vector_value("PORT", port) == 0) &&
|
||||
state != VirtualMachine::EPILOG_STOP )
|
||||
{
|
||||
graphics->remove("PORT");
|
||||
clpool->release_vnc_port(vm->get_cid(), port);
|
||||
}
|
||||
|
||||
|
||||
vmpool->update_history(vm);
|
||||
|
||||
vmpool->update(vm);
|
||||
|
@ -682,6 +682,11 @@ int set_vnc_port(VirtualMachine *vm, int cluster_id, RequestAttributes& att)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else if (vm->hasPreviousHistory() &&
|
||||
vm->get_previous_action() == History::STOP_ACTION)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else if (graphics->vector_value("PORT", port) == 0)
|
||||
{
|
||||
rc = cpool->set_vnc_port(cluster_id, port);
|
||||
|
Loading…
x
Reference in New Issue
Block a user