From 7fa519fa244647c5159ffe6a7d3eea881e84a1c4 Mon Sep 17 00:00:00 2001 From: sharathsivakumar Date: Wed, 26 Apr 2023 17:08:29 +0200 Subject: [PATCH] server: backport 15743, improved description of --initial-cluster-state Signed-off-by: sharathsivakumar --- etcdmain/config.go | 2 +- etcdmain/help.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/etcdmain/config.go b/etcdmain/config.go index 119545f24..b3fecaa03 100644 --- a/etcdmain/config.go +++ b/etcdmain/config.go @@ -189,7 +189,7 @@ func newConfig() *config { fs.StringVar(&cfg.ec.DNSClusterServiceName, "discovery-srv-name", cfg.ec.DNSClusterServiceName, "Service name to query when using DNS discovery.") fs.StringVar(&cfg.ec.InitialCluster, "initial-cluster", cfg.ec.InitialCluster, "Initial cluster configuration for bootstrapping.") fs.StringVar(&cfg.ec.InitialClusterToken, "initial-cluster-token", cfg.ec.InitialClusterToken, "Initial cluster token for the etcd cluster during bootstrap.") - fs.Var(cfg.cf.clusterState, "initial-cluster-state", "Initial cluster state ('new' or 'existing').") + fs.Var(cfg.cf.clusterState, "initial-cluster-state", "Initial cluster state ('new' when bootstrapping a new cluster or 'existing' when adding new members to an existing cluster). After successful initialization (bootstrapping or adding), flag is ignored on restarts.") fs.BoolVar(&cfg.ec.StrictReconfigCheck, "strict-reconfig-check", cfg.ec.StrictReconfigCheck, "Reject reconfiguration requests that would cause quorum loss.") fs.BoolVar(&cfg.ec.EnableV2, "enable-v2", cfg.ec.EnableV2, "Accept etcd V2 client requests.") diff --git a/etcdmain/help.go b/etcdmain/help.go index c50ddfa16..4a3aa7c88 100644 --- a/etcdmain/help.go +++ b/etcdmain/help.go @@ -94,7 +94,8 @@ Clustering: --initial-cluster 'default=http://localhost:2380' Initial cluster configuration for bootstrapping. --initial-cluster-state 'new' - Initial cluster state ('new' or 'existing'). + Initial cluster state ('new' when bootstrapping a new cluster or 'existing' when adding new members to an existing cluster). + After successful initialization (bootstrapping or adding), flag is ignored on restarts. --initial-cluster-token 'etcd-cluster' Initial cluster token for the etcd cluster during bootstrap. Specifying this can protect you from unintended cross-cluster interaction when running multiple clusters.