summaryrefslogtreecommitdiff
path: root/libpod/container_internal.go
diff options
context:
space:
mode:
authorValentin Rothberg <vrothberg@redhat.com>2022-08-05 14:22:54 +0200
committerValentin Rothberg <vrothberg@redhat.com>2022-08-10 21:10:17 +0200
commit3fc126e152d5ebe4bfef980dea04192762628773 (patch)
tree8fb7514960cf0c2c3ef9de12e463b53668cbe204 /libpod/container_internal.go
parent67a2e7351b0cea00ba455c0c4e52e13898fec203 (diff)
downloadpodman-3fc126e152d5ebe4bfef980dea04192762628773.tar.gz
podman-3fc126e152d5ebe4bfef980dea04192762628773.tar.bz2
podman-3fc126e152d5ebe4bfef980dea04192762628773.zip
libpod: allow the notify socket to be passed programatically
The notify socket can now either be specified via an environment variable or programatically (where the env is ignored). The notify mode and the socket are now also displayed in `container inspect` which comes in handy for debugging and allows for propper testing. Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
Diffstat (limited to 'libpod/container_internal.go')
-rw-r--r--libpod/container_internal.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go
index bad68991b..7cef067b0 100644
--- a/libpod/container_internal.go
+++ b/libpod/container_internal.go
@@ -31,6 +31,7 @@ import (
"github.com/containers/podman/v4/pkg/lookup"
"github.com/containers/podman/v4/pkg/rootless"
"github.com/containers/podman/v4/pkg/selinux"
+ "github.com/containers/podman/v4/pkg/systemd/notifyproxy"
"github.com/containers/podman/v4/pkg/util"
"github.com/containers/storage"
"github.com/containers/storage/pkg/archive"
@@ -1224,9 +1225,9 @@ func (c *Container) start() error {
payload += "\n"
payload += daemon.SdNotifyReady
}
- if sent, err := daemon.SdNotify(false, payload); err != nil {
+ if err := notifyproxy.SendMessage(c.config.SdNotifySocket, payload); err != nil {
logrus.Errorf("Notifying systemd of Conmon PID: %s", err.Error())
- } else if sent {
+ } else {
logrus.Debugf("Notify sent successfully")
}
}