From f4f429d4e33434d76ea59bd68979c3201d3f1572 Mon Sep 17 00:00:00 2001 From: Cole Gleason Date: Mon, 16 Jun 2014 09:41:37 -0700 Subject: [PATCH 1/3] docs(cluster-size): remove outdated refrences to flag max-cluster-size --- Documentation/configuration.md | 1 - config/config.go | 1 - server/usage.go | 1 - 3 files changed, 3 deletions(-) diff --git a/Documentation/configuration.md b/Documentation/configuration.md index 368fdd319..1fe07ac59 100644 --- a/Documentation/configuration.md +++ b/Documentation/configuration.md @@ -31,7 +31,6 @@ configuration files. * `-cpuprofile` - The path to a file to output CPU profile data. Enables CPU profiling when present. * `-data-dir` - The directory to store log and snapshot. Defaults to the current working directory. * `-max-result-buffer` - The max size of result buffer. Defaults to `1024`. -* `-max-cluster-size` - The max size of the cluster. Defaults to `9`. * `-max-retry-attempts` - The max retry attempts when trying to join a cluster. Defaults to `3`. * `-peer-addr` - The advertised public hostname:port for server communication. Defaults to `127.0.0.1:7001`. * `-peer-bind-addr` - The listening hostname for server communication. Defaults to advertised IP. diff --git a/config/config.go b/config/config.go index 167c9b847..e181cd3d6 100644 --- a/config/config.go +++ b/config/config.go @@ -36,7 +36,6 @@ var newFlagNameLookup = map[string]string{ "d": "data-dir", "m": "max-result-buffer", "r": "max-retry-attempts", - "maxsize": "max-cluster-size", "clientCAFile": "ca-file", "clientCert": "cert-file", "clientKey": "key-file", diff --git a/server/usage.go b/server/usage.go index 874b1ea07..3ae157029 100644 --- a/server/usage.go +++ b/server/usage.go @@ -53,7 +53,6 @@ Other Options: -max-result-buffer Max size of the result buffer. -max-retry-attempts Number of times a node will try to join a cluster. -retry-interval Seconds to wait between cluster join retry attempts. - -max-cluster-size Maximum number of nodes in the cluster. -snapshot=false Disable log snapshots -snapshot-count Number of transactions before issuing a snapshot. ` From 20147c535780ab1a59cdacc94e3ef0c1bc71c0e2 Mon Sep 17 00:00:00 2001 From: Cole Gleason Date: Fri, 20 Jun 2014 10:41:07 -0700 Subject: [PATCH 2/3] flags: alias max-cluster-size to cluster-active-size as deprecated flag --- config/config.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config/config.go b/config/config.go index e181cd3d6..ce64b3126 100644 --- a/config/config.go +++ b/config/config.go @@ -36,6 +36,7 @@ var newFlagNameLookup = map[string]string{ "d": "data-dir", "m": "max-result-buffer", "r": "max-retry-attempts", + "maxsize": "cluster-active-size", "clientCAFile": "ca-file", "clientCert": "cert-file", "clientKey": "key-file", @@ -44,6 +45,7 @@ var newFlagNameLookup = map[string]string{ "serverKey": "peer-key-file", "snapshotCount": "snapshot-count", "peer-heartbeat-timeout": "peer-heartbeat-interval", + "max-cluster-size": "cluster-active-size", } // Config represents the server configuration. @@ -64,6 +66,7 @@ type Config struct { PeersFile string `toml:"peers_file" env:"ETCD_PEERS_FILE"` MaxResultBuffer int `toml:"max_result_buffer" env:"ETCD_MAX_RESULT_BUFFER"` MaxRetryAttempts int `toml:"max_retry_attempts" env:"ETCD_MAX_RETRY_ATTEMPTS"` + MaxClusterSize int `toml:"max_cluster_size" env:"ETCD_MAX_CLUSTER_SIZE"` RetryInterval float64 `toml:"retry_interval" env:"ETCD_RETRY_INTERVAL"` Name string `toml:"name" env:"ETCD_NAME"` Snapshot bool `toml:"snapshot" env:"ETCD_SNAPSHOT"` @@ -296,6 +299,8 @@ func (c *Config) LoadFlags(arguments []string) error { f.IntVar(&c.MaxRetryAttempts, "r", c.MaxRetryAttempts, "(deprecated)") f.IntVar(&c.SnapshotCount, "snapshotCount", c.SnapshotCount, "(deprecated)") f.IntVar(&c.Peer.HeartbeatInterval, "peer-heartbeat-timeout", c.Peer.HeartbeatInterval, "(deprecated)") + f.IntVar(&c.Cluster.ActiveSize, "max-cluster-size", c.Cluster.ActiveSize, "(deprecated)") + f.IntVar(&c.Cluster.ActiveSize, "maxsize", c.Cluster.ActiveSize, "(deprecated)") // END DEPRECATED FLAGS if err := f.Parse(arguments); err != nil { From 097aac79f54373662fbd3990d3e5e9fee2aae39d Mon Sep 17 00:00:00 2001 From: Cole Gleason Date: Fri, 27 Jun 2014 10:52:16 -0700 Subject: [PATCH 3/3] flags: remove MaxClusterSize variable --- config/config.go | 1 - 1 file changed, 1 deletion(-) diff --git a/config/config.go b/config/config.go index ce64b3126..acc79a4f0 100644 --- a/config/config.go +++ b/config/config.go @@ -66,7 +66,6 @@ type Config struct { PeersFile string `toml:"peers_file" env:"ETCD_PEERS_FILE"` MaxResultBuffer int `toml:"max_result_buffer" env:"ETCD_MAX_RESULT_BUFFER"` MaxRetryAttempts int `toml:"max_retry_attempts" env:"ETCD_MAX_RETRY_ATTEMPTS"` - MaxClusterSize int `toml:"max_cluster_size" env:"ETCD_MAX_CLUSTER_SIZE"` RetryInterval float64 `toml:"retry_interval" env:"ETCD_RETRY_INTERVAL"` Name string `toml:"name" env:"ETCD_NAME"` Snapshot bool `toml:"snapshot" env:"ETCD_SNAPSHOT"`