From 940200f1ae34d51a76881f68f487889255ccf607 Mon Sep 17 00:00:00 2001 From: Gyuho Lee Date: Fri, 23 Mar 2018 05:22:38 -0700 Subject: [PATCH] etcdmain: move "unsafe" flags to bottom Signed-off-by: Gyuho Lee --- etcdmain/config.go | 6 +++--- etcdmain/help.go | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/etcdmain/config.go b/etcdmain/config.go index 7abd105b7..6a74c4737 100644 --- a/etcdmain/config.go +++ b/etcdmain/config.go @@ -193,9 +193,6 @@ func newConfig() *config { fs.StringVar(&cfg.ec.LogPkgLevels, "log-package-levels", "", "Specify a particular log level for each etcd package (eg: 'etcdmain=CRITICAL,etcdserver=DEBUG').") fs.StringVar(&cfg.ec.LogOutput, "log-output", embed.DefaultLogOutput, "Specify 'stdout' or 'stderr' to skip journald logging even when running under systemd.") - // unsafe - fs.BoolVar(&cfg.ec.ForceNewCluster, "force-new-cluster", false, "Force to create a new one member cluster.") - // version fs.BoolVar(&cfg.printVersion, "version", false, "Print the version and exit.") @@ -216,6 +213,9 @@ func newConfig() *config { fs.DurationVar(&cfg.ec.ExperimentalCorruptCheckTime, "experimental-corrupt-check-time", cfg.ec.ExperimentalCorruptCheckTime, "Duration of time between cluster corruption check passes.") fs.StringVar(&cfg.ec.ExperimentalEnableV2V3, "experimental-enable-v2v3", cfg.ec.ExperimentalEnableV2V3, "v3 prefix for serving emulated v2 state.") + // unsafe + fs.BoolVar(&cfg.ec.ForceNewCluster, "force-new-cluster", false, "Force to create a new one member cluster.") + // ignored for _, f := range cfg.ignored { fs.Var(&flags.IgnoredFlag{Name: f}, f, "") diff --git a/etcdmain/help.go b/etcdmain/help.go index 582d36bff..88c5870fe 100644 --- a/etcdmain/help.go +++ b/etcdmain/help.go @@ -166,14 +166,6 @@ logging flags --log-output 'default' specify 'stdout' or 'stderr' to skip journald logging even when running under systemd. -unsafe flags: - -Please be CAUTIOUS when using unsafe flags because it will break the guarantees -given by the consensus protocol. - - --force-new-cluster 'false' - force to create a new one-member cluster. - profiling flags: --enable-pprof 'false' Enable runtime profiling data via HTTP server. Address is at client URL + "/debug/pprof/" @@ -193,5 +185,13 @@ experimental flags: duration of time between cluster corruption check passes. --experimental-enable-v2v3 '' serve v2 requests through the v3 backend under a given prefix. + + +Please be CAUTIOUS when using unsafe flags because it will break the guarantees +given by the consensus protocol. + +unsafe flags: + --force-new-cluster 'false' + force to create a new one-member cluster. ` )