Skip to content

Commit 36d2576

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 <[email protected]> (cherry picked from commit 555ea3f) Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent b337430 commit 36d2576

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

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)