Scope host tag-rule matches to deployment plan in FirstFit/Random allocators#8
Draft
Copilot wants to merge 2 commits into
Draft
Scope host tag-rule matches to deployment plan in FirstFit/Random allocators#8Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
Copilot
AI
changed the title
[WIP] Fix automatic VM deployments for service offerings with host and storage tags
Scope host tag-rule matches to deployment plan in FirstFit/Random allocators
Jun 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automatic VM placement could fail when a service offering combined host tags and storage tags because rule-tagged hosts were appended without zone/pod/cluster scoping, allowing out-of-scope hosts into allocation. This made host candidates diverge from storage-pool scope and broke valid host+pool pairing in planner flow.
Host selection scope correction
FirstFitAllocator.allocateTo(...)overloads to append rule-tag hosts using deployment scope (dcId,podId,clusterId) instead of the unscoped DAO call.RandomAllocatorwhere rule-tag hosts are unioned into candidates.DAO API extension for scoped rule-tag lookup
HostDao:findHostsWithTagRuleThatMatchComputeOferringTags(String computeOfferingTags, Long clusterId, Long podId, Long dcId)HostDaoImplby reusing existing rule evaluation and filtering returned hosts by deployment scope.Regression-focused allocator tests
FirstFitAllocatorTestcoverage for scoped rule-tag lookup in the prefiltered-host allocation path.RandomAllocatorTestto verify scoped DAO usage and prevent fallback to unscoped lookup.