-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Molecule throws error during gather_facts : Failed to create temporary directory #6
Comments
+1 on this. Also encountered today and was about to report this |
Concur with @patrickstump that this isn't actually an issue for this repo/image - |
Possible duplicate of #4. |
For those with the same issue, this is the solution: # molecule.yml
# ,,,
platforms:
- name: ubuntu2204
image: geerlingguy/docker-ubuntu2204-ansible:latest
cgroupns_mode: host
command: ""
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw # won't work with ro
privileged: true
pre_build_image: true
# ... My understanding is that this removes any isolation from the container and the processes run directly on the host. Obviously an issue in prod, but fine for local dev and automated testing on GitHub Actions. |
Also works around geerlingguy/docker-ubuntu2204-ansible#6
Also works around geerlingguy/docker-ubuntu2204-ansible#6
Also works around geerlingguy/docker-ubuntu2204-ansible#6
Also works around geerlingguy/docker-ubuntu2204-ansible#6
Overview
This appears to be an issue with default docker settings on ubuntu 22.04 desktop, so I don't think it is an actual issue with the image. However, I wasn't sure where else to put the knowledge. Apologies if this is the wrong call.
Error
When running
molecule test
with thegeerlingguy/docker-ubuntu2204-ansible:latest
image, gather_facts throws the error:As stated clearly in the README for this project, the
cgroupns=host
should be used. Docker says the default cgroupns ishost
, however unless I specified that on the command line, it would not run manually or via molecule.Making modifications to molecule.yml did nothing. Finally I edited /etc/docker/daemon.json to set the default cgroupns for docker to
host
and it started working.Fix
Add `default-cgroupns-mode" to docker's daemon.json file and restart docker.
Alternate Fix
If someone knows how to specify
cgroupns
in the molecule file, I think that would be a better solution. I could not find anyway to do so. Please comment if you know how.Host Machine
Host: Ubuntu 22.04 Desktop, amd64
Docker Version
Molecule Config
The text was updated successfully, but these errors were encountered: