Skip to content

Commit fbf45f2

Browse files
authored
Merge pull request #730 from klihub/release/prepare/0.6.0/enable-systemd-cgroup
0.6.0 release preparation: always try to enable 'SystemdCgroup = true' for tests with containerd.
2 parents 3730f3d + 5a4dfda commit fbf45f2

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

demo/lib/distro.bash

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -892,9 +892,17 @@ default-install-containerd() {
892892
}
893893

894894
default-config-containerd() {
895-
if vm-command-q "[ -f /etc/containerd/config.toml ]"; then
896-
vm-sed-file /etc/containerd/config.toml 's/^.*disabled_plugins *= *.*$/disabled_plugins = []/'
895+
if vm-command-q "[ ! -f /etc/containerd/config.toml ]"; then
896+
vm-command "mkdir -p /etc/containerd && containerd config default > /etc/containerd/config.toml"
897897
fi
898+
899+
vm-sed-file /etc/containerd/config.toml 's/^.*disabled_plugins *= *.*$/disabled_plugins = []/'
900+
901+
if vm-command-q "containerd config dump | grep -v -q SystemdCgroup"; then
902+
vm-command "containerd config dump > /etc/containerd/config.toml"
903+
fi
904+
905+
vm-sed-file /etc/containerd/config.toml 's/SystemdCgroup = false/SystemdCgroup = true/g'
898906
}
899907

900908
default-restart-containerd() {

0 commit comments

Comments
 (0)