mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-20 07:19:18 +01:00
CA-293311: RPU wizard: Only check the maintenance mode on hosts that need to be upgraded (and check host liveness on the hosts where we will only apply updates)
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
This commit is contained in:
parent
1ac88b7cec
commit
a511124b82
@ -37,9 +37,12 @@ namespace XenAdmin.Diagnostics.Checks
|
||||
{
|
||||
class HostMaintenanceModeCheck : HostLivenessCheck
|
||||
{
|
||||
public HostMaintenanceModeCheck(Host host)
|
||||
private readonly bool checkHostLivenessOnly;
|
||||
|
||||
public HostMaintenanceModeCheck(Host host, bool checkHostLivenessOnly = false)
|
||||
: base(host)
|
||||
{
|
||||
this.checkHostLivenessOnly = checkHostLivenessOnly;
|
||||
}
|
||||
|
||||
protected override Problem RunCheck()
|
||||
@ -48,6 +51,9 @@ namespace XenAdmin.Diagnostics.Checks
|
||||
if (problem != null)
|
||||
return problem;
|
||||
|
||||
if (checkHostLivenessOnly)
|
||||
return null;
|
||||
|
||||
// Check the host is not in Maintenance Mode (or disabled)
|
||||
if (Host.MaintenanceMode() || !Host.enabled)
|
||||
{
|
||||
|
@ -164,7 +164,7 @@ namespace XenAdmin.Wizards.RollingUpgradeWizard
|
||||
//HostMaintenanceModeCheck checks - for hosts that will be upgraded or updated
|
||||
var livenessChecks = new List<Check>();
|
||||
foreach (Host host in hostsToUpgradeOrUpdate)
|
||||
livenessChecks.Add(new HostMaintenanceModeCheck(host));
|
||||
livenessChecks.Add(new HostMaintenanceModeCheck(host, !hostsToUpgrade.Contains(host)));
|
||||
groups.Add(new CheckGroup(Messages.CHECKING_HOST_LIVENESS_STATUS, livenessChecks));
|
||||
|
||||
//HA checks - for each pool
|
||||
|
Loading…
Reference in New Issue
Block a user