aboutsummaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-05-12 07:15:19 -0400
committerGitHub <noreply@github.com>2022-05-12 07:15:19 -0400
commite6d19acee7cab3afee83633270747fabed58da67 (patch)
tree4d71c0b0821ce0e0597454b96184d01b9d1887a5 /libpod
parentf65e13eb7aa5874faad579bee2ac16170d467845 (diff)
parent03af8213cea25036788d9c9db33e748b7985d590 (diff)
downloadpodman-e6d19acee7cab3afee83633270747fabed58da67.tar.gz
podman-e6d19acee7cab3afee83633270747fabed58da67.tar.bz2
podman-e6d19acee7cab3afee83633270747fabed58da67.zip
Merge pull request #14215 from vrothberg/fix-notify
sdnotify: send MAINPID only once
Diffstat (limited to 'libpod')
-rw-r--r--libpod/oci_conmon_linux.go14
1 files changed, 0 insertions, 14 deletions
diff --git a/libpod/oci_conmon_linux.go b/libpod/oci_conmon_linux.go
index c232702e9..6aa7ce6dc 100644
--- a/libpod/oci_conmon_linux.go
+++ b/libpod/oci_conmon_linux.go
@@ -36,7 +36,6 @@ import (
"github.com/containers/podman/v4/utils"
"github.com/containers/storage/pkg/homedir"
pmount "github.com/containers/storage/pkg/mount"
- "github.com/coreos/go-systemd/v22/daemon"
spec "github.com/opencontainers/runtime-spec/specs-go"
"github.com/opencontainers/selinux/go-selinux/label"
"github.com/pkg/errors"
@@ -1279,19 +1278,6 @@ func (r *ConmonOCIRuntime) createOCIContainer(ctr *Container, restoreOptions *Co
// conmon not having a pid file is a valid state, so don't set it if we don't have it
logrus.Infof("Got Conmon PID as %d", conmonPID)
ctr.state.ConmonPID = conmonPID
-
- // Send the MAINPID via sdnotify if needed.
- switch ctr.config.SdNotifyMode {
- case define.SdNotifyModeContainer, define.SdNotifyModeIgnore:
- // Nothing to do or conmon takes care of it already.
-
- default:
- if sent, err := daemon.SdNotify(false, fmt.Sprintf("MAINPID=%d", conmonPID)); err != nil {
- logrus.Errorf("Notifying systemd of Conmon PID: %v", err)
- } else if sent {
- logrus.Debugf("Notify MAINPID sent successfully")
- }
- }
}
runtimeRestoreDuration := func() int64 {