mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Rename docker execution module to avoid shadowing in the loader
With the merging of #39996, salt/modules/docker.py now imports salt.utils.docker. However, our loader appends the module dir (in this case salt/modules/) to sys.path temporarily for the length of the loading process. So, as the docker execution module tries to import salt.utils.docker, when salt.utils.docker attempts to do an "import docker", and docker-py is *not* installed, this results in salt/modules/docker.py (the docker execution module) being loaded in its place, which results in tracebacks in the minion log. Renaming the docker execution module keeps this import shadowing from occurring. Note that we don't need to do this for the placeholder salt/states/docker.py as it does not import salt.utils.docker.
This commit is contained in:
parent
37b5a3ccda
commit
774a3f1147
@ -109,7 +109,7 @@ execution modules
|
||||
dnsmasq
|
||||
dnsutil
|
||||
dockercompose
|
||||
docker
|
||||
dockermod
|
||||
dpkg
|
||||
drac
|
||||
dracr
|
||||
|
@ -1,7 +0,0 @@
|
||||
===================
|
||||
salt.modules.docker
|
||||
===================
|
||||
|
||||
.. automodule:: salt.modules.docker
|
||||
:members:
|
||||
:exclude-members: cp, freeze, unfreeze
|
7
doc/ref/modules/all/salt.modules.dockermod.rst
Normal file
7
doc/ref/modules/all/salt.modules.dockermod.rst
Normal file
@ -0,0 +1,7 @@
|
||||
======================
|
||||
salt.modules.dockermod
|
||||
======================
|
||||
|
||||
.. automodule:: salt.modules.dockermod
|
||||
:members:
|
||||
:exclude-members: cp, freeze, unfreeze
|
@ -19,7 +19,7 @@ from tests.support.mock import (
|
||||
# Import Salt Libs
|
||||
from salt.ext.six.moves import range
|
||||
from salt.exceptions import CommandExecutionError
|
||||
import salt.modules.docker as docker_mod
|
||||
import salt.modules.dockermod as docker_mod
|
||||
|
||||
docker_mod.__context__ = {'docker.docker_version': ''}
|
||||
docker_mod.__salt__ = {}
|
@ -17,7 +17,7 @@ from tests.support.mock import (
|
||||
|
||||
# Import Salt Libs
|
||||
from salt.exceptions import CommandExecutionError
|
||||
import salt.modules.docker as docker_mod
|
||||
import salt.modules.dockermod as docker_mod
|
||||
import salt.states.docker_image as docker_state
|
||||
|
||||
docker_mod.__context__ = {'docker.docker_version': ''}
|
||||
|
@ -16,7 +16,7 @@ from tests.support.mock import (
|
||||
)
|
||||
|
||||
# Import Salt Libs
|
||||
import salt.modules.docker as docker_mod
|
||||
import salt.modules.dockermod as docker_mod
|
||||
import salt.states.docker_network as docker_state
|
||||
|
||||
docker_mod.__context__ = {'docker.docker_version': ''}
|
||||
|
@ -16,7 +16,7 @@ from tests.support.mock import (
|
||||
)
|
||||
|
||||
# Import Salt Libs
|
||||
import salt.modules.docker as docker_mod
|
||||
import salt.modules.dockermod as docker_mod
|
||||
import salt.states.docker_volume as docker_state
|
||||
|
||||
docker_mod.__context__ = {'docker.docker_version': ''}
|
||||
|
Loading…
Reference in New Issue
Block a user