Fix error message for pause a restarting container

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 2c63ac3a974a7ab56ffeddece76cc29710ef2996
Component: engine
This commit is contained in:
Zhang Wei
2016-02-03 21:20:27 +08:00
parent e9b0659a70
commit 083b040a59
+5
View File
@@ -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
}