diff --git a/Branding/branding.sh b/Branding/branding.sh index bbd62690a..7817016a4 100644 --- a/Branding/branding.sh +++ b/Branding/branding.sh @@ -41,4 +41,11 @@ BRANDING_PV_TOOLS="[Guest Tools]" BRANDING_PRODUCT_VERSION_TEXT=0.0.0 BRANDING_XC_PRODUCT_VERSION=0.0.0 BRANDING_XC_PRODUCT_VERSION_INSTALLER=0.0.0 -UPDATES_URL="[Updates url]" +XC_UPDATES_URL="[Xc updates url]" +CFU_URL="[Cfu url]" +YUM_REPO_BASE_BIN="[YumRepoBaseBin]" +YUM_REPO_BASE_SRC="[YumRepoBaseSource]" +YUM_REPO_EARLY_ACCESS_BIN="[YumRepoEarlyAccessBin]" +YUM_REPO_EARLY_ACCESS_SRC="[YumRepoEarlyAccessSource]" +YUM_REPO_NORMAL_BIN="[YumRepoNormalBin]" +YUM_REPO_NORMAL_SRC="[YumRepoNormalSource]" diff --git a/XenAdmin/Alerts/Types/OutOfSyncWithCdnAlert.cs b/XenAdmin/Alerts/Types/OutOfSyncWithCdnAlert.cs index 383664687..bba89f26a 100644 --- a/XenAdmin/Alerts/Types/OutOfSyncWithCdnAlert.cs +++ b/XenAdmin/Alerts/Types/OutOfSyncWithCdnAlert.cs @@ -105,7 +105,7 @@ namespace XenAdmin.Alerts public override string FixLinkText => Messages.UPDATES_GENERAL_TAB_SYNC_NOW; - public override string HelpID => "TODO"; + public override string HelpID => "OutOfSyncWithCdnAlert"; public override string Title => _outOfSyncSpan == TimeSpan.Zero ? Messages.ALERT_CDN_NEVER_SYNC_TITLE @@ -159,7 +159,7 @@ namespace XenAdmin.Alerts public override string FixLinkText => Messages.ALERT_CDN_REPO_NOT_CONFIGURED_ACTION_LINK; - public override string HelpID => "TODO"; + public override string HelpID => "YumRepoNotConfiguredAlert"; public override string Title => string.Format(Messages.ALERT_CDN_REPO_NOT_CONFIGURED_TITLE, Connection.Name); } diff --git a/XenAdmin/Controls/ComboBoxes/VgpuComboBox.cs b/XenAdmin/Controls/ComboBoxes/VgpuComboBox.cs index 313acc30c..80538dc8b 100644 --- a/XenAdmin/Controls/ComboBoxes/VgpuComboBox.cs +++ b/XenAdmin/Controls/ComboBoxes/VgpuComboBox.cs @@ -145,7 +145,7 @@ namespace XenAdmin.Controls if (GpuGroup == null) { //this refers to the item "None" - displayName = Messages.GPU_NONE; + displayName = Messages.NONE_UPPER; } else if (VgpuTypes == null || VgpuTypes.Length == 0 || VgpuTypes[0] == null) { diff --git a/XenAdmin/Controls/XenTabPage.cs b/XenAdmin/Controls/XenTabPage.cs index a20d3c59c..6e7c0dc5f 100644 --- a/XenAdmin/Controls/XenTabPage.cs +++ b/XenAdmin/Controls/XenTabPage.cs @@ -103,7 +103,7 @@ namespace XenAdmin.Controls /// Gets the value by which the help files section for this page is identified /// Most derived classes override it to return a fixed string /// - public virtual string HelpID => ""; + public virtual string HelpID => string.Empty; public virtual string NextText(bool isLastPage) { diff --git a/XenAdmin/Diagnostics/Checks/HAOffCheck.cs b/XenAdmin/Diagnostics/Checks/HAOffCheck.cs deleted file mode 100644 index 14335cb9f..000000000 --- a/XenAdmin/Diagnostics/Checks/HAOffCheck.cs +++ /dev/null @@ -1,71 +0,0 @@ -/* Copyright (c) Cloud Software Group, Inc. - * - * Redistribution and use in source and binary forms, - * with or without modification, are permitted provided - * that the following conditions are met: - * - * * Redistributions of source code must retain the above - * copyright notice, this list of conditions and the - * following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the - * following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND - * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -using XenAPI; -using XenAdmin.Diagnostics.Problems; -using XenAdmin.Core; -using XenAdmin.Diagnostics.Problems.PoolProblem; - - -namespace XenAdmin.Diagnostics.Checks -{ - class HAOffCheck : HostPostLivenessCheck - { - public HAOffCheck(Host host) - : base(host) - { - } - - protected override Problem RunHostCheck() - { - Pool pool = Helpers.GetPoolOfOne(Host.Connection); - if (pool == null) - return null; - - if (pool.ha_enabled) - return new HAEnabledProblem(this, pool); - if (Helpers.WlbEnabled(pool.Connection)) - return new WLBEnabledProblem(this, pool); - return null; - } - - public override string Description => Messages.HA_CHECK_DESCRIPTION; - - public override string SuccessfulCheckDescription - { - get - { - var pool = Helpers.GetPool(Host.Connection); - return string.Format(Messages.PATCHING_WIZARD_CHECK_ON_XENOBJECT_OK, - pool != null ? pool.Name() : Host.Name(), Description); - } - } - } -} diff --git a/XenAdmin/Wizards/PatchingWizard/PlanActions/BringBabiesBackAction.cs b/XenAdmin/Diagnostics/Checks/HaWlbOffCheck.cs similarity index 64% rename from XenAdmin/Wizards/PatchingWizard/PlanActions/BringBabiesBackAction.cs rename to XenAdmin/Diagnostics/Checks/HaWlbOffCheck.cs index e358e671f..84c9d6c31 100644 --- a/XenAdmin/Wizards/PatchingWizard/PlanActions/BringBabiesBackAction.cs +++ b/XenAdmin/Diagnostics/Checks/HaWlbOffCheck.cs @@ -28,27 +28,34 @@ * SUCH DAMAGE. */ -using System.Collections.Generic; +using XenAdmin.Core; +using XenAdmin.Diagnostics.Problems; +using XenAdmin.Diagnostics.Problems.PoolProblem; using XenAPI; -namespace XenAdmin.Wizards.PatchingWizard.PlanActions +namespace XenAdmin.Diagnostics.Checks { - public class BringBabiesBackAction : HostPlanAction + class HaWlbOffCheck : PoolCheck { - private readonly List> _vms; - private readonly bool _enableOnly; - - public BringBabiesBackAction(List> vms, Host host, bool enableOnly) - : base(host) + public HaWlbOffCheck(Pool pool) + : base(pool) { - _vms = vms; - _enableOnly = enableOnly; } - protected override void RunWithSession(ref Session session) + protected override Problem RunCheck() { - BringBabiesBack(ref session, _vms, _enableOnly); + if (Pool.ha_enabled) + return new HAEnabledProblem(this, Pool); + + if (Helpers.WlbEnabled(Pool.Connection)) + return new WLBEnabledProblem(this, Pool); + + return null; } + + public override string Description => Messages.HA_WLB_CHECK_DESCRIPTION; + + public override string SuccessfulCheckDescription => string.Format(Messages.PATCHING_WIZARD_CHECK_ON_XENOBJECT_OK, Pool.Name(), Description); } } diff --git a/XenAdmin/Dialogs/ServerUpdates/ConfigUpdatesDialog.cs b/XenAdmin/Dialogs/ServerUpdates/ConfigUpdatesDialog.cs index e05a557e1..0eb304037 100644 --- a/XenAdmin/Dialogs/ServerUpdates/ConfigUpdatesDialog.cs +++ b/XenAdmin/Dialogs/ServerUpdates/ConfigUpdatesDialog.cs @@ -113,6 +113,8 @@ namespace XenAdmin.Dialogs.ServerUpdates tabControl1.SelectTab(_configLcmTab); } + internal override string HelpName => "ConfigureUpdatesDialog"; + private sealed class OptionsTabPage : TabPage { diff --git a/XenAdmin/Help/HelpManager.resx b/XenAdmin/Help/HelpManager.resx index b0f5d4dc8..61fa898ab 100644 --- a/XenAdmin/Help/HelpManager.resx +++ b/XenAdmin/Help/HelpManager.resx @@ -190,7 +190,7 @@ pools-rootpassword - updates-applying + updates-applying-ch intro-start @@ -198,6 +198,9 @@ users-overview + + updates-autoconfig + templates-new @@ -271,7 +274,7 @@ vms-relocate - + systemalerts resources-customfields @@ -300,9 +303,6 @@ dr-testfailover - - 9830 - dr-testfailover @@ -411,9 +411,6 @@ vms-network-properties - - 6536 - vms-snapshotschedule-manage-policy @@ -588,6 +585,9 @@ dr-testfailover + + systemalerts + licensing-about @@ -603,8 +603,11 @@ storage-pools-add-hba - - updates-applying + + updates-applying-xs + + + updates-applying-ch systemalerts @@ -846,32 +849,14 @@ intro-options - - updates-applying + + systemalerts - - updates-applying + + updates-applying-ch - - updates-applying - - - updates-applying - - - updates-applying - - - updates-applying - - - updates-applying - - - updates-applying - - - updates-applying + + updates-applying-xs pools-add-host @@ -1074,9 +1059,6 @@ hosts-reconnect - - updates-applying - vms-properties @@ -1135,12 +1117,15 @@ updates-xencenter - updates-applying + updates-applying-ch - updates-applying + updates-applying-ch storage-readcaching - \ No newline at end of file + + systemalerts + + diff --git a/XenAdmin/Help/extract-help-numbers b/XenAdmin/Help/extract-help-numbers deleted file mode 100644 index 677ce4820..000000000 --- a/XenAdmin/Help/extract-help-numbers +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -dir=$(dirname "$0") - -cat $dir/HelpManager.resx | sed -e 's# ##g' | awk ' -/data name="/ { FS="\""; NAME=$2; } -/.*<\/value>/ { print "#define " NAME " " $1; }' | -sed -e 's# *# #g' | sed -e 's###g' | grep -v Icon1 | grep -v Bitmap1 | grep -v Name1 | sort -nk 3 diff --git a/XenAdmin/Help/extract-help-numbers-csv b/XenAdmin/Help/extract-help-numbers-csv deleted file mode 100644 index 6bf88ee75..000000000 --- a/XenAdmin/Help/extract-help-numbers-csv +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -dir=$(dirname "$0") - -cat $dir/HelpManager.resx | sed -e 's# ##g' | awk ' -/data name="/ { FS="\""; NAME=$2; } -/.*<\/value>/ { print NAME "," $1; }' | -sed -e 's# *# #g' | sed -e 's###g' | grep -v Icon1 | grep -v Bitmap1 | grep -v Name1 | sort -nk 3 diff --git a/XenAdmin/MainWindow.cs b/XenAdmin/MainWindow.cs index b0c5d9b57..49cbb8058 100755 --- a/XenAdmin/MainWindow.cs +++ b/XenAdmin/MainWindow.cs @@ -2563,7 +2563,7 @@ namespace XenAdmin foreach (var page in _notificationPages) { if (page.Visible) - return alertPage.HelpID; + return page.HelpID; } if (TheTabControl.SelectedTab.Controls.Count > 0 && TheTabControl.SelectedTab.Controls[0] is IControlWithHelp ctrl) diff --git a/XenAdmin/SettingsPanels/GpuEditPage.cs b/XenAdmin/SettingsPanels/GpuEditPage.cs index 37c0aa219..9919783ec 100644 --- a/XenAdmin/SettingsPanels/GpuEditPage.cs +++ b/XenAdmin/SettingsPanels/GpuEditPage.cs @@ -119,7 +119,7 @@ namespace XenAdmin.SettingsPanels if (Helpers.GpusAvailable(Connection)) { var vGpus = VGpus; - txt = vGpus.Count > 0 ? string.Join(",", vGpus.Select(v => v.VGpuTypeDescription())) : Messages.GPU_NONE; + txt = vGpus.Count > 0 ? string.Join(",", vGpus.Select(v => v.VGpuTypeDescription())) : Messages.NONE_UPPER; } return txt; diff --git a/XenAdmin/TabPages/CdnUpdates/CdnExpandableRow.cs b/XenAdmin/TabPages/CdnUpdates/CdnExpandableRow.cs index 86ec2db61..afe78cf43 100644 --- a/XenAdmin/TabPages/CdnUpdates/CdnExpandableRow.cs +++ b/XenAdmin/TabPages/CdnUpdates/CdnExpandableRow.cs @@ -205,15 +205,18 @@ namespace XenAdmin.TabPages.CdnUpdates SetValues(Host.Name(), Images.GetImage16For(Images.GetIconFor(Host)), channel: channel, lastSync: lastSyncTime, lastUpdate: lastUpdateTime); - if (poolUpdateInfo != null && hostUpdateInfo != null) + if (poolUpdateInfo != null && hostUpdateInfo != null && hostUpdateInfo.UpdateIDs.Length > 0) { - if (hostUpdateInfo.RecommendedGuidance.Length > 0) + if (hostUpdateInfo.RecommendedGuidance.Contains(CdnGuidance.EvacuateHost) || + hostUpdateInfo.RecommendedGuidance.Contains(CdnGuidance.RebootHost)) { - _childRows.Add(new PostUpdateActionRow(hostUpdateInfo.RecommendedGuidance)); + _childRows.Add(new PreUpdateActionRow()); + } - if (hostUpdateInfo.LivePatches.Length > 0 && !hostUpdateInfo.RecommendedGuidance.Contains(CdnGuidance.RebootHost)) - _childRows.Add(new LivePatchActionRow()); - } + _childRows.Add(new PostUpdateActionRow(hostUpdateInfo.RecommendedGuidance.Where(g => g != CdnGuidance.EvacuateHost).ToArray())); + + if (hostUpdateInfo.LivePatches.Length > 0 && !hostUpdateInfo.RecommendedGuidance.Contains(CdnGuidance.RebootHost)) + _childRows.Add(new LivePatchActionRow()); var categories = hostUpdateInfo.GetUpdateCategories(poolUpdateInfo); @@ -282,11 +285,23 @@ namespace XenAdmin.TabPages.CdnUpdates } } + internal class PreUpdateActionRow : CdnExpandableRow + { + public PreUpdateActionRow() + { + SetValues(Messages.HOTFIX_PRE_UPDATE_ACTIONS, Images.StaticImages.rightArrowLong_Blue_16); + } + } + internal class PostUpdateActionRow : CdnExpandableRow { public PostUpdateActionRow(CdnGuidance[] guidance) { - var text = string.Format(Messages.HOTFIX_POST_UPDATE_ACTIONS, string.Join(Environment.NewLine, guidance.Select(Cdn.FriendlyInstruction))); + var guidanceString = guidance.Length > 0 + ? string.Join(Environment.NewLine, guidance.Select(Cdn.FriendlyInstruction)) + : Messages.NONE_UPPER; + + var text = string.Format(Messages.HOTFIX_POST_UPDATE_ACTIONS, guidanceString); SetValues(text, Images.StaticImages.rightArrowLong_Blue_16); } } diff --git a/XenAdmin/TabPages/HAPage.cs b/XenAdmin/TabPages/HAPage.cs index bcde8fd3a..9f7f43747 100644 --- a/XenAdmin/TabPages/HAPage.cs +++ b/XenAdmin/TabPages/HAPage.cs @@ -211,7 +211,7 @@ namespace XenAdmin.TabPages else { buttonDisableHa.Visible = false; - labelStatus.Text = String.Format(Messages.HAPANEL_BLURB, Helpers.GetName(pool).Ellipsise(30)); + labelStatus.Text = String.Format(Messages.HA_PANEL_BLURB, Helpers.GetName(pool).Ellipsise(30)); } if ( xenObject is SR sr) diff --git a/XenAdmin/TabPages/ManageCdnUpdatesPage.cs b/XenAdmin/TabPages/ManageCdnUpdatesPage.cs index 633c96099..0993038d3 100644 --- a/XenAdmin/TabPages/ManageCdnUpdatesPage.cs +++ b/XenAdmin/TabPages/ManageCdnUpdatesPage.cs @@ -94,7 +94,7 @@ namespace XenAdmin.TabPages Updates.CdnUpdateInfoChanged -= Cdn_UpdateInfoChanged; } - public override string HelpID => "ManageUpdatesDialog"; + public override string HelpID => "ManageCdnUpdatesTabPage"; public override NotificationsSubMode NotificationsSubMode => NotificationsSubMode.UpdatesFromCdn; diff --git a/XenAdmin/TabPages/ManageUpdatesPage.cs b/XenAdmin/TabPages/ManageUpdatesPage.cs index 68ab14916..c8519d82c 100644 --- a/XenAdmin/TabPages/ManageUpdatesPage.cs +++ b/XenAdmin/TabPages/ManageUpdatesPage.cs @@ -120,7 +120,7 @@ namespace XenAdmin.TabPages Updates.CheckForServerUpdatesCompleted -= CheckForUpdates_CheckForUpdatesCompleted; } - public override string HelpID => "ManageUpdatesDialog"; + public override string HelpID => "ManageUpdatesTabPage"; public override NotificationsSubMode NotificationsSubMode => NotificationsSubMode.Updates; diff --git a/XenAdmin/Wizards/PatchingWizard/PatchingWizard.cs b/XenAdmin/Wizards/PatchingWizard/PatchingWizard.cs index 459b55732..bfc4ab805 100644 --- a/XenAdmin/Wizards/PatchingWizard/PatchingWizard.cs +++ b/XenAdmin/Wizards/PatchingWizard/PatchingWizard.cs @@ -293,6 +293,11 @@ namespace XenAdmin.Wizards.PatchingWizard base.FinishWizard(); } + protected override string WizardPaneHelpID() + { + return PatchingWizard_FirstPage.IsNewGeneration ? "PatchingWizard_xs" : "PatchingWizard_ch"; + } + private void CleanUploadedPatches(bool forceCleanSelectedPatch = false) { var list = new List(); diff --git a/XenAdmin/Wizards/PatchingWizard/PatchingWizard_AutomatedUpdatesPage.cs b/XenAdmin/Wizards/PatchingWizard/PatchingWizard_AutomatedUpdatesPage.cs index e342d37dd..b50f447cb 100644 --- a/XenAdmin/Wizards/PatchingWizard/PatchingWizard_AutomatedUpdatesPage.cs +++ b/XenAdmin/Wizards/PatchingWizard/PatchingWizard_AutomatedUpdatesPage.cs @@ -32,6 +32,7 @@ using System.Collections.Generic; using XenAPI; using System.Linq; using System.Text; +using XenAdmin.Actions; using XenAdmin.Core; using XenAdmin.Alerts; using XenAdmin.Wizards.PatchingWizard.PlanActions; @@ -61,8 +62,6 @@ namespace XenAdmin.Wizards.PatchingWizard public override string PageTitle => Messages.PATCHINGWIZARD_AUTOUPDATINGPAGE_TITLE; - public override string HelpID => string.Empty; - #endregion #region AutomatedUpdatesBesePage overrides @@ -172,28 +171,49 @@ namespace XenAdmin.Wizards.PatchingWizard private HostPlan GetCdnUpdatePlanActionsForHost(Host host, CdnPoolUpdateInfo poolUpdateInfo, CdnHostUpdateInfo hostUpdateInfo) { + // pre-update tasks and, last in the list, the update itself var planActionsPerHost = new List(); + // post-update tasks var delayedActionsPerHost = new List(); - if (hostUpdateInfo.RecommendedGuidance.Length > 0 && PostUpdateTasksAutomatically) + // hostUpdateInfo.RecommendedGuidance is what's prescribed by the metadata, + // host.pending_guidances is what's left there from previous updates + + // evacuate host is a pre-update task and needs to be done either the user has + // opted to carry out the post-update tasks automatically or manually, see CA-381225 + // restart toolstack should run before other post-update tasks, see CA-381718 + + if (hostUpdateInfo.RecommendedGuidance.Contains(CdnGuidance.RestartToolstack) || + host.pending_guidances.Contains(update_guidances.restart_toolstack)) { - if (hostUpdateInfo.RecommendedGuidance.Contains(CdnGuidance.RebootHost)) - { - planActionsPerHost.Add(new EvacuateHostPlanAction(host)); - delayedActionsPerHost.Add(new RestartHostPlanAction(host, host.GetRunningVMs())); - } - else if (hostUpdateInfo.RecommendedGuidance.Contains(CdnGuidance.RestartToolstack)) - { + if (PostUpdateTasksAutomatically) delayedActionsPerHost.Add(new RestartAgentPlanAction(host)); - } - else if (hostUpdateInfo.RecommendedGuidance.Contains(CdnGuidance.EvacuateHost)) - { - planActionsPerHost.Add(new EvacuateHostPlanAction(host)); - } - else if (hostUpdateInfo.RecommendedGuidance.Contains(CdnGuidance.RestartDeviceModel)) - { + } + + if (hostUpdateInfo.RecommendedGuidance.Contains(CdnGuidance.RebootHost) || + host.pending_guidances.Contains(update_guidances.reboot_host) || + host.pending_guidances.Contains(update_guidances.reboot_host_on_livepatch_failure)) + { + planActionsPerHost.Add(new EvacuateHostPlanAction(host)); + + if (PostUpdateTasksAutomatically) + delayedActionsPerHost.Add(new RestartHostPlanAction(host, host.GetRunningVMs())); + } + + if (hostUpdateInfo.RecommendedGuidance.Contains(CdnGuidance.EvacuateHost) && + !planActionsPerHost.Any(a => a is EvacuateHostPlanAction)) + { + planActionsPerHost.Add(new EvacuateHostPlanAction(host)); + } + + if (PostUpdateTasksAutomatically) + delayedActionsPerHost.Add(new EnableHostPlanAction(host)); + + if (hostUpdateInfo.RecommendedGuidance.Contains(CdnGuidance.RestartDeviceModel) || + host.pending_guidances.Contains(update_guidances.restart_device_model)) + { + if (PostUpdateTasksAutomatically) delayedActionsPerHost.Add(new RebootVMsPlanAction(host, host.GetRunningVMs())); - } } planActionsPerHost.Add(new ApplyCdnUpdatesPlanAction(host, poolUpdateInfo)); diff --git a/XenAdmin/Wizards/PatchingWizard/PatchingWizard_FirstPage.cs b/XenAdmin/Wizards/PatchingWizard/PatchingWizard_FirstPage.cs index b96b739c1..6e9c08388 100644 --- a/XenAdmin/Wizards/PatchingWizard/PatchingWizard_FirstPage.cs +++ b/XenAdmin/Wizards/PatchingWizard/PatchingWizard_FirstPage.cs @@ -64,8 +64,6 @@ namespace XenAdmin.Wizards.PatchingWizard public override string PageTitle => Messages.BEFORE_YOU_START; - public override string HelpID => "Beforeyoustart"; - public bool IsNewGeneration { get => radioButtonCdn.Checked; diff --git a/XenAdmin/Wizards/PatchingWizard/PatchingWizard_ModePage.cs b/XenAdmin/Wizards/PatchingWizard/PatchingWizard_ModePage.cs index 44692b4d7..fbd06fed8 100644 --- a/XenAdmin/Wizards/PatchingWizard/PatchingWizard_ModePage.cs +++ b/XenAdmin/Wizards/PatchingWizard/PatchingWizard_ModePage.cs @@ -57,8 +57,6 @@ namespace XenAdmin.Wizards.PatchingWizard public override string PageTitle => Messages.PATCHINGWIZARD_MODEPAGE_TITLE; - public override string HelpID => "UpdateMode"; - public override bool EnablePrevious() { return true; @@ -293,24 +291,37 @@ namespace XenAdmin.Wizards.PatchingWizard foreach (var hostUpdateInfo in poolUpdateInfo.HostsWithUpdates) { - if (hostUpdateInfo.RecommendedGuidance.Length > 0) + var host = pool.Connection.Resolve(new XenRef(hostUpdateInfo.HostOpaqueRef)); + if (host != null) { - var host = pool.Connection.Resolve(new XenRef(hostUpdateInfo.HostOpaqueRef)); - if (host != null) + var hostSb = new StringBuilder(); + + var msg = host.IsCoordinator() ? $"{host.Name()} ({Messages.COORDINATOR})" : host.Name(); + hostSb.AppendIndented(msg).AppendLine(); + + //evacuate host is a pre-update task and will be done regardless the mode selected + + if (hostUpdateInfo.RecommendedGuidance.Contains(CdnGuidance.RestartToolstack) || + host.pending_guidances.Contains(update_guidances.restart_toolstack)) { - var hostSb = new StringBuilder(); - - var msg = host.IsCoordinator() ? $"{host.Name()} ({Messages.COORDINATOR})" : host.Name(); - hostSb.AppendIndented(msg).AppendLine(); - - foreach (var g in hostUpdateInfo.RecommendedGuidance) - hostSb.AppendIndented(Cdn.FriendlyInstruction(g), 4).AppendLine(); - - if (hostUpdateInfo.LivePatches.Length > 0 && !hostUpdateInfo.RecommendedGuidance.Contains(CdnGuidance.RebootHost)) - hostSb.AppendIndented(Messages.HOTFIX_POST_UPDATE_LIVEPATCH_ACTIONS, 4).AppendLine(); - - hostDict[host] = hostSb; + hostSb.AppendIndented(Cdn.FriendlyInstruction(CdnGuidance.RestartToolstack), 4).AppendLine(); } + + if (hostUpdateInfo.RecommendedGuidance.Contains(CdnGuidance.RebootHost) || + host.pending_guidances.Contains(update_guidances.reboot_host) || + host.pending_guidances.Contains(update_guidances.reboot_host_on_livepatch_failure)) + { + hostSb.AppendIndented(Cdn.FriendlyInstruction(CdnGuidance.RebootHost), 4).AppendLine(); + } + + if (hostUpdateInfo.RecommendedGuidance.Contains(CdnGuidance.RestartDeviceModel) || + host.pending_guidances.Contains(update_guidances.restart_device_model)) + hostSb.AppendIndented(Cdn.FriendlyInstruction(CdnGuidance.RestartDeviceModel), 4).AppendLine(); + + if (hostUpdateInfo.LivePatches.Length > 0 && !hostUpdateInfo.RecommendedGuidance.Contains(CdnGuidance.RebootHost)) + hostSb.AppendIndented(Messages.HOTFIX_POST_UPDATE_LIVEPATCH_ACTIONS, 4).AppendLine(); + + hostDict[host] = hostSb; } } diff --git a/XenAdmin/Wizards/PatchingWizard/PatchingWizard_PatchingPage.cs b/XenAdmin/Wizards/PatchingWizard/PatchingWizard_PatchingPage.cs index 08782ea33..9393aa4eb 100644 --- a/XenAdmin/Wizards/PatchingWizard/PatchingWizard_PatchingPage.cs +++ b/XenAdmin/Wizards/PatchingWizard/PatchingWizard_PatchingPage.cs @@ -83,11 +83,6 @@ namespace XenAdmin.Wizards.PatchingWizard } } - public override string HelpID - { - get { return "InstallUpdate"; } - } - #endregion #region AutomatedUpdatesBesePage overrides diff --git a/XenAdmin/Wizards/PatchingWizard/PatchingWizard_PrecheckPage.cs b/XenAdmin/Wizards/PatchingWizard/PatchingWizard_PrecheckPage.cs index b7272a82e..4bef97a92 100644 --- a/XenAdmin/Wizards/PatchingWizard/PatchingWizard_PrecheckPage.cs +++ b/XenAdmin/Wizards/PatchingWizard/PatchingWizard_PrecheckPage.cs @@ -104,8 +104,6 @@ namespace XenAdmin.Wizards.PatchingWizard public override string Text => Messages.PATCHINGWIZARD_PRECHECKPAGE_TEXT; - public override string HelpID => "UpdatePrechecks"; - private void Connection_ConnectionStateChanged(IXenConnection conn) { Program.Invoke(this, RefreshRechecks); @@ -364,11 +362,9 @@ namespace XenAdmin.Wizards.PatchingWizard //HA checks var haChecks = new List(); - foreach (Host host in SelectedServers) - { - if (Helpers.HostIsCoordinator(host)) - haChecks.Add(new HAOffCheck(host)); - } + foreach (Pool pool in SelectedPools) + haChecks.Add(new HaWlbOffCheck(pool)); + groups.Add(new CheckGroup(Messages.CHECKING_HA_STATUS, haChecks)); //PBDsPluggedCheck diff --git a/XenAdmin/Wizards/PatchingWizard/PatchingWizard_SelectPatchPage.cs b/XenAdmin/Wizards/PatchingWizard/PatchingWizard_SelectPatchPage.cs index 83055f54b..8b0f54eba 100644 --- a/XenAdmin/Wizards/PatchingWizard/PatchingWizard_SelectPatchPage.cs +++ b/XenAdmin/Wizards/PatchingWizard/PatchingWizard_SelectPatchPage.cs @@ -216,8 +216,6 @@ namespace XenAdmin.Wizards.PatchingWizard public override string PageTitle => Messages.PATCHINGWIZARD_SELECTPATCHPAGE_TITLE; - public override string HelpID => "SelectUpdate"; - protected override void PageLoadedCore(PageLoadedDirection direction) { RegisterEvents(); diff --git a/XenAdmin/Wizards/PatchingWizard/PatchingWizard_SelectServers.cs b/XenAdmin/Wizards/PatchingWizard/PatchingWizard_SelectServers.cs index 1190f7039..d65cfba41 100644 --- a/XenAdmin/Wizards/PatchingWizard/PatchingWizard_SelectServers.cs +++ b/XenAdmin/Wizards/PatchingWizard/PatchingWizard_SelectServers.cs @@ -72,8 +72,6 @@ namespace XenAdmin.Wizards.PatchingWizard public override string PageTitle => Messages.PATCHINGWIZARD_SELECTSERVERPAGE_TITLE; - public override string HelpID => "SelectServers"; - protected override void PageLoadedCore(PageLoadedDirection direction) { poolSelectionOnly = WizardMode == WizardMode.AutomatedUpdates || diff --git a/XenAdmin/Wizards/PatchingWizard/PatchingWizard_UploadPage.cs b/XenAdmin/Wizards/PatchingWizard/PatchingWizard_UploadPage.cs index fdf26412c..3bf130ffb 100644 --- a/XenAdmin/Wizards/PatchingWizard/PatchingWizard_UploadPage.cs +++ b/XenAdmin/Wizards/PatchingWizard/PatchingWizard_UploadPage.cs @@ -120,14 +120,9 @@ namespace XenAdmin.Wizards.PatchingWizard #region XenTabPage overrides - public override string Text { get { return Messages.PATCHINGWIZARD_UPLOADPAGE_TEXT; } } + public override string Text => Messages.PATCHINGWIZARD_UPLOADPAGE_TEXT; - public override string PageTitle - { - get { return Messages.PATCHINGWIZARD_UPLOADPAGE_TITLE_ONLY_UPLOAD; } - } - - public override string HelpID { get { return "UploadPatch"; } } + public override string PageTitle => Messages.PATCHINGWIZARD_UPLOADPAGE_TITLE_ONLY_UPLOAD; public override bool EnableNext() { diff --git a/XenAdmin/Wizards/PatchingWizard/PlanActions/ApplyCdnUpdatesPlanAction.cs b/XenAdmin/Wizards/PatchingWizard/PlanActions/ApplyCdnUpdatesPlanAction.cs index 15a9d68de..4d5643924 100644 --- a/XenAdmin/Wizards/PatchingWizard/PlanActions/ApplyCdnUpdatesPlanAction.cs +++ b/XenAdmin/Wizards/PatchingWizard/PlanActions/ApplyCdnUpdatesPlanAction.cs @@ -57,6 +57,7 @@ namespace XenAdmin.Wizards.PatchingWizard.PlanActions log.DebugFormat("Disabling host {0}", host.Name()); AddProgressStep(string.Format(Messages.UPDATES_WIZARD_ENTERING_MAINTENANCE_MODE, host.Name())); Host.disable(session, HostXenRef.opaque_ref); + Connection.WaitFor(() => !host.enabled, null); } AddProgressStep(string.Format(Messages.UPDATES_WIZARD_APPLYING_UPDATES_FROM_CDN, host.Name())); diff --git a/XenAdmin/Wizards/PatchingWizard/PlanActions/EvacuateHostPlanAction.cs b/XenAdmin/Wizards/PatchingWizard/PlanActions/EvacuateHostPlanAction.cs deleted file mode 100644 index 92a90b708..000000000 --- a/XenAdmin/Wizards/PatchingWizard/PlanActions/EvacuateHostPlanAction.cs +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright (c) Cloud Software Group, Inc. - * - * Redistribution and use in source and binary forms, - * with or without modification, are permitted provided - * that the following conditions are met: - * - * * Redistributions of source code must retain the above - * copyright notice, this list of conditions and the - * following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the - * following disclaimer in the documentation and/or other - * materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND - * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -using XenAPI; - - -namespace XenAdmin.Wizards.PatchingWizard.PlanActions -{ - public class EvacuateHostPlanAction : HostPlanAction - { - public EvacuateHostPlanAction(Host host) - : base(host) - { - } - - protected override void RunWithSession(ref Session session) - { - EvacuateHost(ref session); - } - } -} diff --git a/XenAdmin/Wizards/PatchingWizard/PlanActions/HostPlanAction.cs b/XenAdmin/Wizards/PatchingWizard/PlanActions/HostPlanAction.cs index 5cf647722..8f3dde952 100644 --- a/XenAdmin/Wizards/PatchingWizard/PlanActions/HostPlanAction.cs +++ b/XenAdmin/Wizards/PatchingWizard/PlanActions/HostPlanAction.cs @@ -67,6 +67,7 @@ namespace XenAdmin.Wizards.PatchingWizard.PlanActions AddProgressStep(string.Format(Messages.UPDATES_WIZARD_ENTERING_MAINTENANCE_MODE, hostObj.Name())); log.DebugFormat("Disabling host {0}", hostObj.Name()); Host.disable(session, HostXenRef.opaque_ref); + Connection.WaitFor(() => !hostObj.enabled, null); } if (vms.Count > 0) @@ -225,4 +226,51 @@ namespace XenAdmin.Wizards.PatchingWizard.PlanActions } } } + + + public class BringBabiesBackAction : HostPlanAction + { + private readonly List> _vms; + private readonly bool _enableOnly; + + public BringBabiesBackAction(List> vms, Host host, bool enableOnly) + : base(host) + { + _vms = vms; + _enableOnly = enableOnly; + } + + protected override void RunWithSession(ref Session session) + { + BringBabiesBack(ref session, _vms, _enableOnly); + } + } + + + public class EvacuateHostPlanAction : HostPlanAction + { + public EvacuateHostPlanAction(Host host) + : base(host) + { + } + + protected override void RunWithSession(ref Session session) + { + EvacuateHost(ref session); + } + } + + + public class EnableHostPlanAction : HostPlanAction + { + public EnableHostPlanAction(Host host) + : base(host) + { + } + + protected override void RunWithSession(ref Session session) + { + WaitForHostToBecomeEnabled(session, true); + } + } } diff --git a/XenAdmin/Wizards/RollingUpgradeWizard/RollingUpgradeWizardPrecheckPage.cs b/XenAdmin/Wizards/RollingUpgradeWizard/RollingUpgradeWizardPrecheckPage.cs index 74c5de2d9..877dd915b 100644 --- a/XenAdmin/Wizards/RollingUpgradeWizard/RollingUpgradeWizardPrecheckPage.cs +++ b/XenAdmin/Wizards/RollingUpgradeWizard/RollingUpgradeWizardPrecheckPage.cs @@ -260,9 +260,8 @@ namespace XenAdmin.Wizards.RollingUpgradeWizard groups.Add(new CheckGroup(Messages.CHECKING_PV_GUESTS, pvChecks)); //HA checks - for each pool - var haChecks = (from Host server in SelectedCoordinators - select new HAOffCheck(server) as Check).ToList(); - + var haChecks = (from Pool pool in SelectedPools + select new HaWlbOffCheck(pool) as Check).ToList(); if (haChecks.Count > 0) groups.Add(new CheckGroup(Messages.CHECKING_HA_STATUS, haChecks)); diff --git a/XenAdmin/XenAdmin.csproj b/XenAdmin/XenAdmin.csproj index 83caf6e7b..e2a78a923 100755 --- a/XenAdmin/XenAdmin.csproj +++ b/XenAdmin/XenAdmin.csproj @@ -711,7 +711,7 @@ - + @@ -4246,7 +4246,6 @@ PatchingWizard_FirstPage.cs - Form @@ -4283,7 +4282,6 @@ PatchingWizard_SelectServers.cs - diff --git a/XenModel/Messages.Designer.cs b/XenModel/Messages.Designer.cs index 73cbafa78..bbefd48fc 100755 --- a/XenModel/Messages.Designer.cs +++ b/XenModel/Messages.Designer.cs @@ -18517,15 +18517,6 @@ namespace XenAdmin { } } - /// - /// Looks up a localized string similar to None. - /// - public static string GPU_NONE { - get { - return ResourceManager.GetString("GPU_NONE", resourceCulture); - } - } - /// /// Looks up a localized string similar to On {0}:. /// @@ -18898,15 +18889,6 @@ namespace XenAdmin { } } - /// - /// Looks up a localized string similar to HA and WLB check. - /// - public static string HA_CHECK_DESCRIPTION { - get { - return ResourceManager.GetString("HA_CHECK_DESCRIPTION", resourceCulture); - } - } - /// /// Looks up a localized string similar to Choose a heartbeat SR. /// @@ -19429,6 +19411,17 @@ namespace XenAdmin { } } + /// + /// Looks up a localized string similar to HA is not currently enabled for pool '{0}'. + /// + ///Click Configure HA to enable HA for this pool and allow your virtual machines to be automatically restarted in the event of unexpected server failure.. + /// + public static string HA_PANEL_BLURB { + get { + return ResourceManager.GetString("HA_PANEL_BLURB", resourceCulture); + } + } + /// /// Looks up a localized string similar to HA restart priority. /// @@ -19560,13 +19553,11 @@ namespace XenAdmin { } /// - /// Looks up a localized string similar to HA is not currently enabled for pool '{0}'. - /// - ///Click Configure HA to enable HA for this pool and allow your virtual machines to be automatically restarted in the event of unexpected server failure.. + /// Looks up a localized string similar to HA and WLB check. /// - public static string HAPANEL_BLURB { + public static string HA_WLB_CHECK_DESCRIPTION { get { - return ResourceManager.GetString("HAPANEL_BLURB", resourceCulture); + return ResourceManager.GetString("HA_WLB_CHECK_DESCRIPTION", resourceCulture); } } @@ -20540,6 +20531,15 @@ namespace XenAdmin { } } + /// + /// Looks up a localized string similar to This server will be evacuated prior to installing updates. + /// + public static string HOTFIX_PRE_UPDATE_ACTIONS { + get { + return ResourceManager.GetString("HOTFIX_PRE_UPDATE_ACTIONS", resourceCulture); + } + } + /// /// Looks up a localized string similar to {0} packages will be updated. /// @@ -28628,6 +28628,15 @@ namespace XenAdmin { } } + /// + /// Looks up a localized string similar to None. + /// + public static string NONE_UPPER { + get { + return ResourceManager.GetString("NONE_UPPER", resourceCulture); + } + } + /// /// Looks up a localized string similar to The VM is not using a shared network. Restart cannot be guaranteed.. /// @@ -30775,15 +30784,6 @@ namespace XenAdmin { } } - /// - /// Looks up a localized string similar to None. - /// - public static string PIF_NONE { - get { - return ResourceManager.GetString("PIF_NONE", resourceCulture); - } - } - /// /// Looks up a localized string similar to Static. /// @@ -42323,15 +42323,6 @@ namespace XenAdmin { } } - /// - /// Looks up a localized string similar to None. - /// - public static string WLB_OPT_REASON_NONE { - get { - return ResourceManager.GetString("WLB_OPT_REASON_NONE", resourceCulture); - } - } - /// /// Looks up a localized string similar to Release Resource. /// diff --git a/XenModel/Messages.resx b/XenModel/Messages.resx index e045cf4e6..4ae3052a2 100755 --- a/XenModel/Messages.resx +++ b/XenModel/Messages.resx @@ -6466,9 +6466,6 @@ Would you like to eject these ISOs before continuing? {0} (1 GPU) - - None - On {0}: @@ -6601,9 +6598,6 @@ not currently live: Server '{0}' cannot be placed in Maintenance Mode because it is the coordinator of an HA-enabled pool. - - HA and WLB check - Choose a heartbeat SR @@ -6790,6 +6784,11 @@ Reduce protection levels, or bring more servers online to increase the maximum s HA is currently being enabled for '{0}'. + + HA is not currently enabled for pool '{0}'. + +Click Configure HA to enable HA for this pool and allow your virtual machines to be automatically restarted in the event of unexpected server failure. + HA restart priority @@ -6836,10 +6835,8 @@ Click Configure HA to alter the settings displayed below. Review configuration and activate HA - - HA is not currently enabled for pool '{0}'. - -Click Configure HA to enable HA for this pool and allow your virtual machines to be automatically restarted in the event of unexpected server failure. + + HA and WLB check Has any custom field @@ -7170,6 +7167,9 @@ This might result in failure to migrate VMs to this server during the RPU or to This server will be live patched. If live patch fails, a server reboot will be required. + + This server will be evacuated prior to installing updates + {0} packages will be updated @@ -9942,6 +9942,9 @@ When you configure an NFS storage repository, you simply provide the host name o (None) + + None + The VM is not using a shared network. Restart cannot be guaranteed. @@ -10666,9 +10669,6 @@ This will cancel the upload process. NIC {0} - - None - Static @@ -14585,9 +14585,6 @@ A {1} user cannot alter the Workload Balancing settings. Network Writes - - None - Release Resource diff --git a/XenModel/XenAPI-Extensions/PIF.cs b/XenModel/XenAPI-Extensions/PIF.cs index 224794bdf..b4c0e46fe 100644 --- a/XenModel/XenAPI-Extensions/PIF.cs +++ b/XenModel/XenAPI-Extensions/PIF.cs @@ -362,7 +362,7 @@ namespace XenAPI switch (ip_configuration_mode) { case ip_configuration_mode.None: - return Messages.PIF_NONE; + return Messages.NONE_UPPER; case ip_configuration_mode.DHCP: return Messages.PIF_DHCP; case ip_configuration_mode.Static: diff --git a/scripts/xenadmin-build.sh b/scripts/xenadmin-build.sh index 842eac5c8..7a2d9777d 100644 --- a/scripts/xenadmin-build.sh +++ b/scripts/xenadmin-build.sh @@ -203,7 +203,7 @@ sha256sum ${OUTPUT_DIR}/${BRANDING_BRAND_CONSOLE_NO_SPACE}-source.zip > ${OUTPUT echo "INFO: Generating XCUpdates.xml" # UPDATE_URL points at the updates XML, we need to point to the MSI -msi_url="${UPDATES_URL/XCUpdates.xml/$BRANDING_BRAND_CONSOLE_NO_SPACE.msi}" +msi_url="${XC_UPDATES_URL/XCUpdates.xml/$BRANDING_BRAND_CONSOLE_NO_SPACE.msi}" output_xml="