mirror of
https://github.com/OpenNebula/one.git
synced 2024-12-23 17:33:56 +03:00
M #-: Prevent monitor flapping in vCenter
It has been observed monitor state flapping for vCenter VMs. In order to avoid race conditions, the running flag is postponed, at the cost of an extra API call to vCenter. Also, unneded extraconfig was removed from the sync operation.
This commit is contained in:
parent
2121925066
commit
19c689bc17
@ -1129,15 +1129,9 @@ module VCenterDriver
|
||||
end
|
||||
end
|
||||
|
||||
# vnc configuration (for config_array hash)
|
||||
# vnc configuration (for config_array hash)
|
||||
extraconfig += extraconfig_vnc
|
||||
|
||||
# vnc configuration (for config_array hash)
|
||||
extraconfig += extraconfig_vnc
|
||||
|
||||
# opennebula.running flag
|
||||
extraconfig += set_running(true, false)
|
||||
|
||||
# device_change hash (nics)
|
||||
device_change += sync_nics(:all, false)
|
||||
|
||||
@ -2266,6 +2260,9 @@ module VCenterDriver
|
||||
error = e.message.split(':').first
|
||||
raise e.message if error != 'InvalidPowerState'
|
||||
end
|
||||
# opennebula.running flag
|
||||
extraconfig += set_running(true, true)
|
||||
|
||||
timeout = CONFIG[:vm_poweron_wait_default]
|
||||
wait_timeout(:is_powered_on?, timeout)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user