* CA-274082: Check status of SR uploaded updates during update installation
* fix review comments
Signed-off-by: Jisheng Xing <jisheng.xing@citrix.com>
us a lot of broken builds. Fixed bug where the HostPlanAction.CurrentHost was
always null (as the private field was never set).
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
PageLoaded override in derived classes, enforce it by wrapping the page specific
code in a new virtual method, which the derived classes can override and PageLoaded
can call after its own logic.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
override in derived classes, enforce it by wrapping the page specific code in
a new virtual method, which the derived classes can override and PageLeave can
call before its own logic.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
For this purpose, the evacuate-reboot-bringbabiesback triplet was replaced by a
new RestartHostPlanAction, which allows fallback to toolstack restart if live
patching has succeeded. Also, created new abstract class HostPlanAction to
reduce code duplication.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
List in order to enforce the order of checks (the Dictionary is not guaranteed to
keep the order the items are added). Also, extra null check.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
in the Host extensions. Moved method TryResolveWithTimeout to the Connection class
where it is more relevant. Removed wrapper methods WaitForReboot and WaitForAgent
as they were not particularly useful.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
alongside the wizard progress buttons. For this purpose, the separate UpdateControls
method was removed and the logic was moved in the EnableNext method. The OnPageUpdated
method that fires this is now called every time the checks start.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
calculating the AfterApplyGuidanceActionsForPatch twice when the patch had
mandatory guidance.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
* CA-281646: Do not download the update again when using an update from disk
When applying a "new version" update, XenCenter starts an automated updates sequence that by default downloads all the updates. However, when using an update from disk, we shouldn't download it again.
With these changes, when an update from disk is used we save the [update, path] mapping, which we then use in the automated updates sequence, so we don't download that update again.
Also fixed a bug where a zipped update file from disk is not identified as a new version.
* CA-281646: Remove unused directive
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
- The new "server selection" precheck is added for Inverness or greater pools and checks if all the servers in the pool are selected (if update not already applied) when applying an update that has the "enforce-homogeneity" flag set to true
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
Increased the wait between host_enable attempts, allowing to wait more for the host to reboot.
This will affect Automated Updates and other normal Patching Wizard
operations as well.
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
CA-267330: [Update Wizard Improvements] The Update wizard: block the installation of an update on slaves if a reboot or a toolstack restart is pending on master
The commit fixes bug and unify sorting rules in ManageUpdatesPage,
PatchingWizard_SelectServers and RollingUpgradeWizardSelectPool data
grid views.
The rules are:
1) Name column sorted purely by name.
2) Other columns sorted by string value, if the same, sorted by default,
which is still in order even in reverse direction.
Signed-off-by: Ji Jiang <ji.jiang@citrix.com>
Fixed a bug that caused XenCenter to try to apply an update (that the user manually selected) multiple times and therefore failed. This was only present when the Select All button was used.
prevent them from being serialised alongside the API properties. This will also
be useful for moving the API bindings out of XenModel.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
- Change the "Web page" column alignment to TopLeft, to match the other columns
- When trying to find an alert from a filename, use the patch name instead of the alert name, because now the alert name can also be a version name
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
* CA-249823 - Accept zip files in Updates Wizard
* CA-258326 - Improve implementation of CA-248823(Accept zip files in Updates Wizard)
* Small unrelated bugfix: Stop selectFromDiskRadioButton being checked when
restoring dismissed updates.
Signed-off-by: Letsibogo Ramadi <letsibogo.ramadi@citrix.com>
- Ensure that the disk-space plugin functions are not called on Ely or greater hosts, except for the 'get_avail_host_disk_space' function, which is still needed
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
Due to a regression (introduced by [1]), XenCenter will not run delayed actions in the correct host-order at all times. This can cause the master to be not the first host to be rebooted what may result in connections being lost to slaves should the API change between restarts/updates in a way that it would not be compatible to the previous version. This would make the wizard fail and users would have to restart their master host manually to make it connect to its slaves again.
This commit fixes the order of the hosts when executing the delayed actions.
[1]: 15827512e1
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
In rare cases, the GetMaster could return null, causing the update progress to fail with "Pool_patch or Pool_update not found". (when the Cache hasn't been populated by the execution gets here)
This commit drops GetMaster and uses a pre-saved masterUuid instead of waiting for the Cache what would be the other way to solve this issue.
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
Reset the PrecheckPage.PoolUpdate property on leaving the SelectPatch page, because it needs to be null for the Automated Updates mode and for the single update mode it will be updated on leaving the Upload page.
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
Perform all the prechecks on applicable hosts only (i.e. the hosts that don't have the update applied already), with the following exceptions:
- The HA check, which is performed on the pool master
- The server-side precheck (PatchPrecheckCheck) which will still be performed on all servers in the pool and will show the warning if the update has already been applied on some servers
This commit also adds an override to the HAOffCheck.SuccessfulCheckDescription to show the pool name instead of the master's if the check is successful.
Also, in the PatchPrecheckCheck, I had moved the code that checks if the patch is already applied to the very beginning (before the host liveness check), so it will return the warning that the server will be skipped even if the server is not reachable
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
Also rearranged some code in PatchingWizard class, to keep all property assignments together for each wizard page
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
Introduced the WizardMode enum and the WizardMode properties in several wizard pages (replacing the IsInAutomatedUpdates boolean property)
When in NewVersion mode, we show the same wizard pages as the AutomatedUpdates mode and we build the update sequence based on the selected update alert (which is an update to a new version)
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
In the Updates wizard:
New versions that are available as updates will be listed in the "Download Updates from Citrix" section, before any other updates.
If XenCenter is not the latest version, these rows will be greyed out, with a tooltip.
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
- On the Updates tab: for new versions, check that the version of XenCenter is at least the latest. If not, give an additional option to download a newer XenCenter (for both updates and upgrades), and not offer "Download and Install" (for updates).
- In the Patching wizard: if the update is a new version, we force the user to first update their XenCenter to the new version
- In the RPU wizard: if the server version is not the latest and their XenCenter version is not the latest from updates.xml, we assume that they want to upgrade to the latest XenServer version and we force the user to first update their XenCenter to the latest version.
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
When a TargetInvocationException is raised, its InnerException property holds the underlying exception, which is what we should display.
Also ellipsise the action description (which could be an error thrown by the upload action) that is displayed on the Upload page.
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
This commit fixes a bug in the Update Wizard that causes XenCenter to not restart Toolstack when it should in the following case: in Automated Mode, when the update sequence for a host has an update that contains live-patch with restartHost guidance (and guidance-mandatory=false) followed by an update with Toolstack restart guidance.
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
Also changed ApplyPatchAction and ApplyUpdateAction to install a single update to a single host, so that the appropriate action title can be displayed if an action fails. And replaced 2 hardcoded strings with resource strings.
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
Disabled the ability to select unreachable hosts and in addition
added a try/catch block to hide error message resulting from trying
to clean up an unreachable host.
Signed-off-by: Letsibogo Ramadi <letsibogo.ramadi@citrix.com>
This change does not apply to supplemental packs, as we should be able to install supp packs to individual hosts in a pool.
Also, if the wizard is installing an update from disk and we cannot match it in updates.xml, then we will continue to allow host selection, because we can't tell whether it is a supp pack or a hotfix.
Plus fixing the bug where the "Select All" button is enabled even when all the selectable servers/pools are selected
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
- Added a new method in XenTabPage which the derived classes can implement to select a default control after the page is loaded.
- Added a new wizard test that runs through the wizard by pressing the Enter key and checks if it has landed on the right page.
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
If batch updating fails in a pool, this code will do the clean up by
running the appropriate (next in the queue) RemoveUpdateFilesFromMaster action. In addition to Pool_update.clean(), Pool_update.destroy() will be called when needed.
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
The Pool_update does not always covers all the VDIs XenCenter creates. These orphaned ones have to be deleted as well.
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
For ISO updates, when disabling hosts, use the filename matching logic for pre-Ely hosts as well.
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
Modify the cleanup pool update action to also call update destroy (removing the update from xapi db) when the update has not been applied to any hosts (ie we cancelled the wizard before completion).
This happened because the LivePatchCodesByHost was null when the prechecks were generated for an update, so the live patch codes returned by the precheck were ignored.
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
Due to the tooltip container introduced for the automatic radio button, winforms didn't treat these radio buttons properly - we needed code to make them mutually exclusive, tab didn't behave properly and keyboard arrow navigation between them didn't work. Therefore I have removed the tooltip container (so our radio buttons behave properly without any extra work) and we instead use a winforms tooltip shown when the mouse is over the automatic radio button. Note that since the control is disabled when we want a tooltip, neither hover events nor attaching a winforms tooltip in the usual way will work. Therefore I use a mousemove event on the table, which displays the tooltip if and only if we are over the disabled control. Also adjusted the tab indexes to make sure tab works correctly across the whole page.
Signed-off-by: Callum McIntyre <callumiandavid.mcintyre@citrix.com>
I've looked at how this was implemented in Dundee, and there we used an absolute height on the row containing the manual checkbox. I've done the same here, changing row 3 from autosize to absoliute 47px. I've also removed the empty row that was between the two radio buttons. This is a Winforms problem, without workarounds an autosize radio button in an autosize container (say the table row) will report its height as one row of text, no matter whether it needs more. This seems to be the only place we use a long radio label (as opposed to a separate label underneath the radio), so I doubt it's worth doing anything more complex than this. I've tested it with the CN string used in the ticket, and it uses less space than the English translation. The string also hasn't changed from Dundee.
Signed-off-by: Callum McIntyre <callumiandavid.mcintyre@citrix.com>
- added a new precheck, called "Live patching status" which checks is a reboot is needed for each host. If reboot is needed, the check will display a warning, otherwise it will show a green tickbox, saying that the server does not need to be rebooted, and if live patching is used, this information will be included as well.
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
Using new XAPI functionality in Install Update Wizard required by the new packaging format (ISO updates)
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
Replace PATCH_PRECHECK_LIVEPATCH_MISSING to PATCH_PRECHECK_LIVEPATCH_NOT_APPLICABLE due to changes in XAPI
Note: if XAPI change gets active before this change we will see UNKNOWN instead of PATCH_PRECHECK_LIVEPATCH_NOT_APPLICABLE in XenCenter what will make no difference
Fixed regression caused by 5555709337.
Supplemental packs can now be installed again in automatic mode.
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
Adjusted messages, and added a tooltip to the Automatic restart radio when it's disabled. Also now support standalone hosts in addition to pooled.
Signed-off-by: Callum McIntyre <callumiandavid.mcintyre@citrix.com>
- When building the list of servers that require post-install actions, ignore the ones where the patch has already been installed.
- Also fixing the infinite recursion in Build() method (causing StackOverflowException when installing a supplemental pack).
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
This fixes the NullReferenceException that occurs when trying to evacuate a host after a non-livepatch update (that requires reboot) has been installed
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
XenCenter will check host.patches_requiring_reboot when a host restart is due while a batch update is in progress. If the restart is not required, XenCenter will skip relevant PlanActions.
The intention here is to check this whenever a restart is due according to the original schedule - this way a completely livepatchable update can prevent the restart while the key batch hotfixing logic is not changed.
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
Automatic is disabled if any pool forbids auto restart (per Neptune), and reboot is required. It's also disabled if the update type isn't one of the three in the switch statement. If it's enabled it is checked by default.
If we are expecting to live patch, but at the end
hosts.patches_requring_reboot contains the patch, then warn the user that
live patching has failed for the host - and it needs to be rebooted.
Signed-off-by: Callum McIntyre <callumiandavid.mcintyre@citrix.com>
This commit implements the check for LiveUpdate capability of a patch. If
the patch is completely live-updatable, XenCenter will not restart the
host (but will do further checks once it has finished installing the
update - separate ticket)
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
the checks before the page is loaded. Corrected the conditions for enabling the
Previous and Next buttons on this page. This commit fixes broken RPU wizard test.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
Comparing uuids instead of references that likely will be changed after the Cache has been repopulated.
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
- Moved progress bar at the bottom of the page and made it the same height as on Upload page; This progress bar is now used when the prechecks are performed (existing functionality) and also for the "resolve" actions (new functionality).
- Added a label for displaying action progress.
- The icon and label saying that you need to resolve problems is hidden when there are no issues found and when an action is in progress (when the progress label is shown instead).
- When a resolve action is in progress, all controls on the page are disabled, apart from Cancel; pressing Cancel will cancel the "resolve" action and the wizard.
- Also put everything in a TableLayoutPanel (hence all the designer changes)
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>