|
@@ -35,6 +35,11 @@ func (daemon *Daemon) containerPause(container *container.Container) error {
|
|
return derr.ErrorCodeAlreadyPaused.WithArgs(container.ID)
|
|
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 {
|
|
if err := daemon.execDriver.Pause(container.Command); err != nil {
|
|
return err
|
|
return err
|
|
}
|
|
}
|