From 754daf918b1c58d402bad052a7e0c4ce3144b584 Mon Sep 17 00:00:00 2001 From: ethanport Date: Tue, 1 Nov 2016 08:36:30 -0700 Subject: [PATCH 1/2] clustering.md: update minor grammar --- Documentation/op-guide/clustering.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Documentation/op-guide/clustering.md b/Documentation/op-guide/clustering.md index 0ee75327c..4e3d46fff 100644 --- a/Documentation/op-guide/clustering.md +++ b/Documentation/op-guide/clustering.md @@ -126,7 +126,7 @@ $ etcd --name infra2 --initial-advertise-peer-urls https://10.0.1.12:2380 \ If the cluster needs encrypted communication but does not require authenticated connections, etcd can be configured to automatically generate its keys. On initialization, each member creates its own set of keys based on its advertised IP addresses and hosts. -On each machine, etcd would be started with these flag: +On each machine, etcd would be started with these flags: ``` $ etcd --name infra0 --initial-advertise-peer-urls https://10.0.1.10:2380 \ @@ -205,7 +205,7 @@ exit 1 ## Discovery -In a number of cases, the IPs of the cluster peers may not be known ahead of time. This is common when utilizing cloud providers or when the network uses DHCP. In these cases, rather than specifying a static configuration, use an existing etcd cluster to bootstrap a new one. We call this process "discovery". +In a number of cases, the IPs of the cluster peers may not be known ahead of time. This is common when utilizing cloud providers or when the network uses DHCP. In these cases, rather than specifying a static configuration, use an existing etcd cluster to bootstrap a new one. This process is called "discovery". There two methods that can be used for discovery: @@ -214,17 +214,17 @@ There two methods that can be used for discovery: ### etcd discovery -To better understand the design about discovery service protocol, we suggest reading the discovery service protocol [documentation][discovery-proto]. +To better understand the design of the discovery service protocol, we suggest reading the discovery service protocol [documentation][discovery-proto]. #### Lifetime of a discovery URL -A discovery URL identifies a unique etcd cluster. Instead of reusing a discovery URL, always create discovery URLs for new clusters. +A discovery URL identifies a unique etcd cluster. Instead of reusing an existing discovery URL, each etcd instance shares a new discovery URL to bootstrap the new cluster. Moreover, discovery URLs should ONLY be used for the initial bootstrapping of a cluster. To change cluster membership after the cluster is already running, see the [runtime reconfiguration][runtime-conf] guide. #### Custom etcd discovery service -Discovery uses an existing cluster to bootstrap itself. If using a private etcd cluster, can create a URL like so: +Discovery uses an existing cluster to bootstrap itself. If using a private etcd cluster, create a URL like so: ``` $ curl -X PUT https://myetcd.local/v2/keys/discovery/6c007a14875d53d9bf0ef5a6fc0257c817f0fb83/_config/size -d value=3 @@ -271,7 +271,7 @@ $ curl https://discovery.etcd.io/new?size=3 https://discovery.etcd.io/3e86b59982e49066c5d813af1c2e2579cbf573de ``` -This will create the cluster with an initial expected size of 3 members. If no size is specified, a default of 3 is used. +This will create the cluster with an initial size of 3 members. If no size is specified, a default of 3 is used. ``` ETCD_DISCOVERY=https://discovery.etcd.io/3e86b59982e49066c5d813af1c2e2579cbf573de @@ -281,7 +281,7 @@ ETCD_DISCOVERY=https://discovery.etcd.io/3e86b59982e49066c5d813af1c2e2579cbf573d --discovery https://discovery.etcd.io/3e86b59982e49066c5d813af1c2e2579cbf573de ``` -**Each member must have a different name flag specified. `Hostname` or `machine-id` can be a good choice. Or discovery will fail due to duplicated name.** +**Each member must have a different name flag specified or else discovery will fail due to duplicated names. `Hostname` or `machine-id` can be a good choice. ** Now we start etcd with those relevant flags for each member: From 2955d587767cc1ef2a68aee51bce15f2e4ed50dd Mon Sep 17 00:00:00 2001 From: Gyu-Ho Lee Date: Tue, 8 Nov 2016 12:37:33 -0800 Subject: [PATCH 2/2] clientv3/integration: fix minor typos, consistent formatting --- clientv3/integration/metrics_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/clientv3/integration/metrics_test.go b/clientv3/integration/metrics_test.go index 317d81e67..de0efd5a2 100644 --- a/clientv3/integration/metrics_test.go +++ b/clientv3/integration/metrics_test.go @@ -52,7 +52,7 @@ func TestV3ClientMetrics(t *testing.T) { ln, err = transport.NewUnixListener(addr) if err != nil { - t.Fatalf("Error : %v occured while listening on addr : %v", err, addr) + t.Fatalf("Error: %v occurred while listening on addr: %v", err, addr) } err = srv.Serve(ln) @@ -86,19 +86,19 @@ func TestV3ClientMetrics(t *testing.T) { pAfter := sumCountersForMetricAndLabels(t, url, "grpc_client_started_total", "Put", "unary") if pBefore+1 != pAfter { - t.Errorf("grpc_client_started_total expected : %d, got : %d", 1, pAfter-pBefore) + t.Errorf("grpc_client_started_total expected %d, got %d", 1, pAfter-pBefore) } // consume watch response select { case <-wc: case <-time.After(10 * time.Second): - t.Error("Timeout occured for getting watch response") + t.Error("Timeout occurred for getting watch response") } wAfter := sumCountersForMetricAndLabels(t, url, "grpc_client_msg_received_total", "Watch", "bidi_stream") if wBefore+1 != wAfter { - t.Errorf("grpc_client_msg_received_total expected : %d, got %d", 1, wAfter-wBefore) + t.Errorf("grpc_client_msg_received_total expected %d, got %d", 1, wAfter-wBefore) } ln.Close() @@ -127,7 +127,7 @@ func sumCountersForMetricAndLabels(t *testing.T, url string, metricName string, valueString := line[strings.LastIndex(line, " ")+1 : len(line)-1] valueFloat, err := strconv.ParseFloat(valueString, 32) if err != nil { - t.Fatalf("failed parsing value for line: %v and matchingLabelValues : %v \n", line, matchingLabelValues) + t.Fatalf("failed parsing value for line: %v and matchingLabelValues: %v", line, matchingLabelValues) } count += int(valueFloat) } @@ -138,7 +138,7 @@ func getHTTPBodyAsLines(t *testing.T, url string) []string { cfgtls := transport.TLSInfo{} tr, err := transport.NewTransport(cfgtls, time.Second) if err != nil { - t.Fatalf("Error getting transport : %v", err) + t.Fatalf("Error getting transport: %v", err) } tr.MaxIdleConns = -1