diff options
author | Marius Bakke <[email protected]> | 2022-07-21 23:52:47 +0200 |
---|---|---|
committer | Marius Bakke <[email protected]> | 2022-07-21 23:52:47 +0200 |
commit | abea091dbef2d44e6eb46bd2413bdf917e14d095 (patch) | |
tree | 28f6c61dbda0acb52678944b121b66a6f50a3709 /gnu/packages/patches/containerd-create-pid-file.patch | |
parent | 3b20467807c32aeac56bbbe22ffb8823f68e282b (diff) | |
parent | 3f171587bc6a47bb056f3e699e17e05f5832aea5 (diff) |
Merge branch 'master' into staging
Diffstat (limited to 'gnu/packages/patches/containerd-create-pid-file.patch')
-rw-r--r-- | gnu/packages/patches/containerd-create-pid-file.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/gnu/packages/patches/containerd-create-pid-file.patch b/gnu/packages/patches/containerd-create-pid-file.patch new file mode 100644 index 0000000000..668ffcd9e9 --- /dev/null +++ b/gnu/packages/patches/containerd-create-pid-file.patch @@ -0,0 +1,31 @@ +Copyright © 2022 Oleg Pykhalov <[email protected]> + +Create a PID file after containerd is ready to serve requests. + +Fixes <https://issues.guix.gnu.org/38432>. + +--- a/cmd/containerd/command/notify_linux.go 1970-01-01 03:00:01.000000000 +0300 ++++ b/cmd/containerd/command/notify_linux.go 2022-07-02 04:42:35.553753495 +0300 +@@ -22,15 +22,22 @@ + sd "github.com/coreos/go-systemd/v22/daemon" + + "github.com/containerd/containerd/log" ++ ++ "os" ++ "strconv" + ) + + // notifyReady notifies systemd that the daemon is ready to serve requests + func notifyReady(ctx context.Context) error { ++ pidFile, _ := os.Create("/run/containerd/containerd.pid") ++ defer pidFile.Close() ++ pidFile.WriteString(strconv.FormatInt(int64(os.Getpid()), 10)) + return sdNotify(ctx, sd.SdNotifyReady) + } + + // notifyStopping notifies systemd that the daemon is about to be stopped + func notifyStopping(ctx context.Context) error { ++ os.Remove("/run/containerd/containerd.pid") + return sdNotify(ctx, sd.SdNotifyStopping) + } + |