diff --git a/XenAdmin/Wizards/PatchingWizard/PatchingWizard_PrecheckPage.cs b/XenAdmin/Wizards/PatchingWizard/PatchingWizard_PrecheckPage.cs index 15f064f0a..218c7d3df 100644 --- a/XenAdmin/Wizards/PatchingWizard/PatchingWizard_PrecheckPage.cs +++ b/XenAdmin/Wizards/PatchingWizard/PatchingWizard_PrecheckPage.cs @@ -419,6 +419,26 @@ namespace XenAdmin.Wizards.PatchingWizard } } + //Checking reboot required and can evacuate host for version updates + if (WizardMode == Wizards.PatchingWizard.WizardMode.NewVersion && UpdateAlert != null && UpdateAlert.Patch != null && UpdateAlert.Patch.after_apply_guidance == after_apply_guidance.restartHost) + { + checks.Add(new KeyValuePair>(Messages.CHECKING_SERVER_NEEDS_REBOOT, new List())); + checkGroup = checks[checks.Count - 1].Value; + var guidance = new List() { UpdateAlert.Patch.after_apply_guidance }; + + foreach (var host in SelectedServers) + { + checkGroup.Add(new HostNeedsRebootCheck(host, guidance, LivePatchCodesByHost)); + } + + checks.Add(new KeyValuePair>(Messages.CHECKING_CANEVACUATE_STATUS, new List())); + checkGroup = checks[checks.Count - 1].Value; + foreach (Host host in SelectedServers) + { + checkGroup.Add(new AssertCanEvacuateCheck(host, LivePatchCodesByHost)); + } + } + return checks; } @@ -442,7 +462,7 @@ namespace XenAdmin.Wizards.PatchingWizard } //Checking if the host needs a reboot - if (WizardMode != WizardMode.SingleUpdate) + if (WizardMode == WizardMode.SingleUpdate) { checks.Add(new KeyValuePair>(Messages.CHECKING_SERVER_NEEDS_REBOOT, new List())); checkGroup = checks[checks.Count - 1].Value; @@ -458,7 +478,7 @@ namespace XenAdmin.Wizards.PatchingWizard //Checking can evacuate host //CA-97061 - evacuate host -> suspended VMs. This is only needed for restartHost //Also include this check for the supplemental packs (patch == null), as their guidance is restartHost - if (patch == null || patch.after_apply_guidance.Contains(after_apply_guidance.restartHost)) + if (WizardMode != WizardMode.NewVersion && (patch == null || patch.after_apply_guidance.Contains(after_apply_guidance.restartHost))) { checks.Add(new KeyValuePair>(Messages.CHECKING_CANEVACUATE_STATUS, new List())); checkGroup = checks[checks.Count - 1].Value;