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>
When getting the control domain VM, we should use the control_domain only if it is not null. there is no need to check the version (which was, however, looking at the API version of the master)
Always stop any running ncover service before starting (instead of ignoring the error and using the currently running one), and ignore the error if it's already been stopped at the end. The logic for the latter is that we stop the service right after the commands that require it, so if it stopped too early they'll error anyway. If they don't error because of the stopped service then we shouldn't error right at the end.
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>
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>