-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
docker_image.present fails first time when python3-docker module is installed #54449
Comments
I'm not reproducing this entirely, getting a different error but may be with my sls file...
I did use the provided states above |
I probably am missing some kubernetes package |
Hello i'm reporting the same issue using docker formula (it seems that in docker formula they use Here a snippet of my sls file:
The error on first run:
The result on second run:
Versions on server:
Versions on minion:
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue. |
I'm getting this too on Salt
|
Thank you for updating this issue. It is no longer marked as stale. |
FWIW, ensuring the |
I run into the same issue with salt-call state.highstate --retcode-passthrough --local --log-level=debug --force-color I install the docker module, but then run The workaround is to run the state for docker and docker python module separately from the other states that depend on it. Otherwise, a Traceback is the current UI to users of Salt Stack. |
Running into the same issue using salt 3000 on ubuntu 18.04. Installing |
Same issue here on |
This looks like a potential cause: #56669 (comment) |
I installed Installed Running: 3003+ds-1 on Ubuntu 20.04 |
still getting this issue with
|
Dump question, but did you restart the service? |
I have the same issue with:
I made sure to entirely restart the minion each time I changed the python packages. This is the trace I get:
Looking at this trace, it seems that I have verified that I only have one version of
|
I am in nearly the exact same environment as @rhbvkleef and have the same issue. I have tried both Another issue mentions installing |
I think some of the problem may be in that salt is installed via the system package repository and relies on packages like The solution to isolate these would be to either
|
@DaAwesomeP, if you read my previous comment, you'll see that |
Saltstack depends on However, pip is able to provide newer dependencies when it installs packages. These are stored in So I think what may be happening, and maybe I am very wrong here, but There is always a danger in mixing and matching pip and os-provided Python libraries for this reason: there is no version matching between the two systems (apt and pip). I think this may not have used to be an issue because Docker used to ship a Typically for CLI tools and individual applications the solution would be to isolate The best solution I can think of would be to introduce a |
I'm having trouble replicating this issue with the latest 3004. the reload_modules seems to have taken without the need to reload and I am not getting the tracepath shown in #54449 (comment) when with python3-requests at 2.21.0 and python3-docker installed with pkg.installed at 3.4.1 on debian 10. Can someone give a full testcase that replicates the issue? |
There is no response to the issue for some months, if none is received soon, the issue will be closed as considered dormant, and no longer relevant. |
@whytewolf where did you install the python3-docker module from? Did you install the Debian-provided Docker or the one from the Docker APT repo? |
docker apt doesn't supply python3-docker https://download.docker.com/linux/debian/dists/buster/pool/stable/amd64/ that can only come from the debian repos. but i did use the docker apt repos for docker itself for the record. I also run a debian 11 system that has a pip installed version of docker. that runs fine. without issue. |
Closing this issue since no one has been able to give a test case that fails, and I have tried the suggested test cases. as well as some things not suggested in an attempt to get it to fail. If you are still having this issue with a 3004 or later version then please open a new ticket. |
When trying to use the |
I have recently run into this on raspbian bullseye, with the latest salt (3005.1). This time the pip docker version 6 is the issue, downgrading it to 5.0.3 fixes the issue for me. |
the issue with docker 6 is not related to this issue. docker 6.0.0 broke how they handle versioning which is how salt determines if a proper docker python module is installed. that is much different than what was causing this issue which is loader issues and python path based. |
* comment out geerlingguy.docker and disable docker images preload. geerlingguy.docker (5:23.0.1-1~ubuntu.20.04~focal) and preloading of docker images may be an issue as securityonion is pinning older version (5:20.10.8~3-0~ubuntu-focal). trying to force version in geerlingguy.docker did not work. * use python3-docker (4.1.0-1) like securityonion and not pip docker (6.0.1). else noise `Reason: 'docker_container' __virtual__ returned False: 'docker.version' is not available.` saltstack/salt#54449 (comment) https://github.com/saltstack/salt/pull/62882/files * give more retries for so-setup ~2h30
Description of Issue
I'm trying to use
docker_image.present
but salt fails to detect the module on firststate.apply
because the required python modules are installed in that run. On secondstate.apply
the module is detected and used. This is even the case withreload_modules: true
set.On the first run I see:
On the minion itself the
salt-minion
logs have this error:However, it works on second run:
Setup
I have two state files. docker.sls:
and kube.sls:
This may be related to #54332 but in that case
pip
is the installation method and the error message is different.Steps to Reproduce Issue
salt <minion> state.apply
salt <minion> state.apply
Success!
Versions Report
On Master:
On the Minion (after
python3-docker
has been installed):The text was updated successfully, but these errors were encountered: