Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CP-48011: XAPI Support anti-affinity feature check #5631

Conversation

BengangY
Copy link

@BengangY BengangY commented May 15, 2024

Check feature flag in these places:

  1. VM start.
  2. Host evacuation. When this PR is raised, the host evacuation PR is
    still in review. So this PR doesn't include the checking for host
    evacuation. It will be included in another new PR.
  3. Create VM group.
  4. VM.set_groups. Adding VMs to a group and removing VMs from a group
    are all forbidden. If customers need to remove VMs from a group,
    just destroy the group.
  5. Send VM anti-affinity alerts.
    Also, based on our discussion, the name of feature is changed from
    VM_anti_affinity to VM_group.

@BengangY BengangY force-pushed the private/bengangy/CP-48011-review branch from bf9facd to ae33ef1 Compare May 15, 2024 07:23
@BengangY BengangY changed the title CP-48011: [Toolstack] - XAPI Support anti-affinity license v6d feature flag CP-48011: XAPI Support anti-affinity feature check May 15, 2024
@BengangY BengangY marked this pull request as ready for review May 15, 2024 07:43
@BengangY BengangY marked this pull request as draft May 15, 2024 09:24
ocaml/xapi/xapi_vm.ml Outdated Show resolved Hide resolved
ocaml/xapi/xapi_vm_group_helpers.ml Outdated Show resolved Hide resolved
let host_uuid = Db.Host.get_uuid ~__context ~self:host in
let body =
String.concat ""
[
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's probably not easy to add: but how rules are violated would be useful to know.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The breaching for anti-affinity rule can be accessed in this PR: #5605

@BengangY BengangY force-pushed the private/bengangy/CP-48011-review branch from ae33ef1 to 5b18928 Compare May 17, 2024 08:17
@robhoes
Copy link
Member

robhoes commented May 21, 2024

The new commit looks fine in principle. But we need to get the other PR done first and then rebase this PR.

@BengangY BengangY force-pushed the private/bengangy/CP-48011-review branch 2 times, most recently from 6545480 to cf11976 Compare May 27, 2024 09:42
@BengangY BengangY marked this pull request as ready for review May 27, 2024 10:15
Check feature flag in these places:
1. VM start.
2. Host evacuation. When this PR is raised, the host evacuation PR is
   still in review. So this PR doesn't include the checking for host
   evacuation. It will be included in another new PR.
3. Create VM group.
4. VM.set_groups. Adding VMs to a group and removing VMs from a group
   are all forbidden. If customers need to remove VMs from a group,
   just destroy the group.
5. Send VM anti-affinity alerts.
Also, based on our discussion, the name of feature is changed from
`VM_anti_affinity` to `VM_group`.

Signed-off-by: Bengang Yuan <bengang.yuan@cloud.com>
@BengangY BengangY force-pushed the private/bengangy/CP-48011-review branch from cf11976 to 606423e Compare May 28, 2024 03:56
@minglumlu minglumlu merged commit 6529c0b into xapi-project:feature/vm-anti-affinity May 29, 2024
14 checks passed
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.

None yet

4 participants