summaryrefslogtreecommitdiff
path: root/libpod/runtime_ctr.go
diff options
context:
space:
mode:
Diffstat (limited to 'libpod/runtime_ctr.go')
-rw-r--r--libpod/runtime_ctr.go10
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())