Skip to content

Commit

Permalink
fix(executor): Ignore non-running Docker kill errors (#5451)
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Collins <[email protected]>
  • Loading branch information
alexec authored Mar 19, 2021
1 parent 7e4e1b7 commit d9f2010
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions workflow/executor/docker/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,10 +290,8 @@ func (d *DockerExecutor) Kill(ctx context.Context, containerNames []string, term
// We therefore ignore any error. docker wait that follows will re-raise any other error with the container.
_, err = common.RunCommand("docker", killArgs...)
if err != nil {
if strings.Contains(err.Error(), "is not running") {
return nil
}
log.Warningf("Ignored error from 'docker kill --signal TERM': %s", err)
return nil
}
waitArgs := append([]string{"wait"}, containerIDs...)
waitCmd := exec.Command("docker", waitArgs...)
Expand Down

0 comments on commit d9f2010

Please sign in to comment.