mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-20 07:19:18 +01:00
CP-28282: Correction to the required disk space calculation
- also renamed a variable and updated the problem description to include the server name Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
This commit is contained in:
parent
e8ab24820d
commit
121bce92af
@ -65,13 +65,13 @@ namespace XenAdmin.Diagnostics.Checks
|
||||
var elyOrGreater = Helpers.ElyOrGreater(Host.Connection);
|
||||
|
||||
// check the disk space on host
|
||||
var size = elyOrGreater
|
||||
var requiredDiskSpace = elyOrGreater
|
||||
? updateSequence[Host].Sum(p => p.InstallationSize) // all updates on this host (for installation)
|
||||
: Host.IsMaster()
|
||||
? updateSequence[Host].Sum(p => p.InstallationSize) + updateSequence.Values.SelectMany(a => a).Sum(p => p.InstallationSize) // master: all updates on master (for installation) + all updates in pool (for upload)
|
||||
? updateSequence[Host].Sum(p => p.InstallationSize) + updateSequence.Values.SelectMany(p => p).Distinct().Sum(p => p.InstallationSize) // master: all updates on master (for installation) + all updates in pool (for upload)
|
||||
: updateSequence[Host].Sum(p => p.InstallationSize) * 2; // non-master: all updates on this host x 2 (for installation + upload)
|
||||
|
||||
var action = new GetDiskSpaceRequirementsAction(Host, size, true, DiskSpaceRequirements.OperationTypes.automatedUpdates);
|
||||
var action = new GetDiskSpaceRequirementsAction(Host, requiredDiskSpace, true, DiskSpaceRequirements.OperationTypes.automatedUpdates);
|
||||
|
||||
try
|
||||
{
|
||||
@ -82,7 +82,7 @@ namespace XenAdmin.Diagnostics.Checks
|
||||
log.WarnFormat("Could not get disk space requirements");
|
||||
}
|
||||
|
||||
if (action.Succeeded && action.DiskSpaceRequirements.AvailableDiskSpace < size)
|
||||
if (action.Succeeded && action.DiskSpaceRequirements.AvailableDiskSpace < requiredDiskSpace)
|
||||
return new HostOutOfSpaceProblem(this, Host, action.DiskSpaceRequirements);
|
||||
|
||||
// check the disk space for uploading the update files to the pool's SRs (only needs to be done once, so only run this on master)
|
||||
|
2
XenModel/Messages.Designer.cs
generated
2
XenModel/Messages.Designer.cs
generated
@ -26218,7 +26218,7 @@ namespace XenAdmin {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to There is not enough space to upload the required updates..
|
||||
/// Looks up a localized string similar to There is not enough space to upload the required updates to '{0}'..
|
||||
/// </summary>
|
||||
public static string NOT_ENOUGH_SPACE_MESSAGE_AUTO_UPDATE_UPLOAD {
|
||||
get {
|
||||
|
@ -9104,7 +9104,7 @@ It is strongly recommended that you Cancel and apply the latest version of the p
|
||||
<value>There is not enough space to update '{0}' with automated updates.</value>
|
||||
</data>
|
||||
<data name="NOT_ENOUGH_SPACE_MESSAGE_AUTO_UPDATE_UPLOAD" xml:space="preserve">
|
||||
<value>There is not enough space to upload the required updates.</value>
|
||||
<value>There is not enough space to upload the required updates to '{0}'.</value>
|
||||
</data>
|
||||
<data name="NOT_ENOUGH_SPACE_MESSAGE_AUTO_UPDATE_UPLOAD_ALL" xml:space="preserve">
|
||||
<value>There is not enough space on your SRs to upload all the update files required by the automated updates.</value>
|
||||
|
Loading…
Reference in New Issue
Block a user