diff options
author | Matthew Heon <matthew.heon@gmail.com> | 2018-01-16 10:13:31 -0500 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-01-17 15:26:43 +0000 |
commit | aa20a25ca060f13faeca30337d4792c5a7f00aa0 (patch) | |
tree | bb3f19adfb967f5c225092e8dca154baf9e5768c /libpod/runtime_ctr.go | |
parent | b814a94c341306875e40b13e4fe7ebffb1b57f5d (diff) | |
download | podman-aa20a25ca060f13faeca30337d4792c5a7f00aa0.tar.gz podman-aa20a25ca060f13faeca30337d4792c5a7f00aa0.tar.bz2 podman-aa20a25ca060f13faeca30337d4792c5a7f00aa0.zip |
Address review comments
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
Closes: #229
Approved by: rhatdan
Diffstat (limited to 'libpod/runtime_ctr.go')
-rw-r--r-- | libpod/runtime_ctr.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libpod/runtime_ctr.go b/libpod/runtime_ctr.go index bc1b6bc2f..42f3dd892 100644 --- a/libpod/runtime_ctr.go +++ b/libpod/runtime_ctr.go @@ -82,11 +82,11 @@ func (r *Runtime) NewContainer(rSpec *spec.Spec, options ...CtrCreateOption) (c } if err := r.state.AddContainerToPod(pod, ctr); err != nil { - return nil, errors.Wrapf(err, "error adding new container to state") + return nil, err } } else { if err := r.state.AddContainer(ctr); err != nil { - return nil, errors.Wrapf(err, "error adding new container to state") + return nil, err } } @@ -166,17 +166,17 @@ func (r *Runtime) removeContainer(c *Container, force bool) error { } if err := r.state.RemoveContainerFromPod(pod, c); err != nil { - return errors.Wrapf(err, "error removing container %s from state", c.ID()) + return err } } else { if err := r.state.RemoveContainer(c); err != nil { - return errors.Wrapf(err, "error removing container from state") + return err } } // Delete the container // Only do this if we're not ContainerStateConfigured - if we are, - // we haven't been created in runc yet + // we haven't been created in the runtime yet if c.state.State == ContainerStateConfigured { if err := r.ociRuntime.deleteContainer(c); err != nil { return errors.Wrapf(err, "error removing container %s from runc", c.ID()) |