* Tidy up `ArchiveMaintainer`: use naming conventions
* Tidy up `ArchiveMaintainer`: use `var` when possible
* Tidy up `ArchiveMaintainer`: fix typos
* Tidy up `ArchiveMaintainer`: move action methods in own region
* Tidy up `ArchiveMaintainer`: apply code formatting
* Tidy up `ArchiveMaintainer`: remove unused constant/using
* Tidy up `ArchiveMaintainer`: group methods into regions
* Tidy up `ArchiveMaintainer`: remove xmldocs
* Tidy up `ArchiveMaintainer`: miscellaneous changes
* Tidy up `ArchiveMaintainer`: move `NextArchiveDown` to correct `region`
* CA-376887: Use multiple threads to load performance tab data
This commit removes the ad-hoc use of `Thread` and instead relies on `ThreadPool` and `CancellationToken`s to handle multi-threading. To achieve this, `ArchiveMaintainer` instances are now tied to only one `XenObject`. If a user navigates to another Performance tab, a new instance of `ArchiveMaintainer` is used. This enables XenCenter to quietly cancel ongoing data fetching operations, and start a new one without affecting the UI. UI elements are simply updated to point to the new `ArchiveMaintainer` while the old one is being closed.
Please note that follow up commits to clean up `ArchiveMaintiner` and this implementation are coming. They have been separated to make reviews easier
* CA-376887: Move initial load logic to separate method in `ArchiveMaintainer`
* CA-376887: Rename `Update` to `StartUpdateLoop` in `ArchiveMaintainer`
* CA-376887: Fix use of `Dispose` in `PerformancePage` and collapse `Stop`/`Pause` into one method
* CA-376887: Remove unused `FirstTime` variable
* Tidy up `ArchiveMaintainer`: use `switch` when possible and improve logging
* Tidy up `ArchiveMaintainer`: Move variables inline
* Tidy up `ArchiveMaintainer`: Standardize fields/properties
* Tidy up `ArchiveMaintainer`: Normalize whitespace
* CA-376887: Ensure only one thread is spawned for each `ArchiveMaintainer`
- Ensures resources are disposed of
- Fixes issues whereby quickly starting and stopping threads for the same `XenObject` `ArchiveMantainer` would cause threads from not exiting
* Improve formatting and whitespace in `ArchiveMaintainer`
* Improve logging of exceptions in `ArchiveMaintainer:Get`
* Fix `ServerNow` calls in `ArchiveMaintainer`
* Deregister `ArchiveMaintainer` events when a new one is reassigned.
Also rename methods
* Apply code review suggestions
Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
* CP-45071: Convert XenCenter build scripts to PowerShell.
* Removed obsolete variable.
* Pass the timestamp server and the certificate thumbprint as parameters to the build and sign scripts.
* Added further logging and made the verbose output of cmdlets optional.
* Updated README.
* Improved script readability.
Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
- Removed target to add manifest using mt.exe. The manifest is already in the project and embedded in the executable after the build.
- Removed Windows Vista and Windows 8 as .NET Framework 4.8 is not installable there.
Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
* CA-381728: If no post-update tasks exist, XenCenter should explicitly state so.
Also, livepatches should be shown if other guidance is absent.
Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
* Missing placeholders for building locally without applying branding.
Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
* Missing help links.
Also removed scripts that are not used any more.
Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
* CA-381618: The HA/WLB off check is a pool, not a host check.
Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
* CA-381225: Corrected order of running update guidance (also uses input from CA-381718).
Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
* UPDATES_URL has been renamed to XC_UPDATES_URL.
Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
---------
Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
- Try waiting on get_updates if it is not immediately available.
- Log instead of failing when a known (404/500) BadServerResponseException occurs.
- Ensure the UI is refreshed after fetching the list of updates.
Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
If a different thread accesses this code, the assertion will throw a Fatal error before hitting the content of the `lock`.
Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
- Put the servers in maintenance mode before applying the updates.
- Updated host do not disappear completely from the metadata hence we need to skip them from the update plan.
Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
- CA-380799: Host evacuation is not needed when the guidance is toolstack restart.
- CA-380796: Sometimes the guidance was applied before the update installation.
- Livepatch notice should be shown only if guidance is not reboot host.
Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
- Added pool name in the action descriptions.
- Fixed host order on the updates list.
- Synchronize selected was not working for standalone hosts.
- Removed stray call to save settings.
- Null check.
Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
- The pool/host unpatched icons should be shown only when the pool is not fully updated.
- Repo config dialog: added icon on the list to differentiate pools from standalone hosts.
- Use different icons for client and LCM server updates.
- Added icons to the Config Updates dialog.
Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
- Last sync date was not shown for standalone hosts.
- Unlocalised string and incomplete release info.
- Converted Synchronise button to a split button to synchronize all/selected pools.
- Update the label above the updates from CDN page when filters are on.
Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
- Alert sorting was not correct.
- A dismissal request was sent to the server even if there were no server side messages to dismiss.
Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
- Show sync status for the pool in its Updates section.
- Moved update date for the host from the Version to the Updates section.
Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
Also ensure there is a warning icon in the status column when hosts has trial with expired css in post preview
Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
- Use `Nullable.HasValue` and `Nullable.Value` to handle `DateTime?` type returned by `LicenseCssExpiry`
- Check UTC time when checking CSS license expiry
Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
Also:
- Increase size of `LicenseManager` to accommodate larger text
- Add upsell URL to existing warning for pool size restrictions
Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
If pool any of the hosts in a pool hit the `HOST_NOT_ENOUGH_FREE_MEMORY` when calling `VM.assert_can_migrate`, XenCenter would prevent migration even if other hosts had enough memory to accommodate the VM.
Likely a result of the fact that other `VM.assert_can_migrate` failures are a consequence of pool-wide configurations. This is an exception.
Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>