bhouse-nexthop commented on PR #14108: URL: https://github.com/apache/cloudstack/pull/14108#issuecomment-5618788379
Thanks — both correct, and both fixed. **Re-checking VMs with no affinity groups.** You're right, and my own javadoc contradicted the code: it said the check "also covers dedicated resources and DPDK", while the early return skipped `applyAffinityConstraints` entirely for VMs with no groups. Both of those exclusions apply regardless of group membership. The early return is gone. I'd added it out of a concern about `HostAntiAffinityProcessor` taking a `SELECT ... FOR UPDATE` on the affinity group rows. On reflection that concern doesn't hold here: this runs once per planned migration at execution time, bounded by `drs.max.migrations`, not inside the O(VMs × hosts) planning loop. Correctness wins. **Orphaned javadoc.** Confirmed — `executeDrsPlan`'s block was stranded above `destinationViolatesAffinity` and `executeDrsPlan` had none. Moved back. Test updated to assert the opposite of what it did before: a VM with no affinity groups is still put through the re-check. -- 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]
