mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-23 13:15:14 +09: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:
1 file changed
+4
-7
@@ -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
|
||||
|
||||
Reference in new issue
Block a user