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>
Partially upgraded pools are not supported. If the versions of servers mismatch in a pool, Automatic updating will be disabled with the appropriate info message.
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
even when automatic mode was supported for them. The problem was that the xenserver
versions were not retrieved from the DownloadUpdatesXmlAction once the latter had run.
Also, minor refactoring.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
If there is no <minimalpatches /> tag, the version is not supported. This check has priority over licensed state when displaying the reason why a server is not supported.
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
hotkeys; button enabled state; some memory leaks; added spinner while check for
updates is in progress; added alternative text for when automatic mode is not available.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
Implemented pre-check to check whether there is enough free disk space
before starting updating a pool.
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
- Add a new update to the list of uploaded updates only when the upload action has completed successfully.
- Do not perform the disk space check if there is nothing to upload (update has already been uploaded).
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
The PatchPrechecksOnMultipleHostsInAPoolPlanAction did not filter the patchmappings by masterhost, so with some probability, it could choose the wrong mapping (pool_patch object for the same update, but in different pool). This bug is being fixed in this commit, other changes only renamed (for more consistent naming) a class and removed an unused field.
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
XenCenter no longer ignores checking if the master host already has the specified patch applied; it now checks before trying to apply it, which means we get no error in the Patching Wizard's Patching Page.
Signed-off-by: Frezzle <frederico.mazzone@citrix.com>
Where (in code removed by this commit) we iterated through the planActionsByHost dictionary, the hosts were iterated through in the order how the dictionary was initialized. Despite the actions were added in the right order, they then were screwed up, because the Cache.Hosts can have the hosts randomly while we want the master to be first.
To fix the bug, I changed the data structure from a dictionary to a list that has the actions exactly in the (good) order, the order they were added, eliminating the risk of the actions being retrieved in the wrong order.
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
Fixed display issue, now showing pools (and standalone hosts at the same level), not masters.
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
* CA-77990: Report required actions for all VMs at once in the hotfix wizard / RPUW
* CA-77990: Resolve precheck problems in parallel in the Patching wizard
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
* CA-77990: Resolve precheck problems in parallel in the Patching wizard
Changes following code review: Made the ParallelAction work across connections and removed CrossConnectionParallelAction
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
* CA-77990: Modified ParallelAction to create queue on RunSubActions only, with the correct queue size
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
Added support for defining custom update.xml location in Registry. This
can be either a local file or an URL. This will be beneficial when testing XenCenter.
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
DownloadUpdatesXmlAction is called on PageLeave and not when the user selects Automatic Mode. This way we get the error message at the right time, also showing a progress dialog what makes the UX much better.
New tooltips for servers on the Select Server Page to to cover two more cases
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
Implemented error handling.
If there has been an error in a pool, we stop executing actions in that pool immediately, and report the error once every other actions have finished. Error in one pool will not affect the upgrade process of other pools.
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
Removed the first item instead of changing it - it is more logical to not to have it displayed here.
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
Disableded non-required pages in the wizard
Added placeholder for new pages
Changed sequence of pages
Removed unnecessary code
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
- Added PoolPatchCleanAction which is called for each pool after the patch has been applied on all selected hosts
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
- XenCenter build system picks up the RPU hotfixes from Artifactory
- RPU001 and RPU002 replace XS62E006 and XS65ESP1006
- Removed hotfixes from the solution, moved XS60E001 to Branding folder
- also cleaned up code in the HotfixFactory class, removing MNR and Cowley hotfixes (not supported anymore)
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
Fixed code to treat uuids of patches case-insensitive when consuming, but not changing them (eg. to lowercase) to keep compatibility with older XAPIs.
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
- InvisibleMessages.resx contains the default value for the update file extension (xsupdate), which can be overwritten in Branding.cs
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
- Not applied updates do not appear anymore in the General Tab of a pool. (Related to CA-180577)
- If we apply a patch that was already applied (happens when we take a file from disk that is not in the updates list taken from the Citrix website -> no metadata), on cancel we are now removing the uploaded patch from the host.