Merge pull request #27845 from cpuguy83/experimental_checks_daemon

error out if checkpoint specified on non-experimental
Upstream-commit: 0aaef963a880476d6637ad798c30520193ee04e3
Component: engine
This commit is contained in:
Sebastiaan van Stijn
2016-10-27 20:42:09 -07:00
committed by GitHub
+4
View File
@@ -20,6 +20,10 @@ import (
// ContainerStart starts a container.
func (daemon *Daemon) ContainerStart(name string, hostConfig *containertypes.HostConfig, validateHostname bool, checkpoint string) error {
if checkpoint != "" && !daemon.HasExperimental() {
return errors.NewBadRequestError(fmt.Errorf("checkpoint is only supported in experimental mode"))
}
container, err := daemon.GetContainer(name)
if err != nil {
return err