Merge pull request #19952 from WeiZhang555/fix-err-restarting-1
Fix error message for pause a restarting container
This commit is contained in:
commit
dcde68b955
1 changed files with 5 additions and 0 deletions
|
@ -35,6 +35,11 @@ func (daemon *Daemon) containerPause(container *container.Container) error {
|
|||
return derr.ErrorCodeAlreadyPaused.WithArgs(container.ID)
|
||||
}
|
||||
|
||||
// We cannot Pause the container which is restarting
|
||||
if container.Restarting {
|
||||
return derr.ErrorCodeContainerRestarting.WithArgs(container.ID)
|
||||
}
|
||||
|
||||
if err := daemon.execDriver.Pause(container.Command); err != nil {
|
||||
return derr.ErrorCodeCantPause.WithArgs(container.ID, err)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue