mirror of
https://github.com/containers/podman.git
synced 2025-06-22 01:48:54 +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 {
|
if err2 := r.UpdateContainerStatus(ctr); err2 != nil {
|
||||||
logrus.Infof("Error updating status for container %s: %v", ctr.ID(), err2)
|
logrus.Infof("Error updating status for container %s: %v", ctr.ID(), err2)
|
||||||
}
|
}
|
||||||
if ctr.state.State == define.ContainerStateExited {
|
if ctr.ensureState(define.ContainerStateStopped, define.ContainerStateExited) {
|
||||||
return nil
|
return define.ErrCtrStateInvalid
|
||||||
}
|
}
|
||||||
return errors.Wrapf(err, "error sending signal to container %s", ctr.ID())
|
return errors.Wrapf(err, "error sending signal to container %s", ctr.ID())
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user