Skip to content

Commit

Permalink
Merge pull request #730 from klihub/release/prepare/0.6.0/enable-syst…
Browse files Browse the repository at this point in the history
…emd-cgroup

0.6.0 release preparation: always try to enable 'SystemdCgroup = true' for tests with containerd.
  • Loading branch information
klihub authored Oct 5, 2021
2 parents 3730f3d + 5a4dfda commit fbf45f2
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions demo/lib/distro.bash
Original file line number Diff line number Diff line change
Expand Up @@ -892,9 +892,17 @@ default-install-containerd() {
}

default-config-containerd() {
if vm-command-q "[ -f /etc/containerd/config.toml ]"; then
vm-sed-file /etc/containerd/config.toml 's/^.*disabled_plugins *= *.*$/disabled_plugins = []/'
if vm-command-q "[ ! -f /etc/containerd/config.toml ]"; then
vm-command "mkdir -p /etc/containerd && containerd config default > /etc/containerd/config.toml"
fi

vm-sed-file /etc/containerd/config.toml 's/^.*disabled_plugins *= *.*$/disabled_plugins = []/'

if vm-command-q "containerd config dump | grep -v -q SystemdCgroup"; then
vm-command "containerd config dump > /etc/containerd/config.toml"
fi

vm-sed-file /etc/containerd/config.toml 's/SystemdCgroup = false/SystemdCgroup = true/g'
}

default-restart-containerd() {
Expand Down

0 comments on commit fbf45f2

Please sign in to comment.