mirror of
https://github.com/containers/podman.git
synced 2025-06-28 14:29:04 +08:00
Merge pull request #16151 from vrothberg/debug-16142
KillContainer: improve error message
This commit is contained in:
@ -376,7 +376,7 @@ func (r *ConmonOCIRuntime) KillContainer(ctr *Container, signal uint, all bool)
|
||||
logrus.Infof("Error updating status for container %s: %v", ctr.ID(), err2)
|
||||
}
|
||||
if ctr.ensureState(define.ContainerStateStopped, define.ContainerStateExited) {
|
||||
return define.ErrCtrStateInvalid
|
||||
return fmt.Errorf("%w: %s", define.ErrCtrStateInvalid, ctr.state.State)
|
||||
}
|
||||
return fmt.Errorf("sending signal to container %s: %w", ctr.ID(), err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user