Skip to content
This repository has been archived by the owner on May 6, 2020. It is now read-only.

Commit

Permalink
Merge pull request #245 from clearcontainers/sboeuf/fix_kill
Browse files Browse the repository at this point in the history
kill: Don't return an error if container state is 'created'
  • Loading branch information
Sebastien Boeuf authored Jun 27, 2017
2 parents 157d907 + 780f52d commit 4ffb2c4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions kill.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,11 @@ func kill(containerID, signal string, all bool) error {

containerID = status.ID

// container MUST be running
if status.State.State != vc.StateRunning {
// container MUST be created or running
if status.State.State == vc.StateReady {
ccLog.Infof("Container %s state 'created', nothing to do", containerID)
return nil
} else if status.State.State != vc.StateRunning {
return fmt.Errorf("Container %s is not running", containerID)
}

Expand Down

0 comments on commit 4ffb2c4

Please sign in to comment.