15354 Commits

Author SHA1 Message Date
Gyuho Lee
46f04b3c15 pkg/adt: add "IntervalTree.Delete" failure case
Described in https://github.com/etcd-io/etcd/issues/10877.

"black-height" property: Every path from a node to any descendant leaf node must have the same number of black nodes.

Expected

    After deleting 11 (requires rebalancing):
                            [510,511]
                             /      \
                   ----------        --------------------------
                  /                                            \
              [383,384]                                       [830,831]
              /       \                                      /          \
             /         \                                    /            \
      [261,262](red)  [410,411]                     [647,648]           [899,900](red)
          /               \                              \                      /    \
         /                 \                              \                    /      \
      [82,83]           [292,293]                      [815,816](red)   [888,889]    [972,973]
            \                                                           /
             \                                                         /
          [238,239](red)                                       [953,954](red)

Got

    After deleting 11 (requires rebalancing):
                            [510,511]
                             /      \
                   ----------        --------------------------
                  /                                            \
              [82,83]                                       [830,831]
                    \                                      /          \
                     \                                    /            \
                  [383,384]                        [647,648]            [899,900]
                  /       \                              \                  /    \
                 /         \                              \                /      \
           [261,262]      [410,411]                      [815,816]   [888,889]    [972,973]
             /   \                                                                  /
            /     \                                                                /
     [238,239]   [292,293]                                                  [953,954]

This violates "black-height" property.

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-31 10:05:32 -07:00
Gyuho Lee
f2742d6cd4 pkg/adt: test node "11" deletion
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-31 10:05:32 -07:00
Gyuho Lee
1d638bad72 pkg/adt: README "IntervalTree.Delete" test case images
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-31 10:05:32 -07:00
Gyuho Lee
19d69d2563 pkg/adt: README initial commit
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-31 10:05:27 -07:00
Gyuho Lee
6917c495e8 pkg/adt: add "visitLevel", make "IntervalTree" interface, more tests
Make "IntervalTree" an interface to abstract range tree interface

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-30 15:59:59 -07:00
Martin Weindel
149e5dc291 etcdserver: mark flag as experimental, add to changelog and configuration 2019-07-30 16:57:57 -04:00
Martin Weindel
03fd396610 pkg/transport: Improved description of flag peer-skip-client-san-verification 2019-07-30 16:57:57 -04:00
Martin Weindel
2f476f2b5a pkg/transport: Added test for SkipClientVerify flag. 2019-07-30 16:57:57 -04:00
Martin Weindel
1b048c91ec etcdserver: Added configuration flag --peer-skip-client-verify=true 2019-07-30 16:57:57 -04:00
Gyuho Lee
a2a8887c33
Merge pull request #10953 from gyuho/grpc-gateway
vendor: update grpc-ecosystem
2019-07-30 13:31:44 -07:00
Clayton Coleman
465592a718 Documentation/etcd-mixin: Add an alert for down etcd members
An etcd member being down is an important failure state - while
normal admin operations may cause transient outages to rotate,
when any member is down the cluster is operating in a degraded
fashion. Add an alert that records when any members are down
so that administrators know whether the next failure is fatal.

