mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fix error message for pause a restarting container
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
This commit is contained in:
parent
0736dba624
commit
2c63ac3a97
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 err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue