mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-20 23:39:51 +01:00
CA-293099: When installing updates in the automated updates mode (including new version and RPU), ignore the UPDATE_ALREADY_APPLIED errors and allow the process to continue witth the remaining actions.
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
This commit is contained in:
parent
89ddbf4007
commit
167c5132a3
@ -62,13 +62,25 @@ namespace XenAdmin.Wizards.PatchingWizard.PlanActions
|
||||
|
||||
if (mapping != null && (mapping.Pool_patch != null || mapping.Pool_update != null))
|
||||
{
|
||||
AddProgressStep(string.Format(Messages.UPDATES_WIZARD_APPLYING_UPDATE, xenServerPatch.Name, host.Name()));
|
||||
try
|
||||
{
|
||||
AddProgressStep(string.Format(Messages.UPDATES_WIZARD_APPLYING_UPDATE, xenServerPatch.Name,
|
||||
host.Name()));
|
||||
|
||||
var task = mapping.Pool_patch == null
|
||||
? Pool_update.async_apply(session, mapping.Pool_update.opaque_ref, host.opaque_ref)
|
||||
: Pool_patch.async_apply(session, mapping.Pool_patch.opaque_ref, host.opaque_ref);
|
||||
var task = mapping.Pool_patch == null
|
||||
? Pool_update.async_apply(session, mapping.Pool_update.opaque_ref, host.opaque_ref)
|
||||
: Pool_patch.async_apply(session, mapping.Pool_patch.opaque_ref, host.opaque_ref);
|
||||
|
||||
PollTaskForResultAndDestroy(Connection, ref session, task);
|
||||
PollTaskForResultAndDestroy(Connection, ref session, task);
|
||||
}
|
||||
catch (Failure f)
|
||||
{
|
||||
if (f.ErrorDescription.Count > 1 && (f.ErrorDescription[0] == Failure.PATCH_ALREADY_APPLIED || f.ErrorDescription[0] == Failure.UPDATE_ALREADY_APPLIED))
|
||||
log.InfoFormat("The update {0} is already applied on {1}. Ignoring this error.",
|
||||
xenServerPatch.Name, host.Name());
|
||||
else
|
||||
throw;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -90,6 +90,8 @@ namespace XenAPI
|
||||
public const string VM_LACKS_FEATURE_SUSPEND = "VM_LACKS_FEATURE_SUSPEND";
|
||||
public const string VM_FAILED_SHUTDOWN_ACKNOWLEDGMENT = "VM_FAILED_SHUTDOWN_ACKNOWLEDGMENT";
|
||||
public const string OTHER_OPERATION_IN_PROGRESS = "OTHER_OPERATION_IN_PROGRESS";
|
||||
public const string PATCH_ALREADY_APPLIED = "PATCH_ALREADY_APPLIED";
|
||||
public const string UPDATE_ALREADY_APPLIED = "UPDATE_ALREADY_APPLIED";
|
||||
|
||||
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user