diff options
author | Valentin Rothberg <vrothberg@redhat.com> | 2022-08-05 14:22:54 +0200 |
---|---|---|
committer | Valentin Rothberg <vrothberg@redhat.com> | 2022-08-10 21:10:17 +0200 |
commit | 3fc126e152d5ebe4bfef980dea04192762628773 (patch) | |
tree | 8fb7514960cf0c2c3ef9de12e463b53668cbe204 /libpod/container_internal.go | |
parent | 67a2e7351b0cea00ba455c0c4e52e13898fec203 (diff) | |
download | podman-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.go | 5 |
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") } } |