Skip to content

Conversation

BengangY
Copy link
Contributor

@BengangY BengangY commented Apr 22, 2024

VM in an anti-affinity group will choose a host based on the following steps:

  1. If the VM is associated with an anti-affinity group, compute the amount
    of VMs associated with this anti-affinity group for each host.
  2. Group these hosts based on the VM's amount. The hosts with the same VM
    amount are in the same group. Sort all the host groups ascending based on
    the VM's amount.
  3. If a host is an affinity host for this VM, it will be treated as a single
    host group and be put on the head of the group list.
  4. Choose a host which the VM can run on it from each group.

@BengangY BengangY force-pushed the private/bengangy/CP-47302 branch from 79ce511 to c158a72 Compare April 22, 2024 06:15
@BengangY BengangY marked this pull request as ready for review April 22, 2024 06:28
@BengangY BengangY force-pushed the private/bengangy/CP-47302 branch from c158a72 to 9909216 Compare April 23, 2024 01:57
@gangj
Copy link
Contributor

gangj commented Apr 23, 2024

For the 1st commit: "CP-47302: VM start with anti-affinity", would you please add some descriptions about the anti-affinity rules for VM start: how a host is chosen for anti-affinity VM.

For the 2nd commit, the commit message would be better as:
"CP-47302: UT for VM start with anti-affinity"

@BengangY BengangY force-pushed the private/bengangy/CP-47302 branch from 9909216 to f0d6241 Compare April 23, 2024 07:11
@BengangY BengangY force-pushed the private/bengangy/CP-47302 branch from 50af2b2 to 5228bf4 Compare April 24, 2024 06:03
@BengangY BengangY force-pushed the private/bengangy/CP-47302 branch 2 times, most recently from d777784 to e6102d5 Compare April 24, 2024 08:21
@BengangY BengangY force-pushed the private/bengangy/CP-47302 branch from e6102d5 to 91ee946 Compare April 24, 2024 11:19
@BengangY BengangY force-pushed the private/bengangy/CP-47302 branch from 91ee946 to c419275 Compare April 24, 2024 14:19
@BengangY BengangY force-pushed the private/bengangy/CP-47302 branch 2 times, most recently from d15d63c to 6c835fb Compare April 25, 2024 07:29
VM in an anti-affinity group will choose a host based on the following steps:
1. If the VM is associated with an anti-affinity group, compute the number
   of VMs associated with this anti-affinity group for each host.
2. Group these hosts based on the VM's count. The hosts in one group have the
   same number of VMs in one anti-affinity group. Sort all the host groups
   ascending based on the VM's count.
3. If a host is the affinity host of this VM, it will be treated as a single
   host group and be put on the head of the group list.
4. Choose a host randomly which the VM can run on it from each group.

Signed-off-by: Bengang Yuan <[email protected]>
@BengangY BengangY force-pushed the private/bengangy/CP-47302 branch from 6c835fb to d438adb Compare April 25, 2024 07:38
@BengangY BengangY force-pushed the private/bengangy/CP-47302 branch from d438adb to 0de00ba Compare April 25, 2024 13:47
@robhoes robhoes merged commit aeac4cc into xapi-project:feature/vm-anti-affinity Apr 25, 2024
Copy link

pytype_reporter extracted 50 problem reports from pytype output

.

You can check the results of the job here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants