xapi-project/xen-api — pull request #1914 by phusl (2014-09-05 01:34:37+00:00)
Title: CA-121347: Fix inconsistency in HA checks

1. It's currently possible to make a halted VM, with ha_restart_priority="restart", non-agile (whether by creating a VIF, VBD or VGPU).
2. It's not possible to set ha_restart_priority="restart" on a non-agile, halted VM (this is a bit odd as it would result in the same situation as above).
3. It's not possible to start a non-agile VM that has ha_restart_priority="restart" (this has always been true, but before my fix VMs with non-passthrough VGPUs were incorrectly marked as agile).
4. It's not possible to make a running VM, with ha_restart_priority="restart", non-agile.
5. It's not possible to set ha_restart_priority="restart" on a non-agile, running VM.

Point #1 is inconsistent with point #2 - #2 should be allowed. However, after either performing either #1 or #2 it should be impossible to start the VM until the VM is made agile again, or ha_restart_priority is reset to ""

Signed-off-by: Phus Lu phus.lu@citrix.com