Skip to content

systemd/dbus issue with molecule #5

@wookietreiber

Description

@wookietreiber

I've been trying the image with molecule (from molecule/default/molecule.yml):

platforms: 
  - name: debian-12
    image: geerlingguy/docker-debian12-ansible
    command: ${MOLECULE_DOCKER_COMMAND:-""}
    volumes:
      - /sys/fs/cgroup:/sys/fs/cgroup:rw
    cgroupns_mode: host
    privileged: yes
    pre_build_image: yes

With molecule verification, a command like localectl status fails, this is the task in molecule/default/verify.yml:

- name: verify
  hosts: all
  tasks:
    - name: check if localectl status works
      ansible.builtin.command: localectl status
      changed_when: no

... and I'm getting this error:

fatal: [debian-12]: FAILED! => {"changed": false, "cmd": ["localectl", "status"], "delta": "0:00:00.007084", "end": "2023-08-23 11:00:20.692010", "msg": "non-zero return code", "rc": 1, "start": "2023-08-23 11:00:20.684926", "stderr": "Failed to connect to bus: No such file or directory", "stderr_lines": ["Failed to connect to bus: No such file or directory"], "stdout": "", "stdout_lines": []}

I'm suspecting there is an issue with systemd/dbus in the image, potentially there is just a dbus package missing to fully test systemd/dbus-related commands/services.


Note: I'm using these images with molecule (btw thanks for providing them 😉):

geerlingguy/docker-centos8-ansible
geerlingguy/docker-debian10-ansible
geerlingguy/docker-debian11-ansible
geerlingguy/docker-debian12-ansible
geerlingguy/docker-rockylinux8-ansible
geerlingguy/docker-rockylinux9-ansible
geerlingguy/docker-ubuntu2004-ansible
geerlingguy/docker-ubuntu2204-ansible

It occurs with the three debian ones, the others are fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions