mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-27 02:56:01 +01:00
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:
parent
b589d0dd9e
commit
b795938b66
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user