CA-252877: Precheck actions not reverted on upgrading to new XenServer version using an update

Automated Updates now undo pre-check actions once it's finished wit the updates

Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
This commit is contained in:
Gabor Apati-Nagy 2017-05-10 12:21:11 +01:00
parent 5eff76be28
commit d14f0d6b49
2 changed files with 7 additions and 4 deletions

View File

@ -179,8 +179,11 @@ namespace XenAdmin.Wizards.PatchingWizard
}
//add a revert pre-check action for this pool
finalActions.Add(new UnwindProblemsAction(ProblemsResolvedPreCheck.Where(p => hosts.ToList().Select(h => h.uuid).ToList().Contains(p.Check.Host.uuid)).ToList(),
string.Format(Messages.REVERTING_RESOLVED_PRECHECKS_POOL, pool.Connection.Name)));
var problemsToRevert = ProblemsResolvedPreCheck.Where(p => hosts.ToList().Select(h => h.uuid).ToList().Contains(p.Check.Host.uuid)).ToList();
if (problemsToRevert.Count > 0)
{
finalActions.Add(new UnwindProblemsAction(problemsToRevert, string.Format(Messages.REVERTING_RESOLVED_PRECHECKS_POOL, pool.Connection.Name)));
}
if (planActions.Count > 0)
{

View File

@ -41,9 +41,9 @@ namespace XenAdmin.Wizards.PatchingWizard.PlanActions
private readonly List<Problem> _problems;
public UnwindProblemsAction(List<Problem> problems, string TitleOverride = null)
: base(Messages.PATCHINGWIZARD_PATCHINGPAGE_PRECHECK_REVERTING)
: base(TitleOverride ?? Messages.PATCHINGWIZARD_PATCHINGPAGE_PRECHECK_REVERTING)
{
base._title = base.TitlePlan = TitleOverride ?? Messages.REVERTING_RESOLVED_PRECHECKS;
base.TitlePlan = Messages.REVERTING_RESOLVED_PRECHECKS;
_problems = problems;
}