CA-214566: Upload succeeded, but Pool_patch hasn't been found

Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
This commit is contained in:
Gabor Apati-Nagy 2016-06-27 19:39:49 +01:00
parent 5494c19da4
commit ee08e06f52
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>