The rule is more complicated than `up{...} == 0` because not all
failure modes for etcd may have an `up{...}` entry for each member.
For instance, a Kubernetes service in front of an etcd cluster
might only have 2 endpoints recorded in `up` because the third
pod is evicted by the kubelet - the cluster is degraded but
`count(up{...})` would not return the full quorum size. Instead,
use network peer send failures as a failure detector and attempt
to return the max of down services or failing peers. We may
undercount the number of total failures, but we will at least
alert that a member is down.
2019-07-30 14:39:50 -04:00
Sahdev Zala
12c049e6be
Merge pull request #10835 from spzala/securityprocess
Security: Create etcd security process
2019-07-30 14:14:46 -04:00
Gyuho Lee
bc95b1fa84 bill-of-materials: update
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-29 21:41:47 -07:00
Gyuho Lee
80efba3368 tests/e2e: fix curl proclaim error message
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-29 21:28:15 -07:00
Gyuho Lee
f3bca1db08 vendor: update grpc-ecosystem
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-29 16:13:54 -07:00
Gyuho Lee
800e7235eb CHANGELOG: add recent changes in logger
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-29 16:09:06 -07:00
Gyuho Lee
6e766ac5fb
Merge pull request #10947 from gyuho/log-level
*: make log level configurable
2019-07-29 16:06:51 -07:00
Gyuho Lee
4e43a082b2 raft: use mutex in "SetLogger" to avoid race conditions in tests
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-29 15:43:19 -07:00
Gyuho Lee
c6e3401255 etcdserver: make raft log configured by top level logger
To make it consistent

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-29 15:43:19 -07:00
Gyuho Lee
abba5421f5 Documentation/op-guide: add "--log-level" flag
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-29 15:43:19 -07:00
Gyuho Lee
a37f3441f5 etcdmain: add "--log-level" flag
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-29 15:43:19 -07:00
Gyuho Lee
b9de4bddda embed: add "LogLevel", deprecate "Debug" in v3.5
Make log level configurable, and deprecate "debug" flag in v3.5.
And adds more warnings on flags that's being deprecated in v3.5.

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-29 15:43:19 -07:00
Gyuho Lee
e911f901a6 pkg/logutil: add log level utilities
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-29 15:43:19 -07:00
Gyuho Lee
348b0d40a6 embed: do not expose "zapLoggerBuilder"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-29 15:43:19 -07:00
Gyuho Lee
324952c12a
Merge pull request #10935 from gyuho/v2
*: disable v2 API by default
2019-07-29 15:42:56 -07:00
Gyuho Lee
936c506e8d
Merge pull request #10945 from tbg/add-todo
raft: leave TODO about leaving StateSnapshot
2019-07-29 13:51:38 -07:00
Gyuho Lee
4ca04ba991
Merge pull request #10949 from gyuho/docs
Documentation: move design docs to "Documentation", remove "docs"
2019-07-29 13:48:38 -07:00
Gyuho Lee
87e203a5cf Documentation/learning: rewrite balancer design doc images
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-29 13:47:25 -07:00
Gyuho Lee
ad491c0c32 Documentation: move client, learner design docs
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-28 21:54:22 -07:00
Gyuho Lee
3fc62ca586 tools,Documentation: move "etcd-dump-metrics" output to "Documentation"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-28 21:53:50 -07:00
Gyuho Lee
101a63ae97 docs: remove
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-28 21:53:31 -07:00
Gyuho Lee
9e75f27985 CHANGELOG: move corrupt check features to etcd v4
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-28 23:09:42 -05:00
Gyuho Lee
2f30e9ad7f etcdserver: document v2 usage in "publish" method
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-28 21:07:39 -05:00
Gyuho Lee
ae87b21a72 tests/e2e: enable-v2 for v2 e2e tests
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-28 21:07:36 -05:00
Gyuho Lee
38128425b2 Documentation/op-guide: disable v2 by default
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-28 19:36:51 -05:00
Gyuho Lee
ecb915617d embed: disable v2 by default
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-28 19:36:51 -05:00
Gyuho Lee
89d400211d
Merge pull request #10911 from gyuho/balancer
clientv3: fix secure endpoint failover, refactor with gRPC 1.22 upgrade
2019-07-26 14:50:54 -07:00
Tobias Schottdorf
3b02d4c5ff raft: leave TODO about leaving StateSnapshot
The condition is overly strict, which has popped up in CockroachDB
recently.
2019-07-26 23:19:34 +02:00
Gyuho Lee
a7b8034e56 words: whitelist more
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-26 09:19:22 -07:00
Gyuho Lee
8a2a951d79 integration: match code.Canceled in "TestV3KVInflightRangeRequests"
Match new error codes in gRPC v1.22.0

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-26 09:19:22 -07:00
Gyuho Lee
ba42e65b59 clientv3/integration: give more time for balancer resolution
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-26 09:19:22 -07:00
Gyuho Lee
8c7c6ec0c1 clientv3/balancer: refactor
refactor + remove unused

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-26 09:19:19 -07:00
Gyuho Lee
3dc00ab615 clientv3: move auth token credential to "credentials" package
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-26 09:17:44 -07:00
Gyuho Lee
db61ee106c clientv3/credentials: set dial target "Authority" with target address
Overwrite authority when it's IP.

When user dials with "grpc.WithDialer", "grpc.DialContext" "cc.parsedTarget"
update only happens once. This is problematic, because when TLS is enabled,
retries happen through "grpc.WithDialer" with static "cc.parsedTarget" from
the initial dial call.
If the server authenticates by IP addresses, we want to set a new endpoint as
a new authority. Otherwise
"transport: authentication handshake failed: x509: certificate is valid for 127.0.0.1, 192.168.121.180, not 192.168.223.156"
when the new dial target is "192.168.121.180" whose certificate host name is also "192.168.121.180"
but client tries to authenticate with previously set "cc.parsedTarget" field "192.168.223.156"

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-26 09:17:40 -07:00
Gyuho Lee
a6b105a907 embed: use new "credentials" package
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-26 08:56:45 -07:00
Gyuho Lee
7cbe2f5dd6 etcdserver/api/v3rpc: use new "credentials" package
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-26 08:56:38 -07:00
Gyuho Lee
db7231accc clientv3: use new "credentials" package
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-26 08:56:33 -07:00
Gyuho Lee
324c876742 clientv3/credential: implement grpc/credentials.Bundle
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-26 08:56:05 -07:00
Gyuho Lee
4707d7a196 vendor: upgrade grpc-go to v1.22.1
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-26 08:53:09 -07:00
Gyuho Lee
12ab2ee3c4 clientv3: do not use pointer to TransportCredentials interface
Interface in Go is already reference

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-07-26 08:52:31 -07:00