Skip to content

Commit d0adcf5

Browse files
committed
Ignore modprobe failures in ExecStartPre (systemd unit)
When running containerd inside LXC, due to systemd being unable to execute `modprobe overlay` inside the container (module is already loaded in host kernel). This patch adds a `-` prefix to the `ExecStartPre` command, so that failures are ignored, and the service can start as usual. Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit 555ea3f) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent 178c7c3 commit d0adcf5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

containerd.service

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Documentation=https://containerd.io
44
After=network.target
55

66
[Service]
7-
ExecStartPre=/sbin/modprobe overlay
7+
ExecStartPre=-/sbin/modprobe overlay
88
ExecStart=/usr/local/bin/containerd
99
Delegate=yes
1010
KillMode=process

docs/ops.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Documentation=https://containerd.io
4949
After=network.target
5050
5151
[Service]
52-
ExecStartPre=/sbin/modprobe overlay
52+
ExecStartPre=-/sbin/modprobe overlay
5353
ExecStart=/usr/local/bin/containerd
5454
Delegate=yes
5555
KillMode=process

0 commit comments

Comments
 (0)