Merge pull request #1044 from GaborApatiNagy/master_batch_new2

CA-214566: Fix for: Upload succeeded, but Pool_patch hasn't been found
This commit is contained in:
Mihaela Stoica 2016-06-28 13:08:34 +01:00 committed by GitHub
commit 01b4e7a5b2
3 changed files with 18 additions and 1 deletions

View File

@ -79,10 +79,15 @@ namespace XenAdmin.Wizards.PatchingWizard.PlanActions
inProgressAction = uploadPatchAction;
uploadPatchAction.RunExternal(session);
// this has to be run again to refresh poolPatches (to get the recently uploaded one as well)
poolPatches = new List<Pool_patch>(session.Connection.Cache.Pool_patches);
var poolPatch = poolPatches.Find(p => string.Equals(p.uuid, patch.Uuid, StringComparison.OrdinalIgnoreCase));
if (poolPatch == null)
{
//error
log.ErrorFormat("Upload finished successfully, but Pool_patch object has not been found for patch (uuid={0}) on host (uuid={1}).", patch.Uuid, session.Connection);
throw new Exception(Messages.ACTION_UPLOADPATCHTOMASTERPLANACTION_FAILED);
}
var newMapping = new PoolPatchMapping()

View File

@ -2463,6 +2463,15 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to Upload error. The patch was uploaded, but it cannot be found on the host..
/// </summary>
public static string ACTION_UPLOADPATCHTOMASTERPLANACTION_FAILED {
get {
return ResourceManager.GetString("ACTION_UPLOADPATCHTOMASTERPLANACTION_FAILED", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Virtual disk created.
/// </summary>

View File

@ -909,6 +909,9 @@
<data name="ACTION_UPDATE_INTEGRATED_GPU_PASSTHROUGH_TITLE" xml:space="preserve">
<value>Updating integrated GPU passthrough on '{0}'</value>
</data>
<data name="ACTION_UPLOADPATCHTOMASTERPLANACTION_FAILED" xml:space="preserve">
<value>Upload error. The patch was uploaded, but it cannot be found on the host.</value>
</data>
<data name="ACTION_UPLOAD_SERVER_STATUS_REPORT" xml:space="preserve">
<value>Upload server status report to [Citrix] Insight Services</value>
</data>