server: fix host anti-affinity when start batch vms#6002
Conversation
|
@blueorangutan package |
|
@weizhouapache a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 2644 |
nvazquez
left a comment
There was a problem hiding this comment.
Manually tested on KVM with 2 hosts:
Success cases:
- Create anti-affinity group
- Attempt deploying 3 VMs assigning them to anti-affinity group -> RESULT: first 2 VMs running one on each host, 3rd deployment fails
- Stop the 2 running VMs
- Deploy VM without start, assigning it to the anti-affinity group
- Start 3 VMs in batch -> RESULT: 2 VMs running on different hosts (screenshot)
Failing case:
- 2 VMs running one on each host
- Attemp to start the third VM on a specific host (different form the last_host_id) -> RESULT 3 VMs running (screenshot)
@nvazquez the case seems to be expected behaviour. see below |
@weizhouapache @nvazquez , this does not seem like desired behaviour, unless we decide to allow it (for root admin only). I think a user should remove a VM from the anti-affinity group if they want it to run anyway. code changes looks good, btw. |
@DaanHoogland |
|
Thanks @weizhouapache @DaanHoogland - looks good then |
|
@blueorangutan test |
|
@nvazquez a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-3391)
|


Description
This PR fixes #5527
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?