diff options
author | baude <bbaude@redhat.com> | 2019-06-25 08:40:19 -0500 |
---|---|---|
committer | baude <bbaude@redhat.com> | 2019-06-27 07:56:24 -0500 |
commit | 8561b996447793999a6465f9b9e3f0f7bbea2c6a (patch) | |
tree | 133cf8d959934eac882535e6b572aee5d0acf3c5 /libpod/runtime_ctr.go | |
parent | 58a1777f518657ff12744bb69ccf2dab3d429625 (diff) | |
download | podman-8561b996447793999a6465f9b9e3f0f7bbea2c6a.tar.gz podman-8561b996447793999a6465f9b9e3f0f7bbea2c6a.tar.bz2 podman-8561b996447793999a6465f9b9e3f0f7bbea2c6a.zip |
libpod removal from main (phase 2)
this is phase 2 for the removal of libpod from main.
Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'libpod/runtime_ctr.go')
-rw-r--r-- | libpod/runtime_ctr.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libpod/runtime_ctr.go b/libpod/runtime_ctr.go index 79e18dcd1..0d0f700a6 100644 --- a/libpod/runtime_ctr.go +++ b/libpod/runtime_ctr.go @@ -133,7 +133,7 @@ func (r *Runtime) setupContainer(ctx context.Context, ctr *Container, restore bo logrus.Debugf("Allocated lock %d for container %s", ctr.lock.ID(), ctr.ID()) ctr.valid = true - ctr.state.State = ContainerStateConfigured + ctr.state.State = config2.ContainerStateConfigured ctr.runtime = r if ctr.config.OCIRuntime == "" { @@ -370,7 +370,7 @@ func (r *Runtime) removeContainer(ctx context.Context, c *Container, force bool, } } - if c.state.State == ContainerStatePaused { + if c.state.State == config2.ContainerStatePaused { if err := c.ociRuntime.killContainer(c, 9); err != nil { return err } @@ -384,7 +384,7 @@ func (r *Runtime) removeContainer(ctx context.Context, c *Container, force bool, } // Check that the container's in a good state to be removed - if c.state.State == ContainerStateRunning { + if c.state.State == config2.ContainerStateRunning { if err := c.ociRuntime.stopContainer(c, c.StopTimeout()); err != nil { return errors.Wrapf(err, "cannot remove container %s as it could not be stopped", c.ID()) } @@ -464,8 +464,8 @@ func (r *Runtime) removeContainer(ctx context.Context, c *Container, force bool, // 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 c.state.State != config2.ContainerStateConfigured && + c.state.State != config2.ContainerStateExited { if err := c.delete(ctx); err != nil { if cleanupErr == nil { cleanupErr = err @@ -582,7 +582,7 @@ func (r *Runtime) GetAllContainers() ([]*Container, error) { func (r *Runtime) GetRunningContainers() ([]*Container, error) { running := func(c *Container) bool { state, _ := c.State() - return state == ContainerStateRunning + return state == config2.ContainerStateRunning } return r.GetContainers(running) } |