Make the Salt Proxy environment aware#56222
Conversation
a5556d4 to
4315cab
Compare
a058a63 to
afe5a78
Compare
|
Hey, @bdrung Looks like this needs to be rebased and have pre-commit run on it. Do you mind doing that? https://docs.saltstack.com/en/latest/topics/development/contributing.html#quickstart |
|
I rebased it yesterday and pre-commit was successfully run. |
|
Sweet... now we need to figure out why these tests are failing |
|
Only codecov/project is failing, which makes no sense since this merge request just changes one line. |
|
codecov can be ignored - on the newest master it should be. Question: Why is it |
|
In one salt release, the |
132df01 to
1b5fbbd
Compare
|
@bdrung Unless this gets a test today, it's not going to make it into Sodium. |
The Salt proxy minion is looking for proxy minion modules in
`salt://_proxy/`. It does so however only in the default `base`
environment. On setups which do not use `base` or shall be executed in a
different environment this breaks:
/etc/salt/master:
```
...
file_roots:
noc:
- /srv/salt
...
```
```
$ grep "proxyenabled" /srv/salt/_proxy/junos_manager.py
__proxyenabled__ = ['junos_manager']
$ salt-proxy --proxyid=dev1 -l debug
...
[DEBUG ] rest_sample proxy __virtual__() called...
[INFO ] ssh_sample proxy __virtual__() called...
[DEBUG ] Could not LazyLoad junos_manager.grains
[DEBUG ] Could not LazyLoad junos_manager.init
[ERROR ] Proxymodule junos_manager is missing an init() or a
shutdown() or both. Check your proxymodule. Salt-proxy aborted.
[WARNING ] Stopping the Salt Proxy Minion
[ERROR ] -1
[INFO ] The proxy minion is shutting down..
[INFO ] The Salt ProxyMinion is shut down
```
This is because the loader only looks for _proxy modules in the `base`
environment. This commit fixes this (but might possibly break other
things, though I did not find side-effects).
Initial pull request: saltstack#36704
Forwarded: saltstack#55932
Signed-off-by: Benjamin Drung <benjamin.drung@cloud.ionos.com>
b402205 to
e8a75e5
Compare
|
@bdrung would you be willing to add a changelog and test coverage? |
twangboy
left a comment
There was a problem hiding this comment.
Please add a changelog and a test case
|
Closing this due to inactivity. Anyone should feel free to re-open it if they want to see it through to the end in one release cycle. |
The Salt proxy minion is looking for proxy minion modules in
salt://_proxy/. It does so however only in the defaultbaseenvironment. On setups which do not usebaseor shall be executed in a different environment this breaks:/etc/salt/master:
This is because the loader only looks for _proxy modules in the
baseenvironment. This commit fixes this (but might possibly break other things, though I did not find side-effects).The initial pull request #36704 were merged quite some time ago, but one part of it is missing in the 2019.2 release (again?).