Skip to content

Commit

Permalink
fix systemd dbus error on CI (#152)
Browse files Browse the repository at this point in the history
* bump python to 3.9
* bump ansible & molecule versions
* use new `cgroupns_mode` feature in molecule 
 after cgroups v2 upgrade in docker on Github actions [1]


[1] https://www.jeffgeerling.com/blog/2022/docker-and-systemd-getting-rid-dreaded-failed-connect-bus-error
  • Loading branch information
ltalirz authored Dec 18, 2022
1 parent 123666a commit b40149b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.8
python-version: 3.9
- uses: pre-commit/[email protected]

readme:
Expand All @@ -30,7 +30,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.9

- name: Install requirements
run: pip install -r requirements.txt
Expand Down Expand Up @@ -60,10 +60,10 @@ jobs:
with:
path: ${{ env.galaxy-name }}

- name: Set up Python 3.8
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.9

- name: Upgrade pip
run: |
Expand All @@ -82,8 +82,9 @@ jobs:
# See https://github.com/geerlingguy/raspberry-pi-dramble/issues/166
- name: Force GitHub Actions' docker daemon to use vfs.
run: |
sudo apt install -y jq
sudo systemctl stop docker
echo '{"cgroup-parent":"/actions_job","storage-driver":"vfs"}' | sudo tee /etc/docker/daemon.json
echo '{ "exec-opts": ["native.cgroupdriver=cgroupfs"], "cgroup-parent": "/actions_job", "storage-driver":"vfs"}' | sudo tee /etc/docker/daemon.json
sudo systemctl start docker
- name: Run molecule
Expand Down
2 changes: 2 additions & 0 deletions meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
galaxy_info:
role_name: ansible_dokku
namespace: dokku_bot
author: "Jose Diaz-Gonzalez"
description: |
This Ansible role helps install Dokku on Debian/Ubuntu variants. Apart
Expand Down
4 changes: 3 additions & 1 deletion molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ platforms:
image: "geerlingguy/docker-${MOLECULE_DISTRO:-ubuntu1804}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- /sys/fs/cgroup:/sys/fs/cgroup:rw
- /var/lib/containerd
cgroupns_mode: host
privileged: true
pre_build_image: true
provisioner:
Expand Down
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# for running tests
molecule[docker]~=3.3.0
docker~=4.4.4
ansible~=4.6.0
molecule[docker]~=4.0.4
docker~=6.0.1
ansible~=7.1.0
# for development
pre-commit
# for README generation
Expand Down

0 comments on commit b40149b

Please sign in to comment.