Add warning about deprecated "cluster" options to "docker info"
@@ -63,8 +63,6 @@ func (daemon *Daemon) SystemInfo() (*types.Info, error) {
Labels: daemon.configStore.Labels,
ExperimentalBuild: daemon.configStore.Experimental,
ServerVersion: dockerversion.Version,
- ClusterStore: daemon.configStore.ClusterStore,
- ClusterAdvertise: daemon.configStore.ClusterAdvertise,
HTTPProxy: maskCredentials(getEnvAny("HTTP_PROXY", "http_proxy")),
HTTPSProxy: maskCredentials(getEnvAny("HTTPS_PROXY", "https_proxy")),
NoProxy: getEnvAny("NO_PROXY", "no_proxy"),
@@ -72,6 +70,7 @@ func (daemon *Daemon) SystemInfo() (*types.Info, error) {
Isolation: daemon.defaultIsolation,
}
+ daemon.fillClusterInfo(v)
daemon.fillAPIInfo(v)
// Retrieve platform specific info
daemon.fillPlatformInfo(v, sysInfo)
@@ -127,6 +126,16 @@ func (daemon *Daemon) SystemVersion() types.Version {
return v
}
+func (daemon *Daemon) fillClusterInfo(v *types.Info) {
+ v.ClusterAdvertise = daemon.configStore.ClusterAdvertise
+ v.ClusterStore = daemon.configStore.ClusterStore
+
+ if v.ClusterAdvertise != "" || v.ClusterStore != "" {
+ v.Warnings = append(v.Warnings, `WARNING: node discovery and overlay networks with an external k/v store (cluster-advertise,
+ cluster-store, cluster-store-opt) are deprecated and will be removed in a future release.`)
+ }
+}
+
func (daemon *Daemon) fillDriverInfo(v *types.Info) {
var ds [][2]string
drivers := ""
