-
Notifications
You must be signed in to change notification settings - Fork 26
Systemd param fail with Error: chdir: No such file or directory: OCI ...
#78
Comments
I looked at /usr/bin/podman run -d --name "instance" --tty=True --hostname=instance --systemd=True docker.io/pycontribs/centos:8 bash -c "while true; do sleep 10000; done" Then I tried to put I know we just have to put From 3e81eaa2594c251fec1ced41572fa4d4b5ca2d6b Mon Sep 17 00:00:00 2001
From: Tristan Pinaudeau <[email protected]>
Date: Sun, 29 Aug 2021 10:50:20 +0200
Subject: [PATCH] fix: systemd argument takes only lowercase
---
src/molecule_podman/playbooks/create.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/molecule_podman/playbooks/create.yml b/src/molecule_podman/playbooks/create.yml
index cc79f30..9fb416a 100644
--- a/src/molecule_podman/playbooks/create.yml
+++ b/src/molecule_podman/playbooks/create.yml
@@ -166,7 +166,7 @@
{% if item.ip is defined %}--ip={{ item.ip }}{% endif %}
{% if item.etc_hosts is defined %}{% for i,k in item.etc_hosts.items() %}{% if i != item.name %}--add-host {{ i }}:{{ k }} {% endif %}{% endfor %}{% endif %}
{% if item.hostname is defined %}--hostname={{ item.hostname }}{% elif item.name is defined %}--hostname={{ item.name }}{% endif %}
- {% if item.systemd is defined %}--systemd={{ item.systemd }}{% endif %}
+ {% if item.systemd is defined %}--systemd={{ item.systemd|lower }}{% endif %}
{{ item.pre_build_image | default(false) | ternary('', 'molecule_local/') }}{{ item.image }}
{{ (command_directives_dict | default({}))[item.name] | default('') }}
register: server
--
2.33.0
|
Yes, podman has such kind of errors, btw worth to create an issue in https://github.com/containers/podman about that. |
Alright, thanks for your comment, I just created the pull request. And here is the podman issue : containers/podman#11387. |
The following is now working correctly: python -m venv venv
source venv/bin/activate
pip install 'molecule[lint,podman]'
molecule init role -d podman poc && cd poc
cat > molecule/default/molecule.yml <<EOF
---
dependency:
name: galaxy
driver:
name: podman
platforms:
- name: instance
image: docker.io/pycontribs/centos:8
pre_build_image: true
tty: True
systemd: true
provisioner:
name: ansible
verifier:
name: ansible
EOF
molecule create |
Hi, when putting myself on the git branch to try and resolve this issue I came over a new little bug. Using
systemd: true
results in a failure of the asynchronous creation task for a container.Versions
How to reproduce
What is happening
What is expected
The text was updated successfully, but these errors were encountered: