Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Commit

Permalink
Merge pull request #812 from darkowlzz/container-remove-debug-log
Browse files Browse the repository at this point in the history
Signed-off-by: leigh capili <leigh@null.net>
  • Loading branch information
stealthybox authored Mar 29, 2021
2 parents 44f95a4 + 56bcf04 commit 073580f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/runtime/containerd/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ func (cc *ctdClient) RemoveContainer(container string) error {
// Remove the container if it exists
cont, contLoadErr := cc.client.LoadContainer(cc.ctx, container)
if errdefs.IsNotFound(contLoadErr) {
log.Warn(contLoadErr)
log.Debug(contLoadErr)
return nil
} else if contLoadErr != nil {
return contLoadErr
Expand All @@ -699,20 +699,20 @@ func (cc *ctdClient) RemoveContainer(container string) error {
// Load the container's task without attaching
task, taskLoadErr := cont.Task(cc.ctx, nil)
if errdefs.IsNotFound(taskLoadErr) {
log.Warn(taskLoadErr)
log.Debug(taskLoadErr)
} else if taskLoadErr != nil {
return taskLoadErr
} else {
_, taskDeleteErr := task.Delete(cc.ctx)
if taskDeleteErr != nil {
log.Warn(taskDeleteErr)
log.Debug(taskDeleteErr)
}
}

// Delete the container
deleteContErr := cont.Delete(cc.ctx, containerd.WithSnapshotCleanup)
if errdefs.IsNotFound(contLoadErr) {
log.Warn(contLoadErr)
log.Debug(contLoadErr)
} else if deleteContErr != nil {
return deleteContErr
}
Expand Down

0 comments on commit 073580f

Please # to comment.