CA-205204: Uncaught exception during RPU

When an exception is reported during the RPU, XenCenter tries to re-enable the host. But when this fails, we should just ignore it and report the original exception.

Signed-off-by: Mihaela Stoica <Mihaela.Stoica@citrix.com>
This commit is contained in:
Mihaela Stoica 2016-03-24 17:18:53 +00:00
parent 5724885f1f
commit 6dcc00d017

View File

@ -330,11 +330,18 @@ namespace XenAdmin.Wizards.RollingUpgradeWizard
private void ReportException(Exception exception, PlanAction planAction, Host host) private void ReportException(Exception exception, PlanAction planAction, Host host)
{ {
Program.Invoke(this, () => Program.Invoke(this, () =>
{ {
if (host != null && !host.enabled && host.Connection != null && host.Connection.Session != null) if (host != null && !host.enabled && host.Connection != null && host.Connection.Session != null)
new EnableHostAction(host, false, try
AddHostToPoolCommand.EnableNtolDialog).RunExternal(host.Connection.Session); {
}); new EnableHostAction(host, false,
AddHostToPoolCommand.EnableNtolDialog).RunExternal(host.Connection.Session);
}
catch (Exception e)
{
log.Error("Exception while trying to re-enable the host", e);
}
});
Program.BeginInvoke(this, () => Program.BeginInvoke(this, () =>
{ {
var row = planAction is UnwindProblemsAction var row = planAction is UnwindProblemsAction