Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cross-cluster vMotion creates DRS rules in the target cluster, if the VM was part of them in the source cluster. This can create duplicate DRS rules (by name), as it seems VMware looks at the UUID of the rule not the name. Since multiple rules for the same VM cannot be enabled at the same time and `cluster_util.get_rule()` only returns the first matching rule, Nova might update the wrong rule and the anti-affinity might not actually work. To fix this, we get all the rules with the same name during `_update_rule()` to check for duplicates. We keep the first rule we find and delete all others. If the rule is disabled, Nova will enable it already. Since Nova always updates its rule with the VMs that should be in there, any VM being in a deleted duplicate rule is handled, too. Change-Id: Ie5958a1645e8133f303e386353526ec83e646882
- Loading branch information