Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libpod/container_internal.go
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ func (c *Container) cleanupCgroups() error {
func (c *Container) cleanupNetwork() error {
// Stop the container's network namespace (if it has one)
if err := c.runtime.teardownNetNS(c); err != nil {
logrus.Errorf("unable cleanup network for container %s: %q", c.ID(), err)
logrus.Errorf("unable to cleanup network for container %s: %q", c.ID(), err)
}

c.state.NetNS = nil
Expand Down
2 changes: 1 addition & 1 deletion libpod/oci.go
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ func (r *OCIRuntime) updateContainerStatus(ctr *Container) error {
}
statusCode, err := strconv.Atoi(string(statusCodeStr))
if err != nil {
return errors.Wrapf(err, "error convertaing exit status code for container %s to int",
return errors.Wrapf(err, "error converting exit status code for container %s to int",
ctr.ID())
}
ctr.state.ExitCode = int32(statusCode)
Expand Down
9 changes: 2 additions & 7 deletions libpod/runtime_ctr.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,13 +219,8 @@ func (r *Runtime) removeContainer(c *Container, force bool) error {
return errors.Wrapf(ErrCtrExists, "container %s has dependent containers which must be removed before it: %s", c.ID(), depsStr)
}

// Tear down the container's cgroups (if they exist)
if err := c.cleanupCgroups(); err != nil {
return err
}

// Stop the container's network namespace (if it has one)
if err := r.teardownNetNS(c); err != nil {
// Clean up network namespace, cgroups, mounts
if err := c.cleanup(); err != nil {
return err
}

Expand Down
4 changes: 2 additions & 2 deletions libpod/runtime_pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ func (r *Runtime) RemovePod(p *Pod, removeCtrs, force bool) error {
// We can remove containers even if they have dependencies now
// As we have guaranteed their dependencies are in the pod
for _, ctr := range ctrs {
// Stop network NS
if err := r.teardownNetNS(ctr); err != nil {
// Clean up network namespace, cgroups, mounts
if err := ctr.cleanup(); err != nil {
return err
}

Expand Down