summaryrefslogtreecommitdiff
path: root/libpod/oci_internal_linux.go
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2019-08-14 09:29:47 -0500
committerbaude <bbaude@redhat.com>2019-08-15 12:32:54 -0500
commite6673012b5da79714a83e7d99ff0a23c8f401cb9 (patch)
tree495b171f91eee6a42f07bab59bddc2a5b6e3f9a0 /libpod/oci_internal_linux.go
parent3f1657d729b4f4c367b3e124621a6f3a9a5769d4 (diff)
downloadpodman-e6673012b5da79714a83e7d99ff0a23c8f401cb9.tar.gz
podman-e6673012b5da79714a83e7d99ff0a23c8f401cb9.tar.bz2
podman-e6673012b5da79714a83e7d99ff0a23c8f401cb9.zip
do not activate sd_notify support when varlink
add ability to not activate sd_notify when running under varlink as it causes deadlocks and hangs. Fixes: #3572 Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'libpod/oci_internal_linux.go')
-rw-r--r--libpod/oci_internal_linux.go12
1 files changed, 8 insertions, 4 deletions
diff --git a/libpod/oci_internal_linux.go b/libpod/oci_internal_linux.go
index e2c73f5ed..6e4ee2cf2 100644
--- a/libpod/oci_internal_linux.go
+++ b/libpod/oci_internal_linux.go
@@ -247,10 +247,14 @@ func (r *OCIRuntime) configureConmonEnv(runtimeDir string) ([]string, []*os.File
if notify, ok := os.LookupEnv("NOTIFY_SOCKET"); ok {
env = append(env, fmt.Sprintf("NOTIFY_SOCKET=%s", notify))
}
- if listenfds, ok := os.LookupEnv("LISTEN_FDS"); ok {
- env = append(env, fmt.Sprintf("LISTEN_FDS=%s", listenfds), "LISTEN_PID=1")
- fds := activation.Files(false)
- extraFiles = append(extraFiles, fds...)
+ if !r.sdNotify {
+ if listenfds, ok := os.LookupEnv("LISTEN_FDS"); ok {
+ env = append(env, fmt.Sprintf("LISTEN_FDS=%s", listenfds), "LISTEN_PID=1")
+ fds := activation.Files(false)
+ extraFiles = append(extraFiles, fds...)
+ }
+ } else {
+ logrus.Debug("disabling SD notify")
}
return env, extraFiles, nil
}