diff --git a/api/swagger.yaml b/api/swagger.yaml index 6933fb1675..fde6015334 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -4186,7 +4186,7 @@ definitions:


- > **Note**: This field is only propagated when using standalone Swarm + > **Deprecated**: This field is only propagated when using standalone Swarm > mode, and overlay networking using an external k/v store. Overlay > networks with Swarm mode enabled use the built-in raft store, and > this field will be empty. @@ -4200,7 +4200,7 @@ definitions:


- > **Note**: This field is only propagated when using standalone Swarm + > **Deprecated**: This field is only propagated when using standalone Swarm > mode, and overlay networking using an external k/v store. Overlay > networks with Swarm mode enabled use the built-in raft store, and > this field will be empty. diff --git a/api/types/types.go b/api/types/types.go index 7486eab4d8..79e6dd8436 100644 --- a/api/types/types.go +++ b/api/types/types.go @@ -194,8 +194,8 @@ type Info struct { Labels []string ExperimentalBuild bool ServerVersion string - ClusterStore string - ClusterAdvertise string + ClusterStore string `json:",omitempty"` // Deprecated: host-discovery and overlay networks with external k/v stores are deprecated + ClusterAdvertise string `json:",omitempty"` // Deprecated: host-discovery and overlay networks with external k/v stores are deprecated Runtimes map[string]Runtime DefaultRuntime string Swarm swarm.Info diff --git a/daemon/config/config.go b/daemon/config/config.go index 77f8731350..26614d37c4 100644 --- a/daemon/config/config.go +++ b/daemon/config/config.go @@ -159,15 +159,18 @@ type CommonConfig struct { // ClusterStore is the storage backend used for the cluster information. It is used by both // multihost networking (to store networks and endpoints information) and by the node discovery // mechanism. + // Deprecated: host-discovery and overlay networks with external k/v stores are deprecated ClusterStore string `json:"cluster-store,omitempty"` // ClusterOpts is used to pass options to the discovery package for tuning libkv settings, such // as TLS configuration settings. + // Deprecated: host-discovery and overlay networks with external k/v stores are deprecated ClusterOpts map[string]string `json:"cluster-store-opts,omitempty"` // ClusterAdvertise is the network endpoint that the Engine advertises for the purpose of node // discovery. This should be a 'host:port' combination on which that daemon instance is // reachable by other hosts. + // Deprecated: host-discovery and overlay networks with external k/v stores are deprecated ClusterAdvertise string `json:"cluster-advertise,omitempty"` // MaxConcurrentDownloads is the maximum number of downloads that diff --git a/daemon/info.go b/daemon/info.go index 593b8a4956..cb1d39b04b 100644 --- a/daemon/info.go +++ b/daemon/info.go @@ -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 := "" diff --git a/docs/api/version-history.md b/docs/api/version-history.md index 8366ac866f..d675fd7479 100644 --- a/docs/api/version-history.md +++ b/docs/api/version-history.md @@ -17,6 +17,9 @@ keywords: "API, Docker, rcli, REST, documentation" [Docker Engine API v1.41](https://docs.docker.com/engine/api/v1.41/) documentation +* The `ClusterStore` and `ClusterAdvertise` fields in `GET /info` are deprecated + and are now omitted if they contain an empty value. This change is not versioned, + and affects all API versions if the daemon has this patch. * The `filter` (singular) query parameter, which was deprecated in favor of the `filters` option in Docker 1.13, has now been removed from the `GET /images/json` endpoint. The parameter remains available when using API version 1.40 or below.