Address review comments and fix ps output

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
This commit is contained in:
Matthew Heon
2018-09-24 09:53:08 -04:00
parent 2c7f97d5a7
commit 29dbab6440
2 changed files with 5 additions and 3 deletions

View File

@ -332,9 +332,9 @@ func (r *Runtime) removeContainer(ctx context.Context, c *Container, force bool)
label.ReleaseLabel(c.ProcessLabel())
r.reserveLabels()
}
// Delete the container
// Only do this if we're not ContainerStateConfigured - if we are,
// we haven't been created in the runtime yet
// Delete the container.
// Not needed in Configured and Exited states, where the container
// doesn't exist in the runtime
if c.state.State != ContainerStateConfigured &&
c.state.State != ContainerStateExited {
if err := c.delete(ctx); err != nil {