mirror of
https://github.com/containers/podman.git
synced 2025-06-22 18:08:11 +08:00
Merge pull request #15090 from vrothberg/fix-14859
cleanup: transition from `stopping` to `exited`
This commit is contained in:
@ -347,7 +347,7 @@ func (c *Container) syncContainer() error {
|
|||||||
}
|
}
|
||||||
// If runtime knows about the container, update its status in runtime
|
// If runtime knows about the container, update its status in runtime
|
||||||
// And then save back to disk
|
// And then save back to disk
|
||||||
if c.ensureState(define.ContainerStateCreated, define.ContainerStateRunning, define.ContainerStateStopped, define.ContainerStatePaused) {
|
if c.ensureState(define.ContainerStateCreated, define.ContainerStateRunning, define.ContainerStateStopped, define.ContainerStateStopping, define.ContainerStatePaused) {
|
||||||
oldState := c.state.State
|
oldState := c.state.State
|
||||||
|
|
||||||
if err := c.checkExitFile(); err != nil {
|
if err := c.checkExitFile(); err != nil {
|
||||||
@ -1316,10 +1316,10 @@ func (c *Container) stop(timeout uint) error {
|
|||||||
|
|
||||||
// Since we're now subject to a race condition with other processes who
|
// Since we're now subject to a race condition with other processes who
|
||||||
// may have altered the state (and other data), let's check if the
|
// may have altered the state (and other data), let's check if the
|
||||||
// state has changed. If so, we should return immediately and log a
|
// state has changed. If so, we should return immediately and leave
|
||||||
// warning.
|
// breadcrumbs for debugging if needed.
|
||||||
if c.state.State != define.ContainerStateStopping {
|
if c.state.State != define.ContainerStateStopping {
|
||||||
logrus.Warnf(
|
logrus.Debugf(
|
||||||
"Container %q state changed from %q to %q while waiting for it to be stopped: discontinuing stop procedure as another process interfered",
|
"Container %q state changed from %q to %q while waiting for it to be stopped: discontinuing stop procedure as another process interfered",
|
||||||
c.ID(), define.ContainerStateStopping, c.state.State,
|
c.ID(), define.ContainerStateStopping, c.state.State,
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user