Merge pull request #1961 from bergwolf/pause-ready

container: do not pause a StateReady container
This commit is contained in:
Fupan Li 2019-08-14 08:54:59 +08:00 committed by GitHub
commit 99e04ac8cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1196,8 +1196,8 @@ func (c *Container) pause() error {
return err
}
if c.state.State != types.StateRunning && c.state.State != types.StateReady {
return fmt.Errorf("Container not running or ready, impossible to pause")
if c.state.State != types.StateRunning {
return fmt.Errorf("Container not running, impossible to pause")
}
if err := c.sandbox.agent.pauseContainer(c.sandbox, *c); err != nil {