mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-25 06:16:37 +01:00
Merge pull request #1255 from GaborApatiNagy/master_packaging_fixes
Packaging-related bugfixes
This commit is contained in:
commit
adaa084d7a
@ -76,7 +76,7 @@ namespace XenAdmin.Diagnostics.Checks
|
||||
}
|
||||
|
||||
if (action.Succeeded && action.DiskSpaceRequirements.AvailableDiskSpace < size)
|
||||
return new HostOutOfSpaceProblem(this, Host, null, action.DiskSpaceRequirements);
|
||||
return new HostOutOfSpaceProblem(this, Host, action.DiskSpaceRequirements);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
@ -229,18 +229,23 @@ namespace XenAdmin.Diagnostics.Checks
|
||||
|
||||
private Problem FindProblem(string errorcode, string found, string required)
|
||||
{
|
||||
long requiredSpace = 0;
|
||||
long foundSpace = 0;
|
||||
long reclaimableDiskSpace = 0;
|
||||
|
||||
DiskSpaceRequirements diskSpaceReq;
|
||||
|
||||
switch (errorcode)
|
||||
{
|
||||
case "PATCH_PRECHECK_FAILED_WRONG_SERVER_VERSION":
|
||||
return new WrongServerVersion(this, required, Host);
|
||||
|
||||
case "PATCH_PRECHECK_FAILED_OUT_OF_SPACE":
|
||||
System.Diagnostics.Trace.Assert(Helpers.CreamOrGreater(Host.Connection)); // If not Cream or greater, we shouldn't get this error
|
||||
long requiredSpace = 0;
|
||||
long foundSpace = 0;
|
||||
|
||||
long.TryParse(found, out foundSpace);
|
||||
long.TryParse(required, out requiredSpace);
|
||||
// get reclaimable disk space (excluding current patch)
|
||||
long reclaimableDiskSpace = 0;
|
||||
try
|
||||
{
|
||||
var args = new Dictionary<string, string> { { "exclude", Patch.uuid } };
|
||||
@ -252,9 +257,19 @@ namespace XenAdmin.Diagnostics.Checks
|
||||
log.WarnFormat("Plugin call disk-space.get_reclaimable_disk_space on {0} failed with {1}", Host.Name, failure.Message);
|
||||
}
|
||||
|
||||
var diskSpaceReq = new DiskSpaceRequirements(DiskSpaceRequirements.OperationTypes.install, Host, Patch.Name, requiredSpace, foundSpace, reclaimableDiskSpace);
|
||||
diskSpaceReq = new DiskSpaceRequirements(DiskSpaceRequirements.OperationTypes.install, Host, Patch.Name, requiredSpace, foundSpace, reclaimableDiskSpace);
|
||||
|
||||
return new HostOutOfSpaceProblem(this, Host, Patch, diskSpaceReq);
|
||||
|
||||
case "UPDATE_PRECHECK_FAILED_OUT_OF_SPACE":
|
||||
System.Diagnostics.Trace.Assert(Helpers.ElyOrGreater(Host.Connection)); // If not Ely or greater, we shouldn't get this error
|
||||
long.TryParse(found, out foundSpace);
|
||||
long.TryParse(required, out requiredSpace);
|
||||
|
||||
diskSpaceReq = new DiskSpaceRequirements(DiskSpaceRequirements.OperationTypes.install, Host, Update.Name, requiredSpace, foundSpace, 0);
|
||||
|
||||
return new HostOutOfSpaceProblem(this, Host, Update, diskSpaceReq);
|
||||
|
||||
case "OUT_OF_SPACE":
|
||||
if (Helpers.CreamOrGreater(Host.Connection))
|
||||
{
|
||||
|
@ -47,27 +47,52 @@ namespace XenAdmin.Diagnostics.Problems.HostProblem
|
||||
{
|
||||
public class HostOutOfSpaceProblem : HostProblem
|
||||
{
|
||||
private readonly DiskSpaceRequirements diskSpaceReq;
|
||||
private readonly Pool_patch patch;
|
||||
private readonly DiskSpaceRequirements diskSpaceReq;
|
||||
private readonly Pool_patch patch;
|
||||
private readonly Pool_update update;
|
||||
|
||||
public HostOutOfSpaceProblem(Check check, Host host, Pool_patch patch, DiskSpaceRequirements diskSpaceReq)
|
||||
: base(check, host)
|
||||
{
|
||||
this.patch = patch;
|
||||
this.diskSpaceReq = diskSpaceReq;
|
||||
}
|
||||
|
||||
public HostOutOfSpaceProblem(Check check, Host host, Pool_update update, DiskSpaceRequirements diskSpaceReq)
|
||||
: base(check, host)
|
||||
{
|
||||
this.update = update;
|
||||
this.diskSpaceReq = diskSpaceReq;
|
||||
}
|
||||
|
||||
public HostOutOfSpaceProblem(Check check, Host host, DiskSpaceRequirements diskSpaceReq)
|
||||
: base(check, host)
|
||||
{
|
||||
this.diskSpaceReq = diskSpaceReq;
|
||||
}
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
string name = string.Empty;
|
||||
|
||||
if (patch != null)
|
||||
{
|
||||
name = patch.Name;
|
||||
}
|
||||
else if (update != null)
|
||||
{
|
||||
name = update.Name;
|
||||
}
|
||||
|
||||
switch (diskSpaceReq.Operation)
|
||||
{
|
||||
case DiskSpaceRequirements.OperationTypes.install :
|
||||
return string.Format(Messages.NOT_ENOUGH_SPACE_MESSAGE_INSTALL, Server.Name, patch.Name);
|
||||
return string.Format(Messages.NOT_ENOUGH_SPACE_MESSAGE_INSTALL, Server.Name, name);
|
||||
|
||||
case DiskSpaceRequirements.OperationTypes.upload :
|
||||
return string.Format(Messages.NOT_ENOUGH_SPACE_MESSAGE_UPLOAD, Server.Name, patch.Name);
|
||||
return string.Format(Messages.NOT_ENOUGH_SPACE_MESSAGE_UPLOAD, Server.Name, name);
|
||||
|
||||
case DiskSpaceRequirements.OperationTypes.autoupdate :
|
||||
return string.Format(Messages.NOT_ENOUGH_SPACE_MESSAGE_AUTO_UPDATE, Server.Name);
|
||||
@ -81,9 +106,9 @@ namespace XenAdmin.Diagnostics.Problems.HostProblem
|
||||
|
||||
protected override AsyncAction CreateAction(out bool cancelled)
|
||||
{
|
||||
AsyncAction action = null;
|
||||
AsyncAction action = null;
|
||||
|
||||
if (diskSpaceReq.CanCleanup)
|
||||
if (patch != null && diskSpaceReq.CanCleanup)
|
||||
{
|
||||
Program.Invoke(Program.MainWindow, delegate()
|
||||
{
|
||||
|
@ -228,7 +228,7 @@ namespace XenAdmin.Actions
|
||||
vdi.SR = new XenRef<SR>(sr);
|
||||
vdi.virtual_size = diskSize;
|
||||
vdi.name_label = new FileInfo(suppPackFilePath).Name;
|
||||
vdi.name_description = Messages.SUPP_PACK_TEMP_VDI_DESCRIPTION;
|
||||
vdi.name_description = Helpers.ElyOrGreater(Connection) ? Messages.UPDATE_TEMP_VDI_DESCRIPTION : Messages.SUPP_PACK_TEMP_VDI_DESCRIPTION;
|
||||
vdi.sharable = false;
|
||||
vdi.type = vdi_type.user;
|
||||
vdi.VMHint = "";
|
||||
|
9
XenModel/Messages.Designer.cs
generated
9
XenModel/Messages.Designer.cs
generated
@ -33021,6 +33021,15 @@ namespace XenAdmin {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Temporary virtual disk used for the installation of an update.
|
||||
/// </summary>
|
||||
public static string UPDATE_TEMP_VDI_DESCRIPTION {
|
||||
get {
|
||||
return ResourceManager.GetString("UPDATE_TEMP_VDI_DESCRIPTION", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Update {0} was not completed successfully.
|
||||
/// </summary>
|
||||
|
@ -11750,6 +11750,9 @@ Note that if RBAC is enabled, only updates which you have privileges to dismiss
|
||||
<data name="UPDATE_PROPERTIES" xml:space="preserve">
|
||||
<value>Updating '{0}'</value>
|
||||
</data>
|
||||
<data name="UPDATE_TEMP_VDI_DESCRIPTION" xml:space="preserve">
|
||||
<value>Temporary virtual disk used for the installation of an update</value>
|
||||
</data>
|
||||
<data name="UPDATE_WAS_NOT_COMPLETED" xml:space="preserve">
|
||||
<value>Update {0} was not completed successfully</value>
|
||||
</data>
|
||||
|
207
XenModel/XenAPI/FriendlyErrorNames.Designer.cs
generated
207
XenModel/XenAPI/FriendlyErrorNames.Designer.cs
generated
@ -330,6 +330,15 @@ namespace XenAPI {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The requested update could not be found. Please upload the update again. This can occur when you run xe update-pool-clean before xe update-apply. .
|
||||
/// </summary>
|
||||
public static string CANNOT_FIND_UPDATE {
|
||||
get {
|
||||
return ResourceManager.GetString("CANNOT_FIND_UPDATE", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to This PIF is a bond slave and cannot be plugged..
|
||||
/// </summary>
|
||||
@ -1383,6 +1392,15 @@ namespace XenAPI {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The uploaded update package is invalid..
|
||||
/// </summary>
|
||||
public static string INVALID_UPDATE {
|
||||
get {
|
||||
return ResourceManager.GetString("INVALID_UPDATE", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The value '{1}' is invalid for field '{0}'..
|
||||
/// </summary>
|
||||
@ -1617,6 +1635,15 @@ namespace XenAPI {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The dynamic memory range does not satisfy the following constraint..
|
||||
/// </summary>
|
||||
public static string MEMORY_CONSTRAINT_VIOLATION {
|
||||
get {
|
||||
return ResourceManager.GetString("MEMORY_CONSTRAINT_VIOLATION", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to This message has been deprecated..
|
||||
/// </summary>
|
||||
@ -2292,6 +2319,60 @@ namespace XenAPI {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The PVS site already has cache storage configured for the host..
|
||||
/// </summary>
|
||||
public static string PVS_CACHE_STORAGE_ALREADY_PRESENT {
|
||||
get {
|
||||
return ResourceManager.GetString("PVS_CACHE_STORAGE_ALREADY_PRESENT", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The PVS cache storage is in use by the site and cannot be removed..
|
||||
/// </summary>
|
||||
public static string PVS_CACHE_STORAGE_IS_IN_USE {
|
||||
get {
|
||||
return ResourceManager.GetString("PVS_CACHE_STORAGE_IS_IN_USE", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The VIF is already associated with a PVS proxy.
|
||||
/// </summary>
|
||||
public static string PVS_PROXY_ALREADY_PRESENT {
|
||||
get {
|
||||
return ResourceManager.GetString("PVS_PROXY_ALREADY_PRESENT", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The address specified is already in use by an existing PVS_server object.
|
||||
/// </summary>
|
||||
public static string PVS_SERVER_ADDRESS_IN_USE {
|
||||
get {
|
||||
return ResourceManager.GetString("PVS_SERVER_ADDRESS_IN_USE", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The PVS site contains running proxies..
|
||||
/// </summary>
|
||||
public static string PVS_SITE_CONTAINS_RUNNING_PROXIES {
|
||||
get {
|
||||
return ResourceManager.GetString("PVS_SITE_CONTAINS_RUNNING_PROXIES", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The PVS site contains servers and cannot be forgotten..
|
||||
/// </summary>
|
||||
public static string PVS_SITE_CONTAINS_SERVERS {
|
||||
get {
|
||||
return ResourceManager.GetString("PVS_SITE_CONTAINS_SERVERS", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Your current role is not authorized to perform this action.
|
||||
///Action: {0}.
|
||||
@ -4322,6 +4403,15 @@ namespace XenAPI {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The suspend image of a checkpoint is not accessible from the host on which the VM is running.
|
||||
/// </summary>
|
||||
public static string SUSPEND_IMAGE_NOT_ACCESSIBLE {
|
||||
get {
|
||||
return ResourceManager.GetString("SUSPEND_IMAGE_NOT_ACCESSIBLE", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to You must use tar output to retrieve system status from an OEM server..
|
||||
/// </summary>
|
||||
@ -4403,6 +4493,105 @@ namespace XenAPI {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to This update has already been applied..
|
||||
/// </summary>
|
||||
public static string UPDATE_ALREADY_APPLIED {
|
||||
get {
|
||||
return ResourceManager.GetString("UPDATE_ALREADY_APPLIED", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to This update has already been applied to all hosts in the pool..
|
||||
/// </summary>
|
||||
public static string UPDATE_ALREADY_APPLIED_IN_POOL {
|
||||
get {
|
||||
return ResourceManager.GetString("UPDATE_ALREADY_APPLIED_IN_POOL", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The uploaded update already exists.
|
||||
/// </summary>
|
||||
public static string UPDATE_ALREADY_EXISTS {
|
||||
get {
|
||||
return ResourceManager.GetString("UPDATE_ALREADY_EXISTS", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The update failed to apply. Please see attached output..
|
||||
/// </summary>
|
||||
public static string UPDATE_APPLY_FAILED {
|
||||
get {
|
||||
return ResourceManager.GetString("UPDATE_APPLY_FAILED", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The specified update has been applied and cannot be destroyed..
|
||||
/// </summary>
|
||||
public static string UPDATE_IS_APPLIED {
|
||||
get {
|
||||
return ResourceManager.GetString("UPDATE_IS_APPLIED", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The update cannot be applied for the following host(s)..
|
||||
/// </summary>
|
||||
public static string UPDATE_POOL_APPLY_FAILED {
|
||||
get {
|
||||
return ResourceManager.GetString("UPDATE_POOL_APPLY_FAILED", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The update precheck stage failed: conflicting updates are present..
|
||||
/// </summary>
|
||||
public static string UPDATE_PRECHECK_FAILED_CONFLICT_PRESENT {
|
||||
get {
|
||||
return ResourceManager.GetString("UPDATE_PRECHECK_FAILED_CONFLICT_PRESENT", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The update precheck stage failed: the server does not have enough space..
|
||||
/// </summary>
|
||||
public static string UPDATE_PRECHECK_FAILED_OUT_OF_SPACE {
|
||||
get {
|
||||
return ResourceManager.GetString("UPDATE_PRECHECK_FAILED_OUT_OF_SPACE", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The update precheck stage failed: prerequisite update(s) are missing..
|
||||
/// </summary>
|
||||
public static string UPDATE_PRECHECK_FAILED_PREREQUISITE_MISSING {
|
||||
get {
|
||||
return ResourceManager.GetString("UPDATE_PRECHECK_FAILED_PREREQUISITE_MISSING", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The update precheck stage failed with an unknown error..
|
||||
/// </summary>
|
||||
public static string UPDATE_PRECHECK_FAILED_UNKNOWN_ERROR {
|
||||
get {
|
||||
return ResourceManager.GetString("UPDATE_PRECHECK_FAILED_UNKNOWN_ERROR", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The update precheck stage failed: the server is of an incorrect version..
|
||||
/// </summary>
|
||||
public static string UPDATE_PRECHECK_FAILED_WRONG_SERVER_VERSION {
|
||||
get {
|
||||
return ResourceManager.GetString("UPDATE_PRECHECK_FAILED_WRONG_SERVER_VERSION", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Only the local superuser can execute this operation.
|
||||
/// </summary>
|
||||
@ -4916,6 +5105,15 @@ namespace XenAPI {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to You attempted to migrate a VM to a destination host running a version of XenServer older than the source host..
|
||||
/// </summary>
|
||||
public static string VM_HOST_INCOMPATIBLE_VERSION_MIGRATE {
|
||||
get {
|
||||
return ResourceManager.GetString("VM_HOST_INCOMPATIBLE_VERSION_MIGRATE", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The VM's Virtual Hardware Platform version is incompatible with this host..
|
||||
/// </summary>
|
||||
@ -4988,6 +5186,15 @@ namespace XenAPI {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to This operation is illegal because the VM is using nested virtualisation..
|
||||
/// </summary>
|
||||
public static string VM_IS_USING_NESTED_VIRT {
|
||||
get {
|
||||
return ResourceManager.GetString("VM_IS_USING_NESTED_VIRT", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to You attempted an operation on a VM which lacks the feature..
|
||||
/// </summary>
|
||||
|
@ -112,10 +112,10 @@
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="ACTIVATION_WHILE_NOT_FREE" xml:space="preserve">
|
||||
<value>An activation key can only be applied when the edition is set to 'free'.</value>
|
||||
@ -1607,12 +1607,30 @@ Authorized Roles: {1}</value>
|
||||
<data name="UPDATE_ALREADY_EXISTS" xml:space="preserve">
|
||||
<value>The uploaded update already exists</value>
|
||||
</data>
|
||||
<data name="UPDATE_APPLY_FAILED" xml:space="preserve">
|
||||
<value>The update failed to apply. Please see attached output.</value>
|
||||
</data>
|
||||
<data name="UPDATE_IS_APPLIED" xml:space="preserve">
|
||||
<value>The specified update has been applied and cannot be destroyed.</value>
|
||||
</data>
|
||||
<data name="UPDATE_POOL_APPLY_FAILED" xml:space="preserve">
|
||||
<value>The update cannot be applied for the following host(s).</value>
|
||||
</data>
|
||||
<data name="UPDATE_PRECHECK_FAILED_CONFLICT_PRESENT" xml:space="preserve">
|
||||
<value>The update precheck stage failed: conflicting updates are present.</value>
|
||||
</data>
|
||||
<data name="UPDATE_PRECHECK_FAILED_OUT_OF_SPACE" xml:space="preserve">
|
||||
<value>The update precheck stage failed: the server does not have enough space.</value>
|
||||
</data>
|
||||
<data name="UPDATE_PRECHECK_FAILED_PREREQUISITE_MISSING" xml:space="preserve">
|
||||
<value>The update precheck stage failed: prerequisite update(s) are missing.</value>
|
||||
</data>
|
||||
<data name="UPDATE_PRECHECK_FAILED_UNKNOWN_ERROR" xml:space="preserve">
|
||||
<value>The update precheck stage failed with an unknown error.</value>
|
||||
</data>
|
||||
<data name="UPDATE_PRECHECK_FAILED_WRONG_SERVER_VERSION" xml:space="preserve">
|
||||
<value>The update precheck stage failed: the server is of an incorrect version.</value>
|
||||
</data>
|
||||
<data name="USER_IS_NOT_LOCAL_SUPERUSER" xml:space="preserve">
|
||||
<value>Only the local superuser can execute this operation</value>
|
||||
</data>
|
||||
@ -2012,4 +2030,4 @@ Authorized Roles: {1}</value>
|
||||
<data name="XMLRPC_UNMARSHAL_FAILURE" xml:space="preserve">
|
||||
<value>The server failed to unmarshal the XMLRPC message; it was expecting one element and received something else.</value>
|
||||
</data>
|
||||
</root>
|
||||
</root>
|
Loading…
Reference in New Issue
Block a user