Open ollie1 opened 1 month ago
Same here with:
molecule 24.2.0 using python 3.11
ansible:2.17.0
azure:23.5.3 from molecule_plugins
containers:23.5.3 from molecule_plugins requiring collections: ansible.posix>=1.3.0 community.docker>=1.9.1 containers.podman>=1.8.1
default:24.2.0 from molecule
docker:23.5.3 from molecule_plugins requiring collections: community.docker>=3.4.11 ansible.posix>=1.4.0
ec2:23.5.3 from molecule_plugins
gce:23.5.3 from molecule_plugins requiring collections: google.cloud>=1.0.2 community.crypto>=1.8.0
openstack:23.5.3 from molecule_plugins requiring collections: openstack.cloud>=2.1.0
podman:23.5.3 from molecule_plugins requiring collections: containers.podman>=1.7.0 ansible.posix>=1.3.0
vagrant:23.5.3 from molecule_plugins
Please make sure to install community.docker 3.10.2 or newer (right now that's the latest version). It contains a fix for this issue.
Please make sure to install community.docker 3.10.2 or newer (right now that's the latest version). It contains a fix for this issue.
I believe https://github.com/ansible-community/molecule-plugins/blob/b48ead5d12d80eb90ead14f1958d0e9ef79b8752/src/molecule_plugins/docker/driver.py#L270-L273 is still a problem however.
Ouch, yes, if it forces community.docker to 3.4.11, then well, you're totally out of luck. Then you need to stick to requests < 2.32.0.
Installing the community.docker
collection at 3.10.2 manually before running molecule seems to work around the issue. Molecule doesn't force downgrade thankfully.
manually updating community.docker did not fix it for me, had to downgrade requests to 2.30.0 (2.31.0 did not work either) So working config for me: pip:
Also tried: pip:
After updating above config to requests 2.32.0 issue reoccured
@MaxBidlingmaier which parts of community.docker are you using (and which aren't working for you)? If you are using the Swarm modules, you must upgrade Docker SDK for Python as well.
Also I have never heard of problems with requests 2.31.0 so far. What are the exact problems you have with it?
(Also note that requests 2.32.0 has been yanked from PyPI. You should either use a version before that, or after that.)
@felixfontein : Just "normal" docker part (no swarm), see my molecule.yml below
---
dependency:
name: galaxy
driver:
name: docker
platforms:
- name: "sles15sp4"
image: somerepo:mytag
pre_build_image: true
tmpfs:
- /run
- /tmp
volumes:
- '/sys/fs/cgroup:/sys/fs/cgroup:ro'
command: ""
# NET_* capabilities required for iptables + ipset stuff
capabilities:
- SYS_ADMIN
- NET_ADMIN
- NET_RAW
provisioner:
name: ansibl
verifier:
name: ansible
A new version of the
requests
library has been released on pypi - https://pypi.org/project/requests/2.32.1/ . This seems incompatible with the docker molecule plugin. When trying to runmolecule converge
on a project using the docker plugin, I get a message as follows:Downgrading to a version of the requests library <2.32 resolves the issue and molecule works as normal:
Output of
molecule --version