The ProxyAuthenticationEnabled registry key is no longer needed since
CAR-2214 is now in its own branch.
Signed-off-by: Frederico Mazzone <frederico.mazzone@citrix.com>
Fixed the bug that caused a disconnected host to appear as if it was still connected in the License Manager. After this commit, if a host get disconnected in the background its row will be disabled and will be unselectable.
(Note that when the connection resumes, the user will still have to click on a different row to have the disabled state (and the buttons) fixed, but that is a Won't fix bug (CA-115261) that I couldn't fix right now.)
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>
* CA-236844: XenCenter throws "Assertion failed" error when toggling between the RDP and VNC consoles
Couldn't reproduce it, but it looks like the assertion is hit because the console view still holds a subscription to an event from an old vnc stream (maybe not garbage collected yet).
Added code to deregister event handlers when the vcnStream is disconnected and also replaced the the assertion with an if statement, ignoring the case that might have caused the assertion failure.
* CA-236844: XenCenter throws "Assertion failed" error when toggling between the RDP and VNC consoles
Added a Debug assert and a null check.
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
After deleting the schedule vmss will be null for that message, hence
we need to handle this case.
Signed-Of-By: Sharath Babu <sharath.babu@citrix.com>
Implemented a generic mechanism to allow tab pages to unregister their event handlers when they are hidden (when a tab page gets deselected)
Also changed VMStoragePage to derive from BaseTabPage, so it could use the same mechanism.
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>
[VMSS] XC -> right click 'VM' -> Assign VM to snapshot schedule shows all policies,
even though they are not supported by VM
Signed-Off-By: Sharath Babu <sharath.babu@citrix.com>
These lists were continuously growing on each refresh, because the Where
clauses returned all items as the predicate was always evaluated to
true. The reason is: A. Even IEquatable<XenServerPatch> is
implemented on XenServerPatch, it only compares uuids. B. XenServerVersion
(also XenCenterversion) does not implement Equals (always different as the
Action returns new objects).
The two bugs these caused are: A] forever growing list of versions causing
obsolete data to be kept while everything is added to the end of the list
additionally. B] Any previously added Patch will not be updated unless the uuid has been changed (this never changes).
Fix in this commit: On each refresh, taking the new lists as they are
(from the Action) and not trying to keep or modify existing items. GC will do the rest with the old list (and objects)
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
Added "VM.pool_migrate" to the list of tasks suitable for meddling actions.
Removed the usage of MeddlingActionTitle other_config key, because it wasn't working as intended for two reasons:
- If XenCenter starts an action that does multiple async api calls, so multiple tasks, the action's title is assigned to all tasks as MeddlingActionTitles, so the second XenCenter instance would create multiple meddling actions with the same title.
- When a second XenCenter instance tries to see if a task is suitable for a meddling action, the MeddlingActionTitle is not yet present in the task's other_config, so the task is ignored in most of the cases.
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
Further changes
* implemented similar logic for the Commands too as those are keep on getting updates so affected
* moved these static fields to a class (at Images)
* used the same casing as in Resources once they have been moved
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@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>
Changed code at a a few places where it made sense to limit how many times XenCenter asks the Resource Manager for a new instance(*1) of the same(*2) image.
*1: RM returns a new object each time
*2: they are the same as we don't change the locale of a thread and also we don't localise these images - by design
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
Added a check for default_template as a workaround an issue where the allowed_operations of a default template _initially_ indicated that cross pool migration was allowed.
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
- Replaced the information tooltip with a warning icon and label at the bottom of the page.
- Added some null checks
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
have the wizard do it before we get there. Also, replaced the labels in such way
that, if there should be lag, the user will not see the draft message used only
on the designer.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@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>
- On the PVS Cache Configuration dialog, disable the cache storage fields with an information tooltip stating that this PVS cache storage cannot be changed because it is in use.
- Also set the minimum width for the splitter panels, to avoid display issues when the splitter is moved and either of the panels becomes unusable.
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
According to the Microsoft style guide XC to use 'username' for UI fields and use 'user name' when it's being referred to.
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
Show the "Change role" dialog as modal. This way we avoid other issues, like removing the user while the "Change role" dialog is open.
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
Set the suppressHistory flag to true for the parallel action that we run periodically to check the Health Check analysis result
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
* [CA-233454] PVS tab doesn't show a new VM when it's created
Refined the rules for not adding a VM to the table, if it is a template (thus not_a_real_vm), and it has the __gui__ prefix (thus hidden), we still add it, but hide it.
When its name is changed (to remove the __gui__ prefix), we update its name and re-calculate whether it should be visible (in the case of a new VM this will be true once the __gui__ prefix is gone). Also resort the table if a node changes from hidden to visible, because it appears as an addition to the table.
Signed-off-by: Callum McIntyre <callumiandavid.mcintyre@citrix.com>
* [CA-233454] Update criteria for VM visibility to include is_a_real_vm
is_a_template is changed before the name_label removes the __gui__ prefix, so this works with no other changes to the vm property changed event.
Signed-off-by: Callum McIntyre <callumiandavid.mcintyre@citrix.com>
* [CA-233454] Update when the VMs are shown in the PVS list
New observable property IsBeingCreated for VMs, set to true when they're made a hidden object, and false when they're removed from hidden objects (both in CreateVMAction). In the PVS Page when this is set to false, we re-evaluate whether a VM can be shown. This means that new VMs show here at the same time they're added to the tree (only different is tree refresh time), instead of far earlier (and before their networks were added).
Signed-off-by: Callum McIntyre <callumiandavid.mcintyre@citrix.com>
* [CA-233454] Set IsbeingCreated in the CreateVMFastAction
* [CA-233454] Properly support the VM Fast Create action
Further changes to CreateVMFastAction, to ensure it works with PVS tab - use the __gui__ prefix when the VM is created and then change it back just before showing.
* [CA-233454] Small logic adjustments/tidying up
This commit is to fix the following: "when right clicking a disconnected pool the context menu gives you the option to connect, this opens a window to enter credentials. if you close this window (either by cancel or the X), next time when you right click and click connect, nothing happens. you have to restart XenCenter to connect to the pool"
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
Changed the tree builder so that the tree nodes rely on the TreeView's font. If the nodes have their NodeFont != null, then a tree update causes new fonts to be generated for each node and when fonts are being created faster than they could be cleaned up, we reach the GLI handles limit of 10000 (which causes the Out of Memory exception).
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>
confirmations are displayed. Added checkboxes to the dialogs requesting confirmation
of dismissal of notifications so the user can opt to skip this step.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
Changes as discussed on the ticket: No longer disable the rows when they have a warning in the dialog, support warning about storage configuration as well as PVS configuration, and also include these warnings in the PVS page table.
A site's configuration needs to be completed outside of XenCenter, and when it isn't done we shouldn't allow VMs to enable PVS read caching on that site. We now disable sites that aren't configured in the enable read caching dialog, using an EnableableComboBox. I've also changed the DrawMode of that ComboBox component, OwnerDrawFixed more appropriately sizes the dropdown container when the number of items is small.
quiesce after installing vss tools
Enabling snapshot policy type to be changed to quiesce from
other snapshot policy types if the selected VMs are
quiesce snapshot capable.
Signed-off-by: Sharath Babu <sharath.babu@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>
Moved to A for Dismiss All, and E for Dismiss Selected. Since this frees D (the toolstrip menu split button uses one of these, so was previously always D), moved Filter by Date from A to D.
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>
on a background thread and show a spinner while this process is going on. Also,
removed certain duplicate controls and made some minor layout changes (margins,
sizes, column widths).
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
on a background thread and show a spinner while this is going on. Also: run this
check only the first time the page is loaded; some refactoring, namely simplified
the code scanning for SRs by reducing the number of things each method does;
fixed column widths; removed unused property.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@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>
The resume on server uses the CrossPoolMigrateCommand to implement the migration of the VM to the desired host. Before this change that command had no support for resuming a VM after migrating it, so the VM was not resumed. With this change, the CrossPoolMigrateWizard can take an optional (default false) parameter to restart the VM after migration. When this is true, the migrate action becomes a MultipleAction, first migrating and then restarting the VM.
Signed-off-by: Callum McIntyre <callumiandavid.mcintyre@citrix.com>
Also changed the page to use different resource strings for the Storage type in the right hand panel (no hotkeys should be shown there)
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
Instead of using VCPUs_max, use VCPUs_at_startup, which is the value set when we change the VCPUs count on the VM. Note that despite its name we don't need to restart to see this value change.
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>
- show a different message when deleting a Cache Configuration (a PVS_site object) that is actively in use by a PVS site
- some more text changes on the "Configure PVS Cache" dialog
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
If windows_update is in the hidden features registry key, then we hide the virtualization state line about Windows update.
Signed-off-by: Callum McIntyre <callumiandavid.mcintyre@citrix.com>
The reported bug was that the new VM would crash because when clicking through the wizard the pool master is selected by default, not the slave the VM snapshot is on. We already select a default host when a new VM is created from a selected host using HostAncestor, but this property is null for a template (which isn't in the server/VM tree). The fix is that if the selection is a template (which it is when we use new VM from Snapshot) then we instead use its host (using Home()) as the default host. Now the correct host is selected in the VM wizard and the VM creation succeeds.
Signed-off-by: Callum McIntyre <callumiandavid.mcintyre@citrix.com>
The problem here was that TimeSpan.Minutes is always below 60, eg. for 67 minutes it is 7 (with TimeSpan.Hours being 1 then). So our TimeSpan was correct, but if it was between 1 and 2 hours then we would write the minutes in the second hour (which is below 60), ignoring the hour. The fix is to use s.TotalMinutes which for 67 minutes is 67. Hours also had a similar issue, except it would be off by 24 hours for spans between 1 and 2 days.
On the General tab XenCenter shows a list of updates that requires the host to be restarted. This is shown for applied updates for which the required guidance hasn't been done (eg. restartHost or restartAgent after-apply-guidances)
This commit fixes a regression that caused restartToolstack warnings to be not shown in the list of warnings.
The displayed messages are also improved, XenCenter will show Toolstack restart or host restart appropriately and not just restart only as it used to.
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
We now enumerate pre-Creedence and pre-Clearwater servers once, and check hosts only in those lists for the checks that only apply to those servers.
Signed-off-by: Callum McIntyre <callumiandavid.mcintyre@citrix.com>
Moved from BuildList method to the GraphHelpers class. Since they're only used in this class for this search, and there's similar but broader Regex objects in the Helpers class that are used for parsing, I think it's better to keep them in this class to avoid confusion.
Signed-off-by: Callum McIntyre <callumiandavid.mcintyre@citrix.com>
This avoids unnecessary checks where we are upgrading multiple pools from different versions. Also made the same change for the unrelated pre-Clearwater only checks which had the same issue.
Signed-off-by: Callum McIntyre <callumiandavid.mcintyre@citrix.com>
We now only include the StorageLink check if we have any hosts earlier than Creedence in the RPU.
Signed-off-by: Callum McIntyre <callumiandavid.mcintyre@citrix.com>
We have some new RRDs - read, write, read_latency and write_latency. This adds support for them by adding a friendly name and using it to display them. It also adds some filtering (see GraphHelpers.cs) because for backward compatibility io_throughput_read and io_throughput_write (which differ from read and write only in scale) are still available, but shouldn't be displayed in XC. If the new read or write are available, we filter these old datasources out.
Signed-off-by: Callum McIntyre <callumiandavid.mcintyre@citrix.com>
TickUntilCompletion() is now a static method and again takes an ApplianceAction parameter. It does a null check on each while iteration to handle the case where another thread nulls the action. Also added Run() method to ApplianceAction which initialises the ticker (now a private method), and let child classes call Run() instead.
For other actions we get a ticking timer in the Events view because they use PollToCompletion, which calls their Changed event every 900ms. These actions don't use PollToCompletion, and didn't regularly call their Changed event - so their timer didn't tick regularly. This change adds a lightweight mechanism to call their changed event every 900ms until they complete. This allows the events page timer to tick every second in the same way as it does for other actions.
- on certain occasions retrieving datasources can be slow; show a spinner while in progress.
- on certain systems the list of datasources may be long; added search box to aid the user filter them by name.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@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>