Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow proxy minion types to be dynamically loaded #50183

Merged
merged 7 commits into from Nov 16, 2018

Conversation

@cro
Copy link
Member

commented Oct 23, 2018

What does this PR do?

This PR creates a new loadable module type called a metaproxy and abstracts the existing proxy minion to become a type of metaproxy. This enables us to build different types of proxy minions that can still load existing proxymodules.

Tests written?

No, but existing tests for proxy minions pass successfully.

Commits signed with GPG?

Yes

@cro cro requested a review from saltstack/team-core as a code owner Oct 23, 2018
@salt-jenkins salt-jenkins requested a review from saltstack/team-suse Oct 23, 2018
Copy link
Contributor

left a comment

instead of having these larger if statements, can we just put those

if opts is None:
    opts = __opts__

At the top?

if not opts:
ckminions = salt.utils.minions.CkMinions(__opts__)
else:
ckminions = salt.utils.minions.CkMinions(opts)

This comment has been minimized.

Copy link
@gtmanfred

gtmanfred Oct 23, 2018

Contributor

can we just make this ckminions = salt.utils.minions.CkMinions(opts or __opts__) and get rid of the rest of the if statement?

if not opts:
ckminions = salt.utils.minions.CkMinions(__opts__)
else:
ckminions = salt.utils.minions.CkMinions(opts)

This comment has been minimized.

Copy link
@gtmanfred

gtmanfred Oct 23, 2018

Contributor

same here

@rallytime

This comment has been minimized.

Copy link
Contributor

commented Oct 25, 2018

@cro This has several lint failures as well as some test failures. Can you take a look?

@rallytime rallytime requested review from terminalmage and cachedout Oct 25, 2018
@cro cro force-pushed the cro:metaproxy branch from 58b608d to 91f43b2 Oct 29, 2018
@rallytime

This comment has been minimized.

Copy link
Contributor

commented Oct 29, 2018

@cro

This comment has been minimized.

Copy link
Member Author

commented Oct 29, 2018

Yes, looks like they are related to the ProxyCaller. I am looking more closely at it now.

@cro cro force-pushed the cro:metaproxy branch 2 times, most recently from 796ce64 to d4c15f7 Oct 29, 2018
@cro cro closed this Oct 31, 2018
@cro cro reopened this Oct 31, 2018
@gtmanfred gtmanfred closed this Oct 31, 2018
@gtmanfred gtmanfred reopened this Oct 31, 2018
@cro cro force-pushed the cro:metaproxy branch 3 times, most recently from 174e1de to e35eb6a Oct 31, 2018
@cro cro force-pushed the cro:metaproxy branch 2 times, most recently from a89d442 to 12c147a Nov 8, 2018
if not opts:
opts = __opts__
nodegroups = opts.get('nodegroups', {})
matchers = salt.loader.matchers(opts)

This comment has been minimized.

Copy link
@terminalmage

terminalmage Nov 14, 2018

Contributor

If you added a __matchers__ dunder to the packed items, similar to what we do for __salt__ in minion_mods, then you don't need to instantiate a new LazyLoader here. I get that we might still need to do it, in cases where actual opts are passed in, but it shouldn't be necessary in most cases.

@cro cro force-pushed the cro:metaproxy branch from 12c147a to e315407 Nov 15, 2018
cro added 7 commits Oct 23, 2018
@cro cro force-pushed the cro:metaproxy branch from e315407 to 7f8a7d1 Nov 16, 2018
@cachedout cachedout merged commit b210d80 into saltstack:develop Nov 16, 2018
4 of 11 checks passed
4 of 11 checks passed
codeclimate 88 issues to fix
Details
jenkins/pr/py2-centos-7 running py2-centos-7...
Details
jenkins/pr/py2-ubuntu-1604 running py2-ubuntu-1604...
Details
jenkins/pr/py2-windows-2016 running py2-windows-2016...
Details
jenkins/pr/py3-centos-7 running py3-centos-7...
Details
jenkins/pr/py3-ubuntu-1604 running py3-ubuntu-1604...
Details
jenkins/pr/py3-windows-2016 running py3-windows-2016...
Details
WIP Ready for review
Details
continuous-integration/jenkins/pr-merge This commit looks good
Details
jenkins/pr/docs The docs job has passed
Details
jenkins/pr/lint The lint job has passed
Details
garethgreenaway added a commit to garethgreenaway/salt that referenced this pull request Jul 24, 2019
dwoz added a commit that referenced this pull request Aug 8, 2019
[2019.2.1] Porting metaproxy changes in #50183 to 2019.2.1
Akm0d added a commit to Akm0d/salt that referenced this pull request Aug 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.