diff options
author | Matthew Heon <matthew.heon@pm.me> | 2020-06-23 13:33:42 -0400 |
---|---|---|
committer | Matthew Heon <mheon@redhat.com> | 2020-06-24 14:47:59 -0400 |
commit | eb9fd40d21ba2ce28ef1fdf411d6fb838dee9b4b (patch) | |
tree | 00d5a523bb7dce9887657f8eec0cd5d08f88456f /libpod | |
parent | 6594d5d6558437d4cdb11a72eda175ead407ec75 (diff) | |
download | podman-eb9fd40d21ba2ce28ef1fdf411d6fb838dee9b4b.tar.gz podman-eb9fd40d21ba2ce28ef1fdf411d6fb838dee9b4b.tar.bz2 podman-eb9fd40d21ba2ce28ef1fdf411d6fb838dee9b4b.zip |
Set stop signal to 15 when not explicitly set
When going through the output of `podman inspect` to try and
identify another issue, I noticed that Podman 2.0 was setting
StopSignal to 0 on containers by default. After chasing it
through the command line and SpecGen, I determined that we were
actually not setting a default in Libpod, which is strange
because I swear we used to do that. I re-added the disappeared
default and now all is well again.
Also, while I was looking for the bug in SpecGen, I found a bunch
of TODOs that have already been done. Eliminate the comments for
these.
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/runtime_ctr.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libpod/runtime_ctr.go b/libpod/runtime_ctr.go index 0431861b5..f1752cbeb 100644 --- a/libpod/runtime_ctr.go +++ b/libpod/runtime_ctr.go @@ -83,6 +83,8 @@ func (r *Runtime) initContainerVariables(rSpec *spec.Spec, config *ContainerConf return nil, errors.Wrapf(err, "converting containers.conf ShmSize %s to an int", r.config.Containers.ShmSize) } ctr.config.ShmSize = size + ctr.config.StopSignal = 15 + ctr.config.StopTimeout = r.config.Engine.StopTimeout } else { // This is a restore from an imported checkpoint ctr.restoreFromCheckpoint = true @@ -107,8 +109,6 @@ func (r *Runtime) initContainerVariables(rSpec *spec.Spec, config *ContainerConf ctr.state.BindMounts = make(map[string]string) - ctr.config.StopTimeout = r.config.Engine.StopTimeout - ctr.config.OCIRuntime = r.defaultOCIRuntime.Name() // Set namespace based on current runtime namespace |