Merge pull request #1148 from MihaelaStoica/CA-220049

CA-220049: Non-livepatch hotfix installation is failing
This commit is contained in:
Gabor Apati-Nagy 2016-09-05 12:05:06 +01:00 committed by GitHub
commit 6065465a52

View File

@ -66,13 +66,14 @@ namespace XenAdmin.Wizards.PatchingWizard.PlanActions
if (hostObject.patches_requiring_reboot.Count > 0) if (hostObject.patches_requiring_reboot.Count > 0)
{ {
AvoidRestartHosts.Remove(hostObject.uuid); if (AvoidRestartHosts != null)
AvoidRestartHosts.Remove(hostObject.uuid);
log.DebugFormat("Restart is needed now (hostObject.patches_requiring_reboot has {0} items in it). Evacuating now. Will restart after.", hostObject.patches_requiring_reboot.Count); log.DebugFormat("Restart is needed now (hostObject.patches_requiring_reboot has {0} items in it). Evacuating now. Will restart after.", hostObject.patches_requiring_reboot.Count);
} }
else else
{ {
if (!AvoidRestartHosts.Contains(hostObject.uuid)) if (AvoidRestartHosts != null && !AvoidRestartHosts.Contains(hostObject.uuid))
{ {
AvoidRestartHosts.Add(hostObject.uuid); AvoidRestartHosts.Add(hostObject.uuid);
} }