Skip to content

Commit

Permalink
fix dbus error on CI (#78)
Browse files Browse the repository at this point in the history
* bump python to 3.9 (keep aiida at python3.8 due to failure for python3.9 in ansible-python)
* 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 a3dfa21 commit 9974e94
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci-debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.8
python-version: 3.9
- uses: pre-commit/[email protected]

molecule:

strategy:
matrix:
distro: [ubuntu1804, ubuntu2004]
python_version: ["3.8"]
python_version: ["3.9"]
fail-fast: false

runs-on: ubuntu-latest
Expand All @@ -39,10 +39,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 Down
2 changes: 2 additions & 0 deletions meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ allow_duplicates: false

galaxy_info:
author: "MARVEL NCCR"
role_name: aiida
namespace: marvel_nccr
description: "An ansible role that installs and configures [AiiDA](http://www.aiida.net/) on Ubuntu, RHEL, CentOS and Fedora."
license: MIT
min_ansible_version: 2.5
Expand Down
6 changes: 4 additions & 2 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ platforms:
# by default the container will initialise with systemd as PID1
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
env:
Expand All @@ -32,7 +34,7 @@ provisioner:
all:
vars:
ansible_python_interpreter: /usr/bin/python3
aiida_python_version: "${MOLECULE_PYTHON_VERSION:-3.8}"
#aiida_python_version: "${MOLECULE_PYTHON_VERSION:-3.9}"
install_node: "${MOLECULE_INSTALL_NODE:-no}"
# for testing in docker container
jupyter_ip: "0.0.0.0"
Expand Down
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# for running
ansible~=2.10.0
ansible~=7.1.0
tomli
# for testing
molecule[docker]~=3.1.0
docker~=4.3.1
molecule[docker]~=4.0.4
docker~=6.0.1

0 comments on commit 9974e94

Please sign in to comment.