You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* 4.20:
VR: fix site-2-site VPN if split connections is enabled (#10067)
UI: fix cannot open 'Edit tags' modal for static routes (#10065)
Update ownership selection component to be language independent (#10052)
Support to enable/disable VM High Availability manager and related alerts (#10118)
"Enable/Disable VM High Availability manager, it is enabled by default."
128
+
+ " When enabled, the VM HA WorkItems (for VM Stop, Restart, Migration, Destroy) can be created and the scheduled items are executed; and"
129
+
+ " When disabled, new VM HA WorkItems are not allowed and the scheduled items are retried until max retries configured at 'vm.ha.migration.max.retries'"
130
+
+ " (executed in case HA is re-enabled during retry attempts), and then purged after 'time.between.failures' by the cleanup thread that runs"
131
+
+ " regularly at 'time.between.cleanup'", true, Zone);
if (!VmHaEnabled.valueIn(host.getDataCenterId())) {
284
+
Stringmessage = String.format("Unable to schedule restart for VMs on host %s (%d), VM high availability manager is disabled.", host.getName(), host.getId());
285
+
if (logger.isDebugEnabled()) {
286
+
logger.debug(message);
287
+
}
288
+
sendHostAlert(host, message);
289
+
return;
290
+
}
291
+
263
292
logger.warn("Scheduling restart for VMs on host " + host.getId() + "-" + host.getName());
assert (type == WorkType.CheckStop || type == WorkType.ForceStop || type == WorkType.Stop);
319
348
320
349
if (_haDao.hasBeenScheduled(vm.getId(), type)) {
321
350
logger.info("There's already a job scheduled to stop " + vm);
322
-
return;
351
+
returnfalse;
352
+
}
353
+
354
+
if (!VmHaEnabled.valueIn(vm.getDataCenterId())) {
355
+
Stringmessage = String.format("Unable to schedule stop for the VM %s (%d) on host %d, VM high availability manager is disabled.", vm.getName(), vm.getId(), hostId);
logger.info("Scheduled migration work of VM " + vm.getUuid() + " from host " + _hostDao.findById(vm.getHostId()) + " with HAWork " + work);
346
-
wakeupWorkers();
381
+
if (vm.getHostId() == null) {
382
+
returnfalse;
383
+
}
384
+
385
+
if (!VmHaEnabled.valueIn(vm.getDataCenterId())) {
386
+
Stringmessage = String.format("Unable to schedule migration for the VM %s (%d) on host %d, VM high availability manager is disabled.", vm.getName(), vm.getId(), vm.getHostId());
Stringmessage = String.format("Unable to schedule destroy for the VM %s (%d) on host %d, VM high availability manager is disabled.", vm.getName(), vm.getId(), hostId);
if (vm != null && !VmHaEnabled.valueIn(vm.getDataCenterId())) {
966
+
if (logger.isDebugEnabled()) {
967
+
logger.debug(String.format("VM high availability manager is disabled, rescheduling the HA work %s, for the VM %s (id) to retry later in case VM high availability manager is enabled on retry attempt", work, vm.getName(), vm.getId()));
if (CollectionUtils.isNotEmpty(vms) && !HighAvailabilityManagerImpl.VmHaEnabled.valueIn(host.getDataCenterId())) {
1369
+
thrownewCloudRuntimeException(String.format("Cannot perform maintain for the host %s (%d) as there are running VMs on it and VM high availability manager is disabled", host.getName(), hostId));
0 commit comments