Align deltaproxy proxy setup with the single proxy (#70223) - #70224
Open
ggiesen wants to merge 1 commit into
Open
Align deltaproxy proxy setup with the single proxy (#70223)#70224ggiesen wants to merge 1 commit into
ggiesen wants to merge 1 commit into
Conversation
deltaproxy merged the control proxy's pillar into its opts unconditionally. salt/metaproxy/proxy.py guards that behind proxy_merge_pillar_in_opts and treats proxy_mines_pillar as the elif, so the documented option (default False) had no effect here and the control proxy's pillar always won over its opts. Sub-proxy opts start as a copy of the control proxy's, so whatever the pillar injected was inherited fleet-wide. Restore the guard and the elif. A proxymodule's module_executors declaration was also dropped for sub-proxies. post_master_init reads it for the control proxy, but subproxy_post_master_init never set it, so thread_return's getattr(minion_instance, "module_executors", []) found nothing and fell back to the opts default. Set it from the sub-proxy's own proxymodule.
twangboy
approved these changes
Sep 2, 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.
What does this PR do?
Brings two pieces of deltaproxy's proxy setup back in line with the single-proxy metaproxy.
What issues does this PR fix?
Fixes #70223
Root cause
proxy_merge_pillar_in_optswas ignored.salt/metaproxy/proxy.pyguards the pillar-into-opts merge behind that option and treatsproxy_mines_pillaras theelif.deltaproxy.pyhad no guard, so the documented option (defaultFalse) had no effect and the control proxy's pillar always won over its opts. Sub-proxy opts begin as a copy of the control proxy's opts, so anything the pillar injected was inherited by every sub-proxy.A proxymodule's
module_executorswas dropped for sub-proxies.post_master_initreads it for the control proxy, butsubproxy_post_master_initnever set it, sothread_return'sgetattr(minion_instance, "module_executors", [])found nothing and fell back to the opts default. The single-proxy metaproxy honours the declaration.Previous Behavior
With
proxy_merge_pillar_in_optsunset, a plain key in the control proxy's pillar became an opts key on the control proxy and on every sub-proxy. A proxymodule declaringmodule_executorshad that declaration silently ignored on every sub-proxy.New Behavior
The merge only happens when the option asks for it, and a sub-proxy picks up its own proxymodule's
module_executors.Merge requirements satisfied?
Tests written?
Yes. A unit test asserts
subproxy_post_master_initsetsmodule_executorsfrom the sub-proxy's own proxymodule; it fails against unmodified 3008.x.Both halves were verified against a live deltaproxy on 3008.2 with three sub-proxies.
Pillar merge, reading opts only (
config.get <key> omit_pillar=True), withproxy_merge_pillar_in_optsunset:dpcontrolLEAKED_FROM_PILLARminion1LEAKED_FROM_PILLARminion2LEAKED_FROM_PILLARAnd with
proxy_merge_pillar_in_opts: Truethe merge still happens as documented, so the feature is preserved rather than removed.module_executors, from a proxymodule declaring["direct_call"], as seen bythread_return:Commits signed with GPG?
No