ansible-community / molecule-plugins

Collection on molecule plugins
MIT License
109 stars 73 forks source link

Fail at `Wait for instance(s) creation to complete]` #83

Closed anthr76 closed 10 months ago

anthr76 commented 3 years ago
failed: [localhost] (item={'started': 1, 'finished': 0, 'ansible_job_id': '361975307980.2038837', 'results_file': '/var/home/anthonyjrabbito/.ansible_async/361975307980.2038837', 'changed': True, 'failed': False, 'item': {'image': 'docker.io/pycontribs/centos:8', 'name': 'instance', 'pre_build_image': True}, 'ansible_loop_var': 'item'}) => {"ansible_job_id": "361975307980.2038837", "ansible_loop_var": "item", "attempts": 1, "changed": true, "cmd": ["podman", "run", "-d", "--name", "instance", "--hostname=instance", "docker.io/pycontribs/centos:8", "bash", "-c", "while true; do sleep 10000; done"], "delta": "0:00:00.010672", "end": "2021-09-22 16:36:54.642535", "finished": 1, "item": {"ansible_job_id": "361975307980.2038837", "ansible_loop_var": "item", "changed": true, "failed": false, "finished": 0, "item": {"image": "docker.io/pycontribs/centos:8", "name": "instance", "pre_build_image": true}, "results_file": "/var/home/anthonyjrabbito/.ansible_async/361975307980.2038837", "started": 1}, "msg": "non-zero return code", "rc": 1, "start": "2021-09-22 16:36:54.631863", "stderr": "Portal call failed: Failed to start command: Failed to change to directory “/usr/lib/python3.10/site-packages/molecule_podman/playbooks” (No such file or directory)", "stderr_lines": ["Portal call failed: Failed to start command: Failed to change to directory “/usr/lib/python3.10/site-packages/molecule_podman/playbooks” (No such file or directory)"], "stdout": "", "stdout_lines": []}

This is Fedora Silverblue inside a Fedora 35 toolbox with a call back to podman like:

/usr/local/bin/podman

~/dev/anthr76.ansible-role-mak-cri on ☁️  N. Virginia                           
❯ cat /usr/local/bin/podman                
#!/bin/bash

 # https://github.com/owtaylor/toolbox-vscode/blob/main/podman-host.sh

if [ "$1" == "exec" ] ; then
    # Remove 'exec' from $@
    shift
    # We want to match toolbox in what variables from the host pass into the container
    # https://github.com/containers/toolbox/blob/master/src/pkg/utils/utils.go#L67-L90
    # We omit: COLORTERM, TERM, VTE_VERSION
    # shellcheck disable=SC1004,SC2016
    script='
        envargs=()
        for var in \
            DBUS_{SESSION,SYSTEM}_BUS_ADDRESS \
            DESKTOP_SESSION \
            DISPLAY \
            LANG \
            SHELL \
            SSH_AUTH_SOCK \
            USER \
            WAYLAND_DISPLAY \
            XAUTHORITY \
            COLORTERM \
            TERM \
            VTE_VERSION \
            XDG_{CURRENT_DESKTOP,DATA_DIRS,MENU_PREFIX,RUNTIME_DIR,SEAT,VTNR} \
            XDG_SESSION_{DESKTOP,ID,TYPE} \
        ; do
            if [ "${!var+set}" = "set" ] ; then
                envargs+=(-e "$var=${!var}")
            fi
        done
        exec podman exec "${envargs[@]}" "$@"
    '
    exec flatpak-spawn --host sh -c "$script" - "$@"
else
    exec flatpak-spawn --host podman "$@" 
fi

Im having a hard time determining if this is my enviorment or if I'm facing a bug reaching /usr/lib/python3.10/site-packages/molecule_podman/playbooks

within the toolbox it exists

ls /usr/lib/python3.10/site-packages/molecule_podman/playbooks
 create.yml   destroy.yml   Dockerfile.j2   validate-dockerfile.y