From 1b7b20f4f82c39c2cb21f79d4d1d30edf0b7ceeb Mon Sep 17 00:00:00 2001 From: kayrus Date: Thu, 14 Jan 2016 16:06:38 +0100 Subject: [PATCH] etcdctl: Changed default "endpoint" servers order And added "DEPRECATED" note to a "peers" option (relates to https://github.com/coreos/etcd/commit/d685135832677a8ebf97ea88fdd7ac7fe7c2aa2f) Updated to amend commit. --- etcdctl/command/util.go | 2 +- etcdctl/main.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/etcdctl/command/util.go b/etcdctl/command/util.go index 78163aebe..a2181c3fa 100644 --- a/etcdctl/command/util.go +++ b/etcdctl/command/util.go @@ -82,7 +82,7 @@ func getPeersFlagValue(c *cli.Context) []string { // If we still don't have peers, use a default if peerstr == "" { - peerstr = "http://127.0.0.1:4001,http://127.0.0.1:2379" + peerstr = "http://127.0.0.1:2379,http://127.0.0.1:4001" } return strings.Split(peerstr, ",") diff --git a/etcdctl/main.go b/etcdctl/main.go index 57567d319..d2b607432 100644 --- a/etcdctl/main.go +++ b/etcdctl/main.go @@ -34,8 +34,8 @@ func main() { cli.BoolFlag{Name: "no-sync", Usage: "don't synchronize cluster information before sending request"}, cli.StringFlag{Name: "output, o", Value: "simple", Usage: "output response in the given format (`simple`, `extended` or `json`)"}, cli.StringFlag{Name: "discovery-srv, D", Usage: "domain name to query for SRV records describing cluster endpoints"}, - cli.StringFlag{Name: "peers, C", Value: "", Usage: "a comma-delimited list of machine addresses in the cluster (default: \"http://127.0.0.1:4001,http://127.0.0.1:2379\")"}, - cli.StringFlag{Name: "endpoint", Value: "", Usage: "a comma-delimited list of machine addresses in the cluster (default: \"http://127.0.0.1:4001,http://127.0.0.1:2379\")"}, + cli.StringFlag{Name: "peers, C", Value: "", Usage: "DEPRECATED - \"--endpoint\" should be used instead"}, + cli.StringFlag{Name: "endpoint", Value: "", Usage: "a comma-delimited list of machine addresses in the cluster (default: \"http://127.0.0.1:2379,http://127.0.0.1:4001\")"}, cli.StringFlag{Name: "cert-file", Value: "", Usage: "identify HTTPS client using this SSL certificate file"}, cli.StringFlag{Name: "key-file", Value: "", Usage: "identify HTTPS client using this SSL key file"}, cli.StringFlag{Name: "ca-file", Value: "", Usage: "verify certificates of HTTPS-enabled servers using this CA bundle"},