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

kill: Don't return an error if container state is 'created' #245

Merged
merged 1 commit into from
Jun 27, 2017
Merged
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
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