nagaboinaramgopal opened a new pull request, #14083:
URL: https://github.com/apache/cloudstack/pull/14083
### Description
Adds a soft host-tag placement preference as a new affinity group processor.
An affinity group of type "host tag affinity" takes the group name as a host
tag; when a member VM is deployed, routing hosts in the VM's zone that carry
that tag get their deployment priority raised. It is a preference and not a
constraint, so no host is added to the avoid set, deployment still succeeds
when no tagged host is available, and check() never fails a planned destination.
This complements the existing host-tag mechanism on service and disk
offerings, which is a strict requirement, with a soft per-VM preference
expressed through affinity groups. The raised priority is a planner hint and is
not consulted by automatic DRS.
### Testing
Unit tests cover the three paths: tagged hosts get their priority raised and
nothing is excluded, an empty tag match is a no-op, and check() returns true.
Fails before, passes after: neutering the priority raise flips
testProcessRaisesPriorityForTaggedHosts to expected:2 but was:0.
Also checked on a live environment with three KVM hosts in one zone. Tagged
a single host, created a "host tag affinity" group named after the tag, and
deployed. Three VMs in the group all landed on the tagged host while a control
VM with no group landed on an untagged host, and the processor logged the
priority raise for the tagged host on each group deployment:
DEBUG [o.a.c.a.HostTagAffinityProcessor] Raised host 2 priority to 1 (VM
... prefers hosts tagged [htaff]).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]