mirror of
https://github.com/containers/podman.git
synced 2025-06-20 17:13:43 +08:00
Merge pull request #14533 from mheon/avoid_error_on_container_stop
Do not error on signalling a just-stopped container
This commit is contained in:
@ -411,8 +411,8 @@ func (r *ConmonOCIRuntime) KillContainer(ctr *Container, signal uint, all bool)
|
||||
if err2 := r.UpdateContainerStatus(ctr); err2 != nil {
|
||||
logrus.Infof("Error updating status for container %s: %v", ctr.ID(), err2)
|
||||
}
|
||||
if ctr.state.State == define.ContainerStateExited {
|
||||
return nil
|
||||
if ctr.ensureState(define.ContainerStateStopped, define.ContainerStateExited) {
|
||||
return define.ErrCtrStateInvalid
|
||||
}
|
||||
return errors.Wrapf(err, "error sending signal to container %s", ctr.ID())
|
||||
}
|
||||
|
Reference in New Issue
Block a user