xapi-project/xen-api — pull request #1788 by phusl (2014-06-11 05:05:49+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 - #1 should be blocked.

Signed-off-by: Phus Lu