diff --git a/XenAdmin/Diagnostics/Checks/PatchPrecheckCheck.cs b/XenAdmin/Diagnostics/Checks/PatchPrecheckCheck.cs index 64f7cb645..16ce2332e 100644 --- a/XenAdmin/Diagnostics/Checks/PatchPrecheckCheck.cs +++ b/XenAdmin/Diagnostics/Checks/PatchPrecheckCheck.cs @@ -115,6 +115,11 @@ namespace XenAdmin.Diagnostics.Checks if (livePatchCodesByHost != null) livePatchCodesByHost[Host.uuid] = livepatchStatus; } + //trying to apply update to partially upgraded pool + else if (Helpers.ElyOrGreater(Helpers.GetMaster(Host.Connection)) && !Helpers.ElyOrGreater(Host)) + { + return new WrongServerVersion(this, Host); + } return null; } diff --git a/XenAdmin/TabPages/GeneralTabPage.cs b/XenAdmin/TabPages/GeneralTabPage.cs index 359f0f9d3..bd39897b9 100644 --- a/XenAdmin/TabPages/GeneralTabPage.cs +++ b/XenAdmin/TabPages/GeneralTabPage.cs @@ -1677,7 +1677,7 @@ namespace XenAdmin.TabPages if (Helpers.ElyOrGreater(host)) { foreach (var update in host.AppliedUpdates()) - result.Add(update.Name); + result.Add(UpdatesFriendlyName(update.Name)); } else { @@ -1770,7 +1770,7 @@ namespace XenAdmin.TabPages foreach (var update in updates) if (predicate(update)) - output.Add(update.name_label); + output.Add(UpdatesFriendlyName(update.Name)); output.Sort(StringUtility.NaturalCompare); @@ -1893,8 +1893,8 @@ namespace XenAdmin.TabPages private KeyValuePair CreateWarningRow(Host host, Pool_update update) { - var key = String.Format(Messages.GENERAL_PANEL_UPDATE_KEY, update.Name, host.Name); - var value = string.Format(Messages.GENERAL_PANEL_UPDATE_REBOOT_WARNING, host.Name, update.Name); + var key = String.Format(Messages.GENERAL_PANEL_UPDATE_KEY, UpdatesFriendlyName(update.Name), host.Name); + var value = string.Format(Messages.GENERAL_PANEL_UPDATE_REBOOT_WARNING, host.Name, UpdatesFriendlyName(update.Name)); return new KeyValuePair(key, value); } @@ -1909,6 +1909,11 @@ namespace XenAdmin.TabPages return Core.PropertyManager.GetFriendlyName(string.Format("Label-{0}", propertyName)) ?? propertyName; } + private static string UpdatesFriendlyName(string propertyName) + { + return Core.PropertyManager.FriendlyNames.GetString(string.Format("Label-{0}", propertyName)) ?? propertyName; + } + private void linkLabelExpand_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { foreach (PDSection s in sections) diff --git a/XenAdmin/Wizards/PatchingWizard/PatchingWizard_SelectServers.cs b/XenAdmin/Wizards/PatchingWizard/PatchingWizard_SelectServers.cs index 81c448c86..7e783b3e5 100644 --- a/XenAdmin/Wizards/PatchingWizard/PatchingWizard_SelectServers.cs +++ b/XenAdmin/Wizards/PatchingWizard/PatchingWizard_SelectServers.cs @@ -208,6 +208,14 @@ namespace XenAdmin.Wizards.PatchingWizard return; } + //if host is unreachable + if (!host.IsLive) + { + row.Enabled = false; + row.Cells[3].ToolTipText = Messages.PATCHINGWIZARD_SELECTSERVERPAGE_HOST_UNREACHABLE; + return; + } + return; } @@ -228,6 +236,13 @@ namespace XenAdmin.Wizards.PatchingWizard return; } + if (!host.IsLive) + { + row.Enabled = false; + row.Cells[3].ToolTipText = Messages.PATCHINGWIZARD_SELECTSERVERPAGE_HOST_UNREACHABLE; + return; + } + switch (type) { case UpdateType.NewRetail: @@ -430,14 +445,18 @@ namespace XenAdmin.Wizards.PatchingWizard { if (poolSelectionOnly) { - return SelectedPools.SelectMany(p => p.Connection.Cache.Hosts).ToList(); + if (IsInAutomaticMode) + //prechecks will fail in automated updates mode if one of the hosts is unreachable + return SelectedPools.SelectMany(p => p.Connection.Cache.Hosts).ToList(); + //prechecks will issue warning but allow updates to be installed on the reachable hosts only + return SelectedPools.SelectMany(p => p.Connection.Cache.Hosts.Where(host => host.IsLive)).ToList(); } else { List hosts = new List(); foreach (PatchingHostsDataGridViewRow row in dataGridViewHosts.Rows) { - if (row.Tag is Host) + if (row.IsSelectableHost) { if ((row.HasPool && ((int)row.Cells[POOL_ICON_HOST_CHECKBOX_COL].Value) == CHECKED) || (!row.HasPool && ((int)row.Cells[POOL_CHECKBOX_COL].Value) == CHECKED)) hosts.Add((Host)row.Tag); diff --git a/XenModel/Actions/Pool_Patch/RemovePatchAction.cs b/XenModel/Actions/Pool_Patch/RemovePatchAction.cs index bc3e0979b..6dd4a9ac2 100644 --- a/XenModel/Actions/Pool_Patch/RemovePatchAction.cs +++ b/XenModel/Actions/Pool_Patch/RemovePatchAction.cs @@ -61,9 +61,15 @@ namespace XenAdmin.Actions protected override void Run() { Description = String.Format(Messages.REMOVING_UPDATE, patch.Name); - - RelatedTask=Pool_patch.async_destroy(Session, patch.opaque_ref); - PollToCompletion(0, 100); + try + { + RelatedTask = Pool_patch.async_destroy(Session, patch.opaque_ref); + PollToCompletion(0, 100); + } + catch (Failure f) + { + log.Error("Clean up failed", f); + } Description = String.Format(Messages.REMOVED_UPDATE, patch.Name); } diff --git a/XenModel/FriendlyNames.Designer.cs b/XenModel/FriendlyNames.Designer.cs index 3a9532a2c..ecd416dd6 100644 --- a/XenModel/FriendlyNames.Designer.cs +++ b/XenModel/FriendlyNames.Designer.cs @@ -2769,6 +2769,15 @@ namespace XenAdmin { } } + /// + /// Looks up a localized string similar to PVS-Accelerator. + /// + public static string Label_pvsaccelerator { + get { + return ResourceManager.GetString("Label-pvsaccelerator", resourceCulture); + } + } + /// /// Looks up a localized string similar to Disk space allocations. /// @@ -3462,6 +3471,24 @@ namespace XenAdmin { } } + /// + /// Looks up a localized string similar to Measured Boot. + /// + public static string Label_xenserver_measured_boot { + get { + return ResourceManager.GetString("Label-xenserver-measured-boot", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Container Management. + /// + public static string Label_xscontainer { + get { + return ResourceManager.GetString("Label-xscontainer", resourceCulture); + } + } + /// /// Looks up a localized string similar to HA Settings. /// diff --git a/XenModel/FriendlyNames.resx b/XenModel/FriendlyNames.resx index 975e10614..ef43cfc0d 100644 --- a/XenModel/FriendlyNames.resx +++ b/XenModel/FriendlyNames.resx @@ -1916,4 +1916,13 @@ '{0}' Write Latency + + PVS-Accelerator + + + Measured Boot + + + Container Management + \ No newline at end of file diff --git a/XenModel/Messages.Designer.cs b/XenModel/Messages.Designer.cs index 18ccc71ce..e22733e48 100755 --- a/XenModel/Messages.Designer.cs +++ b/XenModel/Messages.Designer.cs @@ -26889,6 +26889,15 @@ namespace XenAdmin { } } + /// + /// Looks up a localized string similar to The server is unreachable. + /// + public static string PATCHINGWIZARD_SELECTSERVERPAGE_HOST_UNREACHABLE { + get { + return ResourceManager.GetString("PATCHINGWIZARD_SELECTSERVERPAGE_HOST_UNREACHABLE", resourceCulture); + } + } + /// /// Looks up a localized string similar to Update already applied. /// diff --git a/XenModel/Messages.resx b/XenModel/Messages.resx index fe3db4980..e073aa0cd 100755 --- a/XenModel/Messages.resx +++ b/XenModel/Messages.resx @@ -9286,6 +9286,9 @@ However, there is not enough space to perform the repartitioning, so the current The server is not licensed for automated updates + + The server is unreachable + Update already applied