|
@@ -80,6 +80,9 @@ func (cli *DaemonCli) start(opts *daemonOptions) (err error) {
|
|
|
if cli.Config, err = loadDaemonCliConfig(opts); err != nil {
|
|
|
return err
|
|
|
}
|
|
|
+ if err := checkDeprecatedOptions(cli.Config); err != nil {
|
|
|
+ return err
|
|
|
+ }
|
|
|
|
|
|
if opts.Validate {
|
|
|
// If config wasn't OK we wouldn't have made it this far.
|
|
@@ -89,8 +92,6 @@ func (cli *DaemonCli) start(opts *daemonOptions) (err error) {
|
|
|
|
|
|
configureProxyEnv(cli.Config)
|
|
|
|
|
|
- warnOnDeprecatedConfigOptions(cli.Config)
|
|
|
-
|
|
|
if err := configureDaemonLogs(cli.Config); err != nil {
|
|
|
return err
|
|
|
}
|
|
@@ -465,16 +466,12 @@ func loadDaemonCliConfig(opts *daemonOptions) (*config.Config, error) {
|
|
|
return conf, nil
|
|
|
}
|
|
|
|
|
|
-func warnOnDeprecatedConfigOptions(config *config.Config) {
|
|
|
- if config.ClusterAdvertise != "" {
|
|
|
- logrus.Warn(`The "cluster-advertise" option is deprecated. To be removed soon.`)
|
|
|
- }
|
|
|
- if config.ClusterStore != "" {
|
|
|
- logrus.Warn(`The "cluster-store" option is deprecated. To be removed soon.`)
|
|
|
- }
|
|
|
- if len(config.ClusterOpts) > 0 {
|
|
|
- logrus.Warn(`The "cluster-store-opt" option is deprecated. To be removed soon.`)
|
|
|
+func checkDeprecatedOptions(config *config.Config) error {
|
|
|
+ // Overlay networks with external k/v stores have been deprecated
|
|
|
+ if config.ClusterAdvertise != "" || len(config.ClusterOpts) > 0 || config.ClusterStore != "" {
|
|
|
+ return errors.New("Host-discovery and overlay networks with external k/v stores are deprecated. The 'cluster-advertise', 'cluster-store', and 'cluster-store-opt' options have been removed")
|
|
|
}
|
|
|
+ return nil
|
|
|
}
|
|
|
|
|
|
func initRouter(opts routerOptions) {
|