Skip to content

Commit

Permalink
Include option to use docker instead of vagrant
Browse files Browse the repository at this point in the history
In the past, I used vagrant -> libvirt to run acceptance test, but
after upgrading the worksration to Ubuntu 22.04 LTS (jammy), this stopped
working because of incompatibilities.

Tests are run using pdk bundle exec rake ... and this uses the pdk
environment with ruby 2.7.x, while my operating system (and thus vagrant)
have been ported to ruby 3. This creates confusion within the tools, because
the Gemfile (from PDK) depends on modules that depend on the ruby version in
their name (puppet-module-posix-...-r3.0). After days of debugging and
finding seemingly inactive issues on github and jira, I decided that I do not
want to waste even more time on this.

I like docker as much or less as vagrant (not much) and converted all litmus
tests to use docker.

Docker itself breaks on Ubuntu 22.04 LTS in unprivileged mode, too. Luckily,
from my experience with Gentoo, I already suspected trouble with cgroups.
Since systemd 248 (no likey either) something changed in the cgroup handling
which causes containers using systemd to fail under further conditions. As
much as I understand the discussion, systemd devs expect the container people
to change their containers or container infrastructure to their ideas.
I don't want to investigate this any deeper.

The solution for using unprivileged docker on Ubuntu 22.04 LTS?
Add "systemd.unified_cgroup_hierarchy=0" to your kernel cmdline.

References for the ruby3 issues:
puppetlabs/puppet-module-gems#166
=> https://tickets.puppetlabs.com/browse/MODULES-11161

References for the docker/systemd/ubuntu22 issue:
moby/moby#42275
  • Loading branch information
mleiner committed May 12, 2022
1 parent cbea21e commit 5de4d7f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions provision.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
---
docker:
provisioner: docker
images:
- litmusimage/rockylinux:8
- litmusimage/centos:7
- litmusimage/debian:10
- litmusimage/debian:11
- litmusimage/debian:9
- litmusimage/ubuntu:18.04
- litmusimage/ubuntu:20.04
vagrant:
provisioner: vagrant
images:
Expand Down

0 comments on commit 5de4d7f

Please sign in to comment.