CA-267330: [Update Wizard Improvements] The Update wizard: block the installation of an update on slaves if a reboot or a toolstack restart is pending on master

Moved some code that is only needed for pre-Ely hosts

Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
This commit is contained in:
Gabor Apati-Nagy 2017-10-18 09:36:35 +01:00
parent b589d0dd9e
commit b795938b66

View File

@ -62,9 +62,6 @@ namespace XenAdmin.Diagnostics.Checks
double bootTime = Host.BootTime();
double agentStart = Host.AgentStartTime();
if (bootTime == 0.0 || agentStart == 0.0)
return null; //fine
//check reboot
if (elyOrGreater)
{
@ -81,6 +78,9 @@ namespace XenAdmin.Diagnostics.Checks
}
else
{
if (bootTime == 0.0 || agentStart == 0.0)
return null; //fine
var hostRestartRequiredPatches = Host.AppliedPatches().Where(p => p.after_apply_guidance.Contains(after_apply_guidance.restartHost) && ((double)Util.ToUnixTime(p.AppliedOn(Host)) > agentStart));
foreach (Pool_patch patch in hostRestartRequiredPatches)
@ -104,6 +104,9 @@ namespace XenAdmin.Diagnostics.Checks
if (!elyOrGreater) //normal mode pre-Ely
{
if (bootTime == 0.0 || agentStart == 0.0)
return null; //fine
if (string.Equals(patch.uuid, UpdateUuid, System.StringComparison.InvariantCultureIgnoreCase))
return new MasterIsPendingRestartToolstackProblem(this, pool);
}