Remove the VDI only on a best effort basis if the upload failed in the UploadSupplementalPackAction. This will make XenCenter to display the message from the original exception and not from the removal action if the latter had also failed.
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
Fixed a typo that caused XenCenter to show a Trace error dialog (and to fail to do the clean-up) after applying an update in manual mode. (when RBAC is involved)
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>
- 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>
This change implements a lightweight retry logic for downloading updates to protect against temporary network issues.
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
Added an extra parameter to the CreateVmFastAction constructor, which is used to specify whether to set the VM's property IsBeingCreated. In order to set this property, we need to wait for the newly created VM to appear in the cache. But we cannot do this in the action test, because the cache is not being updated. Therefore the action needs skip this step when running from the tests. The IsBeingCreated property is only used in the UI, to refresh the PVS tab after the VM is created, so the accuracy of the action test (CreateVMFastActionTest) is not affected by this change.
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
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.
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>
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>
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>
- 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>
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 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>
Introduce fails with a Failure if the uploaded update has already been introduced, in that case XenCenter will use the existing Pool_update
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@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>
- Renamed Add/Remove PVS Site buttons
- Added a note on the PVS Cache configuration page, regarding the recommended cache size and the allowed size for "memory only"
- Added a warning about the Site configuration not being complete until the PVS part is done as well (only visible if PVS_uuid is not set for a PVS_site)
- Added PVS Read Caching status on the VM's general tab
- The absolute maximum allowed for a cache size is 2TB
- Changed the rubric on the Enable PVS read caching dialog
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
2 new radio buttons in Connection Options page, for Basic and Digest; Digest is the default as it's the most secure.
New proxy authentication method setting, which is used to configure XenAPI's HTTP class and the .NET AuthenticationManager (which handles which authentication schemes can be used by the .NET web classes).
The new setting is also transferred and used by the Health Check service.
The bug noted in CA-214653 also occurs here, but the work-around on PR#1201 for that bug will also work for this.
Signed-off-by: Frezzle <frederico.mazzone@citrix.com>
- We shouldn't include the hidden SRs in the list of available SRs in the Migration wizard
- Updated the SR.SupportsVdiCreate function to return false for the Memory SR; this fixes other places where the Memory SR might be visible (e.g. all places where SrPicker is used)
- Also fixed the same issue in the Attach disk dialog
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
Normally, a heartbeat is done every 15 seconds by getting the server time, and starts as soon as connection to host is established, but if an error occurs XC retries once more in another 15 seconds before actually closing the connection to the host.
Now, if a 407 Proxy Authentication Required error occurs on the initial heartbeat then XC does not retry again in 15 seconds; it will close the connection immediately. The disconnection was instant to up to 2 seconds, depending on time taken to get server time (testing with FreeProxy was ~instant and CCProxy was ~2 seconds). This is only a work-around, as the exact reason for this behaviour is still unknown.
Signed-off-by: Frezzle <frederico.mazzone@citrix.com>
- check the current number of vCPUs (by getting the latest value from the cache) before trying to change it.
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
- in the ConfigurePvsSiteAction, we now check if a site still exists, before trying to configure it
- added a CollectionChanged event handler in the Cache configuration dialog, and if we observe that a site has been added, we add it to the dialog as a new page
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>
- If the PVS site cannot be removed (it has running proxies) then popup a dialog stating the reason, instead of starting the action and failing there. We still have the same check in the action, just in case the situation changed in the meantime.
- Removed unused controls
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
PVS Tab:
- Move the "View PVS sites" button inside the "Configure PVS Cache" dialog (next to Remove button) and make it per-site (showing only the PVS servers from that site)
- Remove "Currently attached" column from the VMs section
- Rename "Status" column to "Read caching status"
Configure PVS Cache" dialog:
- Make sure there is a scrollbar to accommodate all hosts in a pool
- Add a confirmation dialog when a site is removed. The action is executed when the Remove button is pressed.
- When Memory SR is selected, set the maximum value to the dom0-extra-memory..
- Allow empty configuration (but see next point): The OK button should only be disabled if the PVS site name is empty
- Add an extra option in the "Cache storage" combobox, with text "Not configured", selected by default on a new site. When this is selected, we will remove the existing entry in pvs_cache_storage and will not create a new one.
- When a PVS site is deleted (forgotten), we first delete all the associated PVS_servers, otherwise the site cannot be deleted.
as move (halted) or migrate (suspended) destination; this was caused by using the
VM's resident_on instead of Home() host. Also, changed the disabled reason to be
a bit more generic and cover cases other than migration.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
- Allow move of multiple VDIs
- CA-187659: show better messages when batching move/migration of multiple VDIs.
- Show different tooltips for single vs. multiple VDI move/migration/deletion.
- Refactored the MoveDiskDdialog. Removed the inherited class VDIMigrateDialog and
the batching manager as it was not very different from its parent, it was registering
the events twice, and was batching migration of even single VDIs.
- Tidied up the Move- and MigrateVirtualDisk commands so they're easier to compare.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
- new image for PVS_site
- added cache size restrictions based on the SR selected
- added button to remove the PVS site on the page
- fixed the error where the subtext for a new PVS sites showed as "Not configured" even after it has been configured
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
* CP-16922: UI changes to PvsPage to replace the single configure button with a separate enable and disable one, per the design doc
* CP-16922: Intermediate checkin - command + dialog implemented, but PVS page has some layout problems.
* CP-16922: Implement GUI for enabling PVS read caching and marking/unmarking VMs for prepopulation
Fix the broken layout by reverting MainWindow.resx (which shouldn't have changed) back to the previous commit. Also removed duplicate properties button code.
* CP-16922: PVS Page changes, to properly display all VMs (not just ones with proxy), only populating proxy columns if there is a proxy set.
* CP-16922: Use a CommandButton for the enable button, connected to the same command as the VM main menu button, and using the table selection as its selection manager.
* CP-16922: Delete the old enable button click behaviour (because it now has a proper command), was causing the dialog to show up twice
* CP-16922: Properly list VMs by hiding those that should be hidden (in addition to non-VMs, also hide the __gui__ prefix and others covered by Show function). Also fixes a bug in NewVMGroupVMsPage discovered when fixing this - it would show VMs that should be hidden if you used the search bar.
* CP-16922: Use ButtonText on the Command to set the text on the PVS enable button
* CP-16922: Add the disable PVS read-caching command, and its associated proxy destroy action. Both based off enable equivalents (main difference is no dialog for now). Not used yet but will be in main window menu + disable button
* CP-16922: Add disable PVS read-caching to the main window menu (under enable), with the disable command attached to it
* CP-16922: Add support for disabling PVS read-caching for selected hosts via the PVS tab page by converting the disable button into a CommandButton in the same way as the enable button, using its own command + selection manager (because Selection Managers only bind to one control)
* CP-16922: Design - adding the "read caching enabled" column from the design, so that we display both whether caching is enabled and whether the VM is currently cached. If it's disabled all other values are missing.
* CP-16922: Add the PVS site column per the design to show the site a VM's PVS Proxy is on if it has a proxy
* CP-16922: Add an event handler for VMs changing so that newly provisioned VMs immediately show up in the PVS tab page
* CP-16922: Support for properly remembering the selection when the VM list is refreshed. A new method returns the list of VMs for the selected rows, and we can then check if the VM for the row being added is in this list. If there was no previous selection then we still select the first row by default.
* CP-16922: Remove prepopulate, which is being removed from the design. The next XAPI version will remove it, so just pass False as prepopulate for now, and remove the option from the dialog and PVS tab page.
* CP-16922: Improve UI appearance for a missing Storage Repository. Per the design, if there is no SR show the message None (memory only) instead of an empty cell
* CP-16922: Improved sorting behaviour. All columns (except VM name, which always uses it) use the VM tag as a sorting fallback (since they all have duplicates). New default sort which sorts by caching enabled first (yes before no), and then VM tag as a tiebreaker. Support for remembering the current sort on refresh, ie when a value changes.
* CP-16922: Refactoring to use a VM extension method to get the PVSProxy (or null if none exists) for a VM. This was used in the PVS Page + commands which are now much simpler.
* CP-16922: Move where the SelectionChanged event handler is set when refreshing the PVS table, so that the command buttons are updated correctly.
* CP-16922: Improvements to PVS read-caching dialog. Set accept/cancel buttons properly + adjust tab values, so focus acts as expected
* CP-16922: Remove the images from the menu for Enable/Disable PVS read-caching, most commands in the menu don't have one
* CP-16922: Sorting out the strings for the actions + ParallelAction calls, and moving them into the resx. Also reverting wrong MainWindow.resx changes.
* CAR-2184: XAPI changes. I've made the minimal possible changes to PvsPage to ensure it compiles, but it's had a lot of feature work (CP-16922) that supersedes this, these small changes should keep that merge painless.
* CAR-2184 XAPI: Reverse the unrelated changes, only keep the PVS ones.
* CP-16922: Merge latest XAPI changes, notably changes to Pvs_site.create
* CP-16922: Change tab show/hide logic for PVS tab, show it even if there are no PVS sites.
* CP-16922: Implement GUI for enabling PVS read caching
Design changes - remove the storage repo column and replace it with status, which is populated with a friendly version of the pvs_proxy_status enum. Also populate site list using site.name_label
Signed-off-by: Callum McIntyre <callumiandavid.mcintyre@citrix.com>
* CP-16922: Implement GUI for enabling PVS read caching
Adjusting the CanExecute of Enable PVS read-caching command to require at least one PVS site to be created. Since the PVS tab can show up without any sites, we need this because we can't create a proxy without a site.
* CP-16922: Code review changes.
Tidied up messages, and ensured actions run async properly, and without exiting before their task.
* CP-16922: Code review changes.
Update dialog resx, wider combobox on dialog, update action descriptions before setting RelatedTask, add friendly message body for PVS error notifications.
The else if (vm.power_state == vm_power_state.Suspended) block had been incorrectly moved out an indent level to the outer if.
Signed-off-by: Callum McIntyre <callumiandavid.mcintyre@citrix.com>
Where we have a host the VM is running on (ie vm.resident_on is not null) at the time it is reverted, attempt to start/resume on that host if possible, instead of the home server of the VM.
Signed-off-by: Callum McIntyre <callumiandavid.mcintyre@citrix.com>
* CAR-2184: XAPI changes. I've made the minimal possible changes to PvsPage to ensure it compiles, but it's had a lot of feature work (CP-16922) that supersedes this, these small changes should keep that merge painless.
Signed-off-by: Callum McIntyre <callumiandavid.mcintyre@citrix.com>
* CAR-2184 XAPI: Reverse the unrelated changes, only keep the PVS ones.
Signed-off-by: Callum McIntyre <callumiandavid.mcintyre@citrix.com>
We already renamed the column to target server, this changes the message in the case where the user doesn't choose a server on this page to also use target server.
Signed-off-by: Callum McIntyre <callumiandavid.mcintyre@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>
Expose both the HIMN network and any VIFs associated with the HIMN
network using XenCenter when the "View->Show Hidden Objects" option
is displayed. However the shown HIMN should not be able to autoplug,
edit or delete.
- Immediately complete the ParallelAction when there are no subactions to be executed, to avoid on infinite lock while waiting for the actions to be completed.
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
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>
- when the cd drive or the tools iso cannot be found, the action should fail.
- if the tools SR is broken, do not show the error on a pop-up because the UX is
bad when installation is attempted on multiple VMS.
- added one more entry to the list of possible tools iso names.
- small performance improvement.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
Generalising to also support pools. New CheckHostPatchesRequiringReboot method with the same behaviour as old method (return list of KeyValue warning messages). Pool updates on Ely use the union of messages from this method instead of the old one. Also localised the "{hotfix} on {server}" string per todo (hence resx changes).
Signed-off-by: Callum McIntyre <callumiandavid.mcintyre@citrix.com>