summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2018-10-25 13:35:39 -0400
committerMatthew Heon <matthew.heon@gmail.com>2018-11-07 11:36:01 -0500
commit3286b0185debc809664d854dd2ee75bf75efadc4 (patch)
tree2e2c799557dc25e0e6b9db452d79cfbe959bdbb3
parent94763a47a6e86ccf13d8a3ded3365f9c4440a668 (diff)
downloadpodman-3286b0185debc809664d854dd2ee75bf75efadc4.tar.gz
podman-3286b0185debc809664d854dd2ee75bf75efadc4.tar.bz2
podman-3286b0185debc809664d854dd2ee75bf75efadc4.zip
Retrieve container PID from conmon
Instead of running a full sync after starting a container to pick up its PID, grab it from Conmon instead. Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
-rw-r--r--libpod/container_internal.go5
-rw-r--r--libpod/oci.go1
2 files changed, 1 insertions, 5 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go
index db1cf6c99..9bb45a08a 100644
--- a/libpod/container_internal.go
+++ b/libpod/container_internal.go
@@ -734,11 +734,6 @@ func (c *Container) start() error {
}
logrus.Debugf("Started container %s", c.ID())
- // We need to pick up full container state, including PID.
- if err := c.runtime.ociRuntime.updateContainerStatus(c, true); err != nil {
- return err
- }
-
return c.save()
}
diff --git a/libpod/oci.go b/libpod/oci.go
index e8a97226a..d3ce70133 100644
--- a/libpod/oci.go
+++ b/libpod/oci.go
@@ -441,6 +441,7 @@ func (r *OCIRuntime) createOCIContainer(ctr *Container, cgroupParent string, res
}
return errors.Wrapf(ErrInternal, "container create failed")
}
+ ctr.state.PID = ss.si.Pid
case <-time.After(ContainerCreateTimeout):
return errors.Wrapf(ErrInternal, "container creation timeout")
}