Compare commits

...

5396 Commits

Author SHA1 Message Date
5848b94e62 build(deps): bump golang.org/x/net from 0.19.0 to 0.20.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.19.0 to 0.20.0.
- [Commits](https://github.com/golang/net/compare/v0.19.0...v0.20.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-15 17:12:05 +00:00
4bc55e5208 Merge pull request #17204 from rahulbapumore/branch1
mvcc: Printing etcd backend database related metrics inside scheduleCompaction function
2024-01-15 15:37:08 +00:00
fbcfd4e942 Merge pull request #17244 from ahrtr/raft_changelog_20240115
Migrate the raft changes to raft's changelog
2024-01-15 13:29:51 +00:00
21bbc82710 mvcc: Printing etcd backend database related metrics inside
scheduleCompaction function

To improve traceability of backend database usage, Added below parameter
related to backend database usage metrics inside scheduledCompaction
function.
current-db-size-bytes
current-db-size
current-db-size-in-use-bytes
current-db-size-in-use

Signed-off-by: Rahul More <rahulbapumore@gmail.com>
2024-01-15 17:36:38 +05:30
6abc942abe Migrate the raft changes to raft's changelog
refer to https://github.com/etcd-io/raft/pull/125

Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2024-01-15 10:40:56 +00:00
c8b4b168af Merge pull request #17235 from fuweid/fix-17223
integration: deflake TestMaintenanceSnapshotCancel
2024-01-14 13:24:50 +00:00
9ded10ec76 Merge pull request #17237 from ahrtr/bbolt_logger_20240112
Specify logger for bbolt
2024-01-13 11:03:14 +00:00
10bf636f0e Merge pull request #17229 from iiamabby/yamllint-install
Ensure bin/python directory is cleaned after install
2024-01-13 10:49:59 +00:00
ed994248e0 Merge pull request #17228 from siyuanfoundation/txBuf1
Fix tx buffer inconsistency if there are duplicate keys in one tx.
2024-01-12 18:34:35 +00:00
cfbf672b3c specify logger for bbolt
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2024-01-12 16:38:18 +00:00
40f22e9319 Merge pull request #17176 from YaoC/fix-learner-metric
server: fix learner metric incorrect issue
2024-01-12 17:37:46 +01:00
8b9e1799ad Merge pull request #17236 from ahrtr/bump_core_dependencies_20240112
Bump core dependencies bbolt and raft
2024-01-12 16:29:18 +00:00
cf648e8503 bump raft to v3.6.0-alpha.0
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2024-01-12 15:30:11 +00:00
f2ada58144 bump bbolt to 1.4.0-alpha.0
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2024-01-12 15:27:48 +00:00
b2cc2fb6e5 Merge pull request #17234 from ahrtr/contribution_20240112
Update contributing guide to ensure there is an associated issue for each PR
2024-01-12 12:05:02 +00:00
fdf1e28a3f integration: deflake TestMaintenanceSnapshotCancel
Unlike SnapshotWithVersion, the client.Snapshot doesn't wait for first
response. The server could open db after we close connection or shutdown
the server. We can read few bytes to ensure server opens boltdb.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-01-12 19:24:10 +08:00
f7d264d1ef update contributing guide to ensure there is an associated issue for each PR
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2024-01-12 10:36:10 +00:00
f7ab7adf29 server: fix learner metric incorrect issue
Signed-off-by: YaoC <chengyao09@hotmail.com>
2024-01-12 09:36:33 +00:00
=
a9b5768312 Ensure bin/python directory is cleaned after install
Co-authored-by: James Blair <mail@jamesblair.net>
Signed-off-by: = <abby.crimlis@outlook.com>
2024-01-12 09:41:06 +13:00
971a4f57cc add key dedupe when a write buffer writeback to an empty read buffer bucket.
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2024-01-11 11:31:09 -08:00
8d29b245a3 add test cases of duplicate keys in one tx.
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2024-01-11 11:31:03 -08:00
b3bf59a355 Merge pull request #17195 from siyuanfoundation/txBuf1
Fix delete inconsistencies in read buffer
2024-01-11 08:21:47 +00:00
db61c9695d commit bbolt transaction if there is any pending deleting operations
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2024-01-10 09:33:21 -08:00
b3a5307640 add tests to test tx delete consistency.
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2024-01-10 09:33:13 -08:00
85bc29388a Merge pull request #17209 from etcd-io/dependabot/github_actions/github/codeql-action-3.23.0
build(deps): bump github/codeql-action from 3.22.12 to 3.23.0
2024-01-10 10:26:20 +00:00
8e2ba574e4 Merge pull request #17174 from jmhbnz/adopt-kubernetes-priorities
Adopt kubernetes issue priorities
2024-01-10 10:18:00 +00:00
a73078928d Merge pull request #17219 from devincd/fix-usage
Fix Struct Config has methods on both value and pointer receivers. Such usage is not recommended by the Go Documentation.
2024-01-10 09:47:05 +00:00
75f8d42f7a Merge pull request #17225 from sharathsivakumar/shsi/dep_mgmt
docs: update rotation worksheet
2024-01-10 07:18:47 +00:00
7c87fc9aa7 docs: update rotation worksheet
Signed-off-by: Sharath Sivakumar <mailssr9@gmail.com>
2024-01-09 21:22:15 +01:00
61c70c0d96 Merge pull request #17220 from sharathsivakumar/shsi/bump_deps_12
Bump dependencies manually
2024-01-09 19:25:47 +00:00
1800796359 Merge pull request #17221 from fuweid/update-changelog
CHANGELOG: update changes for v3.4.29
2024-01-09 19:04:36 +00:00
28f4c6fef6 dependency: bump github.com/grpc-ecosystem/grpc-gateway/v2 from 2.18.1 to 2.19.0
Signed-off-by: Sharath Sivakumar <mailssr9@gmail.com>
2024-01-09 16:26:47 +01:00
6706d9de2a CHANGELOG: update changes for v3.4.29
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-01-09 23:22:18 +08:00
98646057d6 dependency: bump golang.org/x/sys from 0.15.0 to 0.16.0
Signed-off-by: Sharath Sivakumar <mailssr9@gmail.com>
2024-01-09 16:04:19 +01:00
931687f87e fix Struct Config has methods on both value and pointer receivers. Such usage is not recommended by the Go Documentation.
Signed-off-by: devincd <505259926@qq.com>
2024-01-09 17:42:59 +08:00
ac6369d3a7 build(deps): bump github/codeql-action from 3.22.12 to 3.23.0
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.22.12 to 3.23.0.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](012739e508...e5f05b81d5)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-08 17:11:17 +00:00
a2eb17c809 Merge pull request #17199 from serathius/dont-flock
Don't flock snapshot files
2024-01-08 15:03:29 +01:00
3a8e90c4c8 Merge pull request #17200 from iiamabby/yamllint-install
Automate installation of yamllint
2024-01-06 14:03:47 +00:00
1707d79eae Merge pull request #17103 from moficodes/patch-17045
Update arm64 infra guide standard `arm64` runner definition
2024-01-05 13:21:57 -06:00
970abc211e Merge pull request #17152 from serathius/logs-recover-backend
Improve logs around recovering snapshot backend and add an e2e test
2024-01-05 15:38:58 +01:00
=
dbfacb4260 Ensure bin directory exists for protoc install
Co-authored-by: James Blair <mail@jamesblair.net>
Signed-off-by: = <abby.crimlis@outlook.com>
2024-01-05 10:29:34 +13:00
=
b103d46ce7 Automate installation of yamllint
Co-authored-by: James Blair <mail@jamesblair.net>
Signed-off-by: = <abby.crimlis@outlook.com>
2024-01-05 10:04:03 +13:00
3471ef133d Add an e2e test and robustness failpoint around recovering from snapshot backend
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2024-01-04 15:25:24 +01:00
7f8346b3f2 Don't flock snapshot files
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2024-01-04 14:53:44 +01:00
06f7db1b09 Update roadmap to use new issue priorities.
Signed-off-by: James Blair <mail@jamesblair.net>
2024-01-04 04:45:49 +13:00
2b19cd118b Merge pull request #17193 from jmhbnz/improve-workflow-autonomy
Enable org members to approve workflows for backports
2024-01-03 10:25:57 +00:00
8444ea163f Delegate approvals for backport workflows.
Signed-off-by: James Blair <mail@jamesblair.net>
2024-01-03 20:12:49 +13:00
f66b95d3b1 Merge pull request #17191 from ahrtr/dependency_20240102
[2024-01-02] Bump dependencies
2024-01-02 19:38:44 +00:00
b22b8ec3c2 bump github.com/mikefarah/yq/v4 to v4.40.5
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2024-01-02 16:56:04 +00:00
8e7984cbc4 bump go.uber.org/multierr to v1.11.0
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2024-01-02 16:54:54 +00:00
553d88cfd3 bump github.com/prometheus/client_golang to v1.18.0
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2024-01-02 16:52:42 +00:00
f8d5ba9a3f Merge pull request #17106 from ivanvc/cert_20231103
Replace the deprecated `x509.ParseCRL` with `x509.ParseRevocationList`
2023-12-29 19:57:41 +00:00
dc26e816fd Merge pull request #17156 from etcd-io/ptabor-patch-1
Update OWNERS: Retire ptabor
2023-12-28 21:18:26 +00:00
164d4b945b Update README.md
Add Piotr Tabor as emeritus.

Signed-off-by: Piotr Tabor <piotr.tabor@gmail.com>
2023-12-28 21:12:14 +01:00
7d6665981e Update OWNERS: Retire ptab
Hi,
I think, it's a high time for me to retire. No contributions over last 6m.
There is a hope, I will be back working on etcd, but over last 6m it kept being just 2 months away.

Thank you all,
Piotr

Signed-off-by: Piotr Tabor <piotr.tabor@gmail.com>
2023-12-28 21:12:14 +01:00
8ec4b290d6 Document issue prioritisation labels.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-12-29 04:57:22 +13:00
93530f6e0a Merge pull request #17167 from etcd-io/dependabot/github_actions/github/codeql-action-3.22.12
build(deps): bump github/codeql-action from 3.22.11 to 3.22.12
2023-12-27 18:24:04 +00:00
670e25ae12 Merge pull request #17172 from sharathsivakumar/shsi/bump_deps_11
Manually bump dependencies
2023-12-27 17:41:40 +00:00
c21b966478 dependency: bump google.golang.org/protobuf from 1.31.0 to 1.32.0
Signed-off-by: Sharath Sivakumar <mailssr9@gmail.com>
2023-12-27 17:27:40 +01:00
7643204e36 dependency: bump go.uber.org/zap from 1.24.0 to 1.26.0
Signed-off-by: Sharath Sivakumar <mailssr9@gmail.com>
2023-12-27 16:51:59 +01:00
dc17043d2e dependency: bump github.com/prometheus/common from 0.44.0 to 0.45.0
Signed-off-by: Sharath Sivakumar <mailssr9@gmail.com>
2023-12-27 16:49:22 +01:00
3ddd5c146b build(deps): bump github/codeql-action from 3.22.11 to 3.22.12
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.22.11 to 3.22.12.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](b374143c11...012739e508)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-25 17:38:37 +00:00
e9434c9455 client: implement TLS CRL tests
Signed-off-by: Ivan Valdes <ivan@vald.es>
2023-12-23 09:23:17 -08:00
2eb0e2d7d5 Merge pull request #17150 from etcd-io/dependabot/go_modules/google.golang.org/grpc-1.60.1
build(deps): bump google.golang.org/grpc from 1.59.0 to 1.60.1
2023-12-21 19:53:42 +00:00
0c55ed7464 build(deps): bump google.golang.org/grpc from 1.59.0 to 1.60.1
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.59.0 to 1.60.1.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.59.0...v1.60.1)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-21 19:07:47 +00:00
f7262d1a1b Merge pull request #17159 from sharathsivakumar/shsi/bump_deps_10
Manually bump dependencies
2023-12-21 18:15:19 +00:00
362477b077 dependency: bump golang.org/x/crypto from 0.16.0 to 0.17.0
Signed-off-by: Sharath Sivakumar <mailssr9@gmail.com>
2023-12-21 18:19:10 +01:00
ac66c2a013 Merge pull request #17153 from serathius/test-fails-with-older-db-file
Test etcd fails to bootstrap with older db file
2023-12-21 15:00:32 +01:00
3c79b2aca6 Merge pull request #17148 from jmhbnz/fix-artifact-upload
Fix artifact upload github action for compatibility with v4.0
2023-12-21 13:54:12 +00:00
538162ad2a Test etcd fails to bootstrap with older db file
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-12-20 16:32:27 +01:00
d39d86a214 Improve logs around recovering from snapshot backend
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-12-20 16:26:27 +01:00
1e8d66ef95 Add beforeOpenSnapshotBackend failpoint
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-12-20 15:36:54 +01:00
35f4a6c91a Merge pull request #17122 from wespanther/main
Add digest for base image and configure dependabot
2023-12-20 10:00:57 +00:00
de090eb719 Merge pull request #17149 from jongwooo/hotfix/correct-typo-from-kuberntes-to-kubernetes
Correct typo from 'Kuberntes' to 'Kubernetes'
2023-12-20 10:52:45 +01:00
205c6f24ec Merge pull request #17131 from jmhbnz/cleanup-workflows
Remove workflow telemetry github action
2023-12-20 09:34:52 +00:00
08d799c4cc Correct typo from 'Kuberntes' to 'Kubernetes'
Signed-off-by: Jongwoo Han <jongwooo.han@gmail.com>
2023-12-20 18:09:31 +09:00
ac25ceeaee build(deps): bump actions/upload-artifact from 3.1.3 to 4.0.0
Signed-off-by: James Blair <mail@jamesblair.net>
2023-12-20 13:56:36 +13:00
0644d5b099 Ensure matrix workflows use unique names for uploaded artifacts.
There are breaking changes in v4.0 of the upload artifact action which mean name must be unique https://github.com/actions/upload-artifact#breaking-changes.

Signed-off-by: James Blair <mail@jamesblair.net>
2023-12-20 13:55:11 +13:00
5b572f1516 Merge pull request #17147 from siyuanfoundation/chlog
changelog: update 3.4 3.5 changelogs to include livez/readyz changes.
2023-12-19 20:08:07 +00:00
23da38c1cb changelog: update 3.4 3.5 changelogs to include livez/readyz changes.
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2023-12-19 11:25:09 -08:00
cc9ca40470 Add digest for base image and configure dependabot
This should not change the current behavior, but will cause dependabot
to update the digest of the latest base image weekly.

Signed-off-by: Wes Panther <wpanther@google.com>
2023-12-18 21:21:17 -08:00
48fa1b934f Merge pull request #17141 from etcd-io/dependabot/github_actions/github/codeql-action-3.22.11
build(deps): bump github/codeql-action from 2.22.9 to 3.22.11
2023-12-18 18:57:03 +00:00
a05156fe99 build(deps): bump github/codeql-action from 2.22.9 to 3.22.11
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.22.9 to 3.22.11.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](c0d1daa7f7...b374143c11)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-18 17:31:54 +00:00
a2721a30fa Remove workflow telemetry github action.
We have completed memory profiling for our workflows so can consider removing this additional action now.

Signed-off-by: James Blair <mail@jamesblair.net>
2023-12-17 20:44:39 +13:00
f7be2dfa17 Merge pull request #16888 from greenmoon55/greenmoon55-patch-1
tests: add comments for clientv3test.TestWatchResumeInitRev
2023-12-16 20:35:43 +00:00
4e986363a3 Merge pull request #16822 from ahrtr/revoke_20231024
Ignore old leader's leases revoking request
2023-12-15 18:44:03 +00:00
f7ff898fd6 Resovle some review comments
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2023-12-15 17:53:36 +00:00
67f17166bf Safeguard lease operations by double checking the leadership
1. ignore old leader's leases revoking request
2. double check current member's leadership before perform lease renew request
3. etcdserve: ensure current member's leadership before performing lease checkpoint request

Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2023-12-15 17:53:36 +00:00
f7e488dc92 Add e2e test cases to reproduce the lease revoke issue
Refer to https://github.com/etcd-io/etcd/issues/15247

Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2023-12-15 17:53:36 +00:00
2f03bbc5dd Merge pull request #17125 from ahrtr/TestMemberReplace_20231215
Update test case TestMemberReplace to always connect to stable endpoints
2023-12-15 16:17:04 +00:00
9590a02f94 update test case TestMemberReplace to always connect to stable endpoints
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2023-12-15 12:38:27 +00:00
51bd8bd4e8 Merge pull request #17107 from redwrasse/redwrasse/return-early-expectfun
testutils: return early instead of first breaking in LogObserver.Expe…
2023-12-15 09:53:40 +00:00
5c476cc9e9 Merge pull request #17115 from ivanvc/update-3.4-changelog-with-ssrf-fix
changelog: update 3.4 changelog to include ssrf fix
2023-12-15 09:51:06 +00:00
2cf112f3b9 Merge pull request #17117 from silves-xiang/main
etcdclient: Fix memory leak caused by for + time.After
2023-12-14 15:17:58 +00:00
a70fa9b471 Merge pull request #17113 from ahrtr/etcd_log_20231213
Added some log messages for better diagnosis
2023-12-14 12:50:49 +00:00
ed01ee1e5e etcdclient: Fix memory leak caused by for + time.After
Signed-off-by: silves-xiang <xiang20010326@sina.com>
2023-12-14 10:05:51 +08:00
616c5a47de changelog: update 3.4 changelog to include ssrf fix
Signed-off-by: Ivan Valdes <ivan@vald.es>
2023-12-13 15:16:17 -08:00
36b2523669 added some log messages for better diagnosis
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2023-12-13 18:43:22 +00:00
dfdffe48f9 Merge pull request #17102 from ahrtr/actuated_badge_20231212
Add actuated badge
2023-12-13 14:32:10 +00:00
68565c5ed7 Merge pull request #17108 from redwrasse/redwrasse/contrib-readmes
contrib: add missing lock and mixin readme descriptions
2023-12-13 10:05:41 +01:00
c89ee6f120 contrib: add missing lock and mixin readme descriptions
Signed-off-by: redwrasse <mail@redwrasse.io>
2023-12-12 23:48:07 -08:00
8a7596304a testutils: return early instead of first breaking in LogObserver.ExpectFunc
Signed-off-by: redwrasse <mail@redwrasse.io>
2023-12-12 22:24:00 -08:00
16d1ef949c replace the deprecated x509.ParseCRL with x509.ParseRevocationList
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-12-12 14:47:49 -08:00
d298130eb0 Merge pull request #17104 from jmhbnz/update-depdenencies
[2023-12-13] Bump dependencies identified by dependabot
2023-12-12 20:26:15 +00:00
ef0a2903ce depdendency: bump github.com/prometheus/client_model from 0.4.1-0.20230718164431-9a2bf3000d16 to 0.5.0.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-12-13 08:40:24 +13:00
ab19cb3115 update amd infra-guide docs
Signed-off-by: Mofi Rahman <mofi@google.com>
2023-12-12 15:30:10 +00:00
dc76bf4af2 Add actuated badge
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2023-12-12 15:23:54 +00:00
e3324dd128 Merge pull request #17079 from ZhouJianMS/member-replace
Add member replace e2e test
2023-12-12 10:13:11 +00:00
c230928240 Merge pull request #17089 from fykaa/main
Adjusted RAM Requirements for arm64 Workflows
2023-12-12 10:08:25 +00:00
1bfed3a0b6 Merge pull request #17091 from etcd-io/dependabot/github_actions/github/codeql-action-2.22.9
build(deps): bump github/codeql-action from 2.22.8 to 2.22.9
2023-12-12 09:42:17 +00:00
0e8b9b2ef2 Adjusted RAM Requirements for arm64 Workflows
Signed-off-by: fykaa <faeka6@gmail.com>
2023-12-12 14:25:42 +05:30
54822c47e9 member replace e2e test
Signed-off-by: ZhouJianMS <zhoujian@microsoft.com>
2023-12-12 15:22:22 +08:00
f0d85826c9 Merge pull request #17090 from etcd-io/dependabot/github_actions/actions/setup-go-5.0.0
build(deps): bump actions/setup-go from 4.1.0 to 5.0.0
2023-12-11 19:45:08 +00:00
9ffd2d51f3 Merge pull request #17088 from ahrtr/gofail_20231211
Install gofail in module-aware mode and ignore go.mod file
2023-12-11 19:10:50 +00:00
fe61388dcf tuned memory allocation for arm64 workflows of e2e and tests-template yaml file
Signed-off-by: fykaa <faeka6@gmail.com>
2023-12-11 23:20:32 +05:30
1ca46b56ae build(deps): bump github/codeql-action from 2.22.8 to 2.22.9
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.22.8 to 2.22.9.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](407ffafae6...c0d1daa7f7)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-11 17:06:08 +00:00
365a3cc7d1 build(deps): bump actions/setup-go from 4.1.0 to 5.0.0
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 4.1.0 to 5.0.0.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](93397bea11...0c52d547c9)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-11 17:06:02 +00:00
a49a867960 Merge pull request #17086 from jmhbnz/roadmap-progress
Add status column for current release priorities
2023-12-11 13:15:47 +00:00
3ab54f720f install gofail in module-aware mode and ignore go.mod file
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2023-12-11 12:37:05 +00:00
c5a3479b62 Merge pull request #17047 from iiamabby/protoc-install
Adding automated install of Protoc if not found on the system
2023-12-11 12:31:02 +00:00
7775f840d8 Merge pull request #17080 from jonasrdl/update-changelog-go-bump
Update release-3.4 and 3.5 Changelog for go bump to 1.20.12
2023-12-11 12:29:46 +01:00
ec07ff8fd7 Add status column for current release priorities.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-12-10 21:56:01 +13:00
=
580ace4d17 Automating install of protoc
Signed-off-by: = <abby.crimlis@outlook.com>
2023-12-10 19:42:30 +13:00
3e899d42c4 Add missing release date to v3.5.11 changelog
Signed-off-by: Jonas Riedel <jonasriedel@pm.me>
2023-12-08 09:29:54 +01:00
cbcf76408d etcd: Update changelog for go bump
Signed-off-by: Jonas Riedel <jonasriedel@pm.me>
2023-12-07 22:52:10 +01:00
902436eee5 Merge pull request #17078 from overvenus/ignore-message-mismatch
server: ignore raft messages if member id mismatch
2023-12-07 16:50:08 +01:00
9f82390ae9 server: refine TestProcessIgnoreMismatchMessage
Signed-off-by: Neil Shen <overvenus@gmail.com>
2023-12-07 20:32:43 +08:00
fb769c4306 server: ignore raft messages if member id mismatch
Ignore Raft messages when the `To` field mismatches the local member ID.
In cases where incorrect Raft messages are dispatched, potentially due
to a malfunctioning switch, this proactive check prevents panics,
such as "tocommit is out of range".

Signed-off-by: Neil Shen <overvenus@gmail.com>
2023-12-07 11:57:45 +08:00
7851295966 Merge pull request #17073 from jonasrdl/update-to-go-1.21.5
Update go version to 1.21.5
2023-12-06 19:12:23 +00:00
b0b15e5ac7 Merge pull request #17072 from sharathsivakumar/shsi/bump_deps_9
Bump dependencies manually
2023-12-06 18:56:40 +00:00
5cd288771c etcd: Update go version to 1.21.5
Signed-off-by: Jonas Riedel <jonasriedel@pm.me>

Signed-off-by: Jonas Riedel <jonasriedel@pm.me>

Signed-off-by: Jonas Riedel <jonasriedel@pm.me>
2023-12-06 19:25:33 +01:00
be31dd00a5 dependency: bump github.com/prometheus/client_golang from 1.13.0 to 1.17.0
Signed-off-by: Sharath Sivakumar <mailssr9@gmail.com>
2023-12-06 13:54:12 +01:00
c14a582969 dependency: github.com/mikefarah/yq/v4 from 4.35.2 to 4.40.4
Signed-off-by: Sharath Sivakumar <mailssr9@gmail.com>
2023-12-06 13:48:42 +01:00
235ec793fd dependency: bump golang.org/x/net from 0.18.0 to 0.19.0
Signed-off-by: Sharath Sivakumar <mailssr9@gmail.com>
2023-12-06 13:44:54 +01:00
4ece5561d4 Merge pull request #17058 from ahrtr/rollback_lease_lock_20231204
Rollback the pull/14080: which fixed the potential deadlock
2023-12-05 11:44:40 +00:00
9a6eeb5f7e Rollback the pull/14080: which fixed the potential deadlock
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2023-12-05 10:51:38 +00:00
d8f077151d Merge pull request #17066 from ivanvc/disable-forwarding-redirects-for-peer-http-connection
server: disable redirects in peer communication
2023-12-05 09:58:41 +00:00
8578e07117 server: disable redirects in peer communication
Disable following redirects from peer HTTP communication on the client's side.
Etcd server may run into SSRF (Server-side request forgery) when adding a new
member. If users provide a malicious peer URL, the existing etcd members may be
redirected to another unexpected internal URL when getting the new member's
version.

Signed-off-by: Ivan Valdes <ivan@vald.es>
2023-12-04 13:53:28 -08:00
b89a45126d Merge pull request #17046 from moficodes/patch-02
add workflow telemetry to collect action metrics
2023-12-04 10:28:00 +00:00
93ab2ef7b2 Merge pull request #17056 from serathius/revert-switch-v3
Revert "Switch to validating v3 when v2 and v3 are synchronized"
2023-12-03 21:38:27 +01:00
21704b85c2 Merge pull request #17055 from serathius/abort-failpoint-failed
Abort if failpoint injecton failed
2023-12-03 18:12:44 +01:00
bc697bc26e Revert "Switch to validating v3 when v2 and v3 are synchronized"
This reverts commit 4fe46f9203.

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-12-03 18:12:09 +01:00
5175652a8e Abort if failpoint injecton failed
If one of nodes is unhealthy the test would never finish as watchers
would never reach max revision.

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-12-03 17:26:51 +01:00
9d18fb0c6c Merge pull request #17050 from ahrtr/gofail_client_timeout_20231201
Support setting http client timeout when enable/disable failpoint
2023-12-02 08:33:51 +00:00
f37a4365ee Support setting http client timeout when enable/disable failpoint
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2023-12-01 14:26:15 +00:00
db4e95cb1f Merge pull request #17044 from vivekpatani/dependabot-fix
*: dependabot dependency fix
2023-11-30 20:24:31 +00:00
fe43753d45 add workflow telemetry to collect action metrics
part of #17045

Signed-off-by: Mofi Rahman <mofi@google.com>
2023-11-30 19:42:22 +00:00
d616195189 etcdctl,etcdutl,server,tests: bump golang.org/x/time to v0.5.0
- https://github.com/etcd-io/etcd/pull/17031

Signed-off-by: vivekpatani <9080894+vivekpatani@users.noreply.github.com>
2023-11-30 10:14:56 -08:00
b205f1403b etcdutl,server,tests,tools: bump golang.org/x/crypto to v0.16.0
- https://github.com/etcd-io/etcd/pull/17030

Signed-off-by: vivekpatani <9080894+vivekpatani@users.noreply.github.com>
2023-11-30 10:14:27 -08:00
2afd2ddee5 *: bump golang.org/x/sys to 0.15.0
- https://github.com/etcd-io/etcd/pull/17029

Signed-off-by: vivekpatani <9080894+vivekpatani@users.noreply.github.com>
2023-11-30 10:13:29 -08:00
f0708d350e Merge pull request #17028 from etcd-io/dependabot/github_actions/github/codeql-action-2.22.8
build(deps): bump github/codeql-action from 2.22.7 to 2.22.8
2023-11-30 09:30:32 +00:00
76e7a84c02 Merge pull request #17040 from thomasmey/patch-1
Fix message in case of unsupported platform
2023-11-30 09:14:06 +01:00
b5b0b8dbd4 Fix message in case of unsupported platform
Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
2023-11-28 13:36:33 +01:00
bf347243db Merge pull request #17027 from sharathsivakumar/main
changelog: Update changelog for 3.5.11 to include url redirect fix
2023-11-28 09:36:38 +01:00
4c853774e6 Rename the test and update comments
Signed-off-by: Jin Dong <greenmoon55@gmail.com>
2023-11-28 02:32:50 +00:00
f2d718e641 Merge branch 'etcd-io:main' into greenmoon55-patch-1 2023-11-27 21:14:59 -05:00
443af2497d changelog: Update changelog for 3.5.11 to include url redirect fix
Signed-off-by: Sharath Sivakumar <mailssr9@gmail.com>
2023-11-27 20:00:46 +01:00
03d551243b Merge pull request #17015 from serathius/extract-membership-applier
Extract membership applier
2023-11-27 19:59:21 +01:00
b687d76abd build(deps): bump github/codeql-action from 2.22.7 to 2.22.8
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.22.7 to 2.22.8.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](66b90a5db1...407ffafae6)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-27 17:12:50 +00:00
62b772c321 Merge pull request #17021 from serathius/test-applyconfstate
Test ApplyConfState after restart
2023-11-27 13:19:50 +01:00
e0b18a5ade Merge pull request #17026 from serathius/test-v3-storage-configuration-validation
Test v3 storage configuration validation
2023-11-27 12:58:40 +01:00
fbdf65f101 Test v3 storage configuration validation
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-11-27 12:00:47 +01:00
e1d79097d5 Merge pull request #17017 from serathius/switch-validation-v3
Switch to validating v3 when v2 and v3 are synchronized
2023-11-27 10:50:14 +00:00
054b67780b Merge pull request #17023 from jmhbnz/changelog-tracing-update
CHANGELOG: Add 3.5.11 note for --experimental-distributed-tracing-sampling-rate
2023-11-27 09:36:29 +01:00
c3c029d057 CHANGELOG: Add 3.5.11 note for --experimental-distributed-tracing-sampling-rate.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-11-27 09:15:42 +13:00
e192a05193 Test ApplyConfState after restart
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-11-26 17:40:28 +01:00
7fb6b756a5 Merge pull request #17020 from ahrtr/cleanup_20231125
Remove unused method and function
2023-11-25 20:30:44 +01:00
ce0a737ab1 Merge pull request #17018 from moficodes/patch-01
add initialization for epMu in contetx client
2023-11-25 20:16:38 +01:00
a97052acf4 remove unused method and functions
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2023-11-25 16:16:52 +00:00
e6595825ae Merge pull request #17014 from serathius/test-membership-bootstrap
Add a simple test ensuring membership is properly bootstrapped
2023-11-25 15:23:33 +00:00
52a9b9d96c add initialization for epMu in contetx client
fixes #17001

Signed-off-by: Mofi Rahman <mofi@google.com>
2023-11-24 20:57:40 +00:00
4fe46f9203 Switch to validating v3 when v2 and v3 are synchronized
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-11-24 17:46:33 +01:00
2ad21558ac Remove shouldApplyV3 from the v3 applier
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-11-24 16:13:25 +01:00
d22c00ccee Extract membership applier
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-11-24 15:57:15 +01:00
a968c1f5b3 Add a simple test ensuring membership is properly bootstrapped
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-11-24 12:21:59 +01:00
6db5e00103 Merge pull request #17013 from serathius/deduplicate-shouldApplyV3
Move duplicated shouldApplyV3 logic up into apply method
2023-11-24 11:49:21 +01:00
c975f24202 Merge pull request #16950 from mingli103/e2e-test-arm64
etcd-e2d-test:rename e2e-arm64 file and runs it on every pull request…
2023-11-24 09:54:25 +00:00
7fdb33065d Move duplicated shouldApplyV3 logic up into apply method
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-11-24 10:21:14 +01:00
82fe457b29 Merge pull request #16920 from shaoqin2/shlu/contribfest
clientv3test: add comments for clientv3test
2023-11-23 20:33:28 +00:00
904c0769e9 Merge pull request #16998 from ahrtr/3.4.28_changelog
Update changelog for 3.4.28
2023-11-23 19:05:53 +00:00
b3d351185c Update changelog for 3.4.28
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2023-11-23 17:27:25 +00:00
5426f6d264 Merge pull request #17007 from serathius/remove-v2-applier
Remove v2 applier
2023-11-23 16:30:23 +01:00
093666f450 Cleanup v2 applier
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-11-23 15:41:13 +01:00
b17c1de30c Merge pull request #17006 from serathius/remove-v2-sync
Remove v2 sync
2023-11-23 15:40:18 +01:00
c72ff1e69c Remove syncing the v2 store TTLs
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-11-23 14:55:01 +01:00
f04478f41e Merge pull request #16989 from serathius/remove-v2-apply-logic
Remove v2 apply logic
2023-11-23 14:54:31 +01:00
ed3375e076 Remove v2 apply logic
v2 store is no longer available in v3.6.
We can remove apply logic for it as they will never be used.

Only v2 PUT is neeeded as it applies to v3 storage and etcd v3.5 uses it for setting member
attributes and cluster version.

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-11-23 14:13:07 +01:00
ccd711ae13 Merge pull request #17005 from borg-land/fix-missing-json-flag
fix missing json flag when using VERBOSE=1
2023-11-23 14:11:51 +01:00
f454342bfe fix missing json flag when using VERBOSE=1
Signed-off-by: upodroid <upodroid@users.noreply.github.com>
2023-11-23 12:33:29 +00:00
9d97cc203e Merge pull request #16991 from serathius/refactor-v2-deprecation-tests
Refactor v2 deprecation tests to allow different cluster config
2023-11-22 22:18:22 +01:00
28d9564962 Merge pull request #16994 from serathius/tests-v2-cluster-version
Add tests for setting cluster version using v2 request
2023-11-22 21:11:18 +01:00
2f30760b37 Add tests for setting cluster version using v2 request
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-11-22 18:05:19 +01:00
21311698aa Merge pull request #16993 from serathius/stop-v2-requests-tests
Stop using v2 requests in server tests
2023-11-22 17:59:10 +01:00
29dd025b84 Stop using v2 requests in server tests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-11-22 14:41:53 +01:00
cac2882df8 Refactor v2 deprecation tests to allow different cluster config
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-11-22 14:36:38 +01:00
fd0882b67e Merge pull request #16984 from siyuanfoundation/lin-read
etcdserver: add linearizable_read check to readyz.
2023-11-21 19:51:12 +00:00
12b640523a etcdserver: add linearizable_read check to readyz.
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2023-11-21 11:13:20 -08:00
16e441671a Merge pull request #16909 from Icemap/feat-add-wasm-for-transport
client: add wasm for client transport
2023-11-21 17:19:38 +00:00
f64689f4e2 Update copyright header in sockopt_wasm.go
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-11-21 16:27:22 +00:00
5a99305004 Merge pull request #16983 from etcd-io/dependabot/github_actions/github/codeql-action-2.22.7
build(deps): bump github/codeql-action from 2.22.5 to 2.22.7
2023-11-21 15:37:07 +00:00
ec6147cd04 Merge pull request #16967 from serathius/remove-v2-proposals
Remove v2 proposals code
2023-11-21 15:35:51 +00:00
a4426b4d74 Merge pull request #16982 from etcd-io/dependabot/github_actions/actions/github-script-7.0.1
build(deps): bump actions/github-script from 6.4.1 to 7.0.1
2023-11-21 15:09:17 +00:00
bccd56ae48 Merge pull request #16985 from jmhbnz/update-dependencies
[2023-11-21] Bump dependencies identified by dependabot
2023-11-21 15:06:57 +00:00
7c0a09b81e Merge pull request #16986 from jmhbnz/prevent-member-add-ssrf
Disable following redirects when checking peer urls
2023-11-21 10:07:48 +00:00
3a9a7483b7 depdendency: bump go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc from 0.46.0 to 0.46.1.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-11-21 20:03:48 +13:00
3b37afec7b Don't follow redirects when checking peer urls.
It's possible that etcd server may run into SSRF situation when adding a new member. If users provide a malicious peer URL, the existing etcd members may be redirected to other unexpected internal URL when getting the new member's version.

Signed-off-by: James Blair <mail@jamesblair.net>
2023-11-21 10:25:20 +13:00
08aabfea02 depdendency: bump go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc from 1.20.0 to 1.21.0.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-11-21 10:06:15 +13:00
5449f0fb99 depdendency: bump go.opentelemetry.io/otel/sdk from 1.20.0 to 1.21.0.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-11-21 10:04:28 +13:00
3836324e8c build(deps): bump github/codeql-action from 2.22.5 to 2.22.7
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.22.5 to 2.22.7.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](74483a38d3...66b90a5db1)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-20 18:01:27 +00:00
c041272d26 build(deps): bump actions/github-script from 6.4.1 to 7.0.1
Bumps [actions/github-script](https://github.com/actions/github-script) from 6.4.1 to 7.0.1.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](d7906e4ad0...60a0d83039)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-20 18:01:19 +00:00
dd7a4d28a8 Remove code used to make v2 proposals
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-11-19 22:39:33 +01:00
a9cf27b169 Merge pull request #16968 from sharathsivakumar/shsi/fix-slack-links
readme: fix slack link for sig-etcd
2023-11-19 22:09:19 +01:00
958a2b8e3c readme: fix slack link for sig-etcd
Signed-off-by: Sharath Sivakumar <mailssr9@gmail.com>
2023-11-19 20:08:00 +01:00
b4fd31f254 Remove code for setting cluster version via V2 API
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-11-19 15:28:52 +01:00
94b9993184 Merge pull request #16965 from ivanvc/enable-github-workflow-approval-via-ok-to-test-label
github workflow: enable workflow approval
2023-11-19 10:30:46 +01:00
8b3efbc597 Remove nightly workflow
Signed-off-by: Ming Li <mli103hawk@gmail.com>
2023-11-18 10:36:13 -06:00
51eb29af36 etcd-e2d-test:rename e2e-arm64 file and runs it on every pull request #16912
KubeconNA 2023 Contribfest issue #16893 . Recently in #16801 we introduced on demand github actions runners for the arm64 platform. Having on demand runner infrastructure in place means we should now have enough capacity to begin running arm64 tests for every pull request. Currently we have:
.github/workflows/e2e-arm64-template.yaml - Shared template
.github/workflows/e2e-arm64-nightly.yaml - Runs template against both
release-3.5 and main branches nightly. Moving forward we can just rename
.github/workflows/e2e-arm64-template.yaml to
.github/workflows/e2e-arm64.yaml and delete the other file. We can then
just make the template file a standard workflow that will run on pull
request.

Signed-off-by: Ming Li <mli103hawk@gmail.com>
2023-11-18 10:36:13 -06:00
2a463b5812 github workflow: enable workflow approval
Allow to run GitHub workflows for Pull Requests that have the ok-to-test
label.

Signed-off-by: Ivan Valdes <ivan@vald.es>
2023-11-17 15:17:19 -08:00
1bade2c347 Merge pull request #16943 from arjunmalhotra1/main
Update 3.4 & 3.5 changelog.
2023-11-16 15:44:47 +00:00
88e2043923 Update 3.4 & 3.5 changelog.
Signed-off-by: arjunmalhotra1 <am2cj@virginia.edu>
2023-11-16 09:07:47 -06:00
e541a6d672 Merge pull request #16954 from ahrtr/golangci_version_20231116
Get golangci-lint't version from `tools/mod` for `golangci/golangci-lint-action`
2023-11-16 14:49:38 +00:00
033c3f3d94 get golangci-lint's version from tools/mod for the Makefile target install-golangci-lint
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2023-11-16 14:12:58 +00:00
c30d5c3f44 get golangci-lint't version from tools/mod for golangci/golangci-lint-action
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2023-11-16 13:45:31 +00:00
c1d079b05e define golangci-lint's version in tools/mod
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2023-11-16 13:45:31 +00:00
5ec2598d30 Merge pull request #16949 from etsrpl/fix-golangci-lint-missing
tests: fix failed prow test by adding golangci-lint to Makefile
2023-11-16 13:44:56 +00:00
8a09853268 Merge pull request #16953 from sharathsivakumar/main
changelog: Update fix for CVE-2023-47108
2023-11-16 14:13:49 +01:00
f415c886c4 Merge pull request #16952 from sharathsivakumar/shsi/deps_9
Manually bump dependencies raised by dependabot
2023-11-16 13:18:08 +01:00
9ee086c682 changelog: Update fix for CVE-2023-47108
Signed-off-by: Sharath Sivakumar <mailssr9@gmail.com>

Co-authored-by: Benjamin Wang <wachao@vmware.com>
2023-11-16 12:38:16 +01:00
232b25e313 dependency: bump github.com/alexfalkowski/gocovmerge from 1.2.2 to 1.2.3
Signed-off-by: Sharath Sivakumar <mailssr9@gmail.com>
2023-11-16 11:11:36 +01:00
33b526f58d dependency: bump golang.org/x/net from 0.17.0 to 0.18.0
Signed-off-by: Sharath Sivakumar <mailssr9@gmail.com>
2023-11-16 11:03:00 +01:00
4907fedbc3 dependency: bump golang.org/x/crypto from 0.14.0 to 0.15.0
Signed-off-by: Sharath Sivakumar <mailssr9@gmail.com>
2023-11-16 10:50:17 +01:00
7586098f78 dependency: bump github.com/grpc-ecosystem/grpc-gateway/v2 from 2.18.0 to 2.18.1
Signed-off-by: Sharath Sivakumar <mailssr9@gmail.com>
2023-11-16 10:44:50 +01:00
0c76f50dbc Merge pull request #16944 from serathius/refactor-mock-rand
Refactor mocking rand
2023-11-16 09:28:34 +01:00
4ec3cf8cfa tests: fix failed prow test by adding golangci-lint to Makefile
Missing binary, fixes golangci-lint command not found on prow jobs

Signed-off-by: Etienne Simard <esimard@ripple.com>
2023-11-15 14:22:58 -06:00
089165deec clientv3test: add comments for clientv3test
Signed-off-by: shaoqin2 <21689677+shaoqin2@users.noreply.github.com>
2023-11-15 08:25:39 -05:00
d0114cf4c0 Merge pull request #16797 from siyuanfoundation/metrics
etcdserver: add metric counters for livez/readyz health checks.
2023-11-15 10:52:17 +00:00
b71686d1e6 Refactor mocking rand
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-11-15 10:26:39 +01:00
6df2a0cd97 Merge pull request #16914 from siyuanfoundation/rand2
robustness test: add with functions of randomizable config params in robustness test
2023-11-15 10:24:34 +01:00
834fac9fb2 robustness test: add with functions of randomizable config params in robustness test
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2023-11-15 02:08:07 +00:00
3897103b77 etcdserver: add metric counters for livez/readyz health checks.
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2023-11-14 09:26:00 -08:00
b343231b12 Merge pull request #16930 from sharathsivakumar/shsi/bump_deps_8
dependency: bump go.opentelemetry.io/contrib/instrumentation/google.g…
2023-11-13 12:00:32 +00:00
acd5724689 dependency: bump go get go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc from 1.19.0 to 1.20.0
Signed-off-by: Sharath Sivakumar <mailssr9@gmail.com>
2023-11-13 12:18:48 +01:00
30ed399835 Merge pull request #16929 from ZhouJianMS/fix-sleep-failpoint
Exclude sleep failpoint from 1 node scenario
2023-11-13 12:18:47 +01:00
8066e8116b dependency: bump go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc from 0.45.0 to 0.46.0
Signed-off-by: Sharath Sivakumar <mailssr9@gmail.com>
2023-11-13 11:53:02 +01:00
55516234d3 exclude sleep failpoint from 1 node scenario
Signed-off-by: ZhouJianMS <zhoujian@microsoft.com>
2023-11-13 16:19:44 +08:00
4d8eefb7e9 Merge pull request #16913 from ivanvc/run-arm64-test-for-every-push-and-pr
github workflow: run arm64 tests on every push
2023-11-11 15:14:35 +00:00
1e81543546 Merge pull request #16918 from serathius/robustness-timeout
Increase client timeout for failpoint injection
2023-11-11 12:15:32 +01:00
13d7bf5ab7 Increase client timeout for failpoint injection
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-11-11 11:53:41 +01:00
c48738e33f fix: add js platform
Signed-off-by: Icemap <qizhi.wang@pingcap.com>

Signed-off-by: Icemap <qizhi.wang@pingcap.com>
2023-11-11 10:18:34 +08:00
1cecf35b24 feat: add wasm for client transport
Signed-off-by: Icemap <qizhi.wang@pingcap.com>
2023-11-11 10:18:34 +08:00
c3641d34b8 github workflow: run arm64 tests on every push
Use a template to consolidate arm64 and amd64 test workflows. Enable
running armd64 tests on every push and pull request.

Signed-off-by: Ivan Valdes <ivan@vald.es>
2023-11-10 16:06:16 -08:00
e300c6f0e3 Merge pull request #16907 from ahrtr/typo_20231110
Fix typo in concurrent examples
2023-11-10 20:16:43 +00:00
1a65313a73 fix typo in concurrent examples
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-11-10 14:41:21 +00:00
c0bb57a3d4 Merge pull request #16903 from moficodes/main
github workflow: update golangci-lint to 1.55.2
2023-11-10 10:27:42 +00:00
3f17ba474a Merge pull request #16906 from moficodes/docs
doc fix: add instruction to installling protoc and yamllint in contributing.md
2023-11-10 09:38:48 +00:00
569cf2d2b9 doc fix: add instruction for installing protoc and yamllint in contributing.md
Signed-off-by: Mofi Rahman <mofi@google.com>
2023-11-10 05:54:33 +00:00
97e45364a0 Merge branch 'etcd-io:main' into main 2023-11-09 16:21:20 -06:00
11ede03b3f Merge pull request #16896 from vivekpatani/main
*: bump dependabot dependency
2023-11-09 18:11:13 +00:00
8da89177a9 etcdctl,etcdutl,pkg,server,tests,tools: bump github.com/spf13/cobra from 1.7.0 to 1.8.0
- https://github.com/etcd-io/etcd/pull/16878/

Signed-off-by: vivekpatani <9080894+vivekpatani@users.noreply.github.com>
2023-11-09 11:02:36 -06:00
ed30fb1226 *: bump golang.org/x/sys from 0.13.0 to 0.14.0
- https://github.com/etcd-io/etcd/pull/16875

Signed-off-by: vivekpatani <9080894+vivekpatani@users.noreply.github.com>
2023-11-09 11:02:36 -06:00
a4593c8d24 tools/mod: bump github.com/fatih/color from 1.15.0 to 1.16.0
- https://github.com/etcd-io/etcd/pull/16873

Signed-off-by: vivekpatani <9080894+vivekpatani@users.noreply.github.com>
2023-11-09 11:02:36 -06:00
20e14e064e tools/mod: bump golang.org/x/text from 0.13.0 to 0.14.0
- https://github.com/etcd-io/etcd/pull/16872/

Signed-off-by: vivekpatani <9080894+vivekpatani@users.noreply.github.com>
2023-11-09 11:02:36 -06:00
68e06bdf70 tools/mod: bump github.com/elliotchance/orderedmap from 1.5.0 to 1.5.1
- https://github.com/etcd-io/etcd/pull/16871/

Signed-off-by: vivekpatani <9080894+vivekpatani@users.noreply.github.com>
2023-11-09 11:02:36 -06:00
afb36b9468 tools/mod: bump golang.org/x/mod from 0.13.0 to 0.14.0
- https://github.com/etcd-io/etcd/pull/16870/

Signed-off-by: vivekpatani <9080894+vivekpatani@users.noreply.github.com>
2023-11-09 11:02:36 -06:00
ef8a087793 github workflow: update golangci-lint to 1.55.2
fixes: #16897
update golangci-lint version to the latest to keep the codebase linting up to date

Signed-off-by: Mofi Rahman <mofi@google.com>
2023-11-09 10:29:49 -06:00
6e30d9ed7d Merge pull request #16889 from tessapham/fix-scripts
fix test script and lint
2023-11-09 15:32:22 +01:00
38cc9f231b Merge pull request #16794 from jmhbnz/complete-ownersfile-migration
Complete migration to OWNERS file
2023-11-09 15:29:59 +01:00
91f5f4abc5 Merge pull request #16892 from mjlshen/website-745
Update README to callout the issue triage meeting
2023-11-09 15:28:22 +01:00
1f3652e236 Merge pull request #16895 from arjunmalhotra1/main
etcd: upgrade go version from 1.21.3 to 1.21.4
2023-11-09 14:20:43 +00:00
6ddca657a9 etcd: upgrade go version from 1.21.3 to 1.21.4
To keep etcd projects up to date with the latest patch releases &
incorporate the latest security updates.

Signed-off-by: Arjun Malhotra <am2cj@virginia.edu>
2023-11-09 00:18:48 -06:00
ecfee78c45 Update README to callout the issue triage meeting
Signed-off-by: Michael Shen <mishen@umich.edu>
2023-11-08 10:34:31 -05:00
2b7e1c6f82 fix scripts
Signed-off-by: Tessa Pham <hpham111@bloomberg.net>
2023-11-08 00:27:13 -06:00
00ce0116c5 tests: add comments for clientv3test.TestWatchResumeInitRev
Signed-off-by: Jin Dong <greenmoon55@gmail.com>
2023-11-08 00:04:48 -06:00
649b365937 Merge pull request #16883 from mjlshen/16760
scripts: macOS support for scripts/genproto.sh
2023-11-08 01:56:45 +01:00
e526bddab1 Merge pull request #16884 from etsrpl/main
etcd-io tests: trial arm64 on every pr with a small robustness workflow
2023-11-08 01:47:19 +01:00
3381a4c2d8 Merge pull request #16885 from spawulski/main
README.md: Add documentation for new snapshot restore flags
2023-11-08 01:46:05 +01:00
3bf21cdb3a Merge pull request #16886 from tessapham/bom
update dependency in BOM check
2023-11-08 01:45:17 +01:00
c4499adfd5 replace archived repo in BOM check
Signed-off-by: Tessa Pham <hpham111@bloomberg.net>
2023-11-07 17:41:11 -06:00
20218117e2 README.md: Add documentation for new snapshot restore flags
the bump-revision and mark-compated flags were added to `snapshot restore` and required documentation.

Signed off by Stephen Pawulski spawulski@gmail.com

Signed-off-by: spawulski <spawulski@lotlinx.com>
2023-11-07 17:32:25 -06:00
904e5581db etcd-io tests: trial arm64 on every pr with a small robustness workflow
Trial running a small robustness workflow for arm64 on every pull request
KubeconNA 2023 Contribfest issue #16863

Signed-off-by: Etienne Simard <esimard@ripple.com>
2023-11-07 17:01:28 -06:00
27272c3ed0 scripts: macOS support for scripts/genproto.sh
This commit will allow scripts/genproto.sh to fall back to gsed if
available, which is required for the script to work on macOS.

Signed-off-by: Michael Shen <mishen@umich.edu>
2023-11-07 18:00:36 -05:00
7e00a1e42b Merge pull request #16882 from vivekpatani/main
etcdctl,etcdutl,server,tests: update golang.org/x/time to v0.4.0
2023-11-07 17:45:45 +00:00
d2ada92830 etcdctl,etcdutl,server,tests: update golang.org/x/time to v0.4.0
- https://github.com/etcd-io/etcd/pull/16880

Signed-off-by: vivekpatani <9080894+vivekpatani@users.noreply.github.com>
2023-11-07 11:01:51 -06:00
02794b00eb Merge pull request #16864 from vivekpatani/main
clientv3,server,tests: bump dependencies identified by dependabot
2023-11-05 17:47:10 +00:00
8264b4e9ae clientv3,server,tests: bump dependencies identified by dependabot
Signed-off-by: vivekpatani <9080894+vivekpatani@users.noreply.github.com>
2023-11-05 09:27:37 -06:00
d38f7dceb2 Merge pull request #16787 from evanj/evan.jones/rm-unsetenv
osutil: remove unused Unsetenv function
2023-11-04 12:36:44 +00:00
aa67cbe6aa Complete migration to OWNERS file.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-11-05 00:02:45 +13:00
d8284a1a2a Merge pull request #16859 from ZhouJianMS/zhoujian/raft-io-stall
Add robustness failpoint for IO stall in raft loop
2023-11-03 13:57:18 +01:00
d208985aec error handling for gofailpoint
Signed-off-by: ZhouJianMS <zhoujian@microsoft.com>
2023-11-03 19:25:17 +08:00
827dc18682 Add IO stall failpoint in raft loop
Signed-off-by: ZhouJianMS <zhoujian@microsoft.com>
2023-11-03 16:42:33 +08:00
19bf472b9e Merge pull request #16854 from etcd-io/dependabot/github_actions/github/codeql-action-2.22.5
build(deps): bump github/codeql-action from 2.22.4 to 2.22.5
2023-10-30 19:27:57 +00:00
aa4727c493 Merge pull request #16855 from etcd-io/dependabot/github_actions/ossf/scorecard-action-2.3.1
build(deps): bump ossf/scorecard-action from 2.3.0 to 2.3.1
2023-10-30 18:56:25 +00:00
6343516b44 build(deps): bump ossf/scorecard-action from 2.3.0 to 2.3.1
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.3.0 to 2.3.1.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](483ef80eb9...0864cf1902)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-30 17:37:52 +00:00
ac5be8ef8a build(deps): bump github/codeql-action from 2.22.4 to 2.22.5
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.22.4 to 2.22.5.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](49abf0ba24...74483a38d3)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-30 17:37:48 +00:00
5cc9f7f771 Merge pull request #16835 from chaochn47/e2e-livez-readyz
add livez readyz e2e tests
2023-10-29 15:54:57 +00:00
4701a71f00 Merge pull request #16836 from chaochn47/defrag_follow_up
v3rpc: online defrag toggles gRPC health server serving status
2023-10-29 15:32:36 +00:00
42d9e43e5f tests/e2e: enhance livez readyz e2e tests
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-10-28 18:00:14 -07:00
e8ae83fac4 Add e2e tests for livez readyz
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-10-28 17:57:12 -07:00
8a6c1335e2 v3rpc: run health notifier to listen on online defrag state change
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-10-28 17:49:24 -07:00
5fad87c2ab Merge pull request #16840 from serathius/date-v3.5.10
Update date of v3.5.10 release
2023-10-27 13:53:35 +01:00
6b9fb706d9 Update date of v3.5.10 release
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-27 13:41:59 +02:00
a4f507c30a Merge pull request #16832 from ahrtr/3.6_bump_bbolt_1.3.8_20231026
Bump bbolt to 1.3.8 for main branch
2023-10-27 09:22:59 +01:00
1101655b9f bump bbolt to 1.3.8 for main branch
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-10-26 16:34:15 +01:00
2dc62757f5 Merge pull request #16824 from jmhbnz/fix-robustness-arm64-runs-on
Fix arm64 robustness and stop running workflows in containers
2023-10-26 10:44:40 +02:00
6dea713f7d Stop running test workflows in containers.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-10-26 20:52:04 +13:00
cd26faf282 Fix runs-on for arm64 robustness.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-10-26 07:21:54 +13:00
4d77fd1efa Merge pull request #16278 from chaochn47/grpc_health_check_poc
gRPC health server sets serving status to NOT_SERVING on defrag
2023-10-25 19:42:40 +02:00
9a5923098b CHANGELOG-3.6.md: add etcd --experimental-stop-grpc-service-on-defrag
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-10-25 08:59:25 -07:00
913c8258f9 tests: add client failover on defrag test case in e2e
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-10-25 08:59:07 -07:00
ea035471ce online defrag notifies gRPC health server to expose NOT_SERVING status
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-10-25 08:58:33 -07:00
5761f9c28f Merge pull request #16825 from jmhbnz/revert-robustness-to-old-runners
Revert runner change for main robustness nightly
2023-10-25 15:24:26 +02:00
b9498fd24e Revert runner change for main robustness nightly.
Until we can resolve issues with fuse for new actuated runner.

Signed-off-by: James Blair <mail@jamesblair.net>
2023-10-26 00:55:43 +13:00
3347568cc0 Merge pull request #16821 from ahrtr/workflow_20231024
Schedule the arm64 related workflow nightly
2023-10-24 20:16:50 +01:00
974679fb34 schedule the arm64 related workflow nightly
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-10-24 19:08:27 +01:00
0f919ccd8c Merge pull request #16801 from alexellis/actuated/managed-arm64
Switch over to managed Arm64 hosts
2023-10-24 18:23:04 +01:00
a83f58019b Enable manual testing of e2e-arm64-nightly job
Adding workflow_dispatch as an "on" trigger enables
manual testing by maintainers, without having to wait for
the nightly cron schedule.

@ahrtr requested this temporary change in order to trigger
the arm64 jobs via CI.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2023-10-24 12:04:52 +01:00
4777126c09 Merge pull request #16810 from ahrtr/bump_raft_20231023
Bump raft to latest commit
2023-10-24 10:56:51 +01:00
34382006db test: implement method ForgetLeader for struct nodeRecorder
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-10-24 10:19:13 +01:00
ae60b5567a bump raft to latest commit
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-10-24 10:17:57 +01:00
b2fff4ee7f Merge pull request #16820 from jmhbnz/weekly-dependency-update
[2023-10-24] Bump dependencies identified by dependabot
2023-10-24 10:04:54 +01:00
d2af596a98 depdendency: bump github.com/prometheus/common from 0.44.0 to 0.45.0.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-10-24 17:44:01 +13:00
e6e740fb80 depdendency: bump google.golang.org/grpc from 1.58.3 to 1.59.0.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-10-24 17:39:39 +13:00
406cb94b6f Merge pull request #16816 from etcd-io/dependabot/github_actions/actions/checkout-4.1.1
build(deps): bump actions/checkout from 4.1.0 to 4.1.1
2023-10-23 19:37:12 +01:00
297973f1f9 build(deps): bump actions/checkout from 4.1.0 to 4.1.1
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](8ade135a41...b4ffde65f4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-23 17:52:59 +00:00
02c7f94887 Merge pull request #16815 from etcd-io/dependabot/github_actions/github/codeql-action-2.22.4
build(deps): bump github/codeql-action from 2.22.3 to 2.22.4
2023-10-23 18:52:09 +01:00
6e9f458a47 build(deps): bump github/codeql-action from 2.22.3 to 2.22.4
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.22.3 to 2.22.4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](0116bc2df5...49abf0ba24)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-23 17:16:09 +00:00
286bb0bace Switch over to managed Arm64 hosts
This change switches over from 2x self-managed runners where
side effects are possible between builds, to a pool of servers
where each build runs in an isolated VM.

The service is provided by actuated.dev, and sponsored by
both Ampere and the CNCF.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
2023-10-23 18:13:14 +01:00
7f2936dfba Merge pull request #16762 from chaochn47/changelog-grpc-1.47.0
CHANGELOG-3.5.md: Upgrade gRPC to 1.58.3
2023-10-20 19:23:22 +01:00
ee60146141 CHANGELOG-3.5.md: Upgrade gRPC to 1.47.0
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-10-20 08:30:55 -07:00
44ce4f9280 Merge pull request #16698 from chaochn47/health_check_e2e_test
add existing http health check handler e2e test
2023-10-19 10:41:01 +01:00
45fb4565e3 Merge pull request #16786 from serathius/robustness-drop-packet
Implement random packet dropping
2023-10-19 08:44:23 +02:00
1324f03254 add existing http health check handler e2e test
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-10-18 12:42:23 -07:00
262a3a1208 Merge pull request #16793 from jmhbnz/main
Direct questions to our discussion forums
2023-10-18 11:15:13 +01:00
d8c410ff82 Merge pull request #16791 from chaochn47/remove-deprecated-gRPC-API
remove deprecated gRPC API usage
2023-10-18 11:13:09 +01:00
aa28a69ce0 Implement random packet dropping
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-18 10:14:43 +02:00
11edde9204 Merge pull request #16622 from fuweid/fix-unparam-lint
*: enable and fix unparam lint
2023-10-18 09:21:22 +02:00
ff748640b2 Direct questions to our discussion forums.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-10-18 14:14:34 +13:00
3c6d2e972d remove deprecated gRPC API usage
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-10-17 15:51:25 -07:00
bbf59a9f26 Merge pull request #16789 from fuweid/cleanup-build-cov
*: cleanup main_test.go
2023-10-17 16:31:52 +01:00
f96000e15d *: cleanup main_test.go
The #15544 has removed the `build_cov` build. And after go1.20, we use
`-cover` buildflag to enable coverage exporter. We don't need to
maintain main_test.go anymore.

```bash
➜  pwd
/home/fuwei/go/src/go.etcd.io/etcd/etcdctl

➜  go build -o /tmp/etcdctl -cover ./

➜  mkdir /tmp/etcdctl-covdata

➜  GOCOVERDIR=/tmp/etcdctl-covdata /tmp/etcdctl get /health

➜  go tool covdata percent -i=/tmp/etcdctl-covdata
        go.etcd.io/etcd/etcdctl/v3      coverage: 66.7% of statements
        go.etcd.io/etcd/etcdctl/v3/ctlv3        coverage: 83.3% of statements
        go.etcd.io/etcd/etcdctl/v3/ctlv3/command        coverage: 15.4% of statements
```

REF: https://go.dev/testing/coverage/

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-10-17 21:47:23 +08:00
aea1cd0077 feat: enable unparam lint
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-10-17 21:24:13 +08:00
85bd1af331 osutil: remove unused Unsetenv function
The osutil.Unsetenv function is not used. Today, os.Unsetenv exists
in the standard library, and is already used elsewhere in etcd.
Removing this function could break things that may be importing this
package. According to pkg.go.dev, it seems like the only thing is
etcd forks, so it may be worth getting rid of this code. See:

https://pkg.go.dev/github.com/coreos/etcd/pkg/osutil?tab=importedby

Signed-off-by: Evan Jones <ej@evanjones.ca>
2023-10-17 09:07:47 -04:00
be83fffedb Merge pull request #16778 from QuentinBisson/patch-1
Fix cluster variable in mixins
2023-10-17 12:59:31 +01:00
cba514ef0e Merge pull request #16651 from siyuanfoundation/livez-pr
Add livez and readyz for etcd
2023-10-17 13:37:45 +02:00
e51b639520 Merge pull request #16766 from serathius/robustness-member-replace
Add member replace failpoint to robustness tests
2023-10-17 13:36:21 +02:00
5fed813f2e Merge pull request #16767 from serathius/robustness-main-test
Make the main_test the entrypoint and move senario generation to separate file
2023-10-17 13:09:16 +02:00
36a37190f6 Merge pull request #16783 from sharathsivakumar/shsi/bump_deps_7
Bump dependencies manually
2023-10-17 11:07:43 +01:00
b5622a24ba dependency: bump github.com/google/go-cmp from 0.5.9 to 0.6.0
Signed-off-by: Sharath Sivakumar <mailssr9@gmail.com>
2023-10-17 11:24:25 +02:00
3bb27f000c dependency: bump github.com/alexfalkowski/gocovmerge from 1.2.1 to 1.2.2
Signed-off-by: Sharath Sivakumar <mailssr9@gmail.com>
2023-10-17 11:21:29 +02:00
7e8bb15ccb Add member replace failpoint to robustness tests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-17 11:17:49 +02:00
447aa33a96 dependency: bump golang.org/x/sync from 0.3.0 to 0.4.0
Signed-off-by: Sharath Sivakumar <mailssr9@gmail.com>
2023-10-17 11:15:22 +02:00
68e5eb7819 Merge pull request #16777 from serathius/robustness-failpoint
Split failpoints file
2023-10-17 10:54:42 +02:00
0d83a72cf5 Split failpoints file
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-17 09:51:43 +02:00
46b42a750e Fix cluster query
Fix mixin cluster parameter otherwise generated mixins looks like this:

```json
{"type":"prometheus","uid":"${datasource}"},"label":"cluster","name":"job","query":"label_values(etcd_server_has_leader{job=~\".*etcd.*\"}, job)","refresh":2,"type":"query"}]},"time":{"from":"now-15m","to":"now"},"timezone": "`}}{{ .Values.grafana.defaultDashboardsTimezone }}{{`","title":"etcd","uid":"c2f4e12cdf69feb95caa41a5a1b423d9"}`}}
```

where name is job when the variable name used in dashboard queries is cluster.

Signed-off-by: QuentinBisson <quentin@giantswarm.io>
2023-10-16 22:42:31 +02:00
452e820516 Make the main_test the entrypoint and move senario generation to separate file
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-16 22:10:41 +02:00
252f5a6f4d Merge pull request #16775 from serathius/robustness-failpoint-package
Move failpoints to separate package
2023-10-16 21:53:03 +02:00
d6e376b6c6 Move failpoints to separate package
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-16 20:57:31 +02:00
ad1dbceb44 Merge pull request #16774 from etcd-io/dependabot/github_actions/github/codeql-action-2.22.3
build(deps): bump github/codeql-action from 2.22.1 to 2.22.3
2023-10-16 19:47:04 +01:00
ca56844705 build(deps): bump github/codeql-action from 2.22.1 to 2.22.3
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.22.1 to 2.22.3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](fdcae64e14...0116bc2df5)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-16 17:57:21 +00:00
569640f278 Merge pull request #16763 from ahrtr/changelog_20231016
Update 3.4 & 3.5 changelog
2023-10-16 10:33:05 +01:00
4791964173 Merge pull request #16757 from serathius/minimal-time
Use the minimal time event was observed on watch
2023-10-16 11:25:30 +02:00
449d61c661 Update 3.4 & 3.5 changelog
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-10-16 09:54:26 +01:00
7a57e06eca etcdserver: add livez and ready http endpoints for etcd.
Add two separate probes, one for liveness and one for readiness. The liveness probe would check that the local individual node is up and running, or else restart the node, while the readiness probe would check that the cluster is ready to serve traffic. This would make etcd health-check fully Kubernetes API complient.

Signed-off-by: Siyuan Zhang <sizhang@google.com>
2023-10-14 22:32:16 -07:00
aea6f0b4c2 Merge pull request #16759 from serathius/robustness-fix-failure
Fix linearization failure not causing test failure
2023-10-13 19:19:02 +02:00
841731bbf0 Fix linearization failure not causing test failure
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-13 18:56:22 +02:00
4c7b8dbc94 Use the minimal time event was observed on watch
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-13 18:17:29 +02:00
57d9a7eec6 Merge pull request #16756 from serathius/robustness-reorder-validation
Refactor and reorder validation to avoid reporting multiple correlated failures
2023-10-13 18:12:25 +02:00
b02798e946 Refactor and reorder validation to avoid reporting multiple corelated failures
It doesn't make sense to report watch failure if key value operations
are not linearizable.

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-13 14:06:13 +02:00
3eca40d17c Merge pull request #16755 from Juneezee/redundant-len-check
etcdserver: remove redundant `len` check in health check
2023-10-13 12:34:54 +01:00
867faa1924 etcdserver: remove redundant len check in health check
From the Go specification [1]:

  "1. For a nil slice, the number of iterations is 0."

`len` returns 0 if the slice or map is nil [2]. Therefore, checking
`len(v) > 0` around a loop is unnecessary.

[1]: https://go.dev/ref/spec#For_range
[2]: https://pkg.go.dev/builtin#len

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2023-10-13 18:39:38 +08:00
d0d0c33338 Merge pull request #16708 from fuweid/enable-marker-check
*: enable markdown_marker checker
2023-10-13 11:54:34 +02:00
a92e0de316 Merge pull request #16753 from fuweid/deflake-TestEtcdTLSVersion
tests: deflake TestEtcdTLSVersion
2023-10-13 10:28:04 +01:00
6f95ea04be tests: deflake TestEtcdTLSVersion
The proc.Stop just sends the SIGTERM to etcd server. The etcd server
needs time to teardown. If we don't wait for it, the etcd server will
hold the port and then next test case, like TestGrpcProxyAutoSync, will
fail to listen on the port 20000.

```bash
file_/__w/etcd/etcd/tests/fixtures/server.crt_--peer-key-file_/__w/etcd/etcd/tests/fixtures/server.key.insecure_--cert-file_/__w/etcd/etcd/tests/fixtures/server2.crt_--key-file_/__w/etcd/etcd/tests/fixtures/server2.key.insecure_--tls-min-version_TLS1.2_--tls-max-version_TLS1.3) (32856): {"level":"info","ts":"2023-10-13T06:12:32.718845Z","caller":"embed/etcd.go:394","msg":"closing etcd server","name":"e1","data-dir":"/tmp/TestEtcdTLSVersion284993522/001","advertise-peer-urls":["https://127.0.0.1:20000"],"advertise-client-urls":["https://0.0.0.0:0"]}
2023-10-13T06:12:32.7399709Z --- PASS: TestEtcdTLSVersion (1.03s)
2023-10-13T06:12:32.7400181Z === RUN   TestGrpcProxyAutoSync
2023-10-13T06:12:32.7401203Z     logger.go:130: 2023-10-13T06:12:32.719Z	INFO	starting server...	{"name": "TestGrpcProxyAutoSync-test-0"}
2023-10-13T06:12:32.7408306Z     logger.go:130: 2023-10-13T06:12:32.719Z	INFO	spawning process	{"args": ["/__w/etcd/etcd/bin/etcd", "--name=TestGrpcProxyAutoSync-test-0", "--listen-client-urls=http://localhost:20000", "--advertise-client-urls=http://localhost:20000", "--listen-peer-urls=http://localhost:20001", "--initial-advertise-peer-urls=http://localhost:20001", "--initial-cluster-token=new", "--data-dir", "/tmp/TestGrpcProxyAutoSync1139610722/001", "--snapshot-count=10000", "--initial-cluster-token=new", "--initial-cluster=TestGrpcProxyAutoSync-test-0=http://localhost:20001", "--initial-cluster-state=new"], "working-dir": "/__w/etcd/etcd/tests/e2e", "name": "TestGrpcProxyAutoSync-test-0", "environment-variables": ["ETCD_VERIFY=all", "EXPECT_DEBUG=true", "PATH=/__t/go/1.21.3/x64/bin:/go/bin:/__t/go/1.21.3/x64/bin:/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "ETCD_UNSUPPORTED_ARCH=amd64"]}

...

2023-10-13T06:12:32.7559855Z /__w/etcd/etcd/bin/etcd (TestGrpcProxyAutoSync-test-0) (32863): {"level":"fatal","ts":"2023-10-13T06:12:32.735191Z","caller":"etcdmain/etcd.go:181","msg":"discovery failed","error":"listen tcp 127.0.0.1:20000: bind: address already in use","stacktrace":"go.etcd.io/etcd/server/v3/etcdmain.startEtcdOrProxyV2\n\tgo.etcd.io/etcd/server/v3/etcdmain/etcd.go:181\ngo.etcd.io/etcd/server/v3/etcdmain.Main\n\tgo.etcd.io/etcd/server/v3/etcdmain/main.go:40\nmain.main\n\tgo.etcd.io/etcd/server/v3/main.go:31\nruntime.main\n\truntime/proc.go:267"}
```

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-10-13 16:48:37 +08:00
81fe610bd5 *: enable markdown_marker checker
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-10-13 14:00:25 +08:00
bc0f724ae4 Merge pull request #16697 from chaochn47/health_check_bug_fix
http health check bug fixes
2023-10-13 05:48:24 +01:00
c25f1dff82 http health check bug fixes
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-10-12 16:59:34 -07:00
6d68ab092d Merge pull request #16707 from serathius/dynamic-flags
Dynamically generate flags passed to etcd binary
2023-10-12 18:23:23 +02:00
c34ccfbc06 Dynamically generate flags passed to etcd binary
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-12 17:31:56 +02:00
2c86103472 Merge pull request #16748 from serathius/test-dynamic-flags-v2
Test dynamic flags v2
2023-10-12 17:26:18 +02:00
bd49f26e9c Merge pull request #16752 from fuweid/update-34-changelog
CHANGELOG: update 3.4/3.5 golang version
2023-10-12 16:15:38 +01:00
42507f4fd8 CHANGELOG: update 3.4/3.5 golang version
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-10-12 22:35:54 +08:00
1caf1d32fc Merge pull request #16737 from serathius/disable-failfast
Continue on e2e failure
2023-10-12 14:56:49 +02:00
c71f60e797 Remove duplicated test
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-12 14:09:31 +02:00
05cc60a539 Use contain to make tests clearer and more resilient to changes
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-12 14:09:31 +02:00
6f63f4b676 Use single string to define a flag allowing for easier testing
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-12 14:09:29 +02:00
d69378bbbd Merge pull request #16747 from serathius/test-dynamic-flags
Add tests to prepare to dynamic flag generation
2023-10-12 10:47:11 +02:00
6d9a0a40b0 Add tests to prepare to dynamic flag generation
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-11 23:31:39 +02:00
bf800550c6 Merge pull request #16739 from dusk125/http2-update
bump golang.org/x/net to v0.17.0, google.golang.org/grpc to v1.58.3
2023-10-11 16:25:16 +01:00
03da2fb55c Merge pull request #16741 from dusk125/go1.21.3
Bump go to 1.21.3
2023-10-11 15:53:54 +01:00
e4c0eb7712 bump google.golang.org/grpc to v1.58.3
Signed-off-by: Allen Ray <alray@redhat.com>
2023-10-11 10:39:05 -04:00
a5580a7292 Bump go to 1.21.3
Signed-off-by: Allen Ray <alray@redhat.com>
2023-10-11 10:16:57 -04:00
3a61187ce3 bump golang.org/x/net to v0.17.0
Address CVE-2023-39325 and CVE-2023-44487

Signed-off-by: Allen Ray <alray@redhat.com>
2023-10-11 10:09:14 -04:00
b8271d9c70 Continue on e2e failure
E2e tests has been flaky, with failfast and 2 scenarios tests are twice
as fragile. Any early failure of one of the scenarios cases second to be
canceled. Retryign always require running both scenarios.

Intead let's just wait as in other tests allowing us to retry
just the scenario that failed

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-11 12:25:31 +02:00
a404ee5f6b Merge pull request #16735 from serathius/roundrobin
Return to default write scheduler since golang.org/x/net@v0.11.0 started using round robin
2023-10-10 21:04:56 +02:00
9f40116fa0 Return to default write scheduler since golang.org/x/net@v0.11.0 started using round robin
Introduction of round robin 120fc906b3
Added in v0.10.0 https://github.com/golang/net/compare/v0.10.0...v0.11.0

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-10 16:31:42 +02:00
900877648d Merge pull request #16734 from 0scvr/main
Update changelog for 3.4 & 3.5
2023-10-10 14:20:50 +02:00
03ceed714e Update changelog for 3.4 & 3.5
To log the go version 1.20.9 bump.

Signed-off-by: Oscar <5xp395ab@duck.com>
2023-10-10 12:11:54 +00:00
4540db9a7c Merge pull request #16731 from sharathsivakumar/shsi/bump_dependencies_6
Bump dependencies generated by the bot manually
2023-10-10 13:51:48 +02:00
d884580432 dependency: bump go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc from 0.44.0 to 0.45.0
Signed-off-by: Sharath Sivakumar <mailssr9@gmail.com>
2023-10-10 11:50:54 +02:00
c94deb9511 dependency: bump github.com/prometheus/client_model from 0.4.1-0.20230718164431-9a2bf3000d16 to 0.5.0
Signed-off-by: Sharath Sivakumar <mailssr9@gmail.com>
2023-10-10 11:49:36 +02:00
1b1c42a7aa dependency: bump golang.org/x/net from 0.15.0 to 0.16.0
Signed-off-by: Sharath Sivakumar <mailssr9@gmail.com>
2023-10-10 11:49:35 +02:00
9e7e433b4b Merge pull request #16727 from 0scvr/0scvr/upgrade-go-1.21.2
Upgrade go version to 1.21.2
2023-10-10 09:51:43 +01:00
16e19a9547 Merge pull request #16269 from dusk125/refactor-revision
Refactor common revision code to pkg
2023-10-10 10:16:58 +02:00
86ea531b75 etcd: upgrade go version to 1.21.2
To be up to date with the newest security fix.

Signed-off-by: Oscar <71343264+0scvr@users.noreply.github.com>
2023-10-09 23:34:26 +02:00
395376d3ab Refactor common revision code to pkg
Signed-off-by: Allen Ray <alray@redhat.com>
2023-10-09 14:53:16 -04:00
20edc39912 Merge pull request #16726 from etcd-io/dependabot/github_actions/ossf/scorecard-action-2.3.0
build(deps): bump ossf/scorecard-action from 2.2.0 to 2.3.0
2023-10-09 19:38:44 +01:00
8e1713dda1 Merge pull request #16714 from fuweid/clean-unconvert_pass
*: cleanup unconvert_pass and remove revive tools
2023-10-09 19:38:19 +01:00
2b45c39880 Merge pull request #16725 from etcd-io/dependabot/github_actions/github/codeql-action-2.22.1
build(deps): bump github/codeql-action from 2.21.9 to 2.22.1
2023-10-09 19:12:16 +01:00
97fd17d74e build(deps): bump ossf/scorecard-action from 2.2.0 to 2.3.0
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.2.0 to 2.3.0.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](08b4669551...483ef80eb9)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-09 17:34:26 +00:00
074128a4d9 build(deps): bump github/codeql-action from 2.21.9 to 2.22.1
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.21.9 to 2.22.1.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](ddccb87388...fdcae64e14)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-09 17:34:22 +00:00
82197417f1 tools/mod: remove revive
We have migrated the revive into golangci-lint.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-10-09 23:28:09 +08:00
0ec6181466 scripts: remove unconvert_pass
The `unconvert` has been migrated into golingci-lint.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-10-09 23:27:48 +08:00
de39c75053 Merge pull request #16711 from serathius/robustness-fix-profile
Fix providing profile to robustness tests
2023-10-09 09:52:55 +02:00
b4d54922eb Fix providing profile to robustness tests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-08 21:27:22 +02:00
01a0d8ba83 Merge pull request #16709 from fuweid/remove-markdown-style-checker
scripts: remove the markdown_you_pass
2023-10-08 10:18:35 +02:00
093ec7a11d scripts: remove the markdown_you_pass
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-10-08 15:20:30 +08:00
89983f4cb0 Merge pull request #16703 from serathius/failpoint-set
Fix parsing failpoint names when failpoint has set value
2023-10-07 19:59:23 +02:00
c4bbb1b28c Merge pull request #16705 from fuweid/add-nakedret
*: migrate nakedret_pass into golangci-lint
2023-10-07 19:58:56 +02:00
f5e82260da Fix parsing failpoint names when failpoint has value set
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-07 18:20:18 +02:00
f198b417c6 Merge pull request #16691 from serathius/inject-sleep
Inject sleep during etcd bootstrap to reproduce etcd-io#16666
2023-10-07 18:18:53 +02:00
5878f346ba *: migrate nakedret into golangci-lint
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-10-07 22:29:43 +08:00
05a77032fc Inject sleep during etcd bootstrap to reproduce https://github.com/etcd-io/etcd/issues/16666
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-07 12:31:56 +02:00
185ddb2e78 Merge pull request #16696 from jmhbnz/fix-infra-admins-typo
Fix typo in ci infra admins table
2023-10-06 09:42:23 +02:00
2012af31e5 Fix typo in ci infra admins table.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-10-06 11:27:56 +13:00
3f859a626b Merge pull request #16695 from serathius/watch-validation-revision
Fix watch validation assuming that client requesting older watch revision
2023-10-05 19:17:51 +02:00
6a96ab7c09 Merge pull request #16688 from serathius/e2e-default-config
Use default embed config in e2e tests
2023-10-05 14:54:18 +02:00
c1fb2c2316 Use default embed config in e2e tests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-05 14:17:45 +02:00
c2655b4112 Fix watch validation assuming that client requesting older watch revision
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-05 14:09:43 +02:00
24b679644d Merge pull request #16692 from serathius/getformat
Avoid timing out and provide a proper error in TestCtlV3GetFormat test
2023-10-05 12:49:30 +02:00
f3196e3bbd Avoid timing out and provide a proper error in TestCtlV3GetFormat test
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-05 11:29:39 +02:00
0f14106fb7 Merge pull request #16678 from ahrtr/linearizable_read_20231002
test: add test cases to verify consistent reading right after writing
2023-10-04 17:09:41 +01:00
b385121bec test: add test cases to verify consistent reading right after writing
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-10-04 15:26:44 +01:00
1c5289dd73 Merge pull request #16677 from serathius/revert-13525
Revert "etcd server shouldn't wait for the ready notification infinitely on startup"
2023-10-04 11:49:11 +02:00
19a6baf236 Merge pull request #16246 from grafana/vzhuravlev/refactor_mixin_with_grafonnet
Refactor mixin with grafonnet
2023-10-04 10:33:35 +01:00
6a0d2eb5ce Merge pull request #16689 from jmhbnz/update-dependencies
[2023-10-04] Bump dependencies identified by dependabot
2023-10-04 09:50:36 +01:00
b70745d764 Update jsonnet dependency
Signed-off-by: Vitaly Zhuravlev <v-zhuravlev@users.noreply.github.com>
2023-10-04 06:53:27 +00:00
e0e4cdab81 depdendency: bump github.com/alexfalkowski/gocovmerge from 1.2.0 to 1.2.1.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-10-04 11:46:36 +13:00
314e63735b depdendency: bump github.com/mikefarah/yq/v4 from 4.35.1 to 4.35.2.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-10-04 11:13:25 +13:00
074d79652d depdendency: bump github.com/prometheus/client_golang from 1.16.0 to 1.17.0.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-10-04 11:10:01 +13:00
aac8919b17 depdendency: bump go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc from 1.18.0 to 1.19.0.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-10-04 11:06:38 +13:00
e31de5e3c1 Revert "etcd server shouldn't wait for the ready notification infinitely on startup"
This reverts commit 1713dc67b5.

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-03 21:37:18 +02:00
88f714b3f4 Merge pull request #16681 from etcd-io/dependabot/github_actions/github/codeql-action-2.21.9
build(deps): bump github/codeql-action from 2.21.8 to 2.21.9
2023-10-02 19:15:11 +01:00
9268dc6f4e build(deps): bump github/codeql-action from 2.21.8 to 2.21.9
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.21.8 to 2.21.9.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](6a28655e3d...ddccb87388)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-02 17:28:11 +00:00
df9a814b7f Merge pull request #16676 from serathius/refactor-add-embed-flags
Refactor registering flags to separate AddEmbedFlags function for future reuse
2023-10-02 15:36:08 +02:00
50fb919318 Make AddEmbedFlags functon a method on embed.Config
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-02 13:53:38 +02:00
788070e418 Merge pull request #16674 from serathius/reuse-embed-config
Reuse embed.Config in e2e cluster config
2023-10-02 12:11:17 +02:00
d98faeef82 Refactor registering flags to separate AddEmbedFlags function for future reuse
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-01 09:58:27 +02:00
11b441b605 Reuse embed.Config in e2e cluster config
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-10-01 09:56:31 +02:00
0c0128aad4 Merge pull request #16671 from ahrtr/member_test_20230930
test: fix the TestCtlV3ConsistentMemberList: set the wait-cluster-ready-timeout as 1ns
2023-09-30 15:28:38 +01:00
b8103b0fe4 test: fix the TestCtlV3ConsistentMemberList: set the wait-cluster-ready-timeout as 1ns
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-30 14:21:26 +01:00
ddf9756807 Merge pull request #16670 from fuweid/fix-make-fix
.github: ensure there is no change after make-fix
2023-09-30 13:24:59 +01:00
ddc2b56af3 tools: fix yamlfmt issue
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-30 17:52:57 +08:00
0ece40453a .github: ensure there is no change after make-fix
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-30 17:38:00 +08:00
da9248d2fd Merge pull request #16668 from iiamabby/update-changelog
Documented removal of etcdutl backup in CHANGELOG-3.6
2023-09-30 09:24:05 +01:00
=
16f891f17e Documented removal of etcdutl backup.
Signed-off-by: = <abby.crimlis@outlook.com>
2023-09-30 14:26:03 +13:00
6521c9e224 Merge pull request #16658 from ahrtr/member_20230927
Fix memberList may return incorrect intermediate results right after bootstrap
2023-09-29 14:55:23 +01:00
0b8cad83d1 address the review comments
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-29 12:58:18 +01:00
0a3dc1a8a8 Merge pull request #16662 from iiamabby/remove-etcdutl-backup
Remove legacy etcdutl backup
2023-09-29 10:41:28 +01:00
=
4132c35597 Remove legacy etcdutl backup
Co-authored-by: James Blair <mail@jamesblair.net>

Signed-off-by: = <abby.crimlis@outlook.com>
2023-09-29 15:39:45 +13:00
70a3205506 fix broken unit test in server_test.go
Signed-off-by: Geeta Gharpure <geetagh@amazon.com>
2023-09-28 20:07:06 +01:00
9c9804399e do not update RaftCluster.members and RaftCluster.removed if the v3store is ahead of the current replayed WAL entry index
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-28 20:06:12 +01:00
628b45c099 test: add a test case to verify consistent memberlist on bootstrap
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-28 20:04:47 +01:00
d92d37b105 Merge pull request #16657 from gocurr/pkg/stringutil/rand_test
pkg/stringutil: sort 'ss' in TestUniqueStrings
2023-09-28 10:23:15 +01:00
eef8636f35 pkg/stringutil: sort 'ss' in TestUniqueStrings
From the algorithm below, 'ss' should be sorted.

Also removes 'fmt.Println', because the idiomatic tests would not print.

Signed-off-by: Jes Cok <xigua67damn@gmail.com>
2023-09-27 22:41:16 +08:00
55253cee1b Merge pull request #16652 from fuweid/add-fuweid
Add fuweid as reviewer
2023-09-26 16:54:32 +01:00
1ee010f5c4 Add fuweid as reviewer
REF: #16650

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-26 23:39:10 +08:00
cfd35afe93 Merge pull request #16636 from ahrtr/grpc_20230925
dependency: bump some dependencies
2023-09-26 12:31:09 +01:00
4e7f114fa7 Merge pull request #16638 from fuweid/fix-stylecheck
*: fix stylecheck/unused/unconvert linter issues
2023-09-26 12:15:53 +02:00
4d486a2332 bump go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc from 1.17.0 to 1.18.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-25 21:00:55 +01:00
10cddaaf7c bump go.opentelemetry.io/otel/sdk from 1.17.0 to 1.18.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-25 20:59:30 +01:00
bb85fa8a7f bump gotest.tools/v3 from 3.5.0 to 3.5.1
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-25 20:57:18 +01:00
f90a73c20f bump github.com/mgechev/revive from 1.3.3 to 1.3.4
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-25 20:56:12 +01:00
df7f2d93f8 dependency: bump google.golang.org/grpc from 1.58.1 to 1.58.2
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-25 20:53:56 +01:00
e85949db3a Merge pull request #16645 from etcd-io/dependabot/github_actions/github/codeql-action-2.21.8
build(deps): bump github/codeql-action from 2.21.7 to 2.21.8
2023-09-25 20:27:42 +01:00
a6d511abe2 build(deps): bump github/codeql-action from 2.21.7 to 2.21.8
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.21.7 to 2.21.8.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](04daf014b5...6a28655e3d)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-25 18:53:50 +00:00
06bee68c27 Merge pull request #16646 from etcd-io/dependabot/github_actions/actions/checkout-4.1.0
build(deps): bump actions/checkout from 4.0.0 to 4.1.0
2023-09-25 19:52:40 +01:00
a895710756 build(deps): bump actions/checkout from 4.0.0 to 4.1.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.0.0 to 4.1.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](3df4ab11eb...8ade135a41)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-25 17:48:06 +00:00
8870cb3070 *: fix unconvert linter
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-25 19:40:45 +08:00
4704a5af3a *: fix unused issue
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-25 19:37:18 +08:00
896d161d16 *: fix stylecheck linter
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-25 19:14:01 +08:00
149bcb75ea Merge pull request #16634 from fuweid/fix-revive
*: fix revive linter
2023-09-25 10:49:01 +01:00
07effc4d0a *: fix revive linter
Remove old revive_pass in the bash scripts and migirate the revive.toml
into golangci linter_settings.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-24 14:21:11 +08:00
e1ebc260a9 Merge pull request #16628 from fuweid/fix-goimports
*: fix goimports linter
2023-09-22 10:26:14 +01:00
3eae42d810 Merge pull request #16630 from sharathsivakumar/shsi/bump_depedencies_5
bump dependencies manually
2023-09-22 09:48:26 +01:00
c059e5f41f Merge pull request #16559 from shyamjvs/docs-improvement
Add diagrams for etcd internals and consistent read/write workflows
2023-09-21 11:37:43 -07:00
078b50fe3d dependency: bump honnef.co/go/tools from 0.4.5 to 0.4.6
Signed-off-by: sharathsivakumar <mailssr9@gmail.com>
2023-09-21 20:17:37 +02:00
6060037c53 dependency: bump gotest.tools/gotestsum from 1.10.1 to 1.11.0
Signed-off-by: sharathsivakumar <mailssr9@gmail.com>
2023-09-21 20:14:29 +02:00
443ee6eb40 dependency: bump go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc from 0.43.0 to 0.44.0
Signed-off-by: sharathsivakumar <mailssr9@gmail.com>
2023-09-21 20:07:07 +02:00
2048a638fc dependency: bump google.golang.org/grpc from 1.58.0/1.57.0 to 1.58.1
Signed-off-by: sharathsivakumar <mailssr9@gmail.com>
2023-09-21 19:54:54 +02:00
eef790399e dependency: bump go.uber.org/zap from 1.25.0 to 1.26.0
Signed-off-by: sharathsivakumar <mailssr9@gmail.com>
2023-09-21 19:41:16 +02:00
46df6abb03 *: remove goimports(_fix)_pass and add lint_fix_pass
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-21 21:18:36 +08:00
aa97484166 *: enable goimports in verify-lint
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-21 21:14:09 +08:00
9079ab3c98 Merge pull request #16626 from fuweid/fix-staticcheck-lint
*: fix staticcheck lint
2023-09-21 11:13:50 +01:00
c6323b9a52 disable staticcheck for DoubleBarrier.Enter
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-21 17:39:44 +08:00
502879405f *: lint_pass should use global golangci.yaml
Disable failed linters and enable it by #16610.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-21 16:10:45 +08:00
2b1e181c8b *: Use golangcilint_pass to run staticcheck and ineffassign
Copy the tools/.golangci.yaml and run the linters for which we have
already fixed. The temp .golangci.yaml will be removed when we fixes all
the linters' issues.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-21 12:34:17 +08:00
9c3edfa0af *: fix staticcheck lint
Changed TraceKey/StartTimeKey/TokenFieldNameGRPCKey to struct{} to
follow the correct usage of context. Similar patch to #8901.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-21 11:24:26 +08:00
021edb00ed Merge pull request #16605 from fuweid/fix-ineffassign
*: fix ineffassign lint
2023-09-20 10:54:48 +01:00
df86cadd8b *: fix ineffassign lint
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-19 22:19:19 +08:00
36403e3909 Merge pull request #16608 from fuweid/fix-shadow-vet
*: fix govet-shadow lint
2023-09-19 15:09:05 +01:00
b3b63fd010 Merge pull request #16621 from ahrtr/gw_20230919
dependency: bump grpc-gateway from 2.17.1 to 2.18.0
2023-09-19 13:25:10 +01:00
5e3910d96c *: fix govet-shadow lint
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-19 20:24:01 +08:00
ea2d60cad7 dependency: bump grpc-gateway from 2.17.1 to 2.18.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-19 12:17:22 +01:00
892472dd89 Merge pull request #16620 from ahrtr/changelog_grpc_gw_20230919
Update 3.6 changelog to include the grpc-gateway upgrading from v1 to v2 and golang upgrading to 1.21
2023-09-19 11:05:45 +01:00
c15f11041b Update 3.6 changelog to include the grpc-gateway upgrading from v1 to v2 and golang upgrading to 1.21
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-19 09:54:18 +01:00
c70ac642ae Merge pull request #16595 from ahrtr/gw_20230913
Upgrade grpc-gateway from v1 to v2
2023-09-19 09:39:43 +01:00
357d22667c Merge pull request #16609 from etcd-io/dependabot/github_actions/github/codeql-action-2.21.7
build(deps): bump github/codeql-action from 2.21.5 to 2.21.7
2023-09-19 07:29:03 +01:00
84d0f1fcc5 build(deps): bump github/codeql-action from 2.21.5 to 2.21.7
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.21.5 to 2.21.7.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](00e563ead9...04daf014b5)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-18 17:38:07 +00:00
8eba295bc5 Resolve review comments: add some comments to clarify some confusion script or code
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-18 12:09:46 +01:00
d06cdfa1ee Updated the tools/proto-annotation to exclude grpc.gateway package
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-18 11:22:16 +01:00
5444cdae69 remove all usage of v1 grpc-gateway
1. Manually updated go source file to remove the usage of v1 grpc-gateway;
2. Execute ./scripts/fix.sh

Signed-off-by: Benjamin Wang <wachao@vmware.com>
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-18 11:22:16 +01:00
de41d4d8aa dependency: set github.com/grpc-ecosystem/grpc-gateway/v2 version to 2.17.1 for all modules
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-18 11:22:16 +01:00
189f709a5d Apply patches on the generated *.pb.gw.go files to convert v1 messages to v2 messages
Signed-off-by: Benjamin Wang <wachao@vmware.com>
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-18 11:22:16 +01:00
4ec581a6a3 re-generate all the *.pb.gw.go files
Run ./scripts/genproto.sh

Signed-off-by: Benjamin Wang <wachao@vmware.com>
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-18 11:22:15 +01:00
522b698928 upgrade grpc-gateway from v1 to v2
Signed-off-by: Wei Fu <fuweid89@gmail.com>
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-18 11:22:15 +01:00
700411d838 Merge pull request #16601 from fuweid/fix-nakedret-lint
*: fix nakedret lint
2023-09-18 10:00:25 +01:00
0917288ad5 Merge pull request #16604 from chenyahui/interface_to_any
Use any instead of interface{}
2023-09-18 10:16:36 +02:00
e72c2c40d4 *: fix nakedret lint
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-17 23:52:41 +08:00
c0aa3b613b Use any instead of interface{}
Signed-off-by: chenyahui <cyhone@qq.com>
2023-09-17 17:41:58 +08:00
fb8a315be6 Merge pull request #16600 from jmhbnz/add-owners-file
Add OWNERS file for etcd
2023-09-16 11:09:41 -07:00
371bedad27 Add OWNERS file for etcd.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-09-16 19:43:05 +12:00
3d079fa3c5 Add diagrams explaining etcd internals and consistent read/write workflows
Signed-off-by: Shyam Jeedigunta <jeedigv@amazon.com>
2023-09-15 16:49:08 +00:00
9ec5f98189 Merge pull request #16594 from dusk125/upgrade-1.21
Update to go1.21
2023-09-14 09:26:35 +01:00
cc130fd2d4 Update to go1.21
Signed-off-by: Allen Ray <alray@redhat.com>
2023-09-13 10:10:02 -04:00
afade99a79 Merge pull request #16587 from ahrtr/grpc_20230912
dependency: bump google.golang.org/grpc to 1.58.0
2023-09-13 09:15:56 +01:00
2a0613bc22 dependency: bump google.golang.org/grpc to 1.58.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-12 10:47:14 +01:00
cc282a890b Merge pull request #16572 from ahrtr/fix_curl_test_20230911
test: simply the expected output for some curl test cases
2023-09-12 09:44:00 +01:00
d506a72f32 Merge pull request #16584 from ahrtr/dependencies_20230911
dependency: bump golang.org/x/net from v0.14.0 to v0.15.0
2023-09-12 09:21:40 +01:00
f25f131f36 Merge pull request #16586 from redwrasse/sshah/store-cmt-cleanup
mvcc: cleanup comment in HashStorage.Store
2023-09-12 08:39:30 +01:00
b79cbcc3db mvcc: cleanup comment in HashStorage.Store
Signed-off-by: redwrasse <mail@redwrasse.io>
2023-09-11 21:54:42 -07:00
909d795601 dependency: bump golang.org/x/net from v0.14.0 to v0.15.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-11 19:36:18 +01:00
9c8ad8ed72 Merge pull request #16575 from etcd-io/dependabot/github_actions/actions/upload-artifact-3.1.3
build(deps): bump actions/upload-artifact from 3.1.2 to 3.1.3
2023-09-11 19:29:55 +01:00
17ade8ff07 build(deps): bump actions/upload-artifact from 3.1.2 to 3.1.3
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3.1.2 to 3.1.3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](0b7f8abb15...a8a3f3ad30)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-11 17:20:06 +00:00
d687bd0989 test: simply the expected output for some curl test cases"
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-11 13:50:26 +01:00
6544add961 Merge pull request #16570 from ahrtr/election_rest_20230910
test: add test case to cover all election REST APIs
2023-09-11 11:07:39 +01:00
4445e0831f Merge pull request #16566 from fuweid/update-changelog-35
CHANGELOG: update 3.5 with #16565
2023-09-11 11:07:17 +01:00
18f70c2553 test: add test case to cover all election REST APIs
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-10 20:52:40 +01:00
9e7f83799f Merge pull request #16564 from ahrtr/split_rest_20230909
test: split watch and election tests to separate files
2023-09-10 19:47:22 +01:00
cfb6d24c65 Merge pull request #16567 from sharathsivakumar/shsi/bump_dependencies_4
dependency: bump yamlfmt,sys,otelgrpc,otlptracegrpc
2023-09-09 16:18:10 +01:00
6dae088423 dependency: bump go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc from 1.16.0 to 1.17.0
Signed-off-by: sharathsivakumar <mailssr9@gmail.com>
2023-09-09 16:20:31 +02:00
5d1b0d1170 dependency: bump go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc from 0.42.0 to 0.43.0
Signed-off-by: sharathsivakumar <mailssr9@gmail.com>
2023-09-09 16:20:13 +02:00
e47d10fca7 dependency: bump golang.org/x/sys from 0.11.0 to 0.12.0
Signed-off-by: sharathsivakumar <mailssr9@gmail.com>
2023-09-09 16:19:54 +02:00
3b736aefe2 dependency: bump github.com/google/yamlfmt from 0.9.0 to 0.10.0
Signed-off-by: sharathsivakumar <mailssr9@gmail.com>
2023-09-09 16:19:32 +02:00
83e5424b78 CHANGELOG: update 3.5 with #16565
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-09 21:56:51 +08:00
7f2949bac1 test: split watch and election tests to separate files
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-09 09:40:45 +01:00
8011a53655 Merge pull request #16553 from ahrtr/lock_rest_20230908
test: add test case to cover lock restful APIs
2023-09-09 09:35:15 +01:00
a13fc7e51c Merge pull request #16508 from new-dream/main-concurrentreadtxn
server: optimizing memory overhead of copy operation in ConcurrentReadTxn
2023-09-09 09:35:00 +01:00
b72227ece3 Merge pull request #16557 from ahrtr/changelog_golang_20230908
changelog: update changelog to cover the goalng bump
2023-09-08 18:32:58 +01:00
310e8843e4 changelog: update changelog to cover the goalng bump
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-08 17:04:42 +01:00
0b27aff79c test: add test case to cover lock restful APIs
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-08 17:04:01 +01:00
e121eae908 Merge pull request #16554 from ahrtr/golang_20230908
dependency: bump golang to 1.20.8
2023-09-08 17:03:06 +01:00
a9931b46e3 dependency: bump golang to 1.20.8
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-08 16:29:14 +01:00
7192b6e379 Merge pull request #16357 from liggitt/fieldmask
dependency: bump github.com/grpc-ecosystem/grpc-gateway/v2 from v2.7.0 to v2.16.2
2023-09-07 15:05:19 +01:00
0e972a1a24 Merge pull request #16545 from ahrtr/member_rest_20230905
test: add test cases to cover cluster RESTful APIs
2023-09-07 14:28:19 +01:00
6599dec92b dependency: bump github.com/grpc-ecosystem/grpc-gateway/v2 from v2.7.0 to v2.17.1
Signed-off-by: Jordan Liggitt <liggitt@google.com>
2023-09-07 08:49:57 -04:00
e5638d93fd Merge pull request #16549 from fuweid/deflake-test-TestHashKVWhenCompacting
server/storage/mvcc: deflake TestHashKVWhenCompacting
2023-09-06 12:20:12 +01:00
a6f7bbe560 server/storage/mvcc: deflake TestHashKVWhenCompacting
The HashByRev-goroutines exit since receive `donec` notification. The
Check-computed-hashes goroutine could not have chance to get the hash
result and be stuck forever. We should add case for donec when we wait
for hash result.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-09-06 18:12:42 +08:00
70fd494666 Merge pull request #16548 from ahrtr/fix_TestMemberList_20230906
test: fix the flaky test case `TestMemberList`
2023-09-06 09:29:18 +01:00
1b87ec499e test: de-flake test case TestMemberList
get memberlist immediately before each time checking the members.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-06 08:24:41 +01:00
14ecc7ab20 Merge pull request #16547 from ahrtr/fix_TestV3WatchProgressOnMemberRestart_20230905
test: de-flake test case TestV3WatchProgressOnMemberRestart
2023-09-06 07:43:16 +01:00
b57fe9e9d8 Merge pull request #16546 from ahrtr/remove_apiPrefix_20230905
test: remove apiPrefix and withApiPrefix
2023-09-05 18:26:38 +01:00
5dd5fe35d0 test: de-flake test case TestV3WatchProgressOnMemberRestart
The case may be blocked on sending progress notification, so may
not be able to exit the goroutine.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-05 15:04:02 +01:00
b2ee90c162 test: remove apiPrefix and withApiPrefix
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-05 14:41:11 +01:00
ce64fbe3f9 test: add test cases to cover cluster RESTful APIs
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-05 14:09:52 +01:00
ea9ef764a6 Merge pull request #16532 from etcd-io/dependabot/github_actions/github/codeql-action-2.21.5
build(deps): bump github/codeql-action from 2.21.4 to 2.21.5
2023-09-04 20:05:11 +01:00
dd12ff471a build(deps): bump github/codeql-action from 2.21.4 to 2.21.5
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.21.4 to 2.21.5.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](a09933a12a...00e563ead9)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-04 18:22:30 +00:00
b40e90b6af Merge pull request #16533 from etcd-io/dependabot/github_actions/actions/checkout-4.0.0
build(deps): bump actions/checkout from 3.6.0 to 4.0.0
2023-09-04 19:21:30 +01:00
0f1de81229 build(deps): bump actions/checkout from 3.6.0 to 4.0.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.6.0 to 4.0.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](f43a0e5ff2...3df4ab11eb)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-04 17:12:38 +00:00
8cca0bb2bc Merge pull request #16527 from ahrtr/auth_20230903
test: add e2e test cases to cover all auth related RESTful APIs
2023-09-04 16:24:01 +01:00
bc54bac381 Merge pull request #16523 from YaoC/deflake-TestV3AuthWithLeaseRevokeWithRootJWT
tests/integration: deflake TestV3AuthWithLeaseRevokeWithRootJWT
2023-09-04 15:09:00 +01:00
dc8011570c test: add e2e test cases to cover all auth related RESTful APIs
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-03 20:26:25 +01:00
e80c8966f1 Merge pull request #16525 from jmhbnz/maintain-testcase-naming-standard
Maintain a consistent naming standard for curlv3 tests
2023-09-03 14:11:40 +08:00
7faab4aa44 Maintain a consistent naming standard for curlv3 tests.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-09-03 12:04:50 +12:00
144dcf1ad3 Merge pull request #16518 from ahrtr/auth_test_20230901
test: move all auth related test cases into a separate test file
2023-09-03 03:23:02 +08:00
d2a93eb7ce tests/integration: deflake TestV3AuthWithLeaseRevokeWithRootJWT
Signed-off-by: Yao Cheng <chengyao09@hotmail.com>
2023-09-02 06:31:54 +00:00
818561f43f test: move all auth related test cases into a separate test file
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-02 07:29:54 +01:00
d4a0b88934 Merge pull request #16517 from serathius/test-txn-range-put
Use test cases from TestCheckTxn to test Put and Range
2023-09-01 21:13:34 +02:00
e09cc1e82c Merge pull request #16516 from SagarRawat24/bookworm
update the debian12 and bookworm remove --v 1.0
2023-09-01 20:52:38 +02:00
76cbfd3644 Use test cases from TestCheckTxn to test Put and Range
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-09-01 20:33:41 +02:00
27633923e4 Merge pull request #16515 from serathius/test-txn
server: Test txn checking
2023-09-01 15:24:42 +02:00
7666f9793c Merge pull request #16511 from ahrtr/kv_test_20230831
test: refactor the existing KV RESTful test cases and also add new cases
2023-09-01 20:53:39 +08:00
e1617f98ba server: Test txn checking
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-09-01 14:51:22 +02:00
245b58a1e2 update the debian12 and bookworm remove --v 1.0
Signed-off-by: sagar rawat <sagarrawat24291@gmail.com>
2023-09-01 16:19:29 +05:30
cf1581afc4 Merge pull request #16372 from serathius/single-check
server: Refactor checkTxn into single function handling all request types
2023-09-01 10:34:59 +02:00
b4803fb395 test: refactor the existing KV RESTful test cases and also add new cases
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-09-01 09:13:51 +01:00
60051be990 Merge pull request #16509 from ahrtr/kv_rest_20230830
test: move all KV related RESTful APIs into a separate test file
2023-08-31 21:27:48 +08:00
02c01f04d7 test: move all KV related RESTful APIs into a separate test file
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-08-30 16:19:15 +01:00
b05d75ab0b server: optimizing memory overhead of copy operation in ConcurrentReadTxn
Signed-off-by: new-dream <111836360+new-dream@users.noreply.github.com>
2023-08-30 23:03:15 +08:00
2888a95d5d Merge pull request #16489 from ahrtr/maintanence_20230827
test: add v3 curl test to cover all maintenance REST API
2023-08-30 22:57:05 +08:00
a7330692bd test: add v3 curl test to cover all maintainence REST APIs
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-08-30 15:09:40 +01:00
506e9fdde6 Merge pull request #16503 from fuweid/update-35-changelog
CHANGELOG: add #16490 item in CHANGELOG-3.5.md
2023-08-30 17:08:05 +08:00
92aebbcc88 CHANGELOG: add #16490 item in CHANGELOG-3.5.md
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-08-29 22:16:32 +08:00
bd7f0dab3c server: Refactor checkTxn into single function handling all request types
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-08-29 11:36:03 +02:00
70eb293754 Merge pull request #16501 from jmhbnz/weekly-dependency-update
[2023-08-29] Bump dependencies identified by dependabot
2023-08-29 14:51:41 +08:00
4ae1e9d669 depdendency: bump go.opentelemetry.io/otel/sdk from 1.16.0 to 1.17.0.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-08-29 08:49:31 +12:00
d472700749 depdendency: bump go.opentelemetry.io/otel from 1.16.0 to 1.17.0.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-08-29 08:43:17 +12:00
5e28fdbcad depdendency: bump github.com/mgechev/revive from 1.3.2 to 1.3.3.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-08-29 08:39:52 +12:00
10498ce772 Merge pull request #16499 from etcd-io/dependabot/github_actions/actions/checkout-3.6.0
build(deps): bump actions/checkout from 3.5.3 to 3.6.0
2023-08-29 02:02:25 +08:00
2ec87000c3 build(deps): bump actions/checkout from 3.5.3 to 3.6.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.3 to 3.6.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](c85c95e3d7...f43a0e5ff2)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-28 17:25:19 +00:00
40ada2a857 Add memo in README
Signed-off-by: Vitaly Zhuravlev <v-zhuravlev@users.noreply.github.com>
2023-08-28 14:16:08 +00:00
c852ffe6e2 Add etcdselector to grafana7x dashboard and rest of alerts. https://github.com/etcd-io/etcd/pull/16245
Signed-off-by: Vitaly Zhuravlev <v-zhuravlev@users.noreply.github.com>
2023-08-28 14:07:03 +00:00
957b58e560 Set grafana7x to false by default
Signed-off-by: Vitaly Zhuravlev <v-zhuravlev@users.noreply.github.com>
2023-08-28 13:46:13 +00:00
aa21d536d6 Keep grafana7x dashboard. Enable with grafana7x=true in config
Signed-off-by: Vitaly Zhuravlev <v-zhuravlev@users.noreply.github.com>
2023-08-28 13:42:02 +00:00
d09b8d474a Merge pull request #16464 from fuweid/fix-grpc-gateway-duplicate-path
api: fix duplicate gateway url issue
2023-08-27 23:31:13 +08:00
b6935cf2e9 Merge pull request #16472 from ahrtr/expr_expect_20230825
test: support regular expression matching on the response
2023-08-26 02:34:23 +08:00
7cbab6034b add test cases to verify regular expression match
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-08-25 18:59:34 +01:00
7d95c68b48 test: support regular expression matching on the response
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-08-25 15:00:35 +01:00
7ea5ee8b5d Merge pull request #16463 from jmhbnz/document-golang-version-policy
Document project golang version policy
2023-08-25 20:39:05 +08:00
f377db2e93 Merge pull request #16466 from lavacat/main
dependency: bump honnef.co/go/tools from v0.4.3 to v0.4.5
2023-08-24 16:02:32 +08:00
555c459c58 dependency: bump honnef.co/go/tools from v0.4.3 to v0.4.5
Signed-off-by: Bogdan Kanivets <bkanivets@apple.com>
2023-08-23 15:51:19 -07:00
bcdf05508e Merge pull request #16465 from riendeau/validate-help-flags
Unit test for CLI flags and add missing flags
2023-08-23 22:55:19 +08:00
63e614fb0b Add unit test for CLI flags and missing flags
Signed-off-by: John Riendeau <riendeau@us.ibm.com>
2023-08-23 08:33:39 -05:00
f3121fb765 api: fix duplicate gateway url issue
The HashKV should use `/v3/maintenance/hashkv` as url

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-08-23 20:43:50 +08:00
6723262738 Document policy for etcd project golang version.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-08-23 21:54:35 +12:00
e44afcfadd Merge pull request #16460 from geetasg/pr10
Preserve the order of steps done for snapshot
2023-08-23 16:01:31 +08:00
ce4f2a4892 Fix markdownlint issues in dependency_management.md.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-08-23 17:37:05 +12:00
29bfdd1f69 Merge pull request #16459 from jmhbnz/remove-deprecated-functions
Use crypto/rand.Read instead of deprecated math/rand.Read
2023-08-23 03:45:14 +08:00
8729417cee Preserve the order of steps done for snapshot
Signed-off-by: Geeta Gharpure <geetagh@amazon.com>
2023-08-22 19:12:37 +00:00
5a54fe6dd1 Merge pull request #16457 from serathius/downgrade-membership
Add membership changes to downgrade tests
2023-08-22 12:14:40 +02:00
cb0df72b70 Use crypto/rand.Read instead of deprecated math/rand.Read.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-08-22 21:48:27 +12:00
3794dfd519 Merge pull request #16458 from ahrtr/snap_20230822
test: verify snap.Load() is sucessful
2023-08-22 11:43:38 +02:00
30b5c37190 test: verify snap.Load() is sucessful
Otherwise the following snap.Data may run into nil pointer panic.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-08-22 10:08:34 +01:00
f3cc759afc Merge pull request #16418 from geetasg/pr7
Update to generate v2 snapshot from v3 state
2023-08-22 10:24:53 +02:00
1c0db872d9 Add membership changes to downgrade tests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-08-22 10:18:30 +02:00
e1b8e8c6ad Merge pull request #16455 from geetasg/pr9
Minor update to test code to remove a local var
2023-08-22 15:23:17 +08:00
62e82aba87 Merge pull request #16453 from etcd-io/dependabot/github_actions/golangci/golangci-lint-action-3.7.0
build(deps): bump golangci/golangci-lint-action from 3.6.0 to 3.7.0
2023-08-22 03:47:34 +08:00
59332dc194 Update to generate v2 snapshot from v3 state
Signed-off-by: Geeta Gharpure <geetagh@amazon.com>
2023-08-21 19:18:11 +00:00
7b3daf612d Minor update to test code to remove a local var
Signed-off-by: Geeta Gharpure <geetagh@amazon.com>
2023-08-21 19:13:36 +00:00
3be86903ab build(deps): bump golangci/golangci-lint-action from 3.6.0 to 3.7.0
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.6.0 to 3.7.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](639cd343e1...3a91952989)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-21 17:35:47 +00:00
fe1f30e4df Merge pull request #16445 from jmhbnz/complete-actions-container-migration
Run integration, e2e & grpcproxy tests in container.
2023-08-21 15:58:07 +02:00
e2e17c75fe Merge pull request #16448 from testwill/pkg-import
chore: pkg import more than once
2023-08-21 18:11:06 +08:00
9a6eab2d72 Merge pull request #16373 from serathius/unify-arguments
server: Unify arguments for mvcc methods
2023-08-21 10:09:10 +02:00
3d32447e8b Merge pull request #16440 from fuweid/use-larger-runner
*: enable ubuntu-latest-8-cores runner for amd64 robustness workflow
2023-08-21 10:05:50 +02:00
3371f26461 Merge pull request #16441 from geetasg/pr8
Update test for v2 deprecation to verify membership match
2023-08-21 09:50:53 +02:00
0a3ec0166f Merge pull request #16446 from xuan-nguyen-swe/feature/#479-use-friendly-google-groups-link
Use new and better canonical link to Google Groups
2023-08-21 09:49:05 +02:00
4e24d4a755 Merge pull request #16447 from gocurr/remove_math_rand_seed
all: stop using math/rand.Seed
2023-08-21 09:47:48 +02:00
0f48f9bcb4 Merge pull request #16433 from shyamjvs/fixes
Fix unit tests and make targets to not fail in some environments
2023-08-21 09:46:33 +02:00
eae411e979 Merge pull request #16449 from testwill/typo
fix: throughput typo
2023-08-21 09:41:34 +02:00
4d209af83a fix: throughput typo
Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
2023-08-21 10:27:58 +08:00
f432c1cf20 chore: pkg import more than once
Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
2023-08-21 10:19:05 +08:00
1b63b189ec etcd-io/etcd #479 meeting is now on CNCF-funded Zoom channel
Also, remove outdated meeting phone number

Signed-off-by: Xuan Nguyen <nguyenxndaidev@gmail.com>
2023-08-20 15:28:26 +02:00
52748f60f3 all: stop using math/rand.Seed
Fixes #16428.

Signed-off-by: Jes Cok <xigua67damn@gmail.com>
2023-08-20 16:34:44 +08:00
dd1b06f01a etcd-io/etcd #479 Use new and better canonical link to Google Groups
Signed-off-by: Xuan Nguyen <nguyenxndaidev@gmail.com>
2023-08-19 22:11:18 +02:00
208a74a213 Run integration, e2e & grpcproxy tests in container.
So that we have one approach for running tests regardless of cpu architecture.

Signed-off-by: James Blair <mail@jamesblair.net>
2023-08-19 21:28:32 +12:00
cfbb60d8af Merge pull request #16442 from jmhbnz/update-changelog
Update changelog for go 1.20 update and socket options fix
2023-08-19 14:56:08 +08:00
df0c9ba7d5 Update changelog for backport of socket options fix.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-08-19 11:41:35 +12:00
c3a32a5aa3 Update changelogs for go 1.20 minor version update.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-08-19 11:40:58 +12:00
b16fe80095 Fix unit test to avoid failing based on 'tail' command path
Signed-off-by: Shyam Jeedigunta <jeedigv@amazon.com>
2023-08-18 11:56:13 -07:00
83f20f61cb Fix make test targets when empty bash args provided
Signed-off-by: Shyam Jeedigunta <jeedigv@amazon.com>
2023-08-18 11:56:13 -07:00
e4f239408c Update test for v2 deprecation to verify membership match
Signed-off-by: Geeta Gharpure <geetagh@amazon.com>
2023-08-18 16:14:35 +00:00
3f6a5c0bb1 *: enable larger runner
Use ubuntu-latest-8-cores larger runner to support lazyfs in robustness
CI.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-08-18 22:21:00 +08:00
39aad38f02 Merge pull request #16423 from chenyang8094/fix-raftexample-panic-when-reduce-snapshot-count
Handle ErrCompacted errors for Compact in raftexample
2023-08-18 20:48:32 +08:00
68db7087e1 Handle ErrCompacted errors for Compact in raftexample
Signed-off-by: Chen Yang <809476530@qq.com>
Signed-off-by: chenyangyang.cy <chenyangyang.cy@alibaba-inc.com>
2023-08-18 20:05:05 +08:00
6ef9c5364d Merge pull request #16439 from fuweid/fix-16422
tests/*: redirect metrics into file
2023-08-18 13:42:20 +02:00
d9408473c5 server: Unify arguments for mvcc methods
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-08-18 13:41:13 +02:00
e4e05c5713 tests/*: redirect metrics into file
Redirect metrics data into file to reduce output.

Fix: #16422

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-08-18 16:48:10 +08:00
699861a911 Merge pull request #16430 from xuan-nguyen-swe/etcd-io/etcd#16424-Update-issues-links-in-CONTRIBUTING.md
Update issues links in CONTRIBUTING.md
2023-08-17 15:36:46 +08:00
62907bc842 Update issues links in CONTRIBUTING.md
etcd-io/etcd#16424 Find issues links in CONTRIBUTING.md should search for all repositories under etcd-io organization

Signed-off-by: Xuan <nguyenxndaidev@gmail.com>
2023-08-16 22:43:05 +02:00
0d89fa7336 Merge pull request #16408 from ahrtr/update_roadmap_20230814
Update the roadmap: etcd 3.6.0 will depend on bbolt 1.4.0 instead of 1.3.8
2023-08-16 17:35:21 +08:00
c1b96473db Merge pull request #16420 from ahrtr/update_dependency_guide_20230815
Update dependency management guide
2023-08-15 18:19:44 +08:00
5fd09b4b8b Merge pull request #16417 from ahrtr/dependency_otelgrpc_20230814
dependency: bump go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc from 0.37.0 to 0.42.0
2023-08-15 18:18:32 +08:00
f965d474b8 Merge pull request #16421 from ahrtr/flaky_test_20230815
test: increase the timeout for the flaky test `TestCtlV3AuthCertCNWithWithConcurrentOperation`
2023-08-15 18:15:47 +08:00
bbee33e20a test: increase the timeout for the flaky test TestCtlV3AuthCertCNWithWithConcurrentOperation
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-08-15 10:35:44 +01:00
e3a1d7fb3c Merge pull request #16407 from jmhbnz/consolidate-robustness-templates
Consolidate robustness github actions templates
2023-08-15 16:30:14 +08:00
006b61f957 Update dependency management guide: the gRPC has already been bumped to v1.57
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-08-15 09:23:30 +01:00
4a3af340b7 dependency: bump go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc to v1.16.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-08-15 09:14:44 +01:00
2684447d0d dependency: bump go.opentelemetry.io/otel/sdk to 1.16.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-08-15 09:11:50 +01:00
38b2402971 dependency: bump go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc from 0.37.0 to 0.42.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-08-15 09:03:11 +01:00
602a38150b Consolidate robustness actions templates.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-08-15 19:56:37 +12:00
b130741eb3 Merge pull request #16419 from iiamabby/update-example-config
Add example config for TLS protocol version
2023-08-15 15:32:49 +08:00
=
01317bf80a Add example config for TLS protocol version
Co-authored-by: James Blair <mail@jamesblair.net>
Signed-off-by: = <abby.crimlis@outlook.com>
2023-08-15 12:56:37 +12:00
ea16ed812f Merge pull request #16414 from ahrtr/dependency_20230814
Bump dependencies
2023-08-14 20:19:19 +01:00
0a7d7cdd44 Merge pull request #16410 from etcd-io/dependabot/github_actions/actions/setup-go-4.1.0
build(deps): bump actions/setup-go from 4.0.1 to 4.1.0
2023-08-14 20:10:21 +01:00
d30a0de5ca Merge pull request #16409 from etcd-io/dependabot/github_actions/github/codeql-action-2.21.4
build(deps): bump github/codeql-action from 2.21.2 to 2.21.4
2023-08-14 19:06:22 +01:00
bb21f0ee35 dependency: bump github.com/mikefarah/yq/v4 from 4.34.2 to 4.35.1
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-08-14 18:54:46 +01:00
dacecfde5f dependency: bump github.com/alexfalkowski/gocovmerge from 1.1.8 to 1.2.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-08-14 18:53:28 +01:00
731048d728 Merge pull request #16376 from geetasg/pr6
Update etcdutl restore to create v2 snapshot from v3
2023-08-14 18:33:11 +01:00
a464e9aebb build(deps): bump actions/setup-go from 4.0.1 to 4.1.0
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 4.0.1 to 4.1.0.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](fac708d667...93397bea11)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-14 17:29:06 +00:00
ab895b29f5 build(deps): bump github/codeql-action from 2.21.2 to 2.21.4
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.21.2 to 2.21.4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](0ba4244466...a09933a12a)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-14 17:28:57 +00:00
b4bf1579fa update the roadmap: etcd 3.6.0 will depend on bbolt 1.4.0 instead of 1.3.8
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-08-14 10:09:27 +01:00
b0887354e9 Update etcdutl restore to create v2 snapshot from v3
Signed-off-by: Geeta Gharpure <geetagh@amazon.com>
2023-08-11 21:47:34 +00:00
1edd8baf3c Merge pull request #16394 from jmhbnz/update-to-go-1.20
Migrate to golang 1.20
2023-08-11 07:59:34 +01:00
b6d123d08b Update to golang 1.20 minor release.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-08-11 15:03:48 +12:00
baf7a34c3a Merge pull request #16397 from chaochn47/bump-up-dependency
2023-08-10 bump up dependencies
2023-08-10 08:35:05 +01:00
196b1f5ec5 Merge pull request #16392 from jmhbnz/add-lazyfs-arm64-support
Add lazyfs support for arm64 robustness workflow
2023-08-10 08:14:33 +01:00
6757c444c5 2023-08-10 bump up dependencies
Signed-off-by: chaochn47 <chaochn@amazon.com>
2023-08-10 09:13:34 +08:00
34c71d3eae Add lazyfs support for arm64 robustness.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-08-09 21:56:18 +12:00
43f10cbd57 Merge pull request #16384 from ahrtr/coverage_20230807
replace github.com/gyuho/gocovmerge with github.com/wadey/gocovmerge
2023-08-07 20:49:38 +01:00
acfa46c02b replace github.com/gyuho/gocovmerge with github.com/alexfalkowski/gocovmerge
github.com/gyuho/gocovmerge has already been removed or turned into
a private repo. I believe it's also forked from github.com/wadey/gocovmerge.
So replace it with the original repo github.com/alexfalkowski/gocovmerge.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-08-07 20:13:04 +01:00
f4b5b052b9 Merge pull request #16379 from jmhbnz/weekly-dependencies
Bump golang.org/x/sys from 0.10.0 to 0.11.0
2023-08-07 07:40:44 +01:00
25315dd1f2 Merge pull request #16378 from serathius/qps-flakes
tests/robustness: Reduce minimal QPS to eliminate flakes
2023-08-06 20:49:32 +02:00
bf2170bb99 Merge pull request #16371 from serathius/txn-read
server: Separate txnRead from txnWrite
2023-08-06 20:46:51 +02:00
f7126aa1c3 depdendency: bump golang.org/x/sys from 0.10.0 to 0.11.0.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-08-06 19:02:15 +12:00
a2bd589cdb tests/robustness: Reduce minimal QPS to eliminate flakes
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-08-05 19:27:10 +02:00
81ecac11cb server: Separate txnRead from txnWrite
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-08-04 20:46:33 +02:00
def3494a55 Merge pull request #16360 from iiamabby/weekly-dependencies
[2023-08-03] Bump dependencies identified by dependabot
2023-08-04 16:25:21 +01:00
524fddc426 Merge pull request #16355 from serathius/txn-refactor
server: Separate internal txn functions for recursion and have public function create transaction and trace
2023-08-04 15:54:14 +02:00
10c7e81cac Merge pull request #16358 from ahrtr/remove_creds_bundle_20230802
clientv3: remove the experimental gRPC API grpccredentials.Bundle
2023-08-04 08:46:02 +01:00
0021204c15 Merge pull request #16132 from geetasg/pr5
Add a method to export membership info to v2 store from RaftCluster
2023-08-04 08:43:27 +01:00
=
418bab0ed4 dependency: bump golang.org/x/net 0.12.0 to 0.13.0
Co-authored-by: James Blair <mail@jamesblair.net>
Signed-off-by: = <abby.crimlis@outlook.com>
2023-08-04 09:09:16 +12:00
cca200345a Merge pull request #16359 from jmhbnz/streamline-test-commands
Streamline test commands between branches
2023-08-03 17:51:34 +02:00
fa21c07baa server: Separate internal functions for recursion and have public function create transaction and trace
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-08-03 17:47:03 +02:00
=
5896e40d23 dependency: bump go.uber.org/zap 1.24.0 to 1.25.0
Co-authored-by: James Blair <mail@jamesblair.net>
Signed-off-by: = <abby.crimlis@outlook.com>
2023-08-03 14:46:33 +12:00
7a33184d90 Streamline test commands between branches.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-08-03 12:39:12 +12:00
979102f895 clientv3: remove the experimental gRPC API grpccredentials.Bundle
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-08-02 19:35:51 +01:00
2b533b4bc2 Merge pull request #16354 from z764969689/main
Changelog: modify dependencies bumping go to 1.19.12
2023-08-02 09:49:48 +01:00
b6f095e367 Changelog: modify dependencies bumping go to 1.19.12
Signed-off-by: Luke Zhang <z764969689@163.com>
2023-08-02 16:17:42 +08:00
eb04f3ad8d Merge pull request #16338 from chaochn47/bump-up-grpc
Fix 15877 and bump up gRPC from v1.52.0 to v1.57.0
2023-08-02 08:36:02 +01:00
fbe5ca6747 Merge pull request #16346 from z764969689/main
bump go version to 1.19.12
2023-08-02 07:54:19 +01:00
569ec51965 bump go version to 1.19.12
Signed-off-by: Luke Zhang <z764969689@163.com>
2023-08-02 12:56:23 +08:00
f3a03247df Merge pull request #16265 from kensou97/expose-session-context
clientv3: add Ctx() to return context of session
2023-08-01 17:09:01 +01:00
8524903935 Merge pull request #16223 from kensou97/fix-barrier
clientv3: fix barrier.Wait() still block after barrier.Release()
2023-08-01 17:08:17 +01:00
9ad5189d3d Merge pull request #16313 from CaojiamingAlan/check_version
checks the client supported versions based on the current version
2023-08-01 09:23:38 +01:00
24c6fb4b4d Fix 15877 and bump up gRPC from v1.52.0 to v1.57.0
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-07-31 13:57:24 -07:00
4d4ba98c28 Merge pull request #16335 from etcd-io/dependabot/github_actions/github/codeql-action-2.21.2
build(deps): bump github/codeql-action from 2.21.0 to 2.21.2
2023-07-31 19:56:15 +01:00
b8f08c972f build(deps): bump github/codeql-action from 2.21.0 to 2.21.2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.21.0 to 2.21.2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](1813ca74c3...0ba4244466)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-31 17:04:27 +00:00
9637b07f7b Merge pull request #16325 from serathius/reader-writer
Separate Writer interface from BatchTx interfaces
2023-07-31 11:48:52 +02:00
53cbd81009 Separate Writer interface from BatchTx interfaces
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-07-31 10:18:01 +02:00
41ab23c67b Merge pull request #16318 from jmhbnz/align-race-detection
Simplify go data race detection controls
2023-07-31 09:12:27 +01:00
9126a0fe11 Merge pull request #16324 from chaochn47/bump-up-gRPC
Fix http2 authority header in multiple endpoints scenario and bump up grpc from `v1.51.0` to `v1.52.0`
2023-07-31 08:58:58 +02:00
8aeed09f2c endpoints.Interpret returns Host:port as ServerName
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-07-28 16:19:54 -07:00
e5b7dde17e Add a method to export membership info to v2 store from RaftCluster
Signed-off-by: Geeta Gharpure <geetagh@amazon.com>
2023-07-28 16:55:41 +00:00
3b708df1e0 Merge pull request #16320 from serathius/rlock2
Remove RLock/RUnlock from BatchTx
2023-07-28 12:11:53 +02:00
29769984e6 Remove RLock/RUnlock from BatchTx
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-07-28 11:39:50 +02:00
44f6f4a4a2 Merge pull request #16323 from jmhbnz/improve-default-labels
Automate adding area/testing label to flake issues
2023-07-28 05:33:11 +01:00
c023c06903 checks the client supported versions based on the current version
Signed-off-by: caojiamingalan <alan.c.19971111@gmail.com>
2023-07-27 19:42:02 -05:00
9bd0e83cdf Automate adding area/testing label to flake issues.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-07-28 10:07:08 +12:00
e59e3d709c dependency: bump google.golang.org/grpc from 1.51.0 to 1.52.0
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-07-27 13:25:12 -07:00
9f72c648d3 Merge pull request #14691 from serathius/lazyfs
tests: Add support for lazyfs
2023-07-27 15:27:10 +02:00
145cae36ef Merge pull request #16312 from serathius/rlock
server: Remove Lock/Unlock from ReadTx
2023-07-27 15:18:53 +02:00
5b9b303fa7 Simplify go data race detection control.
Use data race detection by default for all amd64 and arm64 tests.

Remove redundant parameters in github workflows.

Signed-off-by: James Blair <mail@jamesblair.net>
2023-07-27 23:49:09 +12:00
eb32d9cccc tests: Add support for lazyfs
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-07-27 13:42:38 +02:00
6981e4820f Merge pull request #16317 from serathius/substruct
tests: Make EtcdServerProcess substruct of proxyEtcdProcess to dummy methods when extending EtcdProcess interface
2023-07-27 13:41:14 +02:00
b4f8a7be51 server: Remove Lock/Unlock from ReadTx
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-07-27 13:34:43 +02:00
424ced9ff3 Merge pull request #16248 from CaojiamingAlan/replace_lock_with_rlock
Replace unnecessary Lock()/Unlock()s with RLock()/RUnlock()s
2023-07-27 12:15:46 +02:00
828e789c18 tests: Make EtcdServerProcess substruct of proxyEtcdProcess to dummy methods when extending EtcdProcess interface
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-07-27 10:04:02 +02:00
d327cacb2f Hold to v10.0.0 version
Signed-off-by: Vitaly Zhuravlev <v-zhuravlev@users.noreply.github.com>
2023-07-26 20:47:48 +00:00
af07f18dce Merge pull request #16272 from gocurr/fix_unique_urls
pkg/flags: fix UniqueURLs'Set to remove duplicates in UniqueURLs'uss
2023-07-26 16:26:42 +01:00
4f78cc0810 pkg/flags: fix UniqueURLs'Set to remove duplicates in UniqueURLs'uss
From the name of func 'UniqueURLsFromFlag', we can tell that UniqueURLs'uss
should not have duplicates. The current implemention of UniqueURLs'Set
has a bug to make it unique.

Fixes: #16307.

Signed-off-by: Jes Cok <xigua67damn@gmail.com>
2023-07-26 22:28:44 +08:00
6aad5084b0 Merge pull request #16310 from fuweid/test-lazyfs
tests/robustness: enhance compact failpoint
2023-07-26 16:01:07 +02:00
516e096a97 tests/robustness: enhance compact failpoint
If the cluster serves requests slowly, the database has few revision
number and then Compact won't trigger BatchCommit. Add a loop to check
the last revision is big enough to trigger panic.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-07-26 21:32:16 +08:00
21c4061d5c Merge pull request #16288 from skitt/server-semconv-v1.17.0
server: switch to semconv v1.17.0
2023-07-26 13:30:55 +01:00
a6bffb8565 Merge pull request #16306 from ArkaSaha30/main
Manual Dependency Bump
2023-07-26 13:00:59 +01:00
da58ac9847 Bump github.com/mattn/go-runewidth to v0.0.15
Signed-off-by: ArkaSaha30 <arkasaha30@gmail.com>
2023-07-26 13:02:43 +05:30
326dab9bd7 Merge pull request #16279 from ahrtr/roadmap_20230721
Documentation: add roadmap
2023-07-26 08:14:17 +01:00
cb4d3a5697 Documentation: add a roadmap
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-07-25 15:54:22 +01:00
0ba8b0fb16 Merge pull request #16294 from etcd-io/dependabot/github_actions/github/codeql-action-2.21.0
build(deps): bump github/codeql-action from 2.20.4 to 2.21.0
2023-07-25 07:29:03 +01:00
0e8c52504e build(deps): bump github/codeql-action from 2.20.4 to 2.21.0
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.20.4 to 2.21.0.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](489225d82a...1813ca74c3)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-24 17:56:26 +00:00
1010115b8f server: switch to semconv v1.17.0
This is the latest semconv package used in etcd's dependencies.
Switching to that version reduces the overall package dependencies of
the project (and helps downstream projects which track this,
e.g. Kubernetes).

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2023-07-24 15:53:04 +02:00
d204487b6a Merge pull request #16283 from lance5890/fix_typo_in_raft.go
update typo in raft.go
2023-07-24 12:42:37 +01:00
0f975acf2f update typo in raft.go
Signed-off-by: lan.tian <lance5890@163.com>
2023-07-24 15:48:55 +08:00
26b3ecf5aa Merge pull request #16281 from eltociear/fix-typo
Fix typo in triage_issues.md
2023-07-23 14:51:46 +01:00
0a314c9da3 Fix typo in triage_issues.md
Signed-off-by: Ikko Eltociear Ashimine <eltociear@gmail.com>
2023-07-23 22:47:17 +09:00
6979a06e6c Merge pull request #16257 from etcd-io/dependabot/go_modules/github.com/cheggaaa/pb/v3-3.1.4
build(deps): bump github.com/cheggaaa/pb/v3 from 3.1.2 to 3.1.4
2023-07-22 06:14:57 +01:00
8d85baec80 dependency: bump github.com/cheggaaa/pb/v3 from 3.1.2 to 3.1.4 for etcdctl and tests
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-07-21 16:14:59 +01:00
824337a272 build(deps): bump github.com/cheggaaa/pb/v3 from 3.1.2 to 3.1.4
Bumps [github.com/cheggaaa/pb/v3](https://github.com/cheggaaa/pb) from 3.1.2 to 3.1.4.
- [Commits](https://github.com/cheggaaa/pb/compare/v3.1.2...v3.1.4)

---
updated-dependencies:
- dependency-name: github.com/cheggaaa/pb/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-21 16:12:27 +01:00
d1ade07ab0 Merge pull request #16261 from etcd-io/dependabot/go_modules/tools/mod/github.com/mikefarah/yq/v4-4.34.2
build(deps): bump github.com/mikefarah/yq/v4 from 4.34.1 to 4.34.2 in /tools/mod
2023-07-21 15:58:51 +01:00
cd453b931f Merge pull request #16271 from johnshajiang/cleanup-cluster
tests: cleanup unnecessary assignment in cluster.go
2023-07-20 08:16:36 +01:00
92de641a22 Merge pull request #16268 from fuweid/fix-TestPageWriterRandom
pkg/ioutil: deflake TestPageWriterRandom
2023-07-19 16:07:47 +01:00
51a22c21ff tests: cleanup unnecessary assignment in cluster.go
Signed-off-by: John Jiang <john.sha.jiang@gmail.com>
2023-07-19 21:58:33 +08:00
fddd1add52 pkg/ioutil: deflake TestPageWriterRandom
The PageWriter has cache buffer so that it doesn't call the Writer until
the cache is almost full. Since the data's length is random, the pending
bytes should be always less than cache buffer size, instead of page
size.

Fix: #16255

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-07-18 23:18:01 +08:00
35628b9c78 Merge pull request #16230 from jmhbnz/align-arm64-commands
Ensure release is run for arm64 e2e nightly tests
2023-07-18 12:04:33 +01:00
3ff0128842 Fix obtaining UPGRADE_VER in test.sh
Obtain tags from git ls-remote to avoid reliance on local repository state.

Signed-off-by: James Blair <mail@jamesblair.net>
2023-07-18 21:57:51 +12:00
e209968dc3 Merge pull request #16263 from Rajalakshmi-Girish/flake-grpc-rr
Fix flaky integration/clientv3/naming TestEtcdGrpcResolverRoundRobin
2023-07-18 09:49:56 +01:00
eb204f1d32 Merge pull request #16256 from gocurr/simplify_fmt_print
etcdctl/ctlv3/command: simplify code using fmt.Printf with '\n'
2023-07-18 09:47:36 +01:00
7aad281317 Merge pull request #16252 from gocurr/avoid_hardcoding
pkg/expect: avoid hardcoding when checking ErrProcessDone
2023-07-18 09:47:03 +01:00
2f65f56351 Ensure release is run for arm64 e2e nightly tests.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-07-18 20:16:55 +12:00
c3e5201972 clientv3: fix barrier.Wait() still block after barrier.Release() in some cases
Signed-off-by: Wenkang Zhang <314830391@qq.com>
2023-07-18 15:48:48 +08:00
03d8fff0d8 clientv3: add Ctx() to return context of session
Signed-off-by: Wenkang Zhang <314830391@qq.com>
2023-07-18 15:22:53 +08:00
ea72194935 Fix flaky integration/clientv3/naming TestEtcdGrpcResolverRoundRobin
Signed-off-by: Rajalakshmi Girish <rajalakshmi.girish1@ibm.com>
2023-07-17 23:53:02 -07:00
0c643dfb21 Merge pull request #16258 from etcd-io/dependabot/github_actions/github/codeql-action-2.20.4
build(deps): bump github/codeql-action from 2.20.3 to 2.20.4
2023-07-17 19:30:35 +01:00
b71f335740 build(deps): bump github.com/mikefarah/yq/v4 in /tools/mod
Bumps [github.com/mikefarah/yq/v4](https://github.com/mikefarah/yq) from 4.34.1 to 4.34.2.
- [Release notes](https://github.com/mikefarah/yq/releases)
- [Changelog](https://github.com/mikefarah/yq/blob/master/release_notes.txt)
- [Commits](https://github.com/mikefarah/yq/compare/v4.34.1...v4.34.2)

---
updated-dependencies:
- dependency-name: github.com/mikefarah/yq/v4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-17 17:40:07 +00:00
91215fb1ca build(deps): bump github/codeql-action from 2.20.3 to 2.20.4
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.20.3 to 2.20.4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](46ed16ded9...489225d82a)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-17 17:24:31 +00:00
223a75b399 etcdctl/ctlv3/command: simplify code using fmt.Printf with '\n'
The current printing code is complicated. This PR simplifies the
code and reduces the function calls.

Signed-off-by: Jes Cok <xigua67damn@gmail.com>
2023-07-17 19:37:15 +08:00
e282e6c111 Fix typo in mixin Makefile
Signed-off-by: Vitaly Zhuravlev <v-zhuravlev@users.noreply.github.com>
2023-07-17 09:32:59 +00:00
bedd13298d Merge pull request #16251 from liangyuanpeng/changelog_backport_13577
Add changelog for backport 13577 to 3.4&3.5.
2023-07-17 08:25:25 +01:00
11d22abe2b Merge pull request #16249 from iuriatan/update-linter
Update linter and protoc
2023-07-17 09:13:06 +02:00
Lan
6a9ea5ba6c Add changelog for backport 13577 to 3.4&3.5.
Signed-off-by: Lan Liang <gcslyp@gmail.com>
2023-07-17 13:39:15 +08:00
5e65553d27 pkg/expect: avoid hardcoding when checking ErrProcessDone
ExpectProcess's Stop method uses 'strings.Contains' to check
the returned err, however, this can be avoided. os.ErrProcessDone's
error message is the same as the hardcoded string. So I think
this explicit error is what this method wants to compare.

Signed-off-by: Jes Cok <xigua67damn@gmail.com>
2023-07-17 13:14:15 +08:00
ff411f517f Merge pull request #16224 from CaojiamingAlan/expose_isOptsWithFromKey_and_isOptsWithPrefix
expose op.isOptsWithFromKey and op.isOptsWithPrefix
2023-07-15 18:35:39 +01:00
bc97a94564 Follow up https://github.com/etcd-io/etcd/pull/16068#discussion_r1263664700
Replace unnecessary Lock()/Unlock()s with RLock()/RUnlock()s

Signed-off-by: caojiamingalan <alan.c.19971111@gmail.com>
2023-07-14 20:08:25 -05:00
f5644361d0 Refactor monitroing mixin's dashboard
Uses new grafonnet lib to declare dashboard. Generated dashboard has same layout, but now has timeseries panels instead of deprecated graphs

Signed-off-by: Vitaly Zhuravlev <v-zhuravlev@users.noreply.github.com>
2023-07-15 00:16:51 +00:00
a3bd22beef Add etcd_selector to dashboard queries
Otherwise common metrics like 'process_resident_memory_bytes' can return non etcd metrics (when cluster label is 'cluster' for example)

Signed-off-by: Vitaly Zhuravlev <v-zhuravlev@users.noreply.github.com>
2023-07-15 00:16:51 +00:00
f8d4b4ef91 Added lint config & alert summaries
Signed-off-by: Vitaly Zhuravlev <v-zhuravlev@users.noreply.github.com>
2023-07-15 00:16:51 +00:00
b424e60289 Update protoc from 3.14.0 to 3.20.3
Signed-off-by: iuriatan <iuriatan@gmail.com>
2023-07-14 16:46:26 -03:00
abbfc2964a Fix goword issue
Fix `make verify` issues after updating golangci-lint

Signed-off-by: iuriatan <iuriatan@gmail.com>
2023-07-14 16:46:26 -03:00
b798aae9c5 Update golangci-lint from 1.49.0 to 1.53.3
Signed-off-by: iuriatan <iuriatan@gmail.com>
2023-07-14 16:46:26 -03:00
882edb3d63 Merge pull request #16231 from jmhbnz/robustness-arm64-release-35
Add new job for nightly release35 arm64 robustness
2023-07-14 14:56:38 +01:00
c59bc52286 Merge pull request #16200 from kensou97/keepalive-ctx-closer
clientv3: create keepAliveCtxCloser goroutine only if ctx can be canc…
2023-07-14 13:46:15 +01:00
dee90e19f1 Merge pull request #16229 from ahrtr/changelog_20230712
Changelog: add items to cover the fix of bumping go to 1.19.11
2023-07-14 12:08:07 +01:00
2dc7891c7b Merge pull request #16234 from jmhbnz/add-new-reviewer
Add jmhbnz as etcd reviewer
2023-07-13 12:01:48 +02:00
f008184b0e Merge pull request #16232 from cuishuang/main
remove repetitive the
2023-07-13 11:59:14 +02:00
a35d24ab72 Add jmhbnz as etcd reviewer.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-07-13 21:46:04 +12:00
6760dc9572 remove repetitive the
Signed-off-by: cui fliter <imcusg@gmail.com>
2023-07-13 17:01:01 +08:00
5ffac59d88 Add new job for nightly release35 arm64 robustness.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-07-13 20:58:16 +12:00
1cf49e5ef0 Merge pull request #16173 from fuweid/fix-datarace-in-expect
pkg/expect: fix data race
2023-07-13 08:49:13 +01:00
1ee6be793e Merge pull request #16226 from ahrtr/go_20230712
Bump go version to 1.19.11 to fix CVE GO-2023-1878
2023-07-13 09:30:57 +02:00
56edfa6e28 pkg/expect: fix data race
Let's say there is command which outputs one line and exit with error.

There are three goroutines to acquire the lock:

1. ep.read()
2. ep.waitSaveExitErr()
3. ep.Expect()

When ep.read goroutine reads the log but it doesn't acquire the lock in
time, the ep.waitSaveExitErr acquires the lock and updates the
`exitErr`. And then ep.Expect acquires lock but it doesn't see any log
yet and then returns err.

It's hard to reproduce it in local. Add the extra sleep can reproduce it.

```diff
diff --git a/pkg/expect/expect.go b/pkg/expect/expect.go
index a512a3ce4..602bea73f 100644
--- a/pkg/expect/expect.go
+++ b/pkg/expect/expect.go
@@ -128,6 +128,7 @@ func (ep *ExpectProcess) tryReadNextLine(r *bufio.Reader) error {
        printDebugLines := os.Getenv("EXPECT_DEBUG") != ""
        l, err := r.ReadString('\n')

+       time.Sleep(10 * time.Millisecond)
        ep.mu.Lock()
        defer ep.mu.Unlock()
```

See it once in Github Action [1]. In order to fix it, the patch introduces
`readCloseCh` to wait for ep.read to get all the data and retry it.

[1]: https://github.com/etcd-io/etcd/pull/16137#issuecomment-1605838518

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-07-13 14:56:21 +08:00
8fd423332e Changelog: add items to cover the fix of bumping go to 1.19.11
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-07-12 17:02:09 +01:00
3c33fc1cf7 bump go version to 1.19.11
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-07-12 16:47:49 +01:00
930dbbc28d Merge pull request #16196 from fuweid/benchmark-support-range-countonly
tools/benchmark: support --count-only for range
2023-07-12 16:42:38 +01:00
5216eea132 Merge pull request #16198 from vianamjr/clientv3-precent-nil-pointer
Clientv3 prevent nil pointer
2023-07-12 15:42:26 +01:00
06579d9cd1 expose op.isOptsWithFromKey and op.isOptsWithPrefix
Signed-off-by: caojiamingalan <alan.c.19971111@gmail.com>
2023-07-11 14:34:51 -05:00
a639ecd4ee Merge pull request #16219 from ahrtr/3.4.27_release_date
Changelog: update etcd 3.4.27's release date
2023-07-11 13:07:39 +02:00
d934510bdd Changelog: update etcd 3.4.27's release date
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-07-11 10:38:08 +01:00
4f37baf287 Merge pull request #16152 from jmhbnz/template-arm64-jobs
Templated arm64 integration and e2e workflows for main and release-3.5
2023-07-11 10:12:32 +02:00
2d771b6f8f Merge pull request #16189 from jmhbnz/update-community-meeting
Update community meeting frequency to fortnightly
2023-07-11 09:36:15 +02:00
d206977927 Merge pull request #16218 from fuweid/update34changelog
CHANGELOG: add item for 3.4.27
2023-07-11 09:06:39 +02:00
c2474d2999 CHANGELOG: add item for 3.4.27
- embed: fix nil pointer dereference when stopServer

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-07-11 14:55:28 +08:00
c853b9c337 Merge pull request #16210 from ahrtr/dependency_20230710
Bump dependencies
2023-07-10 20:21:07 +01:00
1f07d8f159 Merge pull request #16205 from etcd-io/dependabot/github_actions/github/codeql-action-2.20.3
build(deps): bump github/codeql-action from 2.20.2 to 2.20.3
2023-07-10 19:18:24 +01:00
5ed5807bf4 Merge pull request #16197 from wenjiaswe/patch-2
Asking for approval to regain maintainer status
2023-07-10 20:10:58 +02:00
bad0894aa3 dependency: bump gotest.tools/gotestsum from v1.10.0 to v1.10.1
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-07-10 18:51:51 +01:00
2c22ca7eba dependency: bump golang.org/x/net from v0.11.0 to v0.12.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-07-10 18:43:30 +01:00
843ddb4b1e dependency: bump golang.org/x/crypto from v0.10.0 to v0.11.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-07-10 18:40:35 +01:00
149256735d dependency: bump golang.org/x/sys from v0.9.0 to v0.10.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-07-10 18:38:16 +01:00
0afea07767 build(deps): bump github/codeql-action from 2.20.2 to 2.20.3
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.20.2 to 2.20.3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](004c5de30b...46ed16ded9)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-10 17:25:31 +00:00
2ec12e4b4e clientv3: prevent nil pointer call in get method
Signed-off-by: Marcondes Viana <marju10@gmail.com>
2023-07-10 08:16:00 -03:00
21eb8d2c3b clientv3: create keepAliveCtxCloser goroutine only if ctx can be canceled
Signed-off-by: zhangwenkang <zwenkang@vmware.com>
2023-07-10 01:11:23 +08:00
4755a1646c Update MAINTAINERS
Sending this PR to ask for approval to regain maintainer status.

Signed-off-by: Wenjia Zhang <wenjiazhang@google.com>
2023-07-07 01:16:47 -07:00
82f6cb4635 Merge pull request #16194 from wenjiaswe/patch-1
Update CHANGELOG for #16029 #16165 #16193
2023-07-07 09:39:42 +02:00
e3e58880d3 Update CHANGELOG for #16029 #16165 #16193
Signed-off-by: Wenjia Zhang <wenjiazhang@google.com>
2023-07-07 00:29:49 -07:00
70c8f04a18 tools/benchmark: support --count-only for range
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-07-07 15:07:12 +08:00
ac88260aaf Merge pull request #16191 from chaochn47/fix-runtime-reconfig-test
tests: exclude learner endpoint from MemberPromote
2023-07-07 07:15:02 +01:00
0b6fd24afb Update community meeting frequency to fortnightly.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-07-07 15:00:37 +12:00
4364e7581b Merge pull request #16120 from Tachone/shitao.lst/fix_db_close
etcdutl: fix db double closed
2023-07-06 20:03:51 +01:00
f4444e8fb3 Merge pull request #16154 from CaojiamingAlan/uber_applier_test
add tests for uber applier
2023-07-06 20:00:11 +01:00
cd6cab5e03 Merge pull request #16190 from kensou97/changelog-16188
update changelog for #16188
2023-07-06 18:59:31 +01:00
e5f6673e1a tests: exclude learner endpoints from MemberPromote
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-07-06 09:05:16 -07:00
6f94f118e6 update changelog for #16188
Signed-off-by: zhangwenkang <zwenkang@vmware.com>
2023-07-06 17:22:10 +08:00
e887e5291a Merge pull request #16067 from geetasg/pr1
Adding test for updateClusterVersionV3
2023-07-06 08:36:19 +01:00
93bfdba265 Merge pull request #16156 from kensou97/fix-barrier
clientv3: remove v3.WithFirstKey() in Barrier.Wait()
2023-07-06 08:29:21 +01:00
226e2cf1c8 Merge pull request #15924 from CaojiamingAlan/add-cluster-id-check-for-hashKVHandler
Add cluster id check for hash kv handler
2023-07-05 20:41:41 +01:00
eff9517a90 etcdserver: add cluster id check for hashKVHandler
Signed-off-by: caojiamingalan <alan.c.19971111@gmail.com>
2023-07-05 14:09:40 -05:00
89bbba8fb3 Merge pull request #16174 from twz123/jwt-ed25519-support
auth: Support for EdDSA JWT algorithm
2023-07-05 12:29:04 +01:00
a8a9ebd281 auth: Support for EdDSA JWT algorithm
The golang-jwt library supports this already, so supporting it is just a
matter of wiring things up.

Signed-off-by: Tom Wieczorek <twieczorek@mirantis.com>
2023-07-05 11:33:08 +02:00
76285f7f0f Merge pull request #15962 from HubertZhang/changelog-15939
update changelog for #15939
2023-07-05 10:20:56 +01:00
3d3e91c6e3 clientv3: remove v3.WithFirstKey() in Barrier.Wait()
fix the unexpected blocking when using Barrier.Wait(), e.g.
NewBarrier(client, "a").Wait() will block if key "a" is not existed but "a0" is existed, but it should return immediately.

Signed-off-by: zhangwenkang <zwenkang@vmware.com>
2023-07-04 22:01:54 +08:00
ac58abcf7e Merge pull request #16155 from chaochn47/update-README
update README about profile learner
2023-07-04 14:08:51 +01:00
534b1e5233 Merge pull request #16161 from serathius/robustness-limit-non-unique-writes
tests/robustness: Prevent to many concurrent non-unique writes which are causing linearization to timeout
2023-07-04 08:56:51 +02:00
e04ab3fdc4 Merge pull request #16168 from etcd-io/dependabot/go_modules/tools/mod/gotest.tools/v3-3.5.0
build(deps): bump gotest.tools/v3 from 3.4.0 to 3.5.0 in /tools/mod
2023-07-03 19:41:39 +01:00
fdae5a79f1 Merge pull request #16169 from etcd-io/dependabot/github_actions/github/codeql-action-2.20.2
build(deps): bump github/codeql-action from 2.20.1 to 2.20.2
2023-07-03 19:33:31 +01:00
c03965aebe build(deps): bump github/codeql-action from 2.20.1 to 2.20.2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.20.1 to 2.20.2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](f6e388ebf0...004c5de30b)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-03 17:49:04 +00:00
11e90c0bdb build(deps): bump gotest.tools/v3 from 3.4.0 to 3.5.0 in /tools/mod
Bumps [gotest.tools/v3](https://github.com/gotestyourself/gotest.tools) from 3.4.0 to 3.5.0.
- [Release notes](https://github.com/gotestyourself/gotest.tools/releases)
- [Commits](https://github.com/gotestyourself/gotest.tools/compare/v3.4.0...v3.5.0)

---
updated-dependencies:
- dependency-name: gotest.tools/v3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-03 17:23:21 +00:00
e626c4dddb Merge pull request #16166 from ahrtr/mark_compaction_comment_20230703
etcdutl: update description for `--mark-compacted and` and `--bump-revision` flags in snapshot restore command
2023-07-03 14:30:44 +01:00
49d6d7e259 etcdutl: update description for --mark-compacted and --bump-revision flags in snapshot restore command
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-07-03 13:50:26 +01:00
8fca6ebdb2 tests/robustness: Prevent to many concurrent non-unique writes which are causing linearization to timeout
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-07-03 14:39:23 +02:00
c6fd719ccf Merge pull request #16029 from dusk125/revision-bump
Adding optional revision bump to snapshot restore
2023-07-03 07:01:53 +01:00
57a583d140 Merge pull request #16153 from serathius/robustness-report-load
tests/robustness: Implement loading client reports
2023-07-02 11:20:30 +02:00
ffe73f9a15 add tests for uber applier
Signed-off-by: caojiamingalan <alan.c.19971111@gmail.com>
2023-06-30 22:03:29 -05:00
856790de36 Templated arm64 e2e workflows for main and release-3.5.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-06-29 20:39:15 +12:00
4ea8da7df2 Templated arm64 integration workflows for main and release-3.5.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-06-29 20:39:09 +12:00
249e6c27d6 update README about profile learner
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-06-28 23:54:20 -07:00
11da84a1d1 tests/robustness: Implement loading client reports
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-06-28 15:35:17 +02:00
833aabe4cd Merge pull request #16149 from ArkaSaha30/main
Manual Dependency Bump
2023-06-28 10:04:50 +01:00
22f9dac7b1 Merge pull request #15708 from chaochn47/confchange_raft_node_notifies_apply
raft node notifies configure when confChanged
2023-06-28 10:03:50 +01:00
37bd1e3382 Bump dependency manually
Signed-off-by: ArkaSaha30 <arkasaha30@gmail.com>
2023-06-28 12:39:27 +05:30
7bd77c2e62 etcdutl: fix db double closed
Signed-off-by: shitao.lst <acm_tach@163.com>
2023-06-28 11:51:46 +08:00
bda68d8d06 Merge pull request #16074 from geetasg/pr2
Enable test to verify membership recovery from backend
2023-06-27 20:24:51 +01:00
be3e851264 Adding optional revision bump and mark compacted to snapshot restore
Signed-off-by: Allen Ray <alray@redhat.com>
2023-06-27 09:26:25 -04:00
46d3d3671c Merge pull request #16145 from etcd-io/dependabot/github_actions/ossf/scorecard-action-2.2.0
build(deps): bump ossf/scorecard-action from 2.1.3 to 2.2.0
2023-06-27 10:34:39 +01:00
ea9112b940 Merge pull request #16146 from etcd-io/dependabot/github_actions/github/codeql-action-2.20.1
build(deps): bump github/codeql-action from 2.20.0 to 2.20.1
2023-06-27 10:03:16 +01:00
9f351b3ec6 Merge pull request #16127 from chaochn47/runtime-reconfig-tests
add runtime reconfiguration tests
2023-06-27 09:56:56 +01:00
24ecae0c35 build(deps): bump github/codeql-action from 2.20.0 to 2.20.1
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.20.0 to 2.20.1.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](6c089f53dd...f6e388ebf0)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-27 08:26:18 +00:00
7b7f9740be build(deps): bump ossf/scorecard-action from 2.1.3 to 2.2.0
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.1.3 to 2.2.0.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](80e868c13c...08b4669551)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-27 08:26:16 +00:00
56fc5e6c80 Merge pull request #16148 from CaojiamingAlan/fix_tag_in_comment
fix action tag comment pattern to be consistent
2023-06-27 10:25:36 +02:00
6cdc9ae4fe server/etcdserver/raft.go:
1. rename confChangeCh to raftAdvancedC
2. rename waitApply to confChanged
3. add comments and test assertion

Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-06-26 22:42:44 -07:00
9f68fcc602 fix action tag comment pattern to be consistent
Signed-off-by: caojiamingalan <alan.c.19971111@gmail.com>
2023-06-26 18:03:19 -05:00
ad3b6ee4c6 etcdserver: wait for raft is notified on confChange before responding to client
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-06-26 13:40:51 -07:00
8e161b68f3 add runtime reconfiguration tests
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-06-26 09:09:39 -07:00
d3233fec0a Merge pull request #16136 from serathius/robustness-watch-validation
Robustness watch validation
2023-06-26 14:43:02 +02:00
1967b8e5e6 Merge pull request #16086 from CaojiamingAlan/applier_test
etcdserver: add tests for apply_auth.go
2023-06-26 12:20:05 +02:00
09c462e2ea tests/robustness: Add resumable validation and improve reliable validation
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-06-26 12:12:39 +02:00
3ea0cb8d9c Merge pull request #16137 from fuweid/deflake-failpoint-cases
*: should return exitCode even if cmd isn't nil
2023-06-26 11:39:02 +02:00
467afe2c4b Merge pull request #16135 from serathius/robustness-watch-operations
tests/robustness: Store whole watch operations
2023-06-26 11:13:26 +02:00
739239f131 Merge pull request #16117 from daljitdokal/main
Update 3.4 and 3.5 changelogs for compile with 1.19.10
2023-06-25 17:03:08 +01:00
b3316c0e09 *: should return exitCode even if cmd isn't nil
For the pkg/expect package, if the process has been stopped but there is
no `Close()` call, the `ExitCode()` won't return exit code correctly.
The `ExitCode()` should check `exitErr` and return exit code if cmd isn't nil.

And introduces `exitCode` to return correct exit code based on the
process is signaled or exited.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-06-25 10:39:34 +08:00
e73f26339e Update 3.4 and 3.5 changelogs for compile with 1.19.10
Signed-off-by: Daljit Singh <daljit.dokal@yahoo.co.nz>
2023-06-25 08:34:34 +12:00
26cd2bc017 tests/robustness: Store whole watch operations
Want to keep watch requests to properly validate reliability of watch
stream.

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-06-24 18:15:50 +02:00
31b20ef40f Merge pull request #16129 from serathius/robustness-fix-patch-txn-onfailure
Robustness fix patch txn onfailure
2023-06-24 17:32:31 +02:00
9ff3e66354 Merge pull request #16131 from serathius/robustness-combine-watch-history
tests/robustness: Combine watch histories
2023-06-24 11:22:18 +02:00
1f6e1102a2 tests/robustness: Fix operation patching for txn with onFailure operations
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-06-24 11:20:12 +02:00
0ae8f26f06 tests/robustness: Refactor patch operation functions
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-06-24 11:19:24 +02:00
0e8232950a Merge pull request #16111 from serathius/robustness-pagination
tests/robustness: Implement Kubernetes pagination
2023-06-23 22:29:44 +02:00
78ca04a94a tests/robustness: Combine watch histories
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-06-23 18:40:07 +02:00
3e725aceef Merge pull request #16128 from sharathsivakumar/shsi/bump_dependency_wip
Manual dependency Bump
2023-06-23 17:14:11 +01:00
11aa59c42d etcdserver: add tests for apply_auth.go
Signed-off-by: caojiamingalan <alan.c.19971111@gmail.com>
2023-06-23 10:58:30 -05:00
b92981606a dependency: bump github.com/prometheus/client_golang v1.15.1 to v1.16.0
Signed-off-by: sharathsivakumar <mailssr9@gmail.com>
2023-06-23 16:39:09 +02:00
d8ae7de3a5 dependency: bump golang.org/x/sync from 0.2.0 to 0.3.0
Signed-off-by: sharathsivakumar <mailssr9@gmail.com>
2023-06-23 16:38:18 +02:00
c8247731a2 Merge pull request #16099 from chaochn47/enable_failpoint_in_integration_test
Enable failpoint in integration test
2023-06-23 13:15:08 +01:00
120f1d6d05 Merge pull request #16116 from jmhbnz/new-runner-docs
Document steps for setting up new arm64 self hosted actions runner
2023-06-23 10:36:17 +02:00
c3720fac3d tests/robustness: Implement Kubernetes pagination
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-06-23 09:44:22 +02:00
f985890ac3 Merge pull request #16113 from serathius/robustness-range
tests/robustness: Implement proper range requests
2023-06-22 20:50:27 +02:00
6fd77ac613 Merge pull request #16123 from serathius/robustness-txn-key-prefix
tests/robustness: Fix multi txn key prefix
2023-06-22 20:37:56 +02:00
2e7cb772b2 tests/robustness: Implement proper range requests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-06-22 18:36:43 +02:00
f7831e2607 tests/robustness: Move key into dedicated options to allow to implement proper ranges
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-06-22 18:27:54 +02:00
3f09a51c60 tests/robustness: Make watch event independent from etcd operation
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-06-22 15:43:27 +02:00
0d2d383f0a tests/robustness: Fix multi txn key prefix
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-06-22 14:27:31 +02:00
6d79b86219 Enable failpoint by default in integration tests
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-06-21 23:13:46 -07:00
04d24c2128 Merge pull request #16100 from geetasg/pr4
Verify consistent index is latest at the time of snapshot
2023-06-22 07:10:23 +01:00
090724b753 Document steps for setting up new actions runner.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-06-22 08:25:04 +12:00
54fab1c141 Merge pull request #16122 from serathius/robustness-etcd-range
tests/robustness: Add List and StaleList requests to etcd traffic
2023-06-21 21:53:26 +02:00
9fc438cb6b tests/robustness: Add List and StaleList requests to etcd traffic
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-06-21 18:03:41 +02:00
66553d4f07 Merge pull request #16090 from tjungblu/changelog_leaseput
update change logs with lease put improvements
2023-06-21 13:23:16 +01:00
e3f2638aea update change logs with lease put improvements
Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
2023-06-21 12:18:20 +02:00
de6415801e Merge pull request #16110 from etcd-io/dependabot/github_actions/github/codeql-action-2.20.0
build(deps): bump github/codeql-action from 2.3.6 to 2.20.0
2023-06-20 14:15:52 +01:00
fd3e338d88 Merge pull request #16115 from serathius/robustness-kubernetes-tune
tests/robustness: Tune Kubernetes tests to reduce number of delete requests
2023-06-20 11:16:02 +02:00
486462a907 Merge pull request #16114 from serathius/robustness-test-name-separate
tests/robustness: Separate traffic name from cluster setup in test name
2023-06-20 11:15:41 +02:00
519617cfd0 tests/robustness: Tune Kubernetes tests to reduce number of delete requests
Having too many delete requests is bad as they are not unique requests, so
linearization is more prone to timeout on them.

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-06-20 09:45:23 +02:00
1217548acf tests/robustness: Separate traffic name from cluster setup in test name
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-06-20 09:16:36 +02:00
1d472bb6e4 build(deps): bump github/codeql-action from 2.3.6 to 2.20.0
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.3.6 to 2.20.0.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](83f0fe6c49...6c089f53dd)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-19 18:01:17 +00:00
9c659eb4e0 Merge pull request #16072 from serathius/robustness-stale-read
Validate stale read
2023-06-19 18:22:08 +02:00
550aa152a7 Verify consistent index is latest at the time of snapshot
Signed-off-by: Geeta Gharpure <geetagh@amazon.com>
2023-06-19 16:00:04 +00:00
1420292b10 Merge pull request #16092 from serathius/robustness-etcdctl-traffic-client
Robustness etcd traffic client
2023-06-19 16:10:55 +02:00
1663600bec tests/robustness: Validate stale get requests by replaying etcd state
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-06-19 14:17:38 +02:00
09b9f889e7 tests/robustness: Refactor etcd traffic client
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-06-19 12:08:17 +02:00
bb155a6629 Merge pull request #16102 from ahrtr/dependency_20230619
dependency: bump golang.org/x/net from 0.10.0 to 0.11.0
2023-06-19 10:51:15 +01:00
812fce2c7e Merge pull request #16087 from jmhbnz/main
Document new arm64 infra process
2023-06-19 10:25:35 +01:00
b7e7811ba4 Merge pull request #16091 from serathius/robustness-stale-read-1
tests/robustness: Implement stale reads without validation
2023-06-19 11:21:48 +02:00
b92d099360 dependency: bump golang.org/x/net from 0.10.0 to 0.11.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-06-19 09:25:07 +01:00
5e7349b44c Merge pull request #16094 from serathius/robustness-retry-failpoint
Robustness retry failpoint
2023-06-19 09:10:46 +02:00
43b2477c28 tests/robustness: Retry injecting failpoint
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-06-17 17:30:20 +02:00
f140cc14b3 Document new arm64 infra process.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-06-17 21:01:55 +12:00
96987d8b5e tests/robustness: Implement stale reads without validation
For now we just validate stale read revision, but not response content.
Reason is that etcd model only stores latest version of keys, and no
history like real etcd.

Validating stale read contents needs to be done outside of model
as storing whole history is just to costly for linearization validation.

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-06-16 21:17:37 +02:00
6f2a5b710f Merge pull request #16096 from serathius/robustness-limit-to-fresh-state
tests/robustness: Limit model to start only from fresh state
2023-06-16 21:15:48 +02:00
57258759c6 Merge pull request #16085 from serathius/robustness-disable-blackhole
tests/robustness: Disable blackhole until snapshot for v3.5 and v3.4
2023-06-16 21:15:26 +02:00
ea3255b477 tests/robustness: Limit model to start only from fresh state
It is just to complicated to support starting from non-empty etcd.
Existing implementation was very naive to assume that we can build
full state from just one request. We might consider implementing
validation of non-empty history in future, but for now settting
this limit should clean up the code and speed up development.

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-06-16 13:50:20 +02:00
8de14bd36e Merge pull request #16093 from jmhbnz/separate-fix-targets
Ensure goimports can be fixed individually
2023-06-16 13:30:02 +02:00
fb16bca44a tests/robustness: Disable blackhole until snapshot for v3.5 and v3.4
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-06-16 13:26:24 +02:00
2791422f77 Ensure goimports can be fixed individually.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-06-16 21:47:46 +12:00
8c483f31ad Ensure Makefile PHONY targets match real target names.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-06-16 21:20:45 +12:00
90cbadc660 Merge pull request #16051 from kkkkun/update-changelog
update 3.4 and 3.5 changelogs
2023-06-16 10:23:18 +02:00
32ea42b51c Merge pull request #16083 from serathius/robustness-perfect-knowledge
Robustness Allow errors and partial responses from deterministic model
2023-06-16 10:07:05 +02:00
cb3730a30f Merge pull request #16005 from tjungblu/putauthshort
Early exit auth check on lease puts
2023-06-16 08:33:57 +02:00
34cbf4cd6f tests/robustness: Allow errors and unknown responses in deterministic model
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-06-15 22:25:48 +02:00
84a9af17cc Add first unit test for authApplierV3
This contains a slight refactoring to expose enough information
to write meaningful tests for auth applier v3.

Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
2023-06-15 15:57:44 +02:00
7d27e33a12 Merge pull request #16079 from serathius/robustness-range-request
Robustness range request
2023-06-15 10:04:04 +02:00
899a51e110 Merge pull request #16073 from pchan/bump_dependency2
manual dependency bump
2023-06-14 20:51:01 +01:00
6979318108 tests/robustness: Make Range a proper request type to allow setting Range.Revision != 0 for stale reads
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-06-14 13:55:45 +02:00
974655e02c tests/robustness: Rename operations const to separate from RequestType
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-06-14 13:24:14 +02:00
da49157b20 Merge pull request #16066 from serathius/robusness-validate
tests/robustness: Extract validation to separate package
2023-06-14 11:54:46 +02:00
7bbc738ec4 tests/robustness: Extract validation to separate package
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-06-14 09:14:27 +02:00
a081d52bd4 Merge pull request #16075 from serathius/robustness-randomize-get
tests/robustness: Move get to list of randomized operations
2023-06-14 08:49:04 +02:00
a268a67e45 tests/robustness: Move get to list of randomized operations 2023-06-13 21:09:05 +02:00
455c0c6b81 Merge pull request #16041 from geetasg/pr
Update downgrade test to use a snapshot
2023-06-13 20:35:29 +02:00
e9fa3d30d7 Enable test to verify membership recovery from backend
Signed-off-by: Geeta Gharpure <geetagh@amazon.com>
2023-06-13 18:33:03 +00:00
3a8c6d749f manual dependency bump
Signed-off-by: Prasad Chandrasekaran <prasadc@vmware.com>
2023-06-13 23:28:47 +05:30
2b81483103 Adding test for version update function used in 3.6
Signed-off-by: Geeta Gharpure <geetagh@amazon.com>
2023-06-13 17:38:04 +00:00
06350aba43 Update downgrade test to use snapshot
Signed-off-by: Geeta Gharpure <geetagh@amazon.com>
2023-06-13 17:23:49 +00:00
7444985cab Merge pull request #16062 from etcd-io/dependabot/github_actions/actions/checkout-3.5.3
build(deps): bump actions/checkout from 3.5.2 to 3.5.3
2023-06-13 05:52:27 +08:00
74bb688ece Merge pull request #16061 from etcd-io/dependabot/github_actions/golangci/golangci-lint-action-3.6.0
build(deps): bump golangci/golangci-lint-action from 3.5.0 to 3.6.0
2023-06-13 05:52:14 +08:00
cdff0b3a31 build(deps): bump actions/checkout from 3.5.2 to 3.5.3
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.2 to 3.5.3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](8e5e7e5ab8...c85c95e3d7)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-12 17:59:49 +00:00
09921806af build(deps): bump golangci/golangci-lint-action from 3.5.0 to 3.6.0
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.5.0 to 3.6.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](5f1fec7010...639cd343e1)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-12 17:59:42 +00:00
a6ab774458 Merge pull request #16044 from serathius/robusness-empty
tests/robustness: Assume starting from empty etcd instead of throwing out first failed request
2023-06-12 10:18:34 +02:00
b366cda70f Merge pull request #16046 from serathius/robusness-test-diff
tests/robustness: Provide a response diff in model test to make debugging easier
2023-06-12 10:15:43 +02:00
c104a4d01b Merge pull request #16031 from kkkkun/add_experimental_hash_check_to_help
add experimental-compact-hash-check-enabled to help
2023-06-12 16:03:30 +08:00
20c4247d2c Merge pull request #16037 from chaochn47/uds_e2e_test
add uds test cases into e2e TestAuthority
2023-06-12 14:45:59 +08:00
03c9e71b49 update 3.4 and 3.5 changelogs
Signed-off-by: kkkkun <scuzk373x@gmail.com>
2023-06-12 09:52:56 +08:00
61736c329d Merge pull request #16045 from serathius/robusness-test-name
tests/robustness: Put traffic type on second place before cluster size in test name
2023-06-10 14:30:47 +02:00
00b4156080 Merge pull request #16043 from serathius/go-version
.github/workflows: Read .go-version as a step and not separate workflow
2023-06-10 02:40:48 +02:00
693f25d6b9 Merge pull request #16042 from serathius/epc-etcdctl
tests/e2e: Use epc.Etcdctl
2023-06-10 06:54:24 +08:00
a6f51651ca Merge pull request #16040 from shivanshu1333/etcd/issues/15778
Remove Procfile.v2 and Procfile.learner
2023-06-10 06:45:28 +08:00
f410c6e6df tests/robustness: Provide a response diff in model test to make debugging easier
Signed-off-by: Marek Siarkowicz <serathius@users.noreply.github.com>
2023-06-09 22:42:17 +02:00
53af854871 tests/robustness: Assume starting from empty etcd instead of throwing out first failed request
Signed-off-by: Marek Siarkowicz <serathius@users.noreply.github.com>
2023-06-09 22:38:16 +02:00
f91f6d8414 tests/robustness: Put traffic type on second place before cluster size in test name
Signed-off-by: Marek Siarkowicz <serathius@users.noreply.github.com>
2023-06-09 22:30:53 +02:00
eb56d86e40 .github/workflows: Read .go-version as a step and not separate workflow
Signed-off-by: Marek Siarkowicz <serathius@users.noreply.github.com>
2023-06-09 20:54:46 +02:00
b80fb0a1ce tests/e2e: Use epc.Etcdctl
Signed-off-by: Marek Siarkowicz <serathius@users.noreply.github.com>
2023-06-09 20:39:57 +02:00
dffc35e421 remove Procfile.v2 and Procfile.learner
Signed-off-by: shivanshu1333 <shivanshu1333@gmail.com>
2023-06-09 18:37:09 +05:30
e6c8bf82e0 add uds test cases into e2e TestAuthority
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-06-08 15:54:30 -07:00
a708bed336 Merge pull request #15998 from jmhbnz/document-infra-access
Documenting etcd infrastructure and establish basic controls
2023-06-08 11:07:21 +02:00
798d2b7923 add compact hash check to help
Signed-off-by: scuzk373x@gmai.com <zhuanwajiang@pinduoduo.com>
2023-06-08 14:29:57 +08:00
75229f7e39 Merge pull request #16027 from daljitdokal/main
Update the go version to 1.19.10 patch release
2023-06-08 10:11:45 +08:00
6c5fde5138 Merge pull request #15985 from CaojiamingAlan/check_revision_before_write_hash
Check ScheduledCompactKeyName and FinishedCompactKeyName before writing hash
2023-06-08 10:10:45 +08:00
b9e30bf878 etcdserver: add e2e test to reproduce the incorrect hash issue when resuming scheduled compaction.
check ScheduledCompactKeyName and FinishedCompactKeyName
before writing hash to hashstore. If they do not match, then it means this compaction has once been interrupted and its hash value is invalid. In such cases, we won't write the hash values to the hashstore, and avoids the incorrect corruption alarm.

Signed-off-by: caojiamingalan <alan.c.19971111@gmail.com>
2023-06-07 19:54:09 -05:00
caee53237e Merge pull request #16023 from chaochn47/20230605-dependabot-dependency-mngt
2023-06-06: bump up dependencies update identified by dependabot
2023-06-07 12:48:42 +08:00
b2c39fc8e6 2023-06-06: bump up dependencies update identified by dependabot
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-06-06 20:18:44 -07:00
dcc4c1efb0 Update the go version to 1.19.10 patch release.
Signed-off-by: Daljit Singh <daljit.dokal@yahoo.co.nz>
2023-06-07 14:02:18 +12:00
faf5945603 Merge pull request #16022 from tao12345666333/clean-root-dir
ci: move .golangci.yaml to tools dir
2023-06-07 09:06:14 +08:00
3d40ee69bb Begin documenting etcd infrastructure.
This commit introduces initial processes for managing access and support options.

Signed-off-by: James Blair <mail@jamesblair.net>
2023-06-07 09:50:53 +12:00
0f32b588be ci: move .golangci.yaml to tools dir
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
2023-06-06 19:08:31 +08:00
dfbe2038f3 Early exit auth check on lease puts
Mitigates #15993 by not checking each key individually for permission
when auth is entirely disabled or admin user is calling the method.

Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
2023-06-06 10:23:46 +02:00
d3e43d4de6 Merge pull request #16015 from etcd-io/dependabot/github_actions/github/codeql-action-2.3.6
build(deps): bump github/codeql-action from 2.3.5 to 2.3.6
2023-06-06 08:23:40 +08:00
fe24da8c67 Merge pull request #16014 from etcd-io/dependabot/github_actions/golangci/golangci-lint-action-3.5.0
build(deps): bump golangci/golangci-lint-action from 3.4.0 to 3.5.0
2023-06-06 07:59:29 +08:00
64b11ef8b0 build(deps): bump github/codeql-action from 2.3.5 to 2.3.6
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.3.5 to 2.3.6.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](0225834cc5...83f0fe6c49)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-05 17:59:38 +00:00
caf9a0dadd build(deps): bump golangci/golangci-lint-action from 3.4.0 to 3.5.0
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.4.0 to 3.5.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](08e2f20817...5f1fec7010)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-05 17:59:34 +00:00
cdbc2c1f5d Merge pull request #16003 from jmhbnz/main
Promote etcd frequently asked questions in our bug report template and readme
2023-06-05 18:17:25 +08:00
4a2fdb8ba8 Promote faqs in README.md.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-06-05 21:32:28 +12:00
41b5e21748 Add a checklist for reporting bugs, include faq link.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-06-05 21:32:03 +12:00
337164ba4a Merge pull request #16004 from Azanul/main
Clean golang test cache for remaining ci workflows
2023-06-05 10:33:47 +02:00
8cb3fab8d9 Merge pull request #15966 from tao12345666333/yamlfmt
ci: add fix-yamllint rule in Makefile
2023-06-05 08:30:56 +08:00
b46dc0a1e4 Clean golang test cache
Signed-off-by: Azanul <azanulhaque@gmail.com>
2023-06-05 05:49:03 +05:30
3b7e1223ab Fix errors in README.md reported by markdownlint.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-06-04 22:39:48 +12:00
8da2a5bf46 Merge pull request #15946 from ahrtr/dependency_rotato_20230524
Add the rotation worksheet into the dependency management document
2023-06-03 05:28:05 +08:00
004195bb6e Merge pull request #15997 from ahrtr/etcdctl_hashkv_20230602
etcdctl: update the description for flag '--rev'
2023-06-02 16:21:29 +08:00
a9864d4edb etcdctl: update the description for flag '--rev'
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-06-02 15:53:08 +08:00
53b23d32db Merge pull request #15989 from jmhbnz/disable-arm64-ci-cache
Clean golang cache for arm64 ci workflows
2023-06-02 05:48:18 +08:00
41446dbad9 Clean golang test cache before each arm64 ci test suite.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-06-01 20:30:48 +12:00
5773d94c22 Merge pull request #15957 from jmhbnz/strengthen-support-policy
Strengthen etcd support policy in issue triage docs
2023-06-01 09:05:55 +02:00
8f887d3a79 ci: add fix-yamllint rule in Makefile
Two rules have been specified for yamlfmt here:
* Automatically add the header `---` to YAML files.
* Preserve line breaks.

ref:
https://github.com/google/yamlfmt/blob/main/docs/config-file.md#configuration-1

Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
Co-authored-by: Marek Siarkowicz <siarkowicz@google.com>
2023-06-01 09:06:36 +08:00
0073fd4225 Merge pull request #15984 from spzala/rolesdescription
Update roles reference
2023-05-30 18:11:17 -04:00
ea47d5bec7 Update roles reference
We have moved the roles description from Governance file.

Signed-off-by: Sahdev Zala <spzala@us.ibm.com>
2023-05-30 17:34:18 -04:00
b1df8c468f Merge pull request #15981 from fuweid/20230530-bump-deps
[20230530] Bump dependencies identified by dependabot
2023-05-30 13:38:51 +08:00
98ebb67777 Merge pull request #15980 from etcd-io/dependabot/github_actions/arduino/setup-protoc-1.3.0
build(deps): bump arduino/setup-protoc from 1.2.0 to 1.3.0
2023-05-30 13:37:05 +08:00
59b8522687 dependency: bump github.com/mikefarah/yq/v4 from 4.33.3 to 4.34.1 in /tools/mod
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-05-30 11:40:15 +08:00
42e2c9d4c9 build(deps): bump arduino/setup-protoc from 1.2.0 to 1.3.0
Bumps [arduino/setup-protoc](https://github.com/arduino/setup-protoc) from 1.2.0 to 1.3.0.
- [Release notes](https://github.com/arduino/setup-protoc/releases)
- [Commits](4b3578161e...149f6c87b9)

---
updated-dependencies:
- dependency-name: arduino/setup-protoc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-29 18:00:17 +00:00
bd5d0a5bbb Merge pull request #15970 from etcd-io/dependabot/github_actions/github/codeql-action-2.3.5
build(deps): bump github/codeql-action from 2.3.3 to 2.3.5
2023-05-29 17:44:51 +08:00
904e5072d6 build(deps): bump github/codeql-action from 2.3.3 to 2.3.5
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.3.3 to 2.3.5.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](29b1f65c5e...0225834cc5)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-29 06:13:22 +00:00
8b5ec05ede Merge pull request #15960 from tao12345666333/add-yamllint
ci: Introduce yamllint for actions workflow files
2023-05-29 08:12:56 +02:00
ef9b6a6280 Strengthen etcd support policy.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-05-28 10:16:56 +12:00
7cc98e6392 Merge pull request #15959 from serathius/robustness-watch-client
tests/robustness: Use traffic.RecordingClient in watch
2023-05-26 17:45:57 +02:00
dd961320fe update changelog for #15939
Signed-off-by: Hubert Zhang <hubert.zyk@gmail.com>
2023-05-26 10:19:47 +00:00
b0b922cd71 ci: Introduce yamllint for actions workflow files
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
2023-05-26 16:34:23 +08:00
bf903e5007 Merge pull request #15927 from jmhbnz/run-arm64-in-container
Run arm64 tests in containers on self hosted runners
2023-05-26 09:42:40 +08:00
3413f2e08d Merge pull request #15908 from cuishuang/main
*: use strings.Builder instead of bytes.Buffer
2023-05-26 09:41:01 +08:00
16bf0f6641 tests/robustness: Use traffic.RecordingClient in watch
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-05-25 22:17:23 +02:00
09b8673200 Merge pull request #15911 from mitake/onboarding
Documentation: describe onboarding process
2023-05-25 23:15:59 +09:00
08a4cd46fe Documentation: describe onboarding process
Signed-off-by: Hitoshi Mitake <h.mitake@gmail.com>
Co-authored-by: Marek Siarkowicz <siarkowicz@google.com>
2023-05-25 22:43:36 +09:00
e11dee6498 Merge pull request #15948 from fuweid/support-limit-for-range-benchmark
tools/benchmark: support limit flag for range
2023-05-25 18:45:05 +08:00
cdd9846b56 Merge pull request #15947 from chaochn47/hash_doc
update code comments
2023-05-25 18:44:49 +08:00
82fc4258a7 Merge pull request #15950 from lavacat/main-deps
[2023-05-25] Bump dependencies identified by dependabot
2023-05-25 18:44:18 +08:00
b365f3cda4 tools/benchmark: support limit flag for range
With limit flag, we can verify the performance for the pagination.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-05-25 15:26:25 +08:00
ef91e8ae78 dependency: bump github.com/stretchr/testify from 1.8.2 to 1.8.3
Signed-off-by: Bogdan Kanivets <bkanivets@apple.com>
2023-05-24 23:58:13 -07:00
4418e793a0 dependency: bump github.com/mgechev/revive from 1.3.1 to 1.3.2 in /tools/mod
Signed-off-by: Bogdan Kanivets <bkanivets@apple.com>
2023-05-24 23:32:05 -07:00
9e1e378e9e update code comments
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-05-24 12:54:27 -07:00
24b3ae9a17 add the rotation worksheet into the dependency management document
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-05-24 19:55:30 +08:00
04346e870f Merge pull request #15909 from serathius/robustness-unique-revision
tests/robustness: Expect revisions to be unique for Kubernetes Traffic
2023-05-24 09:20:17 +02:00
67c272e8ba Merge pull request #15942 from cenkalti/plot
benchmarks: pin dependencies of rw-heatmaps
2023-05-24 05:22:52 +08:00
a4f8f56496 Merge pull request #15938 from jmhbnz/clarify-initial-cluster
Add example format for initial-cluster in configuration file
2023-05-24 05:17:22 +08:00
2efecd1978 benchmarks: pin dependencies of rw-heatmaps
Signed-off-by: Cenk Alti <cenkalti@gmail.com>
2023-05-23 14:25:46 -04:00
4872b679a5 tests/robustness: Expect revions to be unique for Kubernetes Traffic
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-05-23 15:51:10 +02:00
b2ee9887d1 Add example format for initial-cluster.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-05-23 21:15:38 +12:00
a0063d76e7 Run arm64 robustness tests in a container.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-05-23 20:18:40 +12:00
4153ecb93b Run arm64 e2e tests in a container.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-05-23 20:18:32 +12:00
bdfa70d02b Run arm64 unit and integration tests in a container.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-05-23 20:18:14 +12:00
8c715f8a40 Merge pull request #15937 from etcd-io/dependabot/github_actions/arduino/setup-protoc-1.2.0
build(deps): bump arduino/setup-protoc from 1.1.2 to 1.2.0
2023-05-23 08:15:06 +08:00
820bcddc6d build(deps): bump arduino/setup-protoc from 1.1.2 to 1.2.0
Bumps [arduino/setup-protoc](https://github.com/arduino/setup-protoc) from 1.1.2 to 1.2.0.
- [Release notes](https://github.com/arduino/setup-protoc/releases)
- [Commits](64c0c85d18...4b3578161e)

---
updated-dependencies:
- dependency-name: arduino/setup-protoc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-22 18:00:38 +00:00
1eb1b6ca69 Merge pull request #15906 from qsyqian/main
clientv3: refactor snapshot SaveWithVersion
2023-05-22 09:56:04 +08:00
fbc34d1222 clientv3: refactor snapshot SaveWithVersion
Signed-off-by: qsyqian <qsyqian@gmail.com>
2023-05-22 09:09:02 +08:00
633e2dcc26 Merge pull request #15920 from fuweid/deflaky-TestKVDelete
tests: deflake TestKVDelete/ClientAutoTLS
2023-05-19 18:06:51 +02:00
befb283cca tests: deflake TestKVDelete/ClientAutoTLS
For the sub test TestKVDelete/ClientAutoTLS, the timeout might be caused
by IO or task scheduled. It's really hard to reproduce this case. And
we don't add `VERBOSE=1` for e2e test, the pipeline doesn't show the
`EXPECT_DEBUG` log in time. It's also hard to debug when flaky case
show. So, this patch will enable `VERBOSE=1` to get timestamp in time.

And the one operation `del a c -w json` will be performed after two seconds
delay, we can increase the timeout from 15s to 30s just in case that the
put or del operations take more time in unstable env.

```
Warning: Keys between "a" and "c" will be deleted. Please interrupt the
command within next 2 seconds to cancel.
```

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-05-19 18:22:18 +08:00
51a26f8d58 Merge pull request #15926 from yellowzf/change_log_update
update changelog for https://github.com/etcd-io/etcd/pull/15907
2023-05-19 17:54:34 +08:00
523a961453 update changelog for https://github.com/etcd-io/etcd/pull/15907
Signed-off-by: yellowzf <zzhf3311@163.com>
2023-05-19 17:20:49 +08:00
0c919dc212 use the more efficient strings.Builder
Signed-off-by: cui fliter <imcusg@gmail.com>
2023-05-19 10:44:58 +08:00
19ec574f45 Merge pull request #15915 from hexfusion/bytes
server/storage/schema: prefer equal to compare for equality comparisons
2023-05-18 10:53:42 +08:00
7e161d5664 Merge pull request #15912 from serathius/maintainer-email
Update maintainers emails
2023-05-17 08:47:03 +02:00
a708e94749 server/storage/schema: prefer equal to compare for equality comparisons
Signed-off-by: Sam Batschelet <sbatschelet@gmail.com>
2023-05-16 21:25:34 -04:00
75b09410e5 Update maintainers emails
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-05-16 16:53:35 +02:00
f3c9db9c46 Merge pull request #15893 from serathius/robustness-validate-client-watch
tests/robustness: Validate all etcd watches opened to etcd
2023-05-16 10:51:55 +02:00
efcbd95f71 Merge pull request #15889 from serathius/robustness-model-test
tests/robustness: Unify model test cases
2023-05-16 10:41:05 +02:00
6429f47631 tests/robustness: Validate all etcd watches opened to etcd
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-05-16 10:28:01 +02:00
112aad1ea7 tests/robustness: Unify model test cases
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-05-16 10:13:08 +02:00
9b10f20004 Merge pull request #15904 from jmhbnz/update-dependencies
[2023-05-16] Bump dependencies identified by dependabot
2023-05-16 06:32:51 +08:00
9683b7912a Merge pull request #15899 from etcd-io/dependabot/github_actions/actions/setup-go-4.0.1
build(deps): bump actions/setup-go from 4.0.0 to 4.0.1
2023-05-16 06:30:10 +08:00
5a5b5a1c5d dependency: bump github.com/prometheus/client_golang from 1.15.0 to 1.15.1
Signed-off-by: James Blair <mail@jamesblair.net>
2023-05-16 09:26:44 +12:00
1798730cd8 dependency: bump golang.org/x/crypto from 0.8.0 to 0.9.0
Signed-off-by: James Blair <mail@jamesblair.net>
2023-05-16 08:39:19 +12:00
29f9d06527 build(deps): bump actions/setup-go from 4.0.0 to 4.0.1
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](4d34df0c23...fac708d667)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-15 18:00:00 +00:00
4675e5c6a3 Merge pull request #15888 from serathius/robustness-k8s-client
tests/robustness: Implement Kubernetes optimistic concurrency operations
2023-05-15 14:49:33 +02:00
6e53792568 tests/robustness: Implement Kubernetes optimistic concurrency operations
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-05-15 13:45:27 +02:00
0efa1c19ef Merge pull request #15891 from serathius/robustness-k8s-watch
tests/robustness: Implement kubernetes list watch protocol
2023-05-15 10:35:34 +02:00
911c40a347 tests/robustness: Implement kubernetes list watch protocol
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-05-15 10:11:05 +02:00
05ed91d76d Merge pull request #15892 from lavacat/main-mono-clock-watch
tests/robustness: use monotonic clock for watch events
2023-05-15 09:25:41 +02:00
2df32102ca Merge pull request #15835 from yellowzf/grpcproxy_fix_memberlist_results_not_update_when_proxy_node_down
grpcproxy: fix memberlist results not update when proxy node down
2023-05-15 13:34:05 +08:00
ca221208d2 grpcproxy: fix memberlist results not update when proxy node down
If start grpc proxy with --resolver-prefix, memberlist will return all alive proxy nodes, when one grpc proxy node is down, it is expected to not return the down node, but it is still return

Signed-off-by: yellowzf <zzhf3311@163.com>
2023-05-15 10:59:02 +08:00
c338882d7a tests/robustness: use monotonic clock for watch events
see: https://github.com/etcd-io/etcd/pull/15323
For consistency watch events should also use only time-measurement operations.

fixes: https://github.com/etcd-io/etcd/issues/15328
Signed-off-by: Bogdan Kanivets <bkanivets@apple.com>
2023-05-14 12:58:13 -07:00
14f21a124e Merge pull request #15886 from jmhbnz/robustness-arm64
Run robustness tests on arm64
2023-05-13 11:16:59 +02:00
012b429f14 Only run robustness on arm64 nightly.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-05-13 19:28:28 +12:00
ffbaac8305 Merge pull request #15887 from ahrtr/limit_workflow_readonly_20230513
workflow: grant only read permission to all workflows
2023-05-13 09:06:06 +02:00
52dfd4bbed Merge pull request #15867 from chaochn47/auth_test_split_8
migrate e2e auth tests to common #8
2023-05-13 14:21:37 +08:00
2bf495d93b workflow: grant only read permission to all workflows
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-05-13 13:53:22 +08:00
c846b087db migrate e2e auth tests to common #8
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-05-12 22:51:47 -07:00
2fd86a12a9 Merge pull request #15881 from jmhbnz/update-triage-guidelines
Initial re-write for contributor issue triage guide
2023-05-13 13:41:36 +08:00
941d760e42 Initial re-write for contributor issue triage guide.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-05-13 13:14:00 +12:00
ffe41987f9 Add self-hosted label to existing arm64 tests.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-05-13 08:12:23 +12:00
09ae3a641c Run robustness tests on arm64.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-05-13 08:11:53 +12:00
2a0c989662 Merge pull request #15882 from serathius/robustness-txn-fields
tests/robustness: Improve naming of Txn fields
2023-05-12 13:34:02 +02:00
3d9890ff0e Merge pull request #15883 from ahrtr/3.4.26_release_date_20230512
Changelog: update the release date of 3.4.26 and 3.5.9
2023-05-12 13:12:14 +02:00
831ce4c3cf tests/robustness: Improve naming of Txn fields
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-05-12 13:10:25 +02:00
d0ca536283 changelog: update the release date of 3.4.26 and 3.5.9
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-05-12 14:57:08 +08:00
67ec1a4d30 Merge pull request #15862 from pchan/bump_dependency
dependency: bump dependabot dependencies
2023-05-12 06:59:47 +08:00
fa7067d0d8 Merge pull request #15880 from serathius/robustness-stream-id
tests/robustness: Separate stream id from client id and improve AppendableHistory doc
2023-05-12 06:35:05 +08:00
e9900f6fff tests/robustness: Separate stream id from client id and improve AppendableHistory doc
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-05-11 21:03:52 +02:00
db07ec9561 dependency: bump indirect zmap dependencies
Signed-off-by: Prasad Chandrasekaran <prasadc@vmware.com>
2023-05-11 18:06:39 +05:30
9878b134eb dependency: bump indirect dependencies
Signed-off-by: Prasad Chandrasekaran <prasadc@vmware.com>
2023-05-11 18:00:12 +05:30
9a922091ed Merge pull request #15873 from serathius/robustness-safeguards
tests/robustness: Add safeguards to client and history
2023-05-11 13:37:42 +02:00
962e15038e tests/robustness: Add safeguards to client and history
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-05-11 13:12:09 +02:00
d77c618e6a Merge pull request #15874 from serathius/robustness-fix-traffic-pointer
tests/robustness: Fix pointer causing all cluster tests using kuberne…
2023-05-11 11:16:21 +02:00
05b663fbe8 Merge pull request #15828 from chaochn47/add_leadership_transfer_coverage
tests/e2e: add graceful shutdown test
2023-05-11 07:39:25 +08:00
e3db9dc616 Merge pull request #15868 from jmhbnz/main
tests: Deflake TestEtcdGrpcResolverRoundRobin
2023-05-11 05:08:53 +08:00
165a76b506 tests/robustness: Fix pointer causing all cluster tests using kubernetes traffic
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-05-10 16:08:08 +02:00
5d1130f8d8 Merge pull request #15870 from ahrtr/changelog_timetolive_20230510
changelog: add items to cover the fix that LeaseTimeToLive API may re…
2023-05-10 19:58:29 +08:00
1c455d4993 changelog: add items to cover the fix that LeaseTimeToLive API may return keys to clients which have no read permission on the keys
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-05-10 19:25:28 +08:00
2bb9930ffa Merge pull request #15869 from serathius/robustness-watch-config
tests/robustness: Move request progress field from traffic to watch c…
2023-05-10 13:05:04 +02:00
dd248518d1 tests/robustness: Move request progress field from traffic to watch config and pass testScenario to reduce number of arguments
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-05-10 11:43:02 +02:00
3f5ad36039 Deflake TestEtcdGrpcResolverRoundRobin.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-05-10 21:03:01 +12:00
7f6d0d04ac Merge pull request #15839 from Rajalakshmi-Girish/keep_going_module_testing2
Add an option to keep_going with run for modules on failure
2023-05-10 08:14:37 +08:00
f31d0eafb9 tests/e2e: add graceful shutdown test
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-05-09 17:08:53 -07:00
b404d25d84 Merge pull request #15741 from AngstyDuck/set-default-value-for-AutoCompactionMode
server: default value for config file field auto-compaction-mode is n…
2023-05-10 05:44:16 +08:00
a7344da7d3 server: default value for config file field auto-compaction-mode is now 'periodic'; added additional checks if auto-compaction-mode is undefined
Signed-off-by: AngstyDuck <solsticedante@gmail.com>
2023-05-09 23:10:44 +08:00
d81d3c3487 Merge pull request #15845 from serathius/robustness-traffic
test/robustness: Create dedicated traffic package
2023-05-09 15:38:28 +02:00
c863f1f8c0 dependency: bump dependabot dependencies
Signed-off-by: Prasad Chandrasekaran <prasadc@vmware.com>
2023-05-09 18:38:35 +05:30
1e479f8c3c Merge pull request #15859 from serathius/go-version
Move go version to dedicated .go-version file
2023-05-09 14:54:45 +02:00
aa373e54df Move go version to dedicated .go-version file
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-05-09 12:32:25 +02:00
ad20230e07 test/robustness: Create dedicated traffic package
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-05-09 10:50:13 +02:00
f6161673af Merge pull request #15851 from serathius/robustness-generic
tests/robustness: Make weighted pick random generic
2023-05-09 10:36:11 +02:00
b7ad0382ad Merge pull request #15844 from mitake/style
server/etcdserver: swap order of return types
2023-05-09 06:34:34 +08:00
3024d9461d Merge pull request #15842 from qsyqian/main
log time when open backend db took too long
2023-05-09 06:06:21 +08:00
b14b468661 tests/robustness: Make weighted pick random generic
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-05-08 19:58:38 +02:00
a0cffb6a1f server/etcdserver: swap order of return types
Signed-off-by: Hitoshi Mitake <h.mitake@gmail.com>
2023-05-08 22:53:04 +09:00
0cd1b7beaa log time when open backend db took too long
Signed-off-by: qsyqian <qsyqian@gmail.com>
2023-05-08 15:23:29 +08:00
0a7dd2186b Merge pull request #15841 from jmhbnz/update-changelog
Update 3.4 and 3.5 changelogs for compile with 1.19.9.
2023-05-08 07:50:37 +08:00
bb057ddae6 Update 3.4 and 3.5 changelogs for compile with 1.19.9.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-05-08 10:58:02 +12:00
767b59f0b0 Merge pull request #15840 from serathius/robustness-limit-count
tests/robustness: Implement Range limit and count
2023-05-07 19:59:27 +02:00
ac61b36e06 Add an option to keep_going with run for modules on failure
Signed-off-by: Rajalakshmi Girish <rajalakshmi.girish1@ibm.com>
2023-05-07 00:43:30 -07:00
7c68be4cf3 tests/robustness: Implement Range limit and count
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-05-07 09:32:07 +02:00
249c0d71d4 Merge pull request #15827 from serathius/robustness-k8s-2
tests/robustness: Implement delete request for kubernetes scenario
2023-05-05 17:40:47 +02:00
40f71ef3c6 tests/robustness: Implement delete request for kubernetes scenario
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-05-05 13:40:46 +02:00
79eabc1cbf Merge pull request #15819 from serathius/robustness-non-deterministic
tests/robustness: Split model code into deterministic and non-deterministic
2023-05-05 13:16:28 +02:00
92366a5338 tests/robustness: Split model code into deterministic and non-deterministic
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
Co-authored-by: Benjamin Wang <wachao@vmware.com>
Co-authored-by: chao <54131596+chaochn47@users.noreply.github.com>
2023-05-05 12:25:10 +02:00
08d25b2e3e Merge pull request #15830 from etcd-io/dependabot/github_actions/actions/upload-artifact-3
build(deps): bump actions/upload-artifact from 2 to 3
2023-05-05 08:53:56 +08:00
8a17ed10bd Merge pull request #15831 from etcd-io/dependabot/github_actions/github/codeql-action-2.3.3
build(deps): bump github/codeql-action from 2.3.2 to 2.3.3
2023-05-05 08:53:42 +08:00
d10cabd3f9 build(deps): bump github/codeql-action from 2.3.2 to 2.3.3
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.3.2 to 2.3.3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](f3feb00acb...29b1f65c5e)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-04 23:47:44 +00:00
58ec96a6ce build(deps): bump actions/upload-artifact from 2 to 3
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2 to 3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v2...0b7f8abb1508181956e8e162db84b466c27e18ce)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-04 23:47:40 +00:00
b75499437b Merge pull request #15829 from chaochn47/remove_invalid_arm64_workflow_config
remove invalid arm64 workflow config
2023-05-05 07:47:17 +08:00
e9b1a0e70f remove invalid arm64 workflow config
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-05-04 15:33:31 -07:00
cfe154209c tests/robustness: Separate describe model functions to dedicated file
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-05-04 14:03:18 +02:00
2c16812841 Merge pull request #15817 from serathius/robustness-k8s-1
tests/robustness: Implement first step in validating the Kubernetes-etcd contract
2023-05-04 13:52:25 +02:00
9b5680c5f1 tests/robustness: Implement first step in validating the Kubernetes-etcd contract.
* Use mod revision for optimistic concurrency.
* Introduce range requests as more general then get
* Add kubernetes specific traffic generation, for now using pull, but
  expected to evolve to use watch.
* Introduce kubernetes specific test scenario

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-05-04 13:26:54 +02:00
ecb64030fb Merge pull request #15821 from jmhbnz/upgrade-go-patch-release
Updated go to latest patch release 1.19.9
2023-05-04 07:56:42 +08:00
b84e4273f7 Updated go to latest patch release 1.19.9.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-05-04 11:00:08 +12:00
3ef5985bcd Merge pull request #15813 from Rajalakshmi-Girish/continue-on-failure
keep going with other test suite runs when failure with one
2023-05-04 05:54:05 +08:00
c9998a7e63 keep_going with other suites when failure with one
Signed-off-by: Rajalakshmi Girish <rajalakshmi.girish1@ibm.com>
2023-05-03 00:57:49 -07:00
5021cd924c Merge pull request #15816 from chaochn47/update_dependency_management
dependency_management.md: document go.opentelemetry.io/otel version update is blocked
2023-05-03 12:27:05 +08:00
bb060586ce dependency_management.md: document go.opentelemetry.io/otel version update is blocked
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-05-02 20:40:06 -07:00
49b59cc8e5 Merge pull request #15656 from mitake/lease-timetolive-auth
protect LeaseTimeToLive with RBAC
2023-05-02 23:02:29 +09:00
4785f5a7ba Merge pull request #15809 from etcd-io/dependabot/github_actions/github/codeql-action-2.3.2
build(deps): bump github/codeql-action from 2.3.0 to 2.3.2
2023-05-02 06:39:40 +08:00
b089474b01 Merge pull request #15795 from jmhbnz/deflake-roundrobin-resolver-test
tests: Deflake TestEtcdGrpcResolverRoundRobin
2023-05-02 06:09:46 +08:00
4c4bd63fa1 build(deps): bump github/codeql-action from 2.3.0 to 2.3.2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.3.0 to 2.3.2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](b2c19fb9a2...f3feb00acb)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-01 18:03:06 +00:00
0deaec0e4f Merge pull request #15762 from aimuz/fix-logger
refactor(util): remove duplicate lg check
2023-04-30 05:52:11 +08:00
7462c61b31 Merge pull request #15792 from fuweid/deflake-robustness-cases
tests/robustness: tune timeout policy
2023-04-29 09:04:38 +02:00
b9533ca98b Deflake TestEtcdGrpcResolverRoundRobin.
Increase request to 1000 to increase sample size/reduce variability and increase tolerance threshold from 10 to 15%.

Signed-off-by: James Blair <mail@jamesblair.net>
2023-04-29 14:14:16 +12:00
09d053e035 tests/robustness: tune timeout policy
In a [scheduled test][1], the error shows

```
2023-04-19T11:16:15.8166316Z     traffic.go:96: rpc error: code = Unavailable desc = keepalive ping failed to receive ACK within timeout
```

According to [grpc-keepalive@v1.51.0][2], each frame from server will
fresh the `lastRead` and it won't file `Ping` frame to server. But the
client used by [`tombstone` request][3] might hit the race. Since we use
5ms as timeout, the client might not receive the result of `Ping` from
server in time. The keepalive will mark it timeout and close the
connection.

I didn't reproduce it in my local. If we add the sleep before update
`lastRead`, it can reproduce it sometimes. Still investigating this
part.

```diff
diff --git a/internal/transport/http2_client.go b/internal/transport/http2_client.go
index d518b07e..bee9c00a 100644
--- a/internal/transport/http2_client.go
+++ b/internal/transport/http2_client.go
@@ -1560,6 +1560,7 @@ func (t *http2Client) reader(errCh chan<- error) {
                t.controlBuf.throttle()
                frame, err := t.framer.fr.ReadFrame()
                if t.keepaliveEnabled {
+                       time.Sleep(2 * time.Millisecond)
                        atomic.StoreInt64(&t.lastRead, time.Now().UnixNano())
                }
                if err != nil {
```

`DialKeepAliveTime` is always >= [10s][4]. I think we should increase
the timeout to avoid flaky caused by unstable env.

And in a [scheduled test][5], the error shows

```
logger.go:130: 2023-04-22T10:45:52.646Z	INFO	Failed to trigger failpoint	{"failpoint": "blackhole", "error": "context deadline exceeded"}
```

Before sending `Status` to member, the client doesn't [pick][6] the
connection in time (100ms) and returns the error.

The `waitTillSnapshot` is used to ensure that it is good enough to
trigger snapshot transfer. And we have 1min timeout for
injectFailpoints, so I think we can remove the 100ms timeout to reduce
unnecessary stop.

```
injectFailpoints(1min timeout)
  failpoint.Inject
    triggerBlockhole.Trigger
      blackhole
        waitTillSnapshot
```

> NOTE: I didn't reproduce it either. :(

Reference:

[1]: <https://github.com/etcd-io/etcd/actions/runs/4741737098/jobs/8419176899>
[2]: <eeb9afa1f6/internal/transport/http2_client.go (L1647)>
[3]: <7450cd886d/tests/robustness/traffic.go (L94)>
[4]: <eeb9afa1f6/dialoptions.go (L445)>
[5]: <https://github.com/etcd-io/etcd/actions/runs/4772033408/jobs/8484334015>
[6]: <eeb9afa1f6/clientconn.go (L932)>

REF: #15763

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-04-29 07:03:47 +08:00
46ab121cb7 Merge pull request #15786 from etcd-io/serathius-patch-1
Provide release date for v3.5.8
2023-04-28 15:21:53 +02:00
7e2e5c68de Provide release data for v3.5.8
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-04-28 15:21:06 +02:00
b052092297 refactor(util): remove duplicate lg check
lg always has a value

Signed-off-by: aimuz <mr.imuz@gmail.com>
2023-04-28 10:43:30 +08:00
7450cd886d Merge pull request #15790 from Rajalakshmi-Girish/add-failfast-flag
Add -failfast flag when the mode is fail_fast
2023-04-27 21:16:38 +02:00
cd24847086 Merge pull request #15789 from ahrtr/save_data_20230427
test: forcibly save data on panicking
2023-04-27 16:23:49 +02:00
81fccc13da Add -failfast flag when the mode is fail_fast
Signed-off-by: Rajalakshmi Girish <rajalakshmi.girish1@ibm.com>
2023-04-27 05:26:38 -07:00
c7d81acaf0 test: forcibly save data on pinicking
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-04-27 14:54:35 +08:00
6d11f8ceb5 Merge pull request #15785 from Mskxn/fix_session
close the session to avoid leak goroutine
2023-04-27 04:24:17 +08:00
26fdf46001 close the session to avoid leak goroutine
Signed-off-by: Mskxn <118117161+Mskxn@users.noreply.github.com>
2023-04-26 20:45:13 +08:00
c9b368119e tests: e2e and integration test for timetolive
Signed-off-by: Hitoshi Mitake <h.mitake@gmail.com>
Co-authored-by: Benjamin Wang <wachao@vmware.com>
2023-04-26 20:35:20 +09:00
975854f07f etcdserver: protect lease timetilive with auth
Signed-off-by: Hitoshi Mitake <h.mitake@gmail.com>
Co-authored-by: Benjamin Wang <wachao@vmware.com>
2023-04-26 20:35:20 +09:00
e04120042e Merge pull request #15779 from fuweid/deprecate-schwag
chore: deprecate github.com/hexfusion/schwag
2023-04-26 11:36:31 +02:00
f13b7502ef Merge pull request #15781 from serathius/meme-readme
Incorporate xkcd dependency meme into README
2023-04-26 11:05:35 +02:00
f6822b4225 Merge pull request #15783 from jmhbnz/consolidate-dockerfiles
Consolidate etcd dockerfiles
2023-04-26 11:01:44 +02:00
ab65ee3d01 Consolidate etcd dockerfiles.
We can consolidate by using docker build args to create the individual platform Dockerfile.

Signed-off-by: James Blair <mail@jamesblair.net>
2023-04-26 17:09:25 +12:00
b4f49a55a5 chore: deprecate github.com/hexfusion/schwag
The schwag was introduced to generate swagger with authorization support
[1][1] in 2017. And in 2018, the grpc-gateway supports to render
security fields by protoc-gen-swagger [2][2]. After several years, I
think it's good to use upstream protoc supports.

NOTE:

The json's key in `rpc.swagger.json` has been reordered so that it seems
that there's a lot of changes. How to verify it:

```bash
$ # use jq -S to sort the key
$ latest_commit="https://raw.githubusercontent.com/etcd-io/etcd/228f493c7697ce3e9d3a1d831bcffad175846c75/Documentation/dev-guide/apispec/swagger/rpc.swagger.json"
$ curl -s "${latest_commit}"  | jq -S . > /tmp/old.json
$ cat Documentation/dev-guide/apispec/swagger/rpc.swagger.json | jq -S . > /tmp/new.json
$ diff --color -u /tmp/old.json /tmp/new.json
```

```diff
--- /tmp/old.json       2023-04-26 10:58:07.142311861 +0800
+++ /tmp/new.json       2023-04-26 10:58:12.170299194 +0800
@@ -1523,11 +1523,14 @@
       "type": "object"
     },
     "protobufAny": {
+      "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n    Foo foo = ...;\n    Any any;\n    any.PackFrom(foo);\n    ...\n    if (any.UnpackTo(&foo)) {\n      ...\n    }\n\nExample 2: Pack and unpack a message in Java.\n\n    Foo foo = ...;\n    Any any = Any.pack(foo);\n    ...\n    if (any.is(Foo.class)) {\n      foo = any.unpack(Foo.class);\n    }\n\n Example 3: Pack and unpack a message in Python.\n\n    foo = Foo(...)\n    any = Any()\n    any.Pack(foo)\n    ...\n    if any.Is(Foo.DESCRIPTOR):\n      any.Unpack(foo)\n      ...\n\n Example 4: Pack and unpack a message in Go\n\n     foo := &pb.Foo{...}\n     any, err := ptypes.MarshalAny(foo)\n     ...\n     foo := &pb.Foo{}\n     if err := ptypes.UnmarshalAny(any, foo); err != nil {\n       ...\n     }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n    package google.profile;\n    message Person {\n      string first_name = 1;\n      string last_name = 2;\n    }\n\n    {\n      \"@type\": \"type.googleapis.com/google.profile.Person\",\n      \"firstName\": <string>,\n      \"lastName\": <string>\n    }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n    {\n      \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n      \"value\": \"1.212s\"\n    }",
       "properties": {
         "type_url": {
+          "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n  value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n  URL, or have them precompiled into a binary to avoid any\n  lookup. Therefore, binary compatibility needs to be preserved\n  on changes to types. (Use versioned type names to manage\n  breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics.",
           "type": "string"
         },
         "value": {
+          "description": "Must be a valid serialized protocol buffer of the above specified type.",
           "format": "byte",
           "type": "string"
         }
```

REF:

1: <https://github.com/etcd-io/etcd/pull/7999#issuecomment-307512043>
2: <https://github.com/grpc-ecosystem/grpc-gateway/pull/547>

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-04-26 11:14:50 +08:00
045192683c Move credits to subscript
Co-authored-by: James Blair <mail@jamesblair.net>
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-04-25 15:33:03 +02:00
2fd9a1914e Incorporate xkcd dependency meme into README
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-04-25 14:49:50 +02:00
4485db379e Merge pull request #15577 from jmhbnz/add-round-robin-test
tests: Add new test for round robin resolver
2023-04-25 18:37:54 +08:00
9b310ea316 Merge pull request #15776 from fuweid/update-deps
[2023-04-25] Bump dependencies identified by dependabot
2023-04-25 16:37:34 +08:00
aa787d9f51 dependency: bump github.com/alexkohler/nakedret from 1.0.1 to 1.0.2
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-04-25 14:44:34 +08:00
18e3acae0e Add new test for round robin resolver.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-04-25 18:44:24 +12:00
8c5e9ad455 Merge pull request #15759 from fuweid/deflake-TestAuthMemberRemove
server/etcdserver: togRPCError for maintenance API
2023-04-25 09:26:28 +08:00
0f3fb04f1f Merge pull request #15744 from ahrtr/dependency_management_20230419
Document: add guidance on dependency management
2023-04-25 06:14:16 +08:00
1dbc9db621 Merge pull request #15772 from etcd-io/dependabot/github_actions/github/codeql-action-2.3.0
build(deps): bump github/codeql-action from 2.2.12 to 2.3.0
2023-04-25 06:12:33 +08:00
a2426712cc build(deps): bump github/codeql-action from 2.2.12 to 2.3.0
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.2.12 to 2.3.0.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](7df0ce3489...b2c19fb9a2)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-24 18:01:36 +00:00
d589a0b5f6 Document: add guidance on dependency management
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-04-24 18:29:09 +08:00
c2d78a316a Merge pull request #15761 from ahrtr/min_version_20230424
Change the minimum recommended etcd versions to run in production to 3.4.22+ and 3.5.6+
2023-04-24 10:26:35 +02:00
146f44d35e change the minimum recommended etcd versions to run in production to 3.4.22+ and 3.5.6+
Please read https://groups.google.com/g/etcd-dev/c/8S7u6NqW6C4

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-04-24 07:08:28 +08:00
211b4320c3 Merge pull request #15752 from sharathsivakumar/main
fixes for "improve description of --initial-cluster-state flag" #15743
2023-04-23 07:17:37 +08:00
32c83becf5 fix review: Updated description of --initial-cluster-state flag
Signed-off-by: sharathsivakumar <mailssr9@gmail.com>
2023-04-22 23:16:33 +02:00
1ba577e499 server/etcdserver: togRPCError for maintenance API
It's to deflake TestAuthMemberRemove.

When the client has multiple endpoints, the client might send a request
with valid token to the follower member which hasn't received token
replicated log yet. The member will reject the request.

For instance, the maintenance.Status API will return "auth: invalid auth
token". But the client doesn't identify the error. The client won't retry to
refresh auth token. The maintenance.Status should togRPCError before return
so that the client can reflesh token. It's align with existing API.

Since the maintenance client always creates one connection to target
member, the member will have the token after refresh auth.

Maybe we can introduce a sync to wait for member is ready with token,
instead of refreshing.

Fixes: #15758

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-04-22 18:35:53 +08:00
63c9fe1d00 Merge pull request #15751 from owayss/auth_store_unit_test_coverage
tests: increases unit test coverage for etcd/server/auth isRangeOpPermitted
2023-04-21 07:29:35 +08:00
4a8817bfb0 Merge pull request #15737 from jmhbnz/update-dependencies
Bump dependencies identified by dependabot
2023-04-21 06:35:08 +08:00
aad63a1efe dependency: bump github.com/mikefarah/yq/v4 from 4.33.1 to 4.33.3
Signed-off-by: James Blair <mail@jamesblair.net>
2023-04-21 05:40:03 +12:00
04f3e9cb9a dependency: bump golang.org/x/crypto from 0.7.0 to 0.8.0
Signed-off-by: James Blair <mail@jamesblair.net>
2023-04-21 05:34:21 +12:00
042e2e9a57 dependency: bump github.com/prometheus/client_golang from 1.14.0 to 1.15.0
Signed-off-by: James Blair <mail@jamesblair.net>
2023-04-21 05:14:40 +12:00
ee6fde70dc Merge pull request #15748 from judavi/15674
Adds a reusable workflow to setup the GoVersion
2023-04-20 15:34:20 +02:00
0df7c48ddd Centralizing workflow go-version variable
Signed-off-by: Juan <1766933+judavi@users.noreply.github.com>
2023-04-20 11:42:28 +00:00
1c18c86e18 tests: increases unit test coverage for etcd/server/auth isRangeOpPermitted
Signed-off-by: Owayss Kabtoul <owayssk@gmail.com>
2023-04-20 13:39:08 +02:00
0ac617059f Merge pull request #15745 from catandcoder/main
fix some comments
2023-04-20 15:07:07 +08:00
57908723f4 fix some comments
Signed-off-by: cui fliter <imcusg@gmail.com>
2023-04-20 14:26:17 +08:00
b27dec8b94 Merge pull request #15721 from vianamjr/txn-auth-unit-test
tests: cover txn.CheckTxnAuth logic with unit tests
2023-04-19 05:54:55 +08:00
9d14ae43c2 fix review: remove if on error check
Signed-off-by: Marcondes Viana <marju10@gmail.com>
2023-04-18 10:43:13 -03:00
ecc7441ba1 fix review: use assert lib
Signed-off-by: Marcondes Viana <marju10@gmail.com>
2023-04-18 10:02:03 -03:00
b526cdcbe8 Merge pull request #15718 from fuweid/followup-15667
tests: make log monitor as common helper (followup #15667
2023-04-18 07:59:19 +02:00
50aa00b203 tests: make log monitor as common helper
It's followup of #15667.

This patch is to use zaptest/observer as base to provide a similar
function to pkg/expect.Expect.

The test env

```bash
11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
mkdir /sys/fs/cgroup/etcd-followup-15667
echo 0-2 | tee /sys/fs/cgroup/etcd-followup-15667/cpuset.cpus # three cores
```

Before change:

* memory.peak: ~ 681 MiB
* Elapsed (wall clock) time (h:mm:ss or m:ss): 6:14.04

After change:

* memory.peak: ~ 671 MiB
* Elapsed (wall clock) time (h:mm:ss or m:ss): 6:13.07

Based on the test result, I think it's safe to be enabled by default.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-04-18 09:00:24 +08:00
a9c1c217a2 Merge pull request #15736 from etcd-io/dependabot/github_actions/github/codeql-action-2.2.12
build(deps): bump github/codeql-action from 2.2.11 to 2.2.12
2023-04-18 05:11:44 +08:00
4c79aecd0c Merge pull request #15735 from etcd-io/dependabot/github_actions/actions/checkout-3.5.2
build(deps): bump actions/checkout from 3.5.0 to 3.5.2
2023-04-18 05:04:46 +08:00
64c9a5c70a build(deps): bump github/codeql-action from 2.2.11 to 2.2.12
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.2.11 to 2.2.12.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](d186a2a36c...7df0ce3489)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-17 18:01:44 +00:00
b1e14c7d0a build(deps): bump actions/checkout from 3.5.0 to 3.5.2
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.0 to 3.5.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](8f4b7f8486...8e5e7e5ab8)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-17 18:01:42 +00:00
3654552fe8 fix review: move setup and vars
Signed-off-by: Marcondes Viana <marju10@gmail.com>
2023-04-17 08:19:10 -03:00
7a7e09d3a5 fix review: group calls
Signed-off-by: Marcondes Viana <marju10@gmail.com>
2023-04-16 19:59:47 -03:00
41b1d36bd9 fix review
Signed-off-by: Marcondes Viana <marju10@gmail.com>
2023-04-16 17:44:46 -03:00
a1a2f43f2f fix review
Signed-off-by: Marcondes Viana <marju10@gmail.com>
2023-04-16 17:41:59 -03:00
8fb839eac1 Update server/etcdserver/txn/txn_test.go
Signed-off-by: Marcondes Viana <marju10@gmail.com>
Co-authored-by: Marek Siarkowicz <marek.siarkowicz@protonmail.com>
2023-04-16 17:09:02 -03:00
4c63611768 tests: cover txn.CheckTxnAuth logic with unit tests
Signed-off-by: Marcondes Viana <marju10@gmail.com>
2023-04-16 13:24:12 -03:00
53b48bbd57 Merge pull request #15716 from ahrtr/3.4.25_date
change v3.4.25's release date
2023-04-14 16:33:05 +08:00
7261f6a39d Merge pull request #15713 from jmhbnz/create-membership-issue-template
Add issue template for new membership nominations.
2023-04-14 10:29:36 +02:00
8aa00159d6 Add issue template for new membership nominations.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-04-14 20:08:56 +12:00
003ae7a5a2 change v3.4.25's release date
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-04-14 15:49:20 +08:00
22f3e50ada Merge pull request #15672 from fuweid/cleanup-15514
chore: cleanup #15514 (Rewrite etcd scripts in strict mode)
2023-04-13 13:06:09 +08:00
9f034fbaa8 chore: use tools/mod to lock the cfssl cmd version
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-04-13 12:06:31 +08:00
9dc54ca32c chore: add strict mode for pkg/proxy/fixtures/gencerts.sh
REF: #15514

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-04-13 12:05:39 +08:00
dc2cf29598 chore: add strict mode to scripts/test_lib.sh
REF: #15514

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-04-13 12:05:39 +08:00
8cd5969248 chore: use strict mode for tests/*/*.sh
REF: #15514

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-04-13 12:05:39 +08:00
78d2ead804 chore: deprecate tests/manual folder
REF: #15514

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-04-13 12:05:39 +08:00
29e7971721 Merge pull request #15611 from serathius/robustness-merge-failpoints
Robustness merge failpoints
2023-04-12 16:06:30 +02:00
e48ef9ea6a tests/robustness: Disable blackholing traffic till snapshot for v3.4.X
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-04-12 14:39:57 +02:00
d19752f16a tests/robustness: Unify failpoint lists by depending on availability checking
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-04-12 14:38:30 +02:00
625d427eb5 tests/robustness: Separate triggering failpoint from injection
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-04-12 14:36:50 +02:00
932415a8d5 tests/robustness: Verify cluster configuration in failpoint availability
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-04-12 14:36:50 +02:00
817aba57c7 Merge pull request #15637 from chaochn47/reduce_e2e_test_runtime
tests/framwork/e2e/cluster.go: revert back to sequential cluster stop to reduce e2e test run time
2023-04-12 14:45:29 +08:00
941c4afb0c tests/framwork/e2e/cluster.go: revert back to sequential cluster stop to reduce e2e test run time
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-04-11 22:08:18 -07:00
6519a15db4 Merge pull request #15639 from ArkaSaha30/add-unit-test-malformed-jwt
server/auth: fix panic a malformed jwt generation and add test-cases
2023-04-11 12:19:28 +02:00
daf9d234d8 Merge pull request #15694 from ahrtr/dependency_20230411
Bump some dependencies
2023-04-11 10:55:47 +02:00
d6d4e62f60 Merge pull request #15678 from ahrtr/changelog_jwt_panic_20230410
changelog: add items to cover some fixes for 3.5.8 and 3.4.25
2023-04-11 10:51:16 +02:00
0375317166 Merge pull request #15679 from HeavenTonight/main
Fix link for maintainers role and responsibilities in README.md
2023-04-11 13:02:28 +08:00
946be6b3a5 changelog: add items to cover some fixes for 3.5.8 and 3.4.25
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-04-11 12:59:06 +08:00
dae1d70189 test: workaround the breaking change in jonboulle/clockwork
See
- https://github.com/jonboulle/clockwork/pull/55
- https://github.com/jonboulle/clockwork/blob/v0.3.0/clockwork.go#L42

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-04-11 12:01:09 +08:00
ff08625126 dedpendency: bump gotest.tools/gotestsum from 1.9.0 to 1.10.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-04-11 08:56:09 +08:00
dddd4780c2 dependency: bump github.com/spf13/cobra from 1.6.1 to 1.7.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-04-11 08:51:26 +08:00
a283eb5e03 dependency: bump golang.org/x/sys from 0.6.0 to 0.7.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-04-11 08:47:31 +08:00
eb9b15bf49 dependency: bump golang.org/x/net from 0.8.0 to 0.9.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-04-11 08:44:26 +08:00
8a27dd4db4 dependency: bump github.com/jonboulle/clockwork from 0.3.0 to 0.4.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-04-11 08:36:44 +08:00
ddcba8329a Merge pull request #15693 from jmhbnz/fix-preallocate-static-analysis
Fix gofmt for client/pkg/fileutil/preallocate.go
2023-04-11 07:05:40 +08:00
ffdd8d79a7 Fix gofmt for client/pkg/fileutil/preallocate.go.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-04-11 10:57:41 +12:00
0406ab9a29 Merge pull request #15281 from MarkintoshZ/preallocate-docs
Show darwin as supported in fileutil.Preallocate docstring
2023-04-11 06:33:08 +08:00
1683231216 Merge pull request #15667 from fuweid/deflake-issue-15545-TestV3WatchRestoreSnapshotUnsync
tests: deflake TestV3WatchRestoreSnapshotUnsync
2023-04-11 06:00:42 +08:00
536953ec6c tests: deflake TestV3WatchRestoreSnapshotUnsync
The TestV3WatchRestoreSnapshotUnsync setups three members' cluster.
Before serving any update requests from client, after leader elected,
each member will have index 8 log: 3 x ConfChange +
3 x ClusterMemberAttrSet + 1 x ClusterVersionSet.

Based on the config (SnapshotCount: 10, CatchUpCount: 5), we need to
file update requests to trigger snapshot at least twice.

T1: L(snapshot-index: 11, compacted-index:  6) F_m0(index: 8)
T2: L(snapshot-index: 22, compacted-index: 17) F_m0(index: 8, out of date)

After member0 recovers from network partition, it will reject leader's
request and return hint (index:8, term:x). If it happens after
second snapshot, leader will find out the index:8 is out of date and
force to transfer snapshot.

However, the client only files 15 update requests and leader doesn't
finish the process of snapshot in time. Since the last of
compacted-index is 6, leader can still replicate index:9 to member0
instead of snapshot.

```bash
cd tests/integration
CLUSTER_DEBUG=true go test -v -count=1 -run TestV3WatchRestoreSnapshotUnsync ./
...

INFO    m2.raft 3da8ba707f1a21a4 became leader at term 2        {"member": "m2"}
...
INFO    m2      triggering snapshot     {"member": "m2", "local-member-id": "3da8ba707f1a21a4", "local-member-applied-index": 22, "local-member-snapshot-index": 11, "local-member-snapshot-count": 10, "snapshot-forced": false}
...

cluster.go:1359: network partition between: 99626fe5001fde8b <-> 1c964119da6db036
cluster.go:1359: network partition between: 99626fe5001fde8b <-> 3da8ba707f1a21a4
cluster.go:416: WaitMembersForLeader

INFO    m0.raft 99626fe5001fde8b became follower at term 2      {"member": "m0"}
INFO    m0.raft raft.node: 99626fe5001fde8b elected leader 3da8ba707f1a21a4 at term 2   {"member": "m0"}
DEBUG   m2.raft 3da8ba707f1a21a4 received MsgAppResp(rejected, hint: (index 8, term 2)) from 99626fe5001fde8b for index 23      {"member": "m2"}
DEBUG   m2.raft 3da8ba707f1a21a4 decreased progress of 99626fe5001fde8b to [StateReplicate match=8 next=9 inflight=15]  {"member": "m2"}

DEBUG   m0      Applying entries        {"member": "m0", "num-entries": 15}
DEBUG   m0      Applying entry  {"member": "m0", "index": 9, "term": 2, "type": "EntryNormal"}

....

INFO    m2      saved snapshot  {"member": "m2", "snapshot-index": 22}
INFO    m2      compacted Raft logs     {"member": "m2", "compact-index": 17}
```

To fix this issue, the patch uses log monitor to watch "compacted Raft
log" and expect that two members should compact log twice.

Fixes: #15545

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-04-10 22:27:58 +08:00
53cce31680 Fix link for maintainers role and responsibilities in README.md
Signed-off-by: guiyong.ou <guiyong.ou@daocloud.io>

Fix link for maintainers role and responsibilities in README.md

Signed-off-by: guiyong.ou <guiyong.ou@daocloud.io>

fix

Signed-off-by: guiyong.ou <guiyong.ou@daocloud.io>
2023-04-10 12:58:44 +08:00
a1fa3bfe51 Add test cases for malformed jwt fix
Signed-off-by: ArkaSaha30 <arkasaha30@gmail.com>
2023-04-10 09:38:49 +05:30
3393d13567 Merge pull request #15675 from Mskxn/main
fix: different errc to avoid confused when timeout
2023-04-10 10:22:02 +08:00
Msk
a3743a79bc tests: use separate errc for each case in TestTxnPanics
Signed-off-by: Msk <118117161+Mskxn@users.noreply.github.com>
2023-04-10 09:16:39 +08:00
f7af6b64ba Merge pull request #15673 from fuweid/chore-expect-pkg-comment
chore: remove pkg/expect TODO comment
2023-04-09 14:06:22 +08:00
85b4da6121 chore: remove pkg/expect TODO comment
https://github.com/google/goexpect has been archived on Feb 7, 2023.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-04-09 12:57:32 +08:00
da36ce2fe9 Merge pull request #15670 from etcd-io/dependabot/github_actions/github/codeql-action-2.2.11
build(deps): bump github/codeql-action from 2.2.10 to 2.2.11
2023-04-08 17:15:30 +08:00
ce089755e1 build(deps): bump github/codeql-action from 2.2.10 to 2.2.11
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.2.10 to 2.2.11.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](8c8d71dde4...d186a2a36c)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-08 06:58:00 +00:00
08e6d67b3c Merge pull request #15650 from etcd-io/dependabot/github_actions/github/codeql-action-2.2.10
build(deps): bump github/codeql-action from 2.2.9 to 2.2.10
2023-04-08 14:57:28 +08:00
7153a8f2f4 Merge pull request #15646 from serathius/robustness-readme-watch-issue
tests/robustness: Document analysing watch issue
2023-04-07 23:45:42 +02:00
caa775d235 Merge pull request #15663 from serathius/2fa
Require 2FA enabled for all members
2023-04-07 10:59:11 +02:00
620956a613 Merge pull request #15654 from ahrtr/changelog_bump_go_20230406
changelog: update items to cover the some new changes in 3.5 and 3.4
2023-04-07 10:55:27 +02:00
535ff9638b Merge pull request #15617 from serathius/robustness-client-refactor
tests: Make using etcdctl expicit in e2e tests
2023-04-07 10:51:01 +02:00
7a0e27ac21 Merge pull request #15657 from serathius/maintainers-update
Update maintainer list
2023-04-07 10:47:45 +02:00
d72220400b Require 2FA enabled for all members
After this PR is merge, I will enable enforcement on etcd org.

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-04-07 10:41:51 +02:00
64176be02f changelog: update items to cover some changes in 3.5 and 3.4
1. Bumped golang to 1.19.8;
2. etcdserver: set zap logging to wsproxy;
3. Fix CVE-2021-28235.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-04-07 13:47:13 +08:00
4ea5c08abc build(deps): bump github/codeql-action from 2.2.9 to 2.2.10
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.2.9 to 2.2.10.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](04df1262e6...8c8d71dde4)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-07 13:06:23 +08:00
89f3e20c18 Update maintainer list
Got a confirmation from Sam that he is retiring his contributions.
Removing Tobias as raft was moved to separate repo.

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-04-06 21:12:13 +02:00
5327d91c20 Merge pull request #15586 from serathius/changelog-v3.5.8
changelog: Refactor changelog and add changes for v3.5.8
2023-04-06 14:47:16 +02:00
34bb7ed7a1 changelog: Refactor changelog and add changes for v3.5.8
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-04-06 14:42:20 +02:00
a5a5862e0b tests: Make using etcdctl expicit in e2e tests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-04-06 13:29:37 +02:00
573251572c Merge pull request #15648 from ahrtr/auth_cve_20230406
security: clear password after authenticating the user
2023-04-06 19:34:38 +09:00
8b1cd036ff security: remove password after authenticating the user
fix https://nvd.nist.gov/vuln/detail/CVE-2021-28235

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-04-06 17:11:54 +08:00
801bb4c6df test: add an e2e test to reproduce https://nvd.nist.gov/vuln/detail/CVE-2021-28235
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-04-06 16:47:31 +08:00
749a0d8d58 Merge pull request #15649 from ahrtr/bump_go_20230406
security: bump golang to 1.19.8 to fix four CVEs
2023-04-06 14:25:01 +08:00
2d0d3c3fdf security: bump go to 1.19.8 to fix four CVEs
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-04-06 13:38:58 +08:00
2d9aeec91f Merge pull request #15645 from serathius/tests-cleanup-alternative-binaries
tests/framework: Cleanup alternative binaries in e2e tests
2023-04-06 07:33:17 +02:00
99df35e69b Merge pull request #15644 from serathius/robustness-etcdctl-provided
tests/robustness: Ensure that etcdctl binary is provided
2023-04-06 07:32:01 +02:00
540d012e5e tests/robustness: Ensure that etcdctl binary is provided
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-04-05 23:04:20 +02:00
1e41d95ab2 tests/robustness: Document analysing watch issue
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-04-05 22:40:47 +02:00
651873cf7b tests/framework: Cleanup alternative binaries in e2e tests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-04-05 15:32:31 +02:00
f6bb874298 Merge pull request #15237 from scpmw/guarantee_progress_notify_order
etcdserver: Send requested progress notifications through watchStream (fix #15220)
2023-04-05 13:49:41 +02:00
74feb229c7 etcdserver: Guarantee order of requested progress notifications
Progress notifications requested using ProgressRequest were sent
directly using the ctrlStream, which means that they could race
against watch responses in the watchStream.

This would especially happen when the stream was not synced - e.g. if
you requested a progress notification on a freshly created unsynced
watcher, the notification would typically arrive indicating a revision
for which not all watch responses had been sent.

This changes the behaviour so that v3rpc always goes through the watch
stream, using a new RequestProgressAll function that closely matches
the behaviour of the v3rpc code - i.e.

1. Generate a message with WatchId -1, indicating the revision for
   *all* watchers in the stream

2. Guarantee that a response is (eventually) sent

The latter might require us to defer the response until all watchers
are synced, which is likely as it should be. Note that we do *not*
guarantee that the number of progress notifications matches the number
of requests, only that eventually at least one gets sent.

Signed-off-by: Peter Wortmann <peter.wortmann@skao.int>
2023-04-05 11:54:10 +01:00
42a2643df9 tests/robustness: Reproduce issue #15220
This issue is somewhat easily reproduced simply by bombarding the
server with requests for progress notifications, which eventually
leads to one being delivered ahead of the payload message. This is
then caught by the watch response validation code previously added by
Marek Siarkowicz.

Signed-off-by: Peter Wortmann <peter.wortmann@skao.int>
2023-04-05 11:23:02 +01:00
af25936fb7 tests/integration: Demonstrate manual progress notification race
This will fail basically every time, as the progress notification
request catches the watcher in an asynchronised state.

Signed-off-by: Peter Wortmann <peter.wortmann@skao.int>
2023-04-05 11:19:07 +01:00
b504ac1840 Merge pull request #15593 from serathius/community-membership
Move to community membership model closer to kubernetes one
2023-04-05 12:11:31 +02:00
9b58269298 Merge pull request #15642 from serathius/robustness-detect-trigger-timeout
tests/robustness: Detect trigger timeout and exit
2023-04-05 10:48:18 +02:00
29a8b56cf2 Merge pull request #15641 from mitake/changelog-15294
changelog: add items to cover 15294
2023-04-05 08:26:08 +08:00
5bae6b1e44 tests/robustness: Detect trigger timeout and exit
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-04-04 15:23:58 +02:00
aaf8919a19 changelog: add items to cover 15294
Signed-off-by: Hitoshi Mitake <h.mitake@gmail.com>
2023-04-04 21:56:46 +09:00
386aedef51 [WIP]server/auth:fix panic on identical JWT token generation and auth
Signed-off-by: ArkaSaha30 <arkasaha30@gmail.com>
2023-04-04 18:01:55 +05:30
f9d124974b Merge pull request #15604 from jmhbnz/robustness-ensure-healthy-clus
tests: Ensure healthy cluster before and after robustness failpoint
2023-04-04 14:22:52 +02:00
1227754284 Cancel watch if cluster not healthy before or after injecting failpoints.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-04-04 13:58:17 +02:00
05e2910f15 Merge pull request #15633 from serathius/robustness-enforce-timeout
tests: Enfoce timeout on failpoints
2023-04-04 13:27:03 +02:00
6582e349db tests: Enfoce timeout on failpoints
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-04-04 12:25:07 +02:00
523f235c82 Merge pull request #15603 from serathius/robustness-finish-with-success
tests: Ensure that operation history finishes with successful request
2023-04-04 12:03:36 +02:00
32acc662c9 Merge pull request #15638 from ahrtr/dependency_20230404
Bump some dependencies
2023-04-04 17:11:26 +08:00
6a5d326519 tests: Ensure that operation history finishes with successful request
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-04-04 09:40:17 +02:00
5e0119eadc Merge pull request #15636 from lavacat/main-test-watch-delay
tests: increase maxWatchDelay to prevent flaky TestWatchDelay*
2023-04-04 09:38:03 +02:00
138fae6246 Merge pull request #15632 from serathius/fix-comparing-etcd-version
tests: Fix comparing etcd version
2023-04-04 09:34:55 +02:00
8b6bf90c0d Merge pull request #15580 from chaochn47/fix_flaking_auth_member_remove_test
fix flaking auth member remove test
2023-04-04 09:34:16 +02:00
4fab20aa75 Merge pull request #15618 from serathius/robustness-fix-periodic-etcd-version
tests: Fix building incorrect etcd version and make switch strict
2023-04-04 09:30:20 +02:00
072c5cb5da dependency: bump google.golang.org/protobuf from 1.28.1 to 1.30.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-04-04 15:28:09 +08:00
56284d5dfe dependency: bump github.com/golang/protobuf from 1.5.2 to 1.5.3
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-04-04 15:21:22 +08:00
0c66fc9f29 dependency: bump go.uber.org/multierr from 1.9.0 to 1.11.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-04-04 15:15:32 +08:00
757910958e tests: increase maxWatchDelay to prevent flaky TestWatchDelay*
value is selected empirically after spot checking some logs of flaky workflows

fixes: https://github.com/etcd-io/etcd/issues/15634
Signed-off-by: Bogdan Kanivets <bkanivets@apple.com>
2023-04-03 21:49:36 -07:00
caed563e08 fix flaking auth member remove test
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-04-03 17:41:08 -07:00
69afcd1960 tests: Fix comparing etcd version
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-04-03 21:13:36 +02:00
b4c1fb14e3 Move to community membership model closer to kubernetes one
Based on https://github.com/kubernetes/community/blob/master/community-membership.md

Changes:
* Extracted contributor membership to separate file
* Provide more detailed requirements for each role. Base maintainers on
  kubernetes subproject owners.
* Introduction of member role

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-04-03 16:42:01 +02:00
6f4e5f316e Merge pull request #15592 from serathius/cleanup-endpoints
tests: Cleanup endpoints
2023-04-03 16:00:44 +02:00
9c72ecb1f9 tests: Fix building incorrect etcd version and make switch strict
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-04-03 15:06:10 +02:00
204892a0f8 Merge pull request #15616 from ahrtr/fix_typo_20230403
test: fix typo in robustness test
2023-04-03 14:22:17 +02:00
e57dcd5ceb test: fix typo in robustness test
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-04-03 18:46:32 +08:00
0cbd56e8b6 tests: Cleanup endpoints
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-04-03 12:18:54 +02:00
7c7f636aea Merge pull request #15615 from serathius/robustness-snapshot-older-version
tests/robustness: Support running snapshot tests on older versions
2023-04-03 12:13:01 +02:00
029315f57e tests/robustness: Support running snapshot tests on older versions
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-04-03 10:43:06 +02:00
4da39e4b1e Merge pull request #15294 from mitake/range-check
server/auth: disallow creating empty permission ranges
2023-04-03 09:03:50 +09:00
a1bd154cb4 Merge pull request #15610 from serathius/robustness-fix-blackhole
Robustness fix blackhole
2023-04-02 19:34:09 +02:00
5d53c83d61 Merge pull request #15614 from zhangguanzhang/changelog-3.5
CHANGELOG: add item into 3.5
2023-04-02 18:58:53 +08:00
2d9d6bdbca CHANGELOG: add item into 3.5
Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
2023-04-02 18:05:56 +08:00
03214c0239 Revert "tests/robustness: Disable testing network blackhole until #15595 is fixed"
This reverts commit 013e25fab9.

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-04-01 16:32:20 +02:00
71ba0873e3 tests/robustness: Encrypt peer traffic to prevent proxy manipulating packets
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-04-01 16:31:53 +02:00
5f99ffdba1 Merge pull request #15607 from etcd-io/dependabot/github_actions/ossf/scorecard-action-2.1.3
build(deps): bump ossf/scorecard-action from 2.1.2 to 2.1.3
2023-04-01 16:50:08 +08:00
38b7406eb7 build(deps): bump ossf/scorecard-action from 2.1.2 to 2.1.3
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.1.2 to 2.1.3.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](e38b1902ae...80e868c13c)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-01 07:02:49 +00:00
d0cd94a520 Merge pull request #15561 from serathius/makefile-entrypoint
Use makefile as entrypoint in CI
2023-04-01 09:02:09 +02:00
6a995d2d63 Merge pull request #15602 from tangwz/fix_raftexample_link
contrib/raftexample: fix raftexample README's raft library link.
2023-03-31 16:00:30 +02:00
4529f01876 Merge pull request #15601 from serathius/robustness-disable-blackhole
tests/robustness: Disable testing network blackhole until #15595 is fixed
2023-03-31 15:04:24 +02:00
330f871ff9 contrib: fix raftexample README's raft library link.
Signed-off-by: tangwz <tangwz.com@gmail.com>
2023-03-31 20:02:49 +08:00
013e25fab9 tests/robustness: Disable testing network blackhole until #15595 is fixed
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-31 13:55:58 +02:00
170cb146a1 Merge pull request #15591 from serathius/remove-v2-client
client: Hide v2 client package
2023-03-31 13:05:02 +02:00
7c626e00f6 Merge pull request #15270 from zhangguanzhang/main
Fixes: #15266 All docker images of Architecture show amd64
2023-03-31 11:41:59 +02:00
be7be34800 client: Hide v2 client package
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-31 10:26:11 +02:00
7ac443f728 Fixes: #15266 All docker images of Architecture show amd64
Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
2023-03-31 11:49:04 +08:00
e11a32366e Merge pull request #15544 from jmhbnz/remove_e2e_calc
Remove e2e from coverage calculation
2023-03-30 16:26:36 +02:00
418010bccb Merge pull request #15588 from serathius/defer-closure
server: Fix defer function closure escape
2023-03-30 14:53:26 +02:00
549087cd69 server: Fix defer function closure escape
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-30 13:37:31 +02:00
0bd0b6b0b5 Merge pull request #15446 from serathius/separate-grpc-server
Allow user to separate http and grpc server
2023-03-30 11:52:25 +02:00
870d478844 Merge e2e spawn files.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-03-30 22:38:00 +13:00
f53594309a Use makefile as entrypoint in CI
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-30 11:15:19 +02:00
4340cbb4aa Merge pull request #15575 from serathius/ensure-watch
tests: Ensure watch catches all events generated in traffic
2023-03-30 10:28:22 +02:00
65add8cec4 tests: Test separate http port connection multiplexing
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-30 09:49:45 +02:00
bf12179a5a server: Add --listen-client-http-urls flag to allow running grpc server separate from http server
Difference in load configuration for watch delay tests show how huge the
impact is. Even with random write scheduler grpc under http
server can only handle 500 KB with 2 seconds delay. On the other hand,
separate grpc server easily hits 10, 100 or even 1000 MB within 100 miliseconds.

Priority write scheduler that was used in most previous releases
is far worse than random one.

Tests configured to only 5 MB to avoid flakes and taking too long to fill
etcd.

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-30 09:49:45 +02:00
419a56e51a server: Pick one address that all grpc gateways connect to
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-30 09:49:45 +02:00
d1f674d624 server: Extract resolveUrl helper function
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-30 09:49:43 +02:00
85c48c4a60 server: Separate client listener grouping from serving
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-30 09:48:46 +02:00
5faad23812 Merge branch 'main' into remove_e2e_calc 2023-03-30 16:46:31 +13:00
0bd94bbae5 Remove defunct build_cov target.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-03-30 16:30:11 +13:00
4b87bb1852 Remove coverage implementation for ctl_v3_watch test.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-03-30 15:44:17 +13:00
3c40a68d09 Remove nocov flags for e2e tests.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-03-30 15:37:09 +13:00
1b125300bb Remove nocov implementation for e2e spawn.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-03-30 15:17:53 +13:00
c41e47fd5f Merge pull request #15582 from chaochn47/fix_TestEtcdExampleConfig
skip verification if db file does not exist
2023-03-30 10:16:11 +08:00
ad688b2a85 tests: Ensure watch catches all events generated in traffic
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-29 11:41:10 +02:00
245ef029d5 Merge pull request #15319 from serathius/linearizability-watch-validation-refactor
tests: Refactor watch validation
2023-03-29 09:24:32 +02:00
b4c2f9b291 Merge pull request #15576 from jmhbnz/document-cipher-config
Document defining ciphers in example etcd config file
2023-03-29 09:51:27 +08:00
d9068cd817 Document defining ciphers in example etcd config file.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-03-29 14:03:14 +13:00
11bf7ae416 skip verification if db file does not exist
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-03-28 18:03:05 -07:00
8aeef56cc7 Merge pull request #15513 from chaochn47/add_etcd_test_analyzer
add etcd test analyzer build and integrate into measure-test-flakiness workflow
2023-03-29 08:20:07 +08:00
4ecb801846 Merge pull request #15578 from chaochn47/auth_test_split_7
migrate auth tests to common #7
2023-03-29 07:07:21 +08:00
a8c20f931e add etcd test analyzer build and integrate into measure-test-flakiness workflow
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-03-28 11:30:32 -07:00
c54521156e tests: Refactor watch validation
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-28 17:32:34 +02:00
5223d09d41 Merge pull request #14838 from serathius/linearizability-docs
tests: Document robustness tests
2023-03-28 16:22:09 +02:00
d03ac88b36 tests: Document robustness tests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-28 15:08:43 +02:00
8a3ffbd7a9 Merge pull request #15553 from jmhbnz/changelog
CHANGELOG: Add new tls configuration options
2023-03-28 13:30:10 +08:00
9a2553fe2f migrate auth tests to common #7
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-03-27 19:30:41 -07:00
b3f0bfc018 Merge pull request #15564 from etcd-io/dependabot/go_modules/tools/mod/github.com/mikefarah/yq/v4-4.33.1
build(deps): bump github.com/mikefarah/yq/v4 from 4.31.2 to 4.33.1 in /tools/mod
2023-03-28 09:22:53 +08:00
7763181079 Merge pull request #15574 from etcd-io/dependabot/github_actions/github/codeql-action-2.2.9
build(deps): bump github/codeql-action from 2.2.8 to 2.2.9
2023-03-28 08:50:54 +08:00
f9b08e5fdc build(deps): bump github/codeql-action from 2.2.8 to 2.2.9
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.2.8 to 2.2.9.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](67a35a0858...04df1262e6)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-27 18:02:38 +00:00
2ca482a761 build(deps): bump github.com/mikefarah/yq/v4 in /tools/mod
Bumps [github.com/mikefarah/yq/v4](https://github.com/mikefarah/yq) from 4.31.2 to 4.33.1.
- [Release notes](https://github.com/mikefarah/yq/releases)
- [Changelog](https://github.com/mikefarah/yq/blob/master/release_notes.txt)
- [Commits](https://github.com/mikefarah/yq/compare/v4.31.2...v4.33.1)

---
updated-dependencies:
- dependency-name: github.com/mikefarah/yq/v4
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-27 17:58:43 +00:00
8b93e0e46b Merge pull request #15559 from mitake/changelog-15542
changelog: added item to cover reverting 14548 in release-3.4
2023-03-27 12:30:10 +08:00
cd240a9a29 changelog: added item to cover reverting 14548 in release-3.4
Signed-off-by: Hitoshi Mitake <h.mitake@gmail.com>
2023-03-26 18:21:01 +09:00
96389040d7 Merge pull request #15554 from etcd-io/dependabot/github_actions/actions/checkout-3.5.0
build(deps): bump actions/checkout from 3.4.0 to 3.5.0
2023-03-25 07:17:46 +08:00
5f6dab4149 build(deps): bump actions/checkout from 3.4.0 to 3.5.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.4.0 to 3.5.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](24cb908017...8f4b7f8486)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-24 10:36:27 +00:00
fdcc292b94 Merge pull request #15505 from pchan/add_test_image_2
scripts: Add testing of etcd in local image in release workflow.
2023-03-24 11:35:49 +01:00
14fbc98b20 Make version check independent from put/get checks
Signed-off-by: Prasad Chandrasekaran <prasadc@vmware.com>
2023-03-24 15:29:34 +05:30
0a94133089 Use run --rm for version checks
Signed-off-by: Prasad Chandrasekaran <prasadc@vmware.com>
2023-03-24 15:27:06 +05:30
ab2a1b7ad6 Incorporate review comments
Signed-off-by: Prasad Chandrasekaran <prasadc@vmware.com>
2023-03-24 14:32:23 +05:30
d5e5f1b542 scripts: Add testing of etcd in local image in release workflow.
Signed-off-by: Prasad Chandrasekaran <prasadc@vmware.com>
2023-03-24 13:33:48 +05:30
8b9fc9ee4d Add new tls configuration options to CHANGELOG.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-03-23 20:37:30 +00:00
e522ce02b8 Merge pull request #15552 from serathius/postmortem-update
Update status of postmortem action items
2023-03-23 11:55:58 +01:00
00c789f5bc docs: Update status of postmortem action items
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-23 11:30:55 +01:00
ead6c43650 Merge pull request #15551 from etcd-io/dependabot/github_actions/github/codeql-action-2.2.8
build(deps): bump github/codeql-action from 2.2.7 to 2.2.8
2023-03-23 07:18:37 +08:00
2d491356ec build(deps): bump github/codeql-action from 2.2.7 to 2.2.8
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.2.7 to 2.2.8.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](168b99b3c2...67a35a0858)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-22 22:28:33 +00:00
08471cddfd Merge pull request #15519 from fuweid/remove-tee-in-ci
chore: introduce strict bash mode for scripts,.github
2023-03-23 06:28:02 +08:00
1fcb782780 chore: introduce strict bash mode for scripts,.github
REF: #15514

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-03-22 18:00:41 +08:00
6b9c1462fd Merge pull request #15291 from ggustafsson/main
etcd-mixin: Limit etcdDatabaseHighFragmentationRatio to 100MB+
2023-03-22 17:12:33 +08:00
86fd5d6b99 Merge pull request #15546 from fuweid/update-changelog
CHANGELOG: add 'server/embed: fix data race when starting both secure & insecure gRPC servers on the same address' into 3.4/3.5
2023-03-22 15:21:27 +08:00
0daf06fa83 CHANGELOG: add item into 3.4/3.5
Add item [server/embed: fix data race when starting both secure & insecure
gRPC servers on the same address] to 3.4/3.5 changelog.

REF: #15509

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-03-22 14:03:47 +08:00
3573d791e4 Remove e2e from coverage calculation.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-03-22 09:52:25 +13:00
c62cf2cb9f Merge pull request #15538 from ahrtr/dependency_20230321
Bump some dependencies
2023-03-21 16:30:36 +08:00
f43dccb2f3 Merge pull request #15536 from etcd-io/dependabot/github_actions/actions/setup-go-4.0.0
build(deps): bump actions/setup-go from 3.5.0 to 4.0.0
2023-03-21 09:35:07 +08:00
8c4bbcc8c7 dependency: bump golang.org/x/ to 0.7.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-03-21 08:36:39 +08:00
1b2b89e378 dependency: bump github.com/mgechev/revive to 1.3.1 and honnef.co/go/tools to 0.4.3
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-03-21 08:36:39 +08:00
64319cf9b7 build(deps): bump actions/setup-go from 3.5.0 to 4.0.0
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 3.5.0 to 4.0.0.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](6edd4406fa...4d34df0c23)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-21 00:33:10 +00:00
9d8292256b Merge pull request #15534 from etcd-io/dependabot/github_actions/actions/checkout-3.4.0
build(deps): bump actions/checkout from 3.3.0 to 3.4.0
2023-03-21 08:32:24 +08:00
10196c55a7 Merge pull request #15535 from etcd-io/dependabot/github_actions/github/codeql-action-2.2.7
build(deps): bump github/codeql-action from 2.2.6 to 2.2.7
2023-03-21 08:29:55 +08:00
b7f8fb1cc5 Merge pull request #15521 from serathius/cov-main
Point coverage to correct branch
2023-03-21 06:42:31 +08:00
586d053d84 build(deps): bump github/codeql-action from 2.2.6 to 2.2.7
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.2.6 to 2.2.7.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](16964e90ba...168b99b3c2)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-20 18:06:24 +00:00
dd6fa9fd10 build(deps): bump actions/checkout from 3.3.0 to 3.4.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.3.0 to 3.4.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](ac59398561...24cb908017)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-20 18:06:19 +00:00
561c94019f Point coverage to correct branch
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-20 16:26:02 +01:00
6d01ab641f Merge pull request #15492 from serathius/fix-issue15271
Fix 15271
2023-03-20 12:01:45 +01:00
3e5fc2e4fc tests: Enable BlackholeUntilSnapshot robustness scenario
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-20 11:15:42 +01:00
7052d8998a server: Test watch restore
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-20 11:15:41 +01:00
a690707c57 mvcc: update minRev when watcher stays synced
Problem: during restore in watchableStore.Restore, synced watchers are moved to unsynced.
minRev will be behind since it's not updated when watcher stays synced.

Solution: update minRev

fixes: https://github.com/etcd-io/etcd/issues/15271
Signed-off-by: Bogdan Kanivets <bkanivets@apple.com>
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-20 11:11:48 +01:00
8cb8f4bf1c Merge pull request #15489 from fuweid/fix-data-race-in-ut
deflake: mvcc storage ut
2023-03-20 10:23:02 +01:00
30abf17f92 Merge pull request #15509 from fuweid/fix-15495
server/embed: fix data race when start insecure grpc
2023-03-19 19:37:12 +01:00
eb09e00541 chore: refactor cleanup fn in mvcc test
The tmp path is cleanup by go testing so that the `cleanup` doesn't need
to call `os.Remove`.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-03-19 21:46:03 +08:00
946918e4a1 Merge pull request #15494 from jmhbnz/txn_help_docs
Add detailed long description for etcdctl txn
2023-03-19 06:42:12 +08:00
a9988e2625 server/embed: fix data race when start insecure grpc
There are two goroutines accessing the `gs` grpc server var. Before
insecure `gs` server start, the `gs` can be changed to secure server and
then the client will fail to connect to etcd with insecure request. It
is data-race. We should use argument for reference in the new goroutine.

fix: #15495

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-03-18 21:48:58 +08:00
736c89398b Merge pull request #15500 from chaochn47/document_measure_test_flakiness
document measure-test-flakiness.sh
2023-03-18 10:45:44 +01:00
830d9e9eaa test: fix TestRestoreContinueUnfinishedCompaction
The original testcase uses `return` statement which skips `restore`
case. It's aimed to enable `restore` testcase.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-03-18 10:58:05 +08:00
d200f72d2d test: should not leak goroutines after test finished
The original flaky test shows in CI pipeline[1], but gotestsum run into
a golang issue[2]. The error message is not clear from summary, like

```
{"Time":"2023-03-02T09:19:38.754394861Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /opt/hostedtoolcache/go/1.19.6/x64/src/testing/testing.go:1433 +0x7e4\n"}
{"Time":"2023-03-02T09:19:38.754414561Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /opt/hostedtoolcache/go/1.19.6/x64/src/runtime/panic.go:476 +0x32\n"}
{"Time":"2023-03-02T09:19:38.754430561Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /opt/hostedtoolcache/go/1.19.6/x64/src/testing/testing.go:1493 +0x47\n"}
{"Time":"2023-03-02T09:19:38.754482561Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /opt/hostedtoolcache/go/1.19.6/x64/src/testing/testing.go:883 +0xc4\n"}
{"Time":"2023-03-02T09:19:38.754497661Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /opt/hostedtoolcache/go/1.19.6/x64/src/testing/testing.go:876 +0xa4\n"}
{"Time":"2023-03-02T09:19:38.754512161Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /opt/hostedtoolcache/go/1.19.6/x64/src/testing/testing.go:927 +0x6a\n"}
{"Time":"2023-03-02T09:19:38.754567661Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"  go.uber.org/zap/zaptest.testingWriter.Write()\n"}
{"Time":"2023-03-02T09:19:38.754571261Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /home/runner/go/pkg/mod/go.uber.org/zap@v1.24.0/zaptest/logger.go:130 +0x12c\n"}
{"Time":"2023-03-02T09:19:38.754582861Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"  go.uber.org/zap/zaptest.(*testingWriter).Write()\n"}
{"Time":"2023-03-02T09:19:38.754597761Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"  go.uber.org/zap/zapcore.(*ioCore).Write()\n"}
{"Time":"2023-03-02T09:19:38.754600961Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /home/runner/go/pkg/mod/go.uber.org/zap@v1.24.0/zapcore/core.go:99 +0x199\n"}
{"Time":"2023-03-02T09:19:38.754612761Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"  go.uber.org/zap/zapcore.(*CheckedEntry).Write()\n"}
{"Time":"2023-03-02T09:19:38.754618561Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /home/runner/go/pkg/mod/go.uber.org/zap@v1.24.0/zapcore/entry.go:255 +0x2ce\n"}
{"Time":"2023-03-02T09:19:38.754630161Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"  go.uber.org/zap.(*Logger).Info()\n"}
{"Time":"2023-03-02T09:19:38.754633261Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /home/runner/go/pkg/mod/go.uber.org/zap@v1.24.0/logger.go:220 +0x6a\n"}
{"Time":"2023-03-02T09:19:38.754644861Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"  go.etcd.io/etcd/server/v3/storage/mvcc.(*treeIndex).Compact()\n"}
{"Time":"2023-03-02T09:19:38.754648461Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /home/runner/work/etcd/etcd/server/storage/mvcc/index.go:194 +0x144\n"}
{"Time":"2023-03-02T09:19:38.754664961Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"  go.etcd.io/etcd/server/v3/storage/mvcc.(*store).scheduleCompaction()\n"}
{"Time":"2023-03-02T09:19:38.754670161Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /home/runner/work/etcd/etcd/server/storage/mvcc/kvstore_compaction.go:29 +0xbb\n"}
{"Time":"2023-03-02T09:19:38.754681861Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"  go.etcd.io/etcd/server/v3/storage/mvcc.(*store).compact.func1()\n"}
{"Time":"2023-03-02T09:19:38.754690561Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /home/runner/work/etcd/etcd/server/storage/mvcc/kvstore.go:235 +0x9e\n"}
{"Time":"2023-03-02T09:19:38.754720061Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"  go.etcd.io/etcd/pkg/v3/schedule.job.Do()\n"}
{"Time":"2023-03-02T09:19:38.754724161Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /home/runner/work/etcd/etcd/pkg/schedule/schedule.go:41 +0x70\n"}
{"Time":"2023-03-02T09:19:38.754736161Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"  go.etcd.io/etcd/pkg/v3/schedule.(*job).Do()\n"}
{"Time":"2023-03-02T09:19:38.754750961Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"  go.etcd.io/etcd/pkg/v3/schedule.(*fifo).executeJob()\n"}
{"Time":"2023-03-02T09:19:38.754754161Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /home/runner/work/etcd/etcd/pkg/schedule/schedule.go:206 +0x101\n"}
{"Time":"2023-03-02T09:19:38.754765861Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"  go.etcd.io/etcd/pkg/v3/schedule.(*fifo).run()\n"}
{"Time":"2023-03-02T09:19:38.754769061Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /home/runner/work/etcd/etcd/pkg/schedule/schedule.go:187 +0x1a5\n"}
{"Time":"2023-03-02T09:19:38.754780461Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"  go.etcd.io/etcd/pkg/v3/schedule.NewFIFOScheduler.func1()\n"}
{"Time":"2023-03-02T09:19:38.754783661Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /home/runner/work/etcd/etcd/pkg/schedule/schedule.go:101 +0x39\n"}
{"Time":"2023-03-02T09:19:38.754824061Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /opt/hostedtoolcache/go/1.19.6/x64/src/testing/testing.go:1493 +0x75d\n"}
FAIL: (code:1):
  % (cd server && 'env' 'ETCD_VERIFY=all' 'go' 'test' '-v' '-json' '-short' '-timeout=3m' '--race=true' '--cpu=4' './...' '-p=2')
{"Time":"2023-03-02T09:19:38.754838961Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /opt/hostedtoolcache/go/1.19.6/x64/src/testing/testing.go:1846 +0x99\n"}
{"Time":"2023-03-02T09:19:38.754854961Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /opt/hostedtoolcache/go/1.19.6/x64/src/testing/testing.go:1446 +0x216\n"}
{"Time":"2023-03-02T09:19:38.754893461Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /opt/hostedtoolcache/go/1.19.6/x64/src/testing/testing.go:1844 +0x7ec\n"}
{"Time":"2023-03-02T09:19:38.754908961Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /opt/hostedtoolcache/go/1.19.6/x64/src/testing/testing.go:1726 +0xa84\n"}
{"Time":"2023-03-02T09:19:38.754957861Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"  go.etcd.io/etcd/pkg/v3/schedule.NewFIFOScheduler()\n"}
{"Time":"2023-03-02T09:19:38.754961061Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /home/runner/work/etcd/etcd/pkg/schedule/schedule.go:101 +0x3b6\n"}
{"Time":"2023-03-02T09:19:38.754976161Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"  go.etcd.io/etcd/server/v3/storage/mvcc.NewStore()\n"}
{"Time":"2023-03-02T09:19:38.754979361Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /home/runner/work/etcd/etcd/server/storage/mvcc/kvstore.go:111 +0x331\n"}
{"Time":"2023-03-02T09:19:38.754991061Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"  go.etcd.io/etcd/server/v3/storage/mvcc.TestHashByRevValue()\n"}
{"Time":"2023-03-02T09:19:38.754994261Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /home/runner/work/etcd/etcd/server/storage/mvcc/hash_test.go:36 +0xa4\n"}
{"Time":"2023-03-02T09:19:38.755010061Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /opt/hostedtoolcache/go/1.19.6/x64/src/testing/testing.go:1446 +0x216\n"}
{"Time":"2023-03-02T09:19:38.755024461Z","Action":"output","Package":"go.etcd.io/etcd/server/v3/storage/mvcc","Test":"TestHashByRevValue","Output":"      /opt/hostedtoolcache/go/1.19.6/x64/src/testing/testing.go:1493 +0x47\n"}

=== Failed
=== FAIL: storage/mvcc  (0.00s)
=== CONT
    testing.go:1319: race detected during execution of test
FAIL
FAIL	go.etcd.io/etcd/server/v3/storage/mvcc	9.852s
```

After using the following command to reproduce it, we can get the error
like:

```bash
go test -v -p=2 --cpu=4 -count=1000 -failfast --race=true -short -timeout=30m ./
--- PASS: TestHashByRevValueLastRevision (0.12s)
==================
WARNING: DATA RACE
Read at 0x00c002024043 by goroutine 65745:
  testing.(*common).logDepth()
      /usr/lib/go-1.19/src/testing/testing.go:883 +0xc4
  testing.(*common).log()
      /usr/lib/go-1.19/src/testing/testing.go:876 +0xa4
  testing.(*common).Logf()
      /usr/lib/go-1.19/src/testing/testing.go:927 +0x6a
  testing.(*T).Logf()
      <autogenerated>:1 +0x75
  go.uber.org/zap/zaptest.testingWriter.Write()
      /home/fuwei/go/pkg/mod/go.uber.org/zap@v1.24.0/zaptest/logger.go:130 +0x12c
  go.uber.org/zap/zaptest.(*testingWriter).Write()
      <autogenerated>:1 +0x7e
  go.uber.org/zap/zapcore.(*ioCore).Write()
      /home/fuwei/go/pkg/mod/go.uber.org/zap@v1.24.0/zapcore/core.go:99 +0x199
  go.uber.org/zap/zapcore.(*CheckedEntry).Write()
      /home/fuwei/go/pkg/mod/go.uber.org/zap@v1.24.0/zapcore/entry.go:255 +0x2ce
  go.uber.org/zap.(*Logger).Info()
      /home/fuwei/go/pkg/mod/go.uber.org/zap@v1.24.0/logger.go:220 +0x6a
  go.etcd.io/etcd/server/v3/storage/mvcc.(*treeIndex).Compact()
      /home/fuwei/go/src/go.etcd.io/etcd/server/storage/mvcc/index.go:194 +0x144
  go.etcd.io/etcd/server/v3/storage/mvcc.(*store).scheduleCompaction()
      /home/fuwei/go/src/go.etcd.io/etcd/server/storage/mvcc/kvstore_compaction.go:29 +0xbb
  go.etcd.io/etcd/server/v3/storage/mvcc.(*store).compact.func1()
      /home/fuwei/go/src/go.etcd.io/etcd/server/storage/mvcc/kvstore.go:235 +0x9e
  go.etcd.io/etcd/pkg/v3/schedule.job.Do()
      /home/fuwei/go/src/go.etcd.io/etcd/pkg/schedule/schedule.go:41 +0x70
  go.etcd.io/etcd/pkg/v3/schedule.(*job).Do()
      <autogenerated>:1 +0x29
  go.etcd.io/etcd/pkg/v3/schedule.(*fifo).executeJob()
      /home/fuwei/go/src/go.etcd.io/etcd/pkg/schedule/schedule.go:206 +0x101
  go.etcd.io/etcd/pkg/v3/schedule.(*fifo).run()
      /home/fuwei/go/src/go.etcd.io/etcd/pkg/schedule/schedule.go:187 +0x1a5
  go.etcd.io/etcd/pkg/v3/schedule.NewFIFOScheduler.func1()
      /home/fuwei/go/src/go.etcd.io/etcd/pkg/schedule/schedule.go:101 +0x39

Previous write at 0x00c002024043 by goroutine 65743:
  testing.tRunner.func1()
      /usr/lib/go-1.19/src/testing/testing.go:1433 +0x7e4
  runtime.deferreturn()
      /usr/lib/go-1.19/src/runtime/panic.go:476 +0x32
  testing.(*T).Run.func1()
      /usr/lib/go-1.19/src/testing/testing.go:1493 +0x47

Goroutine 65745 (running) created at:
  go.etcd.io/etcd/pkg/v3/schedule.NewFIFOScheduler()
      /home/fuwei/go/src/go.etcd.io/etcd/pkg/schedule/schedule.go:101 +0x3b6
  go.etcd.io/etcd/server/v3/storage/mvcc.NewStore()
      /home/fuwei/go/src/go.etcd.io/etcd/server/storage/mvcc/kvstore.go:111 +0x331
  go.etcd.io/etcd/server/v3/storage/mvcc.TestHashByRevValueLastRevision()
      /home/fuwei/go/src/go.etcd.io/etcd/server/storage/mvcc/hash_test.go:76 +0xa4
  testing.tRunner()
      /usr/lib/go-1.19/src/testing/testing.go:1446 +0x216
  testing.(*T).Run.func1()
      /usr/lib/go-1.19/src/testing/testing.go:1493 +0x47

Goroutine 65743 (running) created at:
  testing.(*T).Run()
      /usr/lib/go-1.19/src/testing/testing.go:1493 +0x75d
  testing.runTests.func1()
      /usr/lib/go-1.19/src/testing/testing.go:1846 +0x99
  testing.tRunner()
      /usr/lib/go-1.19/src/testing/testing.go:1446 +0x216
  testing.runTests()
      /usr/lib/go-1.19/src/testing/testing.go:1844 +0x7ec
  testing.(*M).Run()
      /usr/lib/go-1.19/src/testing/testing.go:1726 +0xa84
  main.main()
      _testmain.go:265 +0x2e9
==================
```

The schedule for compact is handled asynchronously and it might use
`t.Logf` after go-test marks the case is done. And there is a comment
from go-test:

```go
// c69ff3a7d0/src/testing/testing.go (LL1580C3-L1582C16)
                // Do not lock t.done to allow race detector to detect race in case
		// the user does not appropriately synchronize a goroutine.
		t.done = true
```

We need to ensure that all the goroutines should be closed before case
finish.

REF:

[1]: https://github.com/etcd-io/etcd/actions/runs/4312405975/jobs/7522924734

[2]: https://github.com/gotestyourself/gotestsum/issues/310

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-03-18 10:58:00 +08:00
f9bdd8c96c Merge pull request #15502 from chaochn47/deflake_TestMemberList
deflake member_test: enable pre-vote by default and add retry
2023-03-18 07:55:02 +08:00
6cfe4bcf1f Merge pull request #15501 from chaochn47/defake_TestTracing
deflake TestTracing
2023-03-18 07:24:02 +08:00
d7f992c351 enable pre-vote by default and add retry on member_test
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-03-17 15:15:13 -07:00
f163af2bc8 deflake TestTracing
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-03-17 14:39:18 -07:00
fcdf0ebd81 document measure-test-flakiness.sh
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-03-17 14:15:54 -07:00
4e0e6bdb0f Merge pull request #15493 from jmhbnz/main
Rename pr and issue triage docs to fix links
2023-03-17 06:55:08 +08:00
91a5f01a4e Add detailed long description for etcdctl txn.
Include an example stdin usage and a link for full docs.

Signed-off-by: James Blair <mail@jamesblair.net>
2023-03-17 11:38:56 +13:00
f312316e81 Rename pr and issue triage docs to fix broken links.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-03-17 10:26:34 +13:00
f3587be6cd Merge pull request #15485 from HanningLin/verify-goimport
Add verify-goimport to verify all import items are well sorted
2023-03-16 12:06:00 +01:00
3717448887 Merge pull request #15479 from serathius/test-cmux
Test connection multiplexing.
2023-03-16 09:16:38 +01:00
8bc6b289fb add new goimport_pass
Signed-off-by: Hanning Lin <liam.hanninglin@outlook.com>
2023-03-16 05:50:17 +00:00
dfc2c6d44b tests: Add connection muiltiplexer testing
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-15 15:56:39 +01:00
aad24ebe2a tests: Extract e2e test utils
Consider creating generic testutils for both e2e and integration tests.

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-15 14:47:49 +01:00
cbf819740e tests: Allow specifying http version in curl
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-15 09:27:51 +01:00
ae30e5c2fb tests: Refactor newClient args
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-15 09:27:51 +01:00
e87abf3f13 tests: Refactor CURLPrefixArgs
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-14 16:35:43 +01:00
67e3c784ba tests: Remove MetricsURLScheme field
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-14 16:35:43 +01:00
c6d8b65ea7 Merge pull request #15432 from tangcong/fix-auth
server/auth: fix auth panic bug when user changes password
2023-03-14 22:13:27 +09:00
cff96fe3a4 Merge pull request #15473 from jmhbnz/main
Refactor: Use proper variable names for urls
2023-03-14 14:25:25 +08:00
f6ebff1557 Refactor: Use proper variable names for urls.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-03-14 18:37:52 +13:00
3fc23ab9a0 Merge pull request #15456 from etcd-io/dependabot/go_modules/tools/mod/github.com/mikefarah/yq/v4-4.31.2
build(deps): bump github.com/mikefarah/yq/v4 from 4.31.1 to 4.31.2 in /tools/mod
2023-03-14 10:27:25 +08:00
6385c7d8ae Merge pull request #15455 from samruddhikhandale/samruddhikhandale/update-contributing
Update CONTRIBUTING.md reference for Codespaces
2023-03-14 09:35:13 +08:00
263dc15a38 build(deps): bump github.com/mikefarah/yq/v4 in /tools/mod
Bumps [github.com/mikefarah/yq/v4](https://github.com/mikefarah/yq) from 4.31.1 to 4.31.2.
- [Release notes](https://github.com/mikefarah/yq/releases)
- [Changelog](https://github.com/mikefarah/yq/blob/master/release_notes.txt)
- [Commits](https://github.com/mikefarah/yq/compare/v4.31.1...v4.31.2)

---
updated-dependencies:
- dependency-name: github.com/mikefarah/yq/v4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-14 00:40:03 +00:00
eba5845db0 Merge pull request #15466 from etcd-io/dependabot/github_actions/github/codeql-action-2.2.6
build(deps): bump github/codeql-action from 2.2.5 to 2.2.6
2023-03-14 08:17:38 +08:00
7f37b3630f Merge pull request #15453 from serathius/refactor-url-names
Refactor url names
2023-03-14 08:09:49 +08:00
bea9c95b77 Merge pull request #15467 from ahrtr/fix_format_20230314
test: fix format error
2023-03-13 23:56:48 +01:00
a141585b1c test: fix format error
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-03-14 05:53:53 +08:00
97a080ba1e build(deps): bump github/codeql-action from 2.2.5 to 2.2.6
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.2.5 to 2.2.6.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](32dc499307...16964e90ba)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-13 18:05:12 +00:00
cd219ca8df Update CONTRIBUTING.md reference for Codespaces
Signed-off-by: Samruddhi Khandale <samruddhikhandale@github.com>
2023-03-13 17:39:17 +00:00
372042c374 refactor: Use proper variable names for urls
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-13 14:48:01 +01:00
043525c69d Merge pull request #15449 from fuweid/fix-15409
tests/integration: deflake TestEtcdVersionFromWAL
2023-03-13 10:36:02 +01:00
ad72900dad server/auth: fix auth panic bug when user changes password
Signed-off-by: tangcong <tangcong506@foxmail.com>
2023-03-12 20:49:09 +08:00
22bdc91302 server/etcdserver: add log for terminating monitors
Adding log for terminating monitors is to make the debug easier.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-03-11 15:07:17 +08:00
4a9ad47bcc tests/integration: deflake #15409
The cluster version will be initialized after the member becomes leader.
The update is handled asynchronously. It couldn't be updated if the member
has been closed and the go-runtime picks the `s.stopping` channel first.

```go
// e2a5df534c/server/etcdserver/server.go (L2170)

func (s *EtcdServer) monitorClusterVersions() {
	...
	for {
		select {
		case <-s.firstCommitInTerm.Receive():
		case <-time.After(monitorVersionInterval):
		case <-s.stopping:
			return
		}
		...
	}
}
```

Or after the `s.stopping` has been closed, the [UpdateClusterVersion][1] won't
file GoAttach successfully. For the #15409, we can see the warn log
`server has stopped; skipping GoAttach` from GoAttach:

```plain
https://github.com/etcd-io/etcd/actions/runs/4340931587/jobs/7580103902

    logger.go:130: 2023-03-06T07:36:44.253Z	WARN	default	stopping grpc server due to error	{"error": "accept tcp 127.0.0.1:2379: use of closed network connection"}
    logger.go:130: 2023-03-06T07:36:44.253Z	WARN	default	stopped grpc server due to error	{"error": "accept tcp 127.0.0.1:2379: use of closed network connection"}
    logger.go:130: 2023-03-06T07:36:44.253Z	ERROR	default	setting up serving from embedded etcd failed.	{"error": "accept tcp 127.0.0.1:2379: use of closed network connection"}
    logger.go:130: 2023-03-06T07:36:44.253Z	ERROR	default	setting up serving from embedded etcd failed.	{"error": "http: Server closed"}
    logger.go:130: 2023-03-06T07:36:44.253Z	INFO	default	skipped leadership transfer for single voting member cluster	{"local-member-id": "8e9e05c52164694d", "current-leader-member-id": "8e9e05c52164694d"}

    logger.go:130: 2023-03-06T07:36:44.253Z	WARN	default	server has stopped; skipping GoAttach

    ...
```

If the cluster version isn't updated, the minimum storage version will
be v3.5 because the [AuthStatus][2] is introduced in [v3.5][3].
The compare will fail.

To fix this issue, we should wait for cluster version to become ready
after server is ready to serve request.

[1]: <e2a5df534c/server/etcdserver/adapters.go (L45)>
[2]: <071e70cdc4>
[3]: <1b4e54c238>

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-03-11 14:50:37 +08:00
e2a5df534c Merge pull request #15447 from nullc4t/main
FIX #13389
2023-03-11 05:36:24 +08:00
4dad1ed71e FIX #13389
Dummy fix. Implement wsproxy.Logger with zap.Logger. Use sctx.lg as logger.

Signed-off-by: anon <thisisnot@myemail.com>
2023-03-10 19:58:09 +02:00
659c74e60e Merge pull request #15431 from serathius/watch-random-scheduler
Watch random scheduler
2023-03-10 13:29:54 +01:00
f3533f2593 server: Switch back to random scheduler to improve resilience to watch starvation
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-10 12:42:34 +01:00
585dfe0186 test: Test etcd watch stream starvation under high read response load when sharing the same connection
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-10 12:42:33 +01:00
b3bb996880 Merge pull request #15420 from ahrtr/dependency_20230307
Bump some dependencies
2023-03-09 13:03:56 +01:00
12d7a32974 Merge pull request #15433 from jmhbnz/main
Update contributing guide with new codespaces developement option
2023-03-09 13:01:52 +01:00
b4c499ed7a Update contributing docs with new codespaces developement option.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-03-09 22:28:25 +13:00
6bd7660079 Merge pull request #15427 from jmhbnz/main
Updated go to latest 1.19.7 release
2023-03-08 19:06:12 +08:00
5b3497555f Updated go to 1.19.7.
Mitigates CVE-2023-24532.

Signed-off-by: James Blair <mail@jamesblair.net>
2023-03-08 21:39:31 +13:00
24f5d4a6fb Merge pull request #15201 from dbadoy/main
pkg/schedule: correct comparison for FIFO schedule test
2023-03-08 14:46:58 +08:00
ebb5e74ace pkg/schedule:correct comparison for FIFO schedule test
Signed-off-by: dbadoy4874 <dbadoy4874@gmail.com>
2023-03-08 13:18:05 +09:00
aaa8bfee99 Merge pull request #15425 from fuweid/update-TestLeasingDeleteRangeContendTxn
tests/integration: Update TestLeasingDeleteRangeContendTxn
2023-03-08 08:08:38 +08:00
3419230eea tests/integration: Update TestLeasingDeleteRangeContendTxn
The TestLeasingDeleteRangeContendTxn is trying to test for RangeDelete when
the target resources are being updated.  When the `txnLeasing` wants a
server-side transaction, it needs to ensure all the keys mod revision should
be leass than what it saw. If the compare fails, it will repeat to apply the
server-side transaction until it is sucessful. I believe the test-case is
trying to verify how the `txnLeasing` handles the race issue.

Before the patch #15401, the resource-updating goroutine keeps updating until
the RangeDelete finishes. The testcase is flaky because two goroutines are
sharing one `ctx` and grpc-go client won't wait for the response if `ctx`
has been canceled.

For example,

| DelLease Goroutine   | PutLease Goroutine         | ETCD Server                    | Key/0 Status |
| --                   | ---                        | --                             | --           |
| deleted              |                            |                                | version = 0  |
|                      | send update(key/0=123) req | received update(key/0=123) req | version = 0  |
| cancel               |                            |                                | version = 0  |
|                      | exit because of cancel     |                                | version = 0  |
| get key/0 by putkv   |                            |                                | version = 0  |
|                      |                            | applied update(key/0=123)      | version = 1  |
| get key/0 by raw-cli |                            |                                | version = 1  |

So `raw-cli` gets `[key/0=123]` while the `putkv` gets `[]`. If `putkv`
applies two update reqs to ETCD server and the last one is canceled
before apply, the error will be like:

```
expected [key:"key/0" version:2 value:"123" ], got [key:"key/0" version:1 value:"123" ]
```

The resource-updating goroutine should not share the ctx with RangeDelete here.
And I also revert current main branch because the resource-update goroutine
only updates 8 times and might exit before `RangeDelete`. In this case,
the `txnLeasing` is not handling the race issue.

Fixes: #15352

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-03-07 23:11:41 +08:00
1002346ceb etcd-mixin: Limit etcdDatabaseHighFragmentationRatio to 100MB+
Signed-off-by: Göran Gustafsson <gustafsson.g@gmail.com>
2023-03-07 14:58:58 +01:00
7ed1219861 dependency: bump golang.org/x/net to v0.8.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-03-07 06:52:07 +08:00
b53d63219a dependency: bump github.com/cheggaaa/pb/v3 to v3.1.2
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-03-07 06:17:01 +08:00
76a563608e Merge pull request #15408 from jmhbnz/main
Return default snapshot count to 10,000
2023-03-06 10:23:35 +01:00
275e10bcf7 Return default snapshot count to 10,000.
The huge (100k+) value was justified when storev2 was being dumped completely with every snapshot.

With storev2 being decomissioned we can checkpoint more frequently for faster recovery.

Signed-off-by: James Blair <mail@jamesblair.net>
2023-03-06 20:21:03 +13:00
7a98ab3ae0 Merge pull request #15378 from chaochn47/auth_test_split_5
migration auth tests to common #5
2023-03-04 07:07:02 +08:00
69ce1aab54 Merge pull request #15405 from jmhbnz/main
CHANGELOG: Add entries for 3.4 and 3.5 go version 1.19.
2023-03-04 05:03:01 +08:00
c002e096b5 migration auth tests to common #5
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-03-03 12:26:36 -08:00
28d965b578 Merge pull request #15383 from jmhbnz/feat/add_devcontainer
Add initial .devcontainer for go 1.19
2023-03-04 04:24:05 +08:00
8c18bf8bc4 Add CHANGELOG entries for 3.4 and 3.5 go version 1.19.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-03-04 08:47:56 +13:00
85bd9d7719 Merge pull request #15401 from tjungblu/racefix_15352
Fixing flaky TestLeasingDeleteRangeContendTxn
2023-03-03 12:23:25 +01:00
63964ec781 Fixing flaky TestLeasingDeleteRangeContendTxn
Fixes etcd-io#15352.
Depending on the goroutine scheduling, the expected count of 8 might not
have been reached yet. This ensures the routine won't stop earlier than
that.

Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
2023-03-03 11:38:22 +01:00
d358e35f3e Merge pull request #15379 from chaochn47/auth_test_split_6
migrate auth tests to common #6
2023-03-03 10:55:28 +01:00
c0f37bb5d5 Merge pull request #15384 from xakdwch/main
rpctypes: use status.Error() instead of status.New().Err()
2023-03-03 10:48:23 +01:00
dff5d1e996 Merge pull request #15398 from xakdwch/feature-enhance
rafthttp: replace inline code with existing function
2023-03-03 10:47:09 +01:00
2e0cafce29 Merge pull request #15399 from ahrtr/dependency_20230303
dependency: bump go.opentelemetry.io/otel to v1.14.0
2023-03-03 17:41:11 +08:00
56423eacd2 dependency: bump go.opentelemetry.io/otel to v1.14.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-03-03 15:44:47 +08:00
c767f429f0 rafthttp: replace inline code with existing function
The isMsgApp function implements the judgment of the MsgApp message,
use the isMsgApp function instead.

Signed-off-by: xakdwch <xakdwch5@gmail.com>
2023-03-03 09:50:14 +08:00
9783253788 Add initial .devcontainer for go.19.
When the devcontainer starts it will run make build to ensure compiled binaries are immediately available for use.

I've confirmed make test is also behaving as expected within the devcontainer.

Signed-off-by: James Blair <mail@jamesblair.net>
2023-03-03 07:03:25 +13:00
d4acc0ad9f Merge pull request #15313 from serathius/dependabot-root
workflows: Remove non-root gomod dependabot rules
2023-03-02 10:17:29 +01:00
8298ed8204 rpctypes: use status.Error() instead of status.New().Err()
status.Error() returns an error representing error code and msg,
status.Error() is better than status.New().Err().

Signed-off-by: xakdwch <xakdwch5@gmail.com>
2023-03-02 10:47:09 +08:00
6471b9e320 workflows: Remove non-root gomod dependabot rules and enable dependency-type all to ensure upgrade of indirect dependencies
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-03-01 13:30:21 +01:00
d798816baf migrate auth tests to common #6
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-02-28 10:32:29 -08:00
c6beef8f0e Merge pull request #15376 from ahrtr/dependencies_20230228
Dependencies: bump some dependencies
2023-02-28 16:52:01 +08:00
5f872589cd dependency: bump golang.org/x/sync to v0.1.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-02-28 06:56:16 +08:00
bc55e615d2 dependency: bump golang.org/x/sys to v0.5.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-02-28 06:54:08 +08:00
6af2c9dbfa dependency: bump golang.org/x/crypto to v0.6.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-02-28 06:51:55 +08:00
f333148da9 dependency: bump golang.org/x/time to v0.3.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-02-28 06:49:39 +08:00
d8b8127084 dependency: bump github.com/stretchr/testify from 1.8.1 to 1.8.2
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-02-28 06:44:33 +08:00
da4bf0f76f Merge pull request #15261 from ahrtr/memberlist_20230208
clientv3: support serializable `MemberList` operation
2023-02-28 06:26:38 +08:00
65eeb7ff17 server/auth: disallow creating empty permission ranges
Signed-off-by: Hitoshi Mitake <h.mitake@gmail.com>
Co-authored-by: Benjamin Wang <wachao@vmware.com>
2023-02-27 22:55:36 +09:00
858d25c43b Merge pull request #15359 from serathius/robustness-rename
tests: Rename linearizability tests to robustness
2023-02-27 06:58:51 +08:00
d475cf81a0 tests: Rename linearizability tests to robustness
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-02-26 14:36:18 +01:00
cb2a22e5d1 Merge pull request #15351 from chaochn47/auth_test_split_4
migrate auth test to common #4
2023-02-26 13:45:11 +01:00
baa21858c1 Merge pull request #15358 from etcd-io/dependabot/go_modules/client/pkg/golang.org/x/sys-0.1.0
build(deps): bump golang.org/x/sys from 0.0.0-20210603125802-9665404d3644 to 0.1.0 in /client/pkg
2023-02-25 19:30:54 +08:00
8aedd91a02 build(deps): bump golang.org/x/sys in /client/pkg
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.0.0-20210603125802-9665404d3644 to 0.1.0.
- [Release notes](https://github.com/golang/sys/releases)
- [Commits](https://github.com/golang/sys/commits/v0.1.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-25 08:42:06 +00:00
42eee79f25 Merge pull request #15357 from etcd-io/dependabot/github_actions/github/codeql-action-2.2.5
build(deps): bump github/codeql-action from 2.2.4 to 2.2.5
2023-02-25 08:39:06 +08:00
3de346259b clientv3: update etcdctl's readme and comment of clientv3.WithSerializable to clarify the use cases
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-02-25 07:23:39 +08:00
1f0d361848 clientv3: support serializable MemberList operation
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-02-25 07:23:39 +08:00
0c52e5e133 build(deps): bump github/codeql-action from 2.2.4 to 2.2.5
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.2.4 to 2.2.5.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](17573ee1cc...32dc499307)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-24 23:21:07 +00:00
0a8cdddd26 Merge pull request #15356 from jmhbnz/main
Ensure we are using an up to date govulncheck
2023-02-25 07:20:30 +08:00
2d2fbcc30e Ensure we are using an up to date govulncheck.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-02-25 11:25:33 +13:00
b93745a862 migrate to auth test #4
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-02-23 10:46:31 -08:00
822eeaf9f2 Merge pull request #15345 from ahrtr/dependencies_20230221
dependency: bump github.com/golang-jwt/jwt/v4 to v4.5.0
2023-02-22 19:47:49 -05:00
7dfd29b0cc build(deps): bump github.com/mikefarah/yq/v4 in /tools/mod
Bumps [github.com/mikefarah/yq/v4](https://github.com/mikefarah/yq) from 4.30.8 to 4.31.1.
- [Release notes](https://github.com/mikefarah/yq/releases)
- [Changelog](https://github.com/mikefarah/yq/blob/master/release_notes.txt)
- [Commits](https://github.com/mikefarah/yq/compare/v4.30.8...v4.31.1)

---
updated-dependencies:
- dependency-name: github.com/mikefarah/yq/v4
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-21 07:50:45 +08:00
de9c0f8fea dependency: bump github.com/golang-jwt/jwt/v4 to v4.5.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-02-21 05:29:53 +08:00
66efadb8fb build(deps): bump honnef.co/go/tools from 0.4.0 to 0.4.2 in /tools/mod
Bumps [honnef.co/go/tools](https://github.com/dominikh/go-tools) from 0.4.0 to 0.4.2.
- [Release notes](https://github.com/dominikh/go-tools/releases)
- [Commits](https://github.com/dominikh/go-tools/compare/v0.4.0...v0.4.2)

---
updated-dependencies:
- dependency-name: honnef.co/go/tools
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-21 05:23:04 +08:00
b17b9c1428 chore: Use http constants to replace numbers as parameters
Signed-off-by: xin.li <xin.li@daocloud.io>
2023-02-20 11:53:41 +08:00
8e56e2f5ce add mix version for snapshot e2e case
Signed-off-by: WangXiaoxiao <1141195807@qq.com>
2023-02-18 18:01:48 +08:00
a7e94c4843 security: bump golang.org/x/net to v0.7.0 to address CVE GO-2023-1571
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-02-17 11:29:47 +08:00
c24ba4d3e8 Merge pull request #15320 from chaochn47/migrate_auth_tests_to_common
migrate 6 auth test cases to common #3
2023-02-16 11:40:34 +01:00
e603d92727 Merge pull request #15325 from serathius/linearizability-refactor-report
tests: Refactor file structure
2023-02-16 11:23:56 +01:00
ee6781bf6f Bump to go 1.19.6
go 1.19.6 (released 2023-02-14) includes important security and bug fixes.

Signed-off-by: James Blair <mail@jamesblair.net>
2023-02-16 17:12:59 +08:00
df99823975 changelog: update the release date of v3.4.24
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-02-16 10:03:37 +08:00
c36ea3fdcf migrate auto tests to common #3
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-02-15 11:08:01 -08:00
a36951ad18 tests: Extract report related functions and clean up main file
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-02-15 16:13:43 +01:00
116a3150c0 Merge pull request #15282 from serathius/linearizability-report-watch
test: Report watch histories
2023-02-15 16:00:10 +01:00
ada0937c59 Merge pull request #15324 from serathius/linearizability-duplicate-watch-event
tests: Detect duplicate watch event
2023-02-15 14:33:52 +01:00
edfc963302 tests: Detect duplicate watch event
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-02-15 13:59:03 +01:00
0cd5c9ca37 tests: Refactor reporting results
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-02-15 13:02:42 +01:00
d99b1dbdaf tests: Move results reporting to top and add reporting watch histories
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-02-15 13:02:42 +01:00
58d74e2b73 test: Refactor TestLinearizability function
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-02-15 13:02:42 +01:00
a64263cf49 tests: Refactor persisting single member dir
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-02-15 13:02:42 +01:00
d0e5c44f67 tests: Refactor getting test results directory
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-02-15 13:02:42 +01:00
2afaddd5b7 tests: Refactor getting longest history
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-02-15 13:02:42 +01:00
a806d155eb Merge pull request #15323 from lavacat/main-mono-clock
tests: use monotonic clock for linearizability test history
2023-02-15 11:38:44 +01:00
25eb025fc0 Merge pull request #15293 from serathius/linearizability-bookmark
Codify kubernetes using response header revision as bookmark
2023-02-15 11:36:03 +01:00
d0c3112d5a dependency: bump go.opentelemetry.io/otel from 1.11.2 to 1.13.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-02-15 18:33:00 +08:00
d2ccb12f36 tests: use monotonic clock for linearizability test history
Problem: time.Now() uses wall clock reading. See https://github.com/golang/go/blob/master/src/time/time.go#L17
"later time-telling operations use the wall clock reading, but later time-measuring operations, specifically comparisons and subtractions, use the monotonic clock reading."
This can cause 'Return' to be before 'Call' and wrong order of operations from different clients.

Solution: use same base time for all clients and only use 'time-measuring' operations to record timestamps for history.
Signed-off-by: Bogdan Kanivets <bkanivets@apple.com>
2023-02-15 01:37:21 -08:00
b55dbe88ca tests: Codify kubernetes using response header revision as bookmark
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-02-15 10:26:34 +01:00
202d813c7b Merge pull request #15259 from serathius/linearizability-multi-op-txn
tests: Implement multi operation Txn
2023-02-15 09:35:16 +01:00
04ba936ea6 tests: Implement multi operation Txn
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-02-14 17:57:52 +01:00
ab27d56244 Merge pull request #15316 from dims/do-not-run-arm64-jobs-on-forks
Do not run arm64 jobs on forks
2023-02-14 17:10:45 +01:00
c60e5954b3 Merge pull request #15318 from serathius/linearizability-duplicate-revision
Allow multiple operations with same mod revisions, but forbid …
2023-02-14 17:03:47 +01:00
b4f9bb45fc tests: Allow multiple operations with same mod revisions, but forbid those operations to be spread between multiple responses
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-02-14 14:36:51 +01:00
597bac7b51 Do not run arm64 jobs on forks
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-02-14 08:20:06 -05:00
6c439aa9e2 Merge pull request #15283 from serathius/linearizability-blackhole-refactor
tests: Refactor blackholing and add separate BlackholePeerUntilSnapsh…
2023-02-14 11:56:37 +01:00
1d8fe11ad9 dependency: bump golang.org/x/net from 0.5.0 to 0.6.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-02-14 17:40:47 +08:00
cc47f7bc7c dependency: bump gopkg.in/natefinch/lumberjack.v2 from 2.0.0 to 2.2.1
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-02-14 17:40:47 +08:00
e569217a6d tests: Refactor blackholing
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-02-14 09:38:10 +01:00
90f486f477 Adding CHANGELOG entries for zap timestamp resolution fixes.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-02-14 07:28:41 +08:00
50532c9fb5 build(deps): bump github/codeql-action from 2.2.1 to 2.2.4
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.2.1 to 2.2.4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](3ebbd71c74...17573ee1cc)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-13 20:35:03 +08:00
f005a20aa7 changelog: add items for the duplicated events issue
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-02-13 19:35:31 +08:00
ed30d5415a Merge pull request #15284 from serathius/funtional-remove
tests: Remove functional testing as they were replaced by linearizabi…
2023-02-13 12:32:04 +01:00
b4dfa9d34f test: correct the logic of comparing revision in linearizablity/watch.go
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-02-13 19:22:31 +08:00
5f68ecc1ef tests: Remove functional testing as they were replaced by linearizability tests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-02-11 13:20:44 +01:00
12d8742e29 Show darwin as supported in fileutil.Preallocate docstring
Signed-off-by: Mark Zhang <bf-109g2@hotmail.com>
2023-02-10 17:40:11 +00:00
87e271701b test: enhance the test case TestV3WatchProgressOnMemberRestart
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-02-10 20:09:26 +08:00
36fc3cae65 clientv3: correct the nextRev on receving progress notification response
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-02-10 09:09:19 +08:00
3c64ae4b79 Merge pull request #15239 from jmhbnz/main
Adjust time resolution to microseconds
2023-02-09 13:45:00 +01:00
d0575e4f18 Merge pull request #15268 from lavacat/main-before-follower-send-failpoint
tests: trigger raftBeforeFollowerSend failpoint in linearizability test
2023-02-09 09:45:58 +01:00
2eadb0ab74 contributing: invalid command for install tools
Fix command for install build tools

Signed-off-by: Myrat92 <zjsegzhf@gmail.com>
2023-02-09 16:05:37 +08:00
4b91ae2800 tests: trigger raftBeforeFollowerSend failpoint in linearizability test
raftBeforeFollowerSend can only be triggered on Follower and won't work on 1 node cluster.
Had to split RandomFailpoint into RandomOneNodeClusterFailpoint and RandomMultiNodeClusterFailpoint

Signed-off-by: Bogdan Kanivets <bkanivets@apple.com>
2023-02-08 23:28:23 -08:00
39d98522d6 tests: Enable progress notify in linearizability tests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-02-09 07:32:54 +08:00
586eaccc4d Merge pull request #15252 from ahrtr/walSync_failpoint_20230207
etcdserver: add failpoints walBeforeSync and walAfterSync
2023-02-08 09:59:46 +01:00
1fe7b9793a etcdserver: add failpoints walBeforeSync and walAfterSync
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-02-08 09:08:09 +08:00
9bae010994 Merge pull request #15250 from serathius/linearizability-validate-watch
tests: Validate watch responses in linearizability tests
2023-02-07 14:50:34 +01:00
8f54d38b6c build(deps): bump honnef.co/go/tools from 0.3.3 to 0.4.0 in /tools/mod
Bumps [honnef.co/go/tools](https://github.com/dominikh/go-tools) from 0.3.3 to 0.4.0.
- [Release notes](https://github.com/dominikh/go-tools/releases)
- [Commits](https://github.com/dominikh/go-tools/compare/v0.3.3...v0.4.0)

---
updated-dependencies:
- dependency-name: honnef.co/go/tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-07 06:29:36 +08:00
189d90ab7b tests: Validate watch responses in linearizability tests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-02-06 16:58:17 +01:00
d8eae85f58 Merge pull request #15249 from etcd-io/serathius-patch-1
Update @serathius email address just in case
2023-02-06 12:19:55 +01:00
adf14f80ba Update @serathius email address just in case
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-02-06 12:19:08 +01:00
dc51cf1646 Merge pull request #15104 from lavacat/main-tests-snapshots
tests linearizability: trigger snapshot related failpoints
2023-02-06 09:47:12 +01:00
91b056968d tests linearizability: trigger snapshot related failpoints
Signed-off-by: Bogdan Kanivets <bkanivets@apple.com>
2023-02-05 00:03:39 -08:00
65aa0fa305 Merge pull request #15242 from fuweid/linearizability-forcestop-cluster
tests/linearizability: force stop cluster with signal kill
2023-02-03 21:19:04 +01:00
2183a55b47 tests: forcestop member procs with signal kill
When the linearizability test cases run with three members, it might take
7-8s to stop three members, especially stopping the leader. The leader
will transfer the leadership and it might take more time to stop peer
listener.

In order to reduce the runtime, this commit is using signal kill to force
stop members instead of graceful shutdown.

REF: #15086

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-02-03 23:06:40 +08:00
fa527c5e54 tests: support to stop the multiple members concurrently
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-02-03 22:23:06 +08:00
712bd8a802 Merge pull request #15233 from kevinzs2048/wip-integration-arm64
Add integration test for Arm64
2023-02-03 12:10:35 +01:00
4d715c0c44 Add integration test for Arm64
Signed-off-by: Kevin Zhao <kevin.zhao@linaro.org>
2023-02-03 18:20:30 +08:00
5f27af9bb8 Fix regression in timestamp resolution
Historic capnslog timestamps are in microsecond resolution. We need to match that when we migrate to the zap logger.

Signed-off-by: James Blair <mail@jamesblair.net>
2023-02-03 21:42:01 +13:00
dc2b198cc7 docker: remove nsswitch.conf
Co-authored-by: Benjamin Wang <wachao@vmware.com>
Signed-off-by: Iavael <905853+iavael@users.noreply.github.com>
2023-02-03 06:37:03 +08:00
9505d72930 Merge pull request #15230 from kevinzs2048/wip-e2e-arm64
Add E2E tests on arm64
2023-02-02 09:05:44 +01:00
009a6c0b94 Add E2E tests on arm64
Now it is daily nightly build at 1 am.

Signed-off-by: Kevin Zhao <kevin.zhao@linaro.org>
2023-02-02 10:38:04 +08:00
b10ebff3bb changelog: add items to cover the bummping of bbolt to v1.3.7
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-02-02 03:47:31 +08:00
f25b159fe3 Merge pull request #15232 from fuweid/linearizability-remove-proxy-for-clustersize-one
tests/linearizability: remove PeerProxy for ClusterSize=1
2023-02-01 11:49:25 +01:00
5a249fb3e2 tests/linearizability: remove PeerProxy for ClusterSize=1
Skip the peer traffic failpoint.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-02-01 18:04:11 +08:00
d814adbf94 Merge pull request #15227 from serathius/linearizability-trigger-fail
Linearizability disable defragment request in traffic to remove flakes
2023-02-01 09:26:08 +01:00
90b839dda7 tests: Disable defrag command as it caused problems with defragBeforeCopy failpoint
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-01-31 12:48:23 +01:00
f4cc163190 Merge pull request #15156 from Nordix/add-minmax-allow-tls13
Add TLSv1.3 support.
2023-01-31 10:11:38 +01:00
5ae405e646 Merge pull request #15202 from serathius/linearizability-logger
tests: Propagage logger through linearizability tests
2023-01-31 08:46:28 +01:00
23e89b98a3 bump bbolt to v1.3.7
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-01-31 07:04:29 +08:00
82243d0919 netutil: consistently format ipv6 addresses
This formats ipv6 addresses to ensure they can be compared safely

Signed-off-by: kidsan <8798449+Kidsan@users.noreply.github.com>
2023-01-31 06:50:42 +08:00
aba0f91167 build(deps): bump github.com/mgechev/revive in /tools/mod
Bumps [github.com/mgechev/revive](https://github.com/mgechev/revive) from 1.2.4 to 1.2.5.
- [Release notes](https://github.com/mgechev/revive/releases)
- [Changelog](https://github.com/mgechev/revive/blob/master/.goreleaser.yml)
- [Commits](https://github.com/mgechev/revive/compare/v1.2.4...v1.2.5)

---
updated-dependencies:
- dependency-name: github.com/mgechev/revive
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-31 05:43:34 +08:00
d0a481be84 build(deps): bump github/codeql-action from 2.1.39 to 2.2.1
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.1.39 to 2.2.1.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](a34ca99b46...3ebbd71c74)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-31 05:28:21 +08:00
588b98d085 Add TLSv1.3 support.
Added optional TLS min/max protocol version and command line switches to set
versions for the etcd server.

If max version is not explicitly set by the user, let Go select the max
version which is currently TLSv1.3. Previously max version was set to TLSv1.2.

Signed-off-by: Tero Saarni <tero.saarni@est.tech>
2023-01-30 16:16:53 +02:00
0c004a6ce4 tests: Propagage logger through linearizability tests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-01-30 14:30:21 +01:00
a8b6b05564 Merge pull request #15191 from serathius/linearizability-failpoints-timeout
tests: Increase failpoint timeout and add more logs
2023-01-30 14:05:23 +01:00
535ade8eb2 tests: Increase failpoint timeout and add more logs
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-01-30 13:26:33 +01:00
b9b7c9328e tools: fix the CSV format error and add build target 'tools' in Makefile
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-01-30 16:35:41 +08:00
5b7b499f50 fix(client):getToken automatically when the token has expired
Signed-off-by: upuplouis <45809347+upuplouis@users.noreply.github.com>

add some notes

Signed-off-by: upuplouis <45809347+upuplouis@users.noreply.github.com>

client/v3:add some notes

Signed-off-by: upuplouis <45809347+upuplouis@users.noreply.github.com>

client/v3:rm Unused comments

Signed-off-by: upuplouis <45809347+upuplouis@users.noreply.github.com>

client/v3:rename gterr

Signed-off-by: upuplouis <45809347+upuplouis@users.noreply.github.com>

fix(client):fix refreshToken

Signed-off-by: upuplouis <45809347+upuplouis@users.noreply.github.com>

fix(client):rm unused comments

Signed-off-by: upuplouis <45809347+upuplouis@users.noreply.github.com>

fix(client):fix the format error.

Signed-off-by: upuplouis <45809347+upuplouis@users.noreply.github.com>

fix format err
2023-01-30 15:19:53 +08:00
a21b89071c CHANGELOG: add item about improvement for concurrent read
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-01-30 11:43:55 +08:00
3d3cb460a0 test: reorder the import items in linearizability/model/model.go
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-01-29 06:12:03 +08:00
070d56b6cd changelog: add ipv6 comparison fix to 3.4 and 3.5
Signed-off-by: kidsan <8798449+Kidsan@users.noreply.github.com>
2023-01-27 17:56:18 +08:00
e2b8e86624 etcdserver: correct the old name of notifyc in comments
The old name(raftDone) of the channel(notifyc) which indicates the apply has been
completed is left unchanged in the comments, resulting in confusion when reading
the source code.

Signed-off-by: caojiamingalan <alan.c.19971111@gmail.com>
2023-01-27 10:02:22 +08:00
3b612ce345 Merge pull request #15180 from serathius/linearizability-large-put
tests: Implement LargePut requests
2023-01-24 23:22:48 +01:00
ef0bdbe489 tests: Implement LargePut requests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-01-24 22:29:31 +01:00
91ec368927 Merge pull request #15178 from serathius/linearizability-defrag
tests: Add defragment request to linearizability tests
2023-01-24 22:23:51 +01:00
c50e602458 tests: Add defragment request to linearizability tests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-01-24 21:49:57 +01:00
63902fafbd Change verb and use switch stmt
Signed-off-by: Sasha Melentyev <sasha@melentyev.io>
2023-01-25 03:47:07 +08:00
bfc361e2df Merge pull request #15179 from serathius/linearizability-deduplicate-scenarios
tests: Deduplicate cluster test scenarios
2023-01-24 20:11:49 +01:00
5cfc2dd7a8 CHANGELOG: add item about improvement for limit range
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-01-25 02:33:07 +08:00
187d2748a4 Merge pull request #15172 from dims/add-functional-tests-on-arm64
Add functional tests on arm64
2023-01-24 19:09:38 +01:00
0575166651 Run on a schedule instead of every PR
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-01-24 13:06:42 -05:00
cc612821e7 tests: Deduplicate cluster test scenarios
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-01-24 18:41:42 +01:00
045cd44eaf Merge pull request #15176 from serathius/linearizability-cluster-stop
tests: Stop cluster after tests finish
2023-01-24 16:48:00 +01:00
45e11687c4 tests: Stop cluster after tests finish
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-01-24 15:48:01 +01:00
207e0f74aa Merge pull request #15159 from serathius/linearizability-separate-request-type
tests: Separate request type from Txn operation type
2023-01-24 13:47:55 +01:00
0d7b624fae dependency: bump github.com/google/addlicense from 1.1.0 to 1.1.1
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-01-24 16:59:37 +08:00
5b8d7698c8 dependency: bump github.com/coreos/go-semver from 0.3.0 to 0.3.1
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-01-24 16:59:37 +08:00
54bd81815d build(deps): bump golangci/golangci-lint-action from 3.3.1 to 3.4.0
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.3.1 to 3.4.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](0ad9a0988b...08e2f20817)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-24 08:10:43 +08:00
844ac9c76d tests: Separate request type from Txn operation type
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-01-23 22:59:28 +01:00
5f94975860 Add functional tests on arm64
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-01-23 16:10:24 -05:00
e04da89030 Merge pull request #15158 from sashamelentyev/cleanup-2
Cleanup
2023-01-23 11:44:07 -05:00
21e21fe36b changelog: Set release date for v3.5.7
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-01-23 18:21:44 +08:00
0f4d7a7483 Cleanup
Signed-off-by: Sasha Melentyev <sasha@melentyev.io>
2023-01-21 15:57:48 +03:00
ee566c492b build(deps): bump github/codeql-action from 2.1.38 to 2.1.39
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.1.38 to 2.1.39.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](515828d974...a34ca99b46)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-20 18:35:49 +08:00
a794be89cb Merge pull request #15149 from serathius/linearizability-artifact-name
tests: Set artifact name based to avoid file override from different subruns
2023-01-20 10:27:04 +01:00
1a315097de tests: Set artifact name based to avoid file override from different subruns
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-01-20 09:51:41 +01:00
0e6074f4e3 Merge pull request #15142 from serathius/linearizability-nightly-fix2
tests: Fix linearizability nightly
2023-01-20 09:46:57 +01:00
a581062c7a tests: Fix linearizability nightly
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-01-20 09:13:51 +01:00
fab8474ef8 test: add CompactionSleepInterval in FakeStore's config
After setting the ComparionSleepInterval, we can use time.Ticker
instead of time.After to optimize the scheduleComparison(),
otherwise it will fail in the 'TestStoreCompact(t)' test.

Signed-off-by: guozhao <guozhao@360.cn>
2023-01-20 06:25:09 +08:00
397e3fb77a Merge pull request #15146 from Niravprajapati1/typo-fix
etcd: fix typo in bug.yaml
2023-01-19 09:55:36 +01:00
fba3b96169 fix: typo in bug.yaml
Signed-off-by: Nirav_Prajapati <niravprajapati97120@gmail.com>
2023-01-19 06:39:37 +00:00
756875151f Merge pull request #15130 from guozhao-coder/replace-timeAfter
etcdserver: use time.Ticker instead of time.After
2023-01-19 05:09:21 +08:00
2af9d67943 Merge pull request #15133 from serathius/linearizability-history-persist
tests: Persist operation history
2023-01-19 05:08:49 +08:00
e3e94fe89e Merge pull request #14682 from serathius/issue13766
Reproduce issue 13766 in linearizability tests
2023-01-18 13:37:34 +01:00
f629d48600 Close file while persisting operation history
Co-authored-by: Benjamin Wang <wachao@vmware.com>
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-01-18 09:43:30 +01:00
48ac46dab5 Merge pull request #15135 from fuweid/update-3.4-changelog
CHANGELOG: add item about improvement for count-only range
2023-01-18 10:30:12 +08:00
754e1ee4ce CHANGELOG: add item about improvement for count-only range
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-01-18 09:51:42 +08:00
a0d12d316d tests: Add reproduce #13766 scenario
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-01-17 14:34:19 +01:00
f763c53d51 tests: Persist operation history
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-01-17 11:58:56 +01:00
09b5663301 Merge pull request #15132 from serathius/linearizability-nightly-fix
tests: Fix linearizability nightly variable name
2023-01-17 10:40:55 +01:00
0c483830d9 tests: Fix linearizability nightly variable name 2023-01-17 10:40:05 +01:00
a31b44b843 Merge pull request #15098 from ahrtr/changelog_promote_learner_20230113
changelog: add items to cover the issue of promoting a non-started learner member
2023-01-17 10:23:25 +01:00
de8d6b3792 etcdserver: use time.Ticker instead of time.After
Using time.After will create a new Timer in each cycle, In these cases
, it is better to use time.Ticker.

Signed-off-by: guozhao <guozhao@360.cn>
2023-01-17 16:58:13 +08:00
5d06650028 Merge pull request #15128 from serathius/linearizability-move-model
tests: Move linearizability model and identity to dedicated packages
2023-01-17 09:17:31 +01:00
a3925d1ed6 Merge pull request #15129 from ahrtr/bump_dependency_20230117
Bump some dependencies
2023-01-17 07:16:46 +08:00
81b359262e Merge pull request #15095 from ahrtr/promote_non_exist_id_20230113
etcdserver: return `membership.ErrIDNotFound` when the memberID not found
2023-01-17 07:12:29 +08:00
1659f8980f dependency: bump github/codeql-action from 2.1.37 to 2.1.38
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-01-17 06:46:31 +08:00
b2d482e6da dependency: bump gotest.tools/gotestsum from v1.8.2 to v1.9.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-01-17 06:39:26 +08:00
ac98432f0b dependency: bump github.com/dustin/go-humanize from v1.0.0 to v1.0.1
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-01-17 06:37:19 +08:00
575ceed1c7 dependency: bump github.com/mikefarah/yq/v4 from v4.30.6 to v4.30.8
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-01-17 06:33:05 +08:00
8ed20e85d2 etcdserver: return membership.ErrIDNotFound when the memberID not found
When promoting a learner, we need to wait until the leader's applied ID
catches up to the commitId. Afterwards, check whether the learner ID
exist or not, and return `membership.ErrIDNotFound` directly in the API
if the member ID not found, to avoid the request being unnecessarily
delivered to raft.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-01-17 06:18:15 +08:00
96e2a7fbd6 tests: Move linearizability model and identity to dedicated packages
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-01-16 19:16:27 +01:00
677e5281e0 Merge pull request #15106 from serathius/linearizability-nightly-release
Add linearizability nightlies for release 3.4/3.5
2023-01-16 11:47:39 +01:00
ab3c530b92 add linearizability nightlies for release 3.4/3.5
This CL refactors the tests to reuse a single workflow that has
parameters. This is then reused for PRs/pushes and the nightlies.

Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-01-16 11:00:16 +01:00
7daec2928a Merge pull request #15071 from wafuwafu13/refactor-gettoken
clientv3: refactor getToken automatically
2023-01-15 18:26:21 -05:00
d31a0ee88a Merge pull request #15105 from serathius/linearizability-nightly-timeout
tests: Reduce number of runs in nightly action
2023-01-15 07:21:30 +08:00
5b8d19c7b3 tests: Reduce number of runs in nightly action
Single run takes up to 30s. Let's reduce number of runs to reduce chance
of timeout.

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-01-14 09:29:12 +01:00
d37f9b2092 Merge pull request #15101 from serathius/linearizability-history-patch-window
tests: Fix history patch window
2023-01-14 09:20:14 +01:00
1257d0d919 tests: Fix history patch window
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-01-13 16:19:20 +01:00
6315f1cfdc Merge pull request #15093 from geetasg/lease_support_review_feedback
Lease support for linearizability tests :  address review feedback
2023-01-13 09:15:54 +01:00
0ccde80d22 changelog: add items to cover the issue of prmoting a non-started learner member
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-01-13 15:22:55 +08:00
66bcb08a23 Merge pull request #15094 from fuweid/changelog-update
CHANGELOG: add dep update item to 3.4
2023-01-13 11:49:08 +08:00
7434636424 CHANGELOG: add dep update item to 3.4
It is used to fix grpc-gateway error handler issue.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-01-13 11:12:36 +08:00
6106912338 Lease support for linearizability tests : Updated as per review feedback.
Signed-off-by: Geeta Gharpure <geetagh@amazon.com>
2023-01-12 23:25:40 +00:00
715a0047fa Merge pull request #15091 from serathius/linearizability-stop-proxy
tests: Move stopping proxy to after process stop to speed up cluster …
2023-01-12 23:46:53 +01:00
2fcb05710d tests: Move stopping proxy to after process stop to speed up cluster shutdown
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-01-12 15:17:34 +01:00
7eb6f66b17 Merge pull request #15084 from serathius/linearizability-lease-timeout
tests: Fix putWithLease traffic timeout/limit and double overall timeout to reduce number of failed requests
2023-01-12 13:49:44 +01:00
bff3d4a592 tests: Fix putWithLease traffic timeout/limit and double overall timeout to reduce number of failed requests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-01-12 10:17:54 +01:00
2b45023364 Merge pull request #15078 from serathius/linearizability-patch-operations
tests: Use watch events to patch history to speed up linearization
2023-01-12 10:09:01 +01:00
7b2dfece70 tests: Use watch events to patch history to speed up linearization
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-01-12 09:31:23 +01:00
3306639b76 Merge pull request #15080 from geetasg/lease_support_refactor
Add support for lease api to linearizability tests
2023-01-11 15:34:36 +01:00
ef917f1efd Merge pull request #15068 from ahrtr/last_wal_rec_corrupt_main_20220107
etcdserver: process the case of the last WAL record being partially synced to disk [backport 3.5]
2023-01-11 18:06:46 +08:00
d3b753e27a Merge pull request #15081 from yanggangtony/go-version
Bump go to 1.19.5
2023-01-11 17:22:03 +08:00
3e48a59c9e Merge pull request #15070 from ahrtr/changelog_wal_record_partially_synced_20230108
changelog: add 3.5 item to cover the fix for last partically synced WAL record
2023-01-11 16:38:02 +08:00
ebf1e3bb1a Bump go to 1.19.5
Signed-off-by: yanggang <gang.yang@daocloud.io>
2023-01-11 14:42:31 +08:00
5b84526e9a Add support for lease api to linearizability tests
Signed-off-by: Geeta Gharpure <geetagh@amazon.com>
2023-01-11 05:19:57 +00:00
ff898640a5 Merge pull request #15044 from serathius/linearizability-watch
Watch events during linearizability test and compare history
2023-01-10 17:59:04 +01:00
8a9f848d33 tests: Refactor how linearizability test components are run in parallel
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-01-10 15:12:12 +01:00
6821e226dd tests: Watch events during linearizability test and compare history
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-01-10 15:11:23 +01:00
2965817150 Merge pull request #15046 from serathius/linearizability-failpoints-available
tests: Trigger only failpoints available in binary
2023-01-10 09:15:20 +01:00
8134b8b46d Merge pull request #15073 from etcd-io/dependabot/go_modules/server/golang.org/x/net-0.5.0
build(deps): bump golang.org/x/net from 0.4.0 to 0.5.0 in /server
2023-01-10 10:14:43 +08:00
30fc7611e2 tidy up dependencies
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-01-10 09:11:34 +08:00
d104408036 build(deps): bump golang.org/x/net from 0.4.0 to 0.5.0 in /server
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.4.0 to 0.5.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](https://github.com/golang/net/compare/v0.4.0...v0.5.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-10 09:10:07 +08:00
c9a9968d40 Merge pull request #15074 from etcd-io/dependabot/github_actions/actions/upload-artifact-3.1.2
build(deps): bump actions/upload-artifact from 3.1.1 to 3.1.2
2023-01-10 09:08:02 +08:00
af5ff0745d Merge pull request #15075 from etcd-io/dependabot/github_actions/actions/checkout-3.3.0
build(deps): bump actions/checkout from 3.2.0 to 3.3.0
2023-01-10 09:04:53 +08:00
9f93448500 build(deps): bump actions/checkout from 3.2.0 to 3.3.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](755da8c3cf...ac59398561)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-09 17:12:51 +00:00
ad315b38fa build(deps): bump actions/upload-artifact from 3.1.1 to 3.1.2
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3.1.1 to 3.1.2.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](83fd05a356...0b7f8abb15)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-09 17:12:44 +00:00
deb4291485 tests: Trigger only failpoints available in binary
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-01-09 17:29:38 +01:00
a992fb5e92 Merge pull request #15059 from serathius/linearizability-operations
tests: Rewrite etcd requests to use operations
2023-01-09 15:12:16 +01:00
acf3782c20 Merge pull request #15048 from serathius/linearizability-network
tests: Implement network delay and blackholing in linearizability tests
2023-01-09 14:51:54 +01:00
6877122dca tests: Rewrite etcd requests to use operations
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-01-09 14:42:25 +01:00
064fad5ae4 tests: Implement network delay and blackholing in linearizability tests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-01-09 14:18:07 +01:00
8b15146f27 clientv3: refactor getToken automatically
Signed-off-by: wafuwafu13 <mariobaske@i.softbank.jp>
2023-01-09 18:01:32 +09:00
4c18ff6673 changelog: add 3.5 item to cover the fix for last partically synced WAL record
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-01-08 05:40:27 +08:00
5ef713c728 remove the dependency on the deprecated io/ioutil
Reference: https://go.dev/doc/go1.16#ioutil

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-01-08 04:55:40 +08:00
bd9f1584d4 process the scenaro of the last WAL record being partially synced to disk
We need to return io.ErrUnexpectedEOF in the error chain, so that
etcdserver can repair it automatically.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-01-08 04:46:51 +08:00
108cd9abaa Merge pull request #15067 from halegreen/fix-comment-typo
client/v3: fix comment typo
2023-01-07 18:02:31 +08:00
49abfa5992 client/v3: fix comment typo
Signed-off-by: WangXiaoxiao <1141195807@qq.com>
2023-01-07 14:40:12 +08:00
6200b22f79 Merge pull request #15033 from chaochn47/snapshotCatchupEntries
externalize snapshot catchup entries to etcd flag
2023-01-05 12:47:28 +08:00
2c46b2b299 externalize snapshot catchup entries to etcd flag
Signed-off-by: Chao Chen <chaochn@amazon.com>
2023-01-04 19:01:07 -08:00
bb86058fef tests: Test model describe method
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2023-01-01 19:54:16 +01:00
e73f55d4e9 Merge pull request #15028 from chaochn47/auth_test_split
tests/common: migrate auth tests #2
2023-01-01 18:58:39 +01:00
4ae4d9fe6c Merge pull request #15043 from ptabor/20221223-log-diagnostics
etcd-dump-logs: Expand to allow diagnosing CRC corrupted problems in WAL log
2022-12-30 10:40:10 +01:00
007858dc97 etcd-dump-logs: Migrate from zap to log for raw
Signed-off-by: Piotr Tabor <ptab@google.com>
2022-12-30 09:22:39 +01:00
8ec3cbc551 fixup! Add --raw mode to ./etcd-dump-log
Signed-off-by: Piotr Tabor <ptab@google.com>
2022-12-30 09:22:39 +01:00
d79bc3fa7e etcd-dump-logs: Fix order of imports..
Signed-off-by: Piotr Tabor <ptab@google.com>
2022-12-30 09:22:39 +01:00
e571fb7baa Add --raw mode to ./etcd-dump-log
This mode allows to look at RAW protos for all entries in WAL logs in the given directory.

Signed-off-by: Piotr Tabor <ptab@google.com>
2022-12-30 09:22:34 +01:00
58681d3feb Expose types of entries within the WAL log for access from the tools.
Signed-off-by: Piotr Tabor <ptab@google.com>
2022-12-30 09:19:23 +01:00
0d8aad54ba wal: Expose Decoder as package visible interface.
Such that can be used by tools.

Signed-off-by: Piotr Tabor <ptab@google.com>
2022-12-30 09:19:23 +01:00
bee2a08968 wal decoding: Add optional mode to ignore CRC errors.
Signed-off-by: Piotr Tabor <ptab@google.com>
2022-12-30 09:19:23 +01:00
498619bdda wal decoder: report file & offset in case of CRC mismatch.
Signed-off-by: Piotr Tabor <ptab@google.com>
2022-12-30 09:19:23 +01:00
bcd5b54e7f Merge pull request #15055 from ptabor/20221228-fix-dump-logs-tests
etcd-dump-logs: Make the tests work again.
2022-12-30 09:17:34 +01:00
9d6b49ed16 Merge pull request #15056 from ptabor/20221218-goimport-tests
Goimports: Apply automated fixing to test files as well.
2022-12-30 10:18:05 +08:00
18a5dc417b Merge pull request #14924 from serathius/linearizability-multiple-keys
tests: Support multiple keys in linearizability tests
2022-12-29 22:47:52 +01:00
14a1bf1d26 etcd-dump-logs: Make the tests work again.
The tests are subtle as they skip if the binary is not generated in the local directory.

$ go build . && go test
PASS
ok      go.etcd.io/etcd/v3/tools/etcd-dump-logs 0.769s

Signed-off-by: Piotr Tabor <ptab@google.com>
2022-12-29 13:08:24 +01:00
9abc895122 Goimports: Apply automated fixing to test files as well.
Signed-off-by: Piotr Tabor <ptab@google.com>
2022-12-29 13:04:45 +01:00
6f899a7b40 Merge pull request #15052 from ptabor/20221228-goimports-fix
./scripts/fix.sh: Takes care of goimports across the whole project.
2022-12-29 11:31:22 +01:00
d4c8611be9 tests: Add comments to linearizability functions
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
Co-authored-by: Benjamin Wang <wachao@vmware.com>
2022-12-29 10:02:21 +01:00
cf22f60e8b Merge pull request #15053 from wafuwafu13/show-as-learner
enhancement(ctlv3): display `as learner` when member add as learner
2022-12-29 09:44:26 +01:00
9e1abbab6e Fix goimports in all existing files. Execution of ./scripts/fix.sh
Signed-off-by: Piotr Tabor <ptab@google.com>
2022-12-29 09:41:31 +01:00
d0cfee180d Merge pull request #15054 from fuweid/cleanup-old-build-tags
chore: delete // +build buildtag by `go fix`
2022-12-29 15:00:27 +08:00
4d0b91947e chore: delete // +build buildtag by go fix
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-12-29 14:17:05 +08:00
4e8761b200 go fmt
Signed-off-by: wafuwafu13 <mariobaske@i.softbank.jp>
2022-12-29 13:18:23 +09:00
0c67e318d7 enhancement(ctlv3): display as learner when member add as learner
Signed-off-by: wafuwafu13 <mariobaske@i.softbank.jp>
2022-12-29 13:18:23 +09:00
ff71f34368 tests: Support multiple keys in linearizability tests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-12-28 20:03:36 +01:00
a4c1b3a9e2 Merge pull request #15045 from serathius/linearizability-model
tests: Refactor etcd model
2022-12-28 20:01:00 +01:00
5a28a02b97 ./scripts/fix.sh: Takes care of goimports across the whole project.
Signed-off-by: Piotr Tabor <ptab@google.com>
2022-12-28 16:37:55 +01:00
abf80a8e10 Merge pull request #15051 from JOJO0527/patch-2
etcdserver: fix typo in comment
2022-12-28 14:14:09 +01:00
101a2a61ea etcdserver: fix typo in comment
etcdserver: fix typo in comment
2022-12-28 18:41:08 +08:00
ff71968046 Merge pull request #15050 from ahrtr/fix_rate_limit_20221228
Added 'secrets.GITHUB_TOKEN' for the static-analysis workflow
2022-12-28 16:15:08 +08:00
a60db1192d Added 'secrets.GITHUB_TOKEN' for the static-analysis workflow
Refer to: https://github.com/arduino/setup-protoc/issues/63

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-28 15:43:44 +08:00
1866fa6f3d Merge pull request #15047 from etcd-io/dependabot/github_actions/ossf/scorecard-action-2.1.2
build(deps): bump ossf/scorecard-action from 2.1.0 to 2.1.2
2022-12-27 07:12:12 +08:00
0fcd828de9 build(deps): bump ossf/scorecard-action from 2.1.0 to 2.1.2
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.1.0 to 2.1.2.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](937ffa90d7...e38b1902ae)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-26 17:18:42 +00:00
9169522d72 Merge pull request #15021 from ramil600/em_manager
clientv3/naming/endpoints: fix endpoints prefix bug
2022-12-26 10:19:26 +08:00
de8b914eb0 Merge pull request #14909 from serathius/linearizability-issue14685-real
tests: Reproduce issue 14685
2022-12-25 06:48:22 +01:00
b108fabf86 tests: Reproduce issue 14685
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-12-24 21:26:57 +01:00
922bed1ae6 tests: Refactor etcd model
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-12-24 21:12:32 +01:00
683a7e8c6b Merge pull request #15040 from ahrtr/update_nsswitch
Update nsswitch.conf file
2022-12-23 15:20:54 +01:00
f01cfda7c9 update nsswitch.conf file
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-23 20:27:53 +08:00
7d5151532c Merge pull request #15039 from ahrtr/changelog_remove_busybox_20221223
Changelog: update base image to static-debian11 and removd dependency on busybox
2022-12-23 20:12:51 +08:00
e06cff4d5d update changelog to update base image to static-debian11 and removd dependency on busybox
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-23 19:26:17 +08:00
1e14a0e31d Merge pull request #15036 from ahrtr/remove_busybox_20221223
remove the dependency on busybox
2022-12-23 18:09:28 +08:00
27ca4d5488 remove the dependency on busybox
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-23 17:28:24 +08:00
f0153222f1 clientv3/naming/endpoints: fix endpoints prefix bug
fixes bug with multiple endpoints with same prefix

Signed-off-by: Ramil Mirhasanov <ramil600@yahoo.com>
2022-12-22 13:36:16 +03:00
16e1fff519 changelog: update the release date of etcd v3.4.23
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-21 14:36:51 +08:00
054b24b425 Merge pull request #15031 from ahrtr/SnapshotWithVersion_nil_panic_20221220
clientv3: add protection code to prevent SnapshotWithVersion from panicking
2022-12-21 06:45:31 +08:00
4d9b709ce0 Merge pull request #15024 from wafuwafu13/client-isunavailableerr-test
test(client): add `TestIsUnavailableErr`
2022-12-21 06:42:44 +08:00
2041d5f245 fix: change error message
Signed-off-by: wafuwafu13 <mariobaske@i.softbank.jp>
2022-12-20 21:54:52 +09:00
57413851b6 fix(client): change error message
Signed-off-by: wafuwafu13 <mariobaske@i.softbank.jp>
2022-12-20 21:52:59 +09:00
dc88d90763 test: add TestIsUnavailableErr
Signed-off-by: wafuwafu13 <mariobaske@i.softbank.jp>
2022-12-20 21:52:59 +09:00
77e4e87ee7 refactor: use assert
Signed-off-by: wafuwafu13 <mariobaske@i.softbank.jp>
2022-12-20 21:52:58 +09:00
a7da508ff6 tests/common: migrate auth tests #1
Signed-off-by: Chao Chen <chaochn@amazon.com>
2022-12-19 22:23:11 -08:00
dc680e3580 Merge pull request #15023 from unai-ttxu/task/fix_etcdctl_member_list_hex_consistency
Improve memberList output consistency
2022-12-20 12:52:40 +08:00
39d96b2557 clientv3: add protection code to prevent SnapshotWithVersion from panicking
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-20 12:51:08 +08:00
d3619e9332 Merge pull request #15012 from wafuwafu13/credentials-test
test(client): add `credentials_test.go`
2022-12-20 10:25:00 +08:00
858e94ad58 Merge pull request #15026 from etcd-io/dependabot/github_actions/ossf/scorecard-action-2.1.0
build(deps): bump ossf/scorecard-action from 2.0.6 to 2.1.0
2022-12-20 10:08:00 +08:00
429f66e12a build(deps): bump ossf/scorecard-action from 2.0.6 to 2.1.0
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.0.6 to 2.1.0.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](99c53751e0...937ffa90d7)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-20 09:28:23 +08:00
599841ca12 Merge pull request #15027 from etcd-io/dependabot/github_actions/github/codeql-action-2.1.37
build(deps): bump github/codeql-action from 2.1.36 to 2.1.37
2022-12-20 09:26:41 +08:00
e98e0df955 Merge pull request #15025 from etcd-io/dependabot/go_modules/tools/mod/github.com/mikefarah/yq/v4-4.30.6
build(deps): bump github.com/mikefarah/yq/v4 from 4.30.5 to 4.30.6 in /tools/mod
2022-12-20 09:24:56 +08:00
ef02c159f2 build(deps): bump github/codeql-action from 2.1.36 to 2.1.37
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.1.36 to 2.1.37.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v2.1.36...959cbb7472c4d4ad70cdfe6f4976053fe48ab394)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-19 17:09:20 +00:00
6f522f657d build(deps): bump github.com/mikefarah/yq/v4 in /tools/mod
Bumps [github.com/mikefarah/yq/v4](https://github.com/mikefarah/yq) from 4.30.5 to 4.30.6.
- [Release notes](https://github.com/mikefarah/yq/releases)
- [Changelog](https://github.com/mikefarah/yq/blob/master/release_notes.txt)
- [Commits](https://github.com/mikefarah/yq/compare/v4.30.5...v4.30.6)

---
updated-dependencies:
- dependency-name: github.com/mikefarah/yq/v4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-19 17:03:52 +00:00
1c00d46b83 Merge pull request #15020 from ahrtr/changelog_security_20221219
changelog: update items to address the critical and high Vulnerabilities
2022-12-19 20:18:00 +08:00
8a75cfff67 Improve memberList output consistency
Signed-off-by: Unai Arrien <unaittxu@gmail.com>
2022-12-19 13:09:19 +01:00
b7c1551250 changelog: update items to address the critical and high Vulnerabilities
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-19 18:41:30 +08:00
6fc0d96b42 Merge pull request #14993 from ramil600/add-log
clientv3/concurrency: add logger to session, add unit test
2022-12-19 10:30:38 +01:00
04a75b10bf Merge pull request #14875 from BarrensZeppelin/patch-lessor
lease: fix potential goroutine leak in lessor_test.go
2022-12-19 09:28:50 +01:00
ba718c8303 Merge pull request #14918 from fuweid/revert-pr-12129
maintenance: add test to verify content of Snapshot
2022-12-18 06:37:48 +08:00
8bd191ae99 test(client): add credentials_test.go
Signed-off-by: wafuwafu13 <mariobaske@i.softbank.jp>
2022-12-17 18:21:20 +09:00
614e520b97 Merge pull request #14998 from chaochn47/auth_test_split
tests/common: migrate auth tests #1
2022-12-17 14:23:35 +08:00
3c582fecb0 clientv3/concurrency: add logger to session, add unit test
Signed-off-by: Ramil Mirhasanov <ramil600@yahoo.com>
2022-12-16 11:11:35 +03:00
e58c73cc18 maintenance: add test to verify content of Snapshot
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-12-16 15:53:39 +08:00
5879ee9bd2 Merge pull request #14999 from fuweid/deflake-14926
e2e: deflake TestCtlV3AuthGracefulDisable
2022-12-16 14:42:27 +08:00
1f93e33c33 Merge pull request #15005 from ArkaSaha30/trivy-nightly-scan
Move trivy scan workflow of specific versions to respective branches
2022-12-16 13:41:47 +08:00
a438794abb e2e: deflake TestCtlV3AuthGracefulDisable
We should call Wait for grpc-proxy process stop before start. Otherwise,
the tcp port won't be released.

Fixes: #14926

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-12-16 13:33:02 +08:00
2d47811407 Move trivy scan workflow of specific versions to respective branches
Signed-off-by: ArkaSaha30 <arkasaha30@gmail.com>
2022-12-16 10:43:55 +05:30
3f4cdff0de Merge pull request #15004 from j13tw/fix-doc
fix doc etcdd.io -> etcd.io
2022-12-16 11:48:11 +08:00
cfe56b3d84 fix doc etcdd.io -> etcd.io
Signed-off-by: ZhengSheng0524 <j13tw@yahoo.com.tw>
2022-12-16 11:23:50 +08:00
1cde3804b0 Merge pull request #15000 from wafuwafu13/server-access-control-test
tests(etcdserver): add `server_access_control_test.go`
2022-12-16 10:09:59 +08:00
2ffa9e7c91 tests(etcdserver): refactor
Signed-off-by: wafuwafu13 <mariobaske@i.softbank.jp>
2022-12-16 10:09:04 +09:00
008df94901 tests/common: migrate auth tests #1
Signed-off-by: Chao Chen <chaochn@amazon.com>
2022-12-15 10:49:20 -08:00
8dcfca0097 tests(etcdserver): add server_access_control_test.go
Signed-off-by: wafuwafu13 <mariobaske@i.softbank.jp>
2022-12-15 21:46:48 +09:00
677b07be0a Merge pull request #14996 from ahrtr/changelog_watch_error_20221215
changelog: added item to cover the rollback to fix 'auth invalid token and old revision errors in watch'
2022-12-15 09:40:01 +09:00
0e48777190 changelog: added item to cover the rollback to fix 'auth invalid token and old revision errors in watch'
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-15 02:22:12 +08:00
8e3fc380dc Merge pull request #14978 from etcd-io/dependabot/github_actions/actions/setup-go-3.5.0
build(deps): bump actions/setup-go from 2.2.0 to 3.5.0
2022-12-14 10:37:26 +08:00
a59276c171 build(deps): bump actions/setup-go from 2.2.0 to 3.5.0
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 2.2.0 to 3.5.0.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](bfdd3570ce...6edd4406fa)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-14 08:59:29 +08:00
3b9086009d Merge pull request #14982 from etcd-io/dependabot/go_modules/tools/mod/github.com/alexkohler/nakedret-1.0.1
build(deps): bump github.com/alexkohler/nakedret from 1.0.0 to 1.0.1 in /tools/mod
2022-12-14 08:56:47 +08:00
cb5b7c2ec7 Merge pull request #14928 from ArkaSaha30/trivy-nightly-scan
etcd: add `trivy-nightly-scan` for etcd images
2022-12-14 08:52:44 +08:00
cd2640f9c0 Merge pull request #14979 from etcd-io/dependabot/go_modules/tools/mod/honnef.co/go/tools-0.3.3
build(deps): bump honnef.co/go/tools from 0.3.0 to 0.3.3 in /tools/mod
2022-12-14 08:50:44 +08:00
6e42da26e4 Merge pull request #14981 from etcd-io/dependabot/go_modules/tests/github.com/anishathalye/porcupine-0.1.4
build(deps): bump github.com/anishathalye/porcupine from 0.1.2 to 0.1.4 in /tests
2022-12-14 08:46:34 +08:00
17d1761fbd build(deps): bump github.com/alexkohler/nakedret in /tools/mod
Bumps [github.com/alexkohler/nakedret](https://github.com/alexkohler/nakedret) from 1.0.0 to 1.0.1.
- [Release notes](https://github.com/alexkohler/nakedret/releases)
- [Commits](https://github.com/alexkohler/nakedret/compare/v1.0...v1.0.1)

---
updated-dependencies:
- dependency-name: github.com/alexkohler/nakedret
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-14 00:19:18 +00:00
042022390d build(deps): bump honnef.co/go/tools from 0.3.0 to 0.3.3 in /tools/mod
Bumps [honnef.co/go/tools](https://github.com/dominikh/go-tools) from 0.3.0 to 0.3.3.
- [Release notes](https://github.com/dominikh/go-tools/releases)
- [Commits](https://github.com/dominikh/go-tools/compare/v0.3.0...v0.3.3)

---
updated-dependencies:
- dependency-name: honnef.co/go/tools
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-14 00:18:23 +00:00
4cce496e3f Merge pull request #14973 from ahrtr/bump_zap_20221213
deps: bump some dependencies suggested by dependabot
2022-12-14 08:06:41 +08:00
c5d80b388b build(deps): bump github.com/anishathalye/porcupine in /tests
Bumps [github.com/anishathalye/porcupine](https://github.com/anishathalye/porcupine) from 0.1.2 to 0.1.4.
- [Release notes](https://github.com/anishathalye/porcupine/releases)
- [Commits](https://github.com/anishathalye/porcupine/compare/v0.1.2...v0.1.4)

---
updated-dependencies:
- dependency-name: github.com/anishathalye/porcupine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-13 22:32:23 +00:00
367c19e159 Merge pull request #14972 from ahrtr/dependabot_weekly_20221213
dependabot: change schedule interval to weekly
2022-12-13 17:31:31 -05:00
c4f7ac28a2 deps: bump go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc from 0.32.0 to 0.37.0 in /server
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-14 04:32:18 +08:00
32840bae73 deps: bump go.opentelemetry.io/otel from 1.7.0 to 1.11.2
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-14 04:27:04 +08:00
8f320bfa00 deps: bump github.com/golang-jwt/jwt/v4 from 4.4.2 to 4.4.3 in /server
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-14 04:19:10 +08:00
8b34906b1d deps: bump github.com/mikefarah/yq/v4 from 4.24.2 to 4.30.5 in /tools/mod
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-14 04:17:21 +08:00
6845168182 deps: bump github.com/google/addlicense from 1.0.0 to 1.1.0 in /tools/mod
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-14 04:15:44 +08:00
feeb703b06 deps: bump gotest.tools/v3 from 3.1.0 to 3.4.0 in /tools/mod
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-14 04:13:08 +08:00
40e85f6bee deps: bump github.com/mgechev/revive from 1.2.1 to 1.2.4 in /tools/mod
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-14 04:09:35 +08:00
c51540bdd2 deps: bump google.golang.org/protobuf from 1.28.0 to 1.28.1
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-14 04:07:52 +08:00
b96be4f1d3 deps: bump github.com/cheggaaa/pb/v3 from 3.0.8 to 3.1.0 in /etcdctl
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-14 04:03:53 +08:00
2c192f4205 deps: bump go.uber.org/multierr from 1.8.0 to 1.9.0 in /server
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-14 04:00:49 +08:00
642a451165 deps: bump gotest.tools/gotestsum from 1.7.0 to 1.8.2 in /tools/mod
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-14 03:53:44 +08:00
700ad0fdce deps: bump github.com/creack/pty from 1.1.11 to 1.1.18 in /pkg
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-14 03:46:14 +08:00
c2a7a5870d deps: bump github.com/prometheus/client_golang from 1.12.2 to 1.14.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-14 03:42:11 +08:00
bc41c0963b deps: bump github.com/coreos/go-systemd/v22 from 22.3.2 to 22.5.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-14 03:38:55 +08:00
259a73d67a deps: bump github.com/spf13/cobra from 1.4.0 to 1.6.1
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-14 03:33:24 +08:00
1a0af6fee6 deps: bump go.uber.org/zap from 1.21.0 to 1.24.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-14 03:33:24 +08:00
d11cc9e651 Merge pull request #14922 from ramil600/target-endpoint
resolver: cleanup of deprecated grpc resolver target.Endpoint field
2022-12-14 03:24:20 +08:00
6429c044a6 Merge pull request #14935 from ahrtr/minor_enhance_error_20221213
client: enhance the function shouldRetryWatch and added unit test
2022-12-13 23:56:21 +09:00
f4d3fa91db Add permissions: read-all to the workflow
Signed-off-by: ArkaSaha30 <arkasaha30@gmail.com>
2022-12-13 12:42:51 +05:30
1d7d8a9016 dependabot: change schedule interval to weekly
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-13 14:38:32 +08:00
e103e2c18c Merge pull request #14946 from etcd-io/dependabot/github_actions/actions/checkout-3.2.0
build(deps): bump actions/checkout from 2.5.0 to 3.2.0
2022-12-13 14:29:41 +08:00
9cb4c817f3 Merge pull request #14940 from etcd-io/dependabot/github_actions/actions/upload-artifact-3.1.1
build(deps): bump actions/upload-artifact from 2.3.1 to 3.1.1
2022-12-13 14:28:12 +08:00
24342aed7b Merge pull request #14937 from etcd-io/dependabot/github_actions/golangci/golangci-lint-action-3.3.1
build(deps): bump golangci/golangci-lint-action from 3.3.0 to 3.3.1
2022-12-13 14:26:08 +08:00
941fe6b877 Add newline at end of file
Signed-off-by: ArkaSaha30 <arkasaha30@gmail.com>
2022-12-13 11:34:57 +05:30
932cb95e37 resolver: cleanup of deprecated grpc resolver target.Endpoint field
target.Endpoint and some other fields are deprecated, URL field is
suggested to use instead
path is required to be stripped of "/" prefix for naming/resolver to
work porperly

Signed-off-by: Ramil Mirhasanov <ramil600@yahoo.com>
2022-12-13 08:39:26 +03:00
ffd26d6a0a build(deps): bump actions/checkout from 2.5.0 to 3.2.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.5.0 to 3.2.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2.5.0...755da8c3cf115ac066823e79a1e1788f8940201b)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-13 03:36:57 +00:00
7a55adcfd1 build(deps): bump actions/upload-artifact from 2.3.1 to 3.1.1
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2.3.1 to 3.1.1.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v2.3.1...83fd05a356d7e2593de66fc9913b3002723633cb)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-13 03:36:52 +00:00
0fabbebeaa build(deps): bump golangci/golangci-lint-action from 3.3.0 to 3.3.1
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.3.0 to 3.3.1.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](07db5389c9...0ad9a0988b)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-13 03:36:49 +00:00
ebe653da2c Merge pull request #14936 from ahrtr/add_dependentbot_20221213
security: add dependabot.yml
2022-12-13 11:36:16 +08:00
f538e18f3b security: add dependabot.yml
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-13 10:44:35 +08:00
d0e753ca86 clientv3: define local variables errMsgGRPCInvalidAuthToken and errMsgGRPCAuthOldRevision to cache gRPC error messages
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-13 07:28:59 +08:00
19dc0cb413 client: enhance the function shouldRetryWatch and added unit test
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-13 06:05:02 +08:00
ee9db729da Merge pull request #14860 from ahrtr/fix_release_20221126
Trigger release in current branch for github workflow case
2022-12-12 17:46:19 +08:00
638d0a016a Merge pull request #14930 from ahrtr/secure_workflow_20221212
Secure the github workflows
2022-12-12 16:59:57 +08:00
7aaef7616e Merge pull request #14927 from ahrtr/fix_testMutexLock_20221212
test: fix nil pointer panic in testMutexLock
2022-12-12 16:50:59 +08:00
bf5c094f3c secure the github workflow
https://app.stepsecurity.io/secureworkflow/etcd-io/etcd/tests.yaml/main?enable=pin
1. Copy the existing yaml file and paste into the textbox,
2. Click "SECURE WORKFLOW"
3. Copy the manifest from the textbox and paste into etcd repo.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-12 16:23:13 +08:00
e30ced0d2f etcd: add trivy-nightly-scan for etcd images
This PR will add `trivy-nightly-scan` for etcd images with versions `3.4.22` and `3.5.6` to scan for vulnerabilities everyday at 2AM UTC.

Signed-off-by: ArkaSaha30 <arkasaha30@gmail.com>
2022-12-12 12:33:13 +05:30
3c51c42417 test: fix nil pointer panic in testMutexLock
Refer to: https://github.com/etcd-io/etcd/actions/runs/3671847902/jobs/6207463700

```
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xedc388]

goroutine 5253 [running]:
go.etcd.io/etcd/client/v3/concurrency.(*Session).Client(...)
	/home/runner/work/etcd/etcd/client/v3/concurrency/session.go:76
go.etcd.io/etcd/client/v3/concurrency.(*Mutex).tryAcquire(0xc000133140, {0x18a8668, 0xc000050158})
	/home/runner/work/etcd/etcd/client/v3/concurrency/mutex.go:111 +0x88
go.etcd.io/etcd/client/v3/concurrency.(*Mutex).Lock(0xc000133140, {0x18a8668, 0xc000050158})
	/home/runner/work/etcd/etcd/client/v3/concurrency/mutex.go:74 +0x68
go.etcd.io/etcd/tests/v3/integration/clientv3/experimental/recipes_test.testMutexLock.func1()
	/home/runner/work/etcd/etcd/tests/integration/clientv3/experimental/recipes/v3_lock_test.go:65 +0x285
created by go.etcd.io/etcd/tests/v3/integration/clientv3/experimental/recipes_test.testMutexLock
	/home/runner/work/etcd/etcd/tests/integration/clientv3/experimental/recipes/v3_lock_test.go:59 +0xda
FAIL	go.etcd.io/etcd/tests/v3/integration/clientv3/experimental/recipes	7.070s
FAIL
```

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-12 10:18:45 +08:00
5d78d6d4b1 release: support kick off release in current branch
Currently when triggering release, it always pull remote repo and
checkout main branch. Any changes which are merged into the target
release branch (e.g. release-3.5) will be ignored. It isn't
convenient for test, including in github workflow and local environment.
So we need to support triggering release in current branch.

Note: --current-branch should only be called with DRY_RUN=true

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-12 09:35:03 +08:00
64599b4072 Merge pull request #14925 from serathius/gofail-v0.1.0
tests: Update gofail to v0.1.0
2022-12-11 05:31:34 +08:00
1bb4c9558d tests: Update gofail to v0.1.0
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-12-10 14:49:20 +01:00
142fa76a11 Merge pull request #14919 from ahrtr/govuln_version_20221209
Pin govulncheck to v0.0.0-20221208180742-f2dca5ff4cc3
2022-12-09 20:48:51 +08:00
808099dc24 Pin govulncheck to v0.0.0-20221208180742-f2dca5ff4cc3
go install golang.org/x/vuln/cmd/govulncheck@latest && govulncheck ./...
  shell: /usr/bin/bash -e {0}
  env:
    GOROOT: /opt/hostedtoolcache/go/1.19.4/x64
go: golang.org/x/vuln/cmd/govulncheck@latest: no matching versions for query "latest"

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-09 18:23:53 +08:00
dafc1ade48 Merge pull request #14917 from serathius/linearizability-nightly-timeout
tests: Increase test timeout for nighly runs to match job timeout min…
2022-12-09 10:10:11 +01:00
a8bc8ba28b tests: Increase test timeout for nighly runs to match job timeout minus ten minutes
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-12-09 09:47:17 +01:00
893a3e7356 Merge pull request #14916 from ahrtr/bump_go_1.19.4
Bump go to 1.19.4 and golang.org/x/net to v0.4.0 to address CVEs
2022-12-09 16:38:39 +08:00
ebca62cc81 Merge pull request #14903 from serathius/linearizability-txn
tests: Add Txn operation to linearizability tests
2022-12-09 09:38:08 +01:00
1ba246e1d8 bump golang.org/x/ to v0.4.0
Found 1 known vulnerability.

Vulnerability #1: GO-2022-1144
  An attacker can cause excessive memory growth in a Go server
  accepting HTTP/2 requests. HTTP/2 server connections contain a
  cache of HTTP header keys sent by the client. While the total
  number of entries in this cache is capped, an attacker sending
  very large keys can cause the server to allocate approximately
  64 MiB per open connection.

  Call stacks in your code:
Error:       tools/etcd-dump-metrics/main.go:158:5: go.etcd.io/etcd/v3/tools/etcd-dump-metrics.main calls go.etcd.io/etcd/server/v3/embed.StartEtcd, which eventually calls golang.org/x/net/http2.Server.ServeConn

  Found in: golang.org/x/net/http2@v0.2.0
  Fixed in: golang.org/x/net/http2@v0.4.0
  More info: https://pkg.go.dev/vuln/GO-2022-1144
Error: Process completed with exit code 3.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-09 08:54:48 +08:00
dccc21bb69 bump go 1.19.4
$ govulncheck ./...
govulncheck is an experimental tool. Share feedback at https://go.dev/s/govulncheck-feedback.

Scanning for dependencies with known vulnerabilities...
Found 1 known vulnerability.

Vulnerability #1: GO-2022-1144
  An attacker can cause excessive memory growth in a Go server
  accepting HTTP/2 requests. HTTP/2 server connections contain a
  cache of HTTP header keys sent by the client. While the total
  number of entries in this cache is capped, an attacker sending
  very large keys can cause the server to allocate approximately
  64 MiB per open connection.

  Call stacks in your code:
      tools/etcd-dump-metrics/main.go:159:31: go.etcd.io/etcd/v3/tools/etcd-dump-metrics.main$4 calls go.etcd.io/etcd/server/v3/embed.StartEtcd, which eventually calls golang.org/x/net/http2.ConfigureServer$1

  Found in: golang.org/x/net/http2@v0.2.0
  Fixed in: golang.org/x/net/http2@v1.19.4
  More info: https://pkg.go.dev/vuln/GO-2022-1144

Vulnerability #2: GO-2022-1144
  An attacker can cause excessive memory growth in a Go server
  accepting HTTP/2 requests. HTTP/2 server connections contain a
  cache of HTTP header keys sent by the client. While the total
  number of entries in this cache is capped, an attacker sending
  very large keys can cause the server to allocate approximately
  64 MiB per open connection.

  Call stacks in your code:
      contrib/lock/storage/storage.go:106:28: go.etcd.io/etcd/v3/contrib/lock/storage.main calls net/http.ListenAndServe
      contrib/raftexample/httpapi.go:113:31: go.etcd.io/etcd/v3/contrib/raftexample.serveHTTPKVAPI$1 calls net/http.Server.ListenAndServe
      tools/etcd-dump-metrics/main.go:159:31: go.etcd.io/etcd/v3/tools/etcd-dump-metrics.main$4 calls go.etcd.io/etcd/server/v3/embed.StartEtcd, which eventually calls net/http.Serve
      tools/etcd-dump-metrics/main.go:159:31: go.etcd.io/etcd/v3/tools/etcd-dump-metrics.main$4 calls go.etcd.io/etcd/server/v3/embed.StartEtcd, which eventually calls net/http.Server.Serve

  Found in: net/http@go1.19.3
  Fixed in: net/http@go1.19.4
  More info: https://pkg.go.dev/vuln/GO-2022-1144

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-09 07:39:57 +08:00
26bf2f81f5 tests: Add Txn operation to linearizability tests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-12-08 23:57:42 +01:00
dc9e422e28 Merge pull request #14902 from serathius/linearizability-issue14685
Refactor etcd model
2022-12-08 23:32:18 +01:00
60200b37d3 tests: Refactor etcd model
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-12-08 10:01:43 +01:00
bb528a6bf4 Merge pull request #14913 from spzala/updatepsc
Update PSC members
2022-12-07 18:46:01 -05:00
4ba806a103 Merge pull request #14911 from tjungblu/linnight
Create a nightly job for linearizability tests
2022-12-08 07:19:00 +08:00
e99e37e159 Update PSC members
Many of the existing PSC members are now emeritus maintainers.
Considering the current state of the project, we may want to keep
PSC with the current maintainers. We will list volunteers as we
add them.

Signed-off-by: Sahdev Zala <spzala@us.ibm.com>
2022-12-07 17:59:19 -05:00
7c9c1b6c1c Create a nightly job for linearizability tests
Start with a simple job against main that runs for 3h by repeating it
an order of magnitude more often than the PR job.

Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
2022-12-07 17:41:49 +01:00
3e3be35f20 Merge pull request #14905 from joycebrum/main
Set Github workflows default permissions to read-only
2022-12-07 16:39:14 +01:00
a92e06f132 fix: revoke write permissions from all workflows
Signed-off-by: Joyce Brum <joycebrum@google.com>
2022-12-07 13:51:22 +00:00
6d0bf24e54 Merge pull request #14907 from fuweid/chore-reduce-ifelse
chore: use Getter in WarnOfExpensiveReadOnlyTxnRequest
2022-12-07 19:57:39 +08:00
f59896c735 chore: use Getter in WarnOfExpensiveReadOnlyTxnRequest
The pb provides an accessor method to get field and it will not panic if
the owner is nil. And add non-empty RangeRespone into the test case.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-12-07 17:54:52 +08:00
d59c9b82d0 Merge pull request #14901 from ahrtr/changelog_readonly_txn_panic_20221206
changelog: add items for the nil pointer panic of readonly txn
2022-12-07 04:27:07 +08:00
6adc81c664 fix: remove workflow dispatch used for testing
Signed-off-by: Joyce Brum <joycebrum@google.com>
2022-12-06 18:10:50 +00:00
4bcf401b7f Squashed commit of the following:
commit 9a3bf2c0ed6e63c718789679745fdaa24a2c2ba9
Author: Joyce Brum <joycebrum@google.com>
Date:   Tue Dec 6 17:59:42 2022 +0000

    fix: write permissions

    Signed-off-by: Joyce Brum <joycebrum@google.com>

commit 7716f3c00cd7cfe4debbbf97662b1cee7277ba00
Author: Joyce Brum <joycebrum@google.com>
Date:   Tue Dec 6 17:04:19 2022 +0000

    fix: typo on coverage workflow

    Signed-off-by: Joyce Brum <joycebrum@google.com>

commit cb5165401392f1a2de3683ec33ffe97dc0f1fe9f
Author: Joyce Brum <joycebrum@google.com>
Date:   Tue Dec 6 16:57:50 2022 +0000

    feat: test coverage workflow with write permissions

    Signed-off-by: Joyce Brum <joycebrum@google.com>

commit 235627f257d52139c9c73c2ca15c9ef7250cea2f
Author: Joyce Brum <joycebrum@google.com>
Date:   Tue Dec 6 16:44:21 2022 +0000

    fix: measure test read all and workflow dispatch

    Signed-off-by: Joyce Brum <joycebrum@google.com>

commit 81b1581f19945ba5ddd7fa74661910a457af7515
Author: Joyce Brum <joycebrum@google.com>
Date:   Tue Dec 6 14:50:12 2022 +0000

    feat: change from content read to read all

    Signed-off-by: Joyce Brum <joycebrum@google.com>

commit 95bd39f615924a9c0186e6d3e1ad6c205c7db428
Author: Joyce Brum <joycebrum@google.com>
Date:   Tue Dec 6 14:45:45 2022 +0000

    fix: add permission to write on e2e.yaml

    Signed-off-by: Joyce Brum <joycebrum@google.com>

commit f86661da253af3908cde9f5f71311fbca6b26c81
Author: Joyce Brum <joycebrum@google.com>
Date:   Mon Dec 5 17:04:44 2022 +0000

    feat: use read-only by default

    Signed-off-by: Joyce Brum <joycebrum@google.com>

Signed-off-by: Joyce Brum <joycebrum@google.com>
2022-12-06 18:03:50 +00:00
b44c2d9afc changelog: add items for the nil pointer panic of readonly txn
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-06 19:26:56 +08:00
a4c6d1bbce Merge pull request #14880 from serathius/linearizability-failed
Improve support for failed requests in linearizability tests
2022-12-06 11:11:47 +01:00
e6ef3c0bc5 Merge pull request #14895 from ahrtr/fix_readyonly_txn_panic_20221205
etcdserver: fix nil pointer panic for readonly txn
2022-12-06 17:29:39 +08:00
5ff9202027 tests: Refactor append failed requests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-12-06 10:21:07 +01:00
619ca4f5cf tests: Add comments explaning handling failed requests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-12-06 10:11:22 +01:00
d8da98c49f tests: Fix return time for failed requests globally
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-12-06 10:11:22 +01:00
45fdc2bbac tests: Extract history from client
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-12-06 10:11:22 +01:00
c5c2ea6aad tests: Enforce that revision doesn't skips without error
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-12-06 10:11:22 +01:00
fe6e42d411 tests: Improve tests by expending on scenarios
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-12-06 10:11:22 +01:00
1d31e5e958 tests: Consider only latest failed request
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-12-06 10:11:22 +01:00
b922afc0a3 tests: Make etcdRequest and etcdResponse public to make it serializable
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-12-06 10:11:22 +01:00
68fd863c87 tests: Mark failed requests as timed out
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-12-06 10:11:22 +01:00
6a68141db5 tests: Allow dynamic number of clients
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-12-06 10:11:22 +01:00
42bb543315 Merge pull request #14897 from serathius/linearizability-trigger-exit
Allow failpoint requests to fail assuming that process exists within 1 second
2022-12-06 09:31:21 +01:00
2263315871 Merge pull request #14802 from geetasg/delete_api
linearizability tests - Add support for delete api
2022-12-06 09:30:59 +01:00
f2bc0823f6 tests: Make it explicit that we only suppurt panic failpoints
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-12-06 09:08:36 +01:00
738ee3687a tests: Allow failpoint requests to fail assuming that process exists within 1 second
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-12-06 09:08:36 +01:00
a5cfc089fa tests: Refactor picking a member function
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-12-06 09:08:36 +01:00
daad3a2154 etcdserver: fix nil pointer panic for readonly txn
FYI. https://github.com/etcd-io/etcd/issues/14891#issuecomment-1337191993

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-06 14:53:47 +08:00
da7708d528 Merge pull request #14898 from mehvaibh/main
changelog: added non mutating requests pass through quotaKVServer when NOSPACE in 3.7
2022-12-06 08:36:32 +08:00
898c6e867c changelog: added non mutating requests pass through quotaKVServer when NOSPACE in 3.7
Signed-off-by: Vaibhav Mehta <mehvaibh@amazon.com>
2022-12-05 15:15:31 -08:00
b851eac5b9 Merge pull request #14872 from HeavenTonight/fix-makefile
Make sure shellcheck exist
2022-12-06 05:58:24 +08:00
f1f82d86bc Merge pull request #14892 from ahrtr/changelog_decouple_raft
changelog: added item for the decoupling raft from etcd in 3.6
2022-12-06 05:49:09 +08:00
5baf8377bb Merge pull request #14885 from serathius/linearizability-recreate-cluster
Linearizability recreate cluster
2022-12-05 12:16:00 +01:00
812128c447 Merge pull request #14882 from ahrtr/remove_raft_20221202
Remove raft from etcd
2022-12-05 17:58:31 +08:00
4f238837aa Make sure shellcheck exist
Signed-off-by: guiyong.ou <guiyong.ou@daocloud.io>
2022-12-05 15:36:16 +08:00
5d32ea51e5 changelog: added item for the decoupling raft from etcd in 3.6
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-05 13:38:18 +08:00
40cc73c22e Merge pull request #14889 from halegreen/fix-typo
test: fix typo
2022-12-04 16:33:35 +01:00
f7f5474515 test:fix typo
Signed-off-by: WangXiaoxiao <1141195807@qq.com>
2022-12-04 21:11:12 +08:00
1608659746 Merge pull request #14887 from Bhargav-InfraCloud/update-doc-svg
docs: Update raft package to go.etcd.io/raft/v3 in modules SVG
2022-12-04 12:57:11 +08:00
377dffd51d docs: Update raft package to go.etcd.io/raft/v3 in modules SVG
Replace raft package path go.etcd.io/etcd/raft/v3 with
go.etcd.io/raft/v3 in modules SVG in documentation

Signed-off-by: Bhargav Ravuri <bhargav.ravuri@infracloud.io>
2022-12-03 18:44:57 +05:30
a573d8af69 tests: Use golang count to repeat tests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-12-03 11:21:07 +01:00
7f70b8cf76 tests: Separate retries count from failure trigger count
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-12-03 11:21:07 +01:00
df2d075e1a tests: Sleep between failpoint failure
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-12-03 11:21:07 +01:00
11711fc007 tests: Recreate cluster for every failpoint trigger
This shortens operation history and avoids having to many failed requests.
Failed requests are problematic as too many of them can cause linearizability
verification complexity to become exponential.

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-12-03 11:21:07 +01:00
56ca9efc57 Remove raft from etcd
Please use go.etcd.io/raft/v3 instead.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-02 17:19:43 +08:00
26c0627793 Merge pull request #14881 from ahrtr/update_raft_for_etcdserver_20221202
Update etcd to use the new raft module go.etcd.io/raft/v3
2022-12-02 16:58:35 +08:00
971e42d631 Resolve build and test errors
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-02 15:43:48 +08:00
cc58edecf2 raft: add raft into the tools/mod
Previously etcdservers depends on raft/raftpb/raft.proto directly.
After moving raft to a separate repo, we need to add raft to the
tools/mod, and get raft included in the -I protc flags.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-02 15:36:41 +08:00
b4709b20e2 cleanup top level go.mod and go.sum and Bill-of-materials.json
Just execute ./script/fix.sh after updating raftexample to use
the new raft module go.etcd.io/raft/v3.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-02 14:30:32 +08:00
0775d36e53 raftexample: update etcdserver to use the new raft module go.etcd.io/raft/v3
Just replaced all go.etcd.io/etcd/raft/v3 with go.etcd.io/raft/v3
under directory contrib/raftexample.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-02 14:25:50 +08:00
8651478ce2 raft: mark etcd/raft deprecated, and suggest users to use the new go.etcd.io/raft/v3 module
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-02 14:17:58 +08:00
394956ca4e doc: cleanup etcd/raft in all documents
TODO:
1. Update Documentation/contributor-guide/modules.svg;
2. Update bill-of-materials.json when raft and raftexample are removed in future;

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-02 14:13:18 +08:00
b1cdf16988 scripts: cleanup raft from all script files
No need to generate proto file;
No need to test coverage for raft;
No need to run any test for raft module;
NO need to run any test for raftexample;

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-02 13:58:11 +08:00
c2313de3ec cleanup top level go.mod and go.sum files
Executed commands below,
1. Removed go.etcd.io/raft/v3 => ../raft;
2. go get go.etcd.io/raft/v3@eaa6808e1f7ab2247c13778250f70520b0527ff1;
3. go mod tidy

Note that after execuing command `go mod tidy`, the dependency
"go.etcd.io/etcd/raft/v3 v3.5.6" was added automatically. When we
remove raft and the raftexample, and it will cleanup automatically
when executing `go mod tidy` again.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-02 13:49:21 +08:00
5503a9484a test: cleanup go.mod and go.sum files
Executed commands below,
1. Removed go.etcd.io/raft/v3 => ../raft;
2. go get go.etcd.io/raft/v3@eaa6808e1f7ab2247c13778250f70520b0527ff1;
3. go mod tidy

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-02 13:36:05 +08:00
7ce21519fb test: update test to use the new raft module go.etcd.io/raft/v3
Just replaced all go.etcd.io/etcd/raft/v3 with go.etcd.io/raft/v3
under directory test.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-02 13:32:47 +08:00
ff337cc993 tools/etcd-dump-logs: generate go.mod and go.sum for the tool
Add go.mod and go.sum to fix issue below,
```
$ go build
../../server/etcdserver/api/snap/snapshotter.go:33:2: missing go.sum entry for module providing package go.etcd.io/raft/v3 (imported by go.etcd.io/etcd/server/v3/etcdserver/api/snap); to add:
	go get go.etcd.io/etcd/server/v3/etcdserver/api/snap@v3.6.0-alpha.0
../../server/storage/wal/walpb/record.pb.go:14:2: missing go.sum entry for module providing package go.etcd.io/raft/v3/raftpb (imported by go.etcd.io/etcd/v3/tools/etcd-dump-logs); to add:
	go get go.etcd.io/etcd/v3/tools/etcd-dump-logs
```

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-02 13:27:38 +08:00
bb6e892763 tools/etcd-dump-logs: update tool to use the new raft module go.etcd.io/raft/v3
Just replaced all go.etcd.io/etcd/raft/v3 with go.etcd.io/raft/v3
under tools/etcd-dump-logs.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-02 13:12:19 +08:00
f54752b977 etcdutl: cleanup go.mod and go.sum files
Executed commands below,
1. Removed go.etcd.io/raft/v3 => ../raft;
2. go get go.etcd.io/raft/v3@eaa6808e1f7ab2247c13778250f70520b0527ff1
3. go mod tidy

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-02 13:06:59 +08:00
f5b5d12dd3 etcdutl: updated etcdutl to use the new raft module go.etcd.io/raft/v3
Just replaced all go.etcd.io/etcd/raft/v3 with go.etcd.io/raft/v3
under directory etcdutl.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-02 13:02:31 +08:00
faff80a2b3 etcdserve: format the source code
gofmt -w ./server

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-02 13:00:59 +08:00
87e1ca2b9a etcdserver: cleanup go.mod and go.sum files
Executed commands below,
1. Removed go.etcd.io/raft/v3 => ../raft;
2. go get go.etcd.io/raft/v3@eaa6808e1f7ab2247c13778250f70520b0527ff1
3. go mod tidy

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-02 12:59:23 +08:00
e9aa275b36 etcdserver: update etcdserver to use the new raft module go.etcd.io/raft/v3
Just replaced all go.etcd.io/etcd/raft/v3 with go.etcd.io/raft/v3
under directory server.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-02 09:33:45 +08:00
ccf5d3c1af Cleanup comment
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-12-01 09:49:33 -08:00
eef1fb9246 Record delete request errors
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-12-01 09:49:22 -08:00
6be22d84ef Updated as per review feedback.
Signed-off-by: Geeta Gharpure <geetagh@amazon.com>
2022-12-01 09:39:26 -08:00
de991a9f2d linearizability tests - Add support for delete api
Signed-off-by: Geeta Gharpure <geetagh@amazon.com>
2022-12-01 09:39:26 -08:00
571c65748e Merge pull request #14868 from Bhargav-InfraCloud/append-build-flags
Read Go Build Flags from env `GO_BUILD_FLAGS` (#14396)
2022-12-01 09:05:46 +01:00
08dd8d2e0e lease: increase renew timeout to 10s
Signed-off-by: Oskar Haarklou Veileborg <ohv1020@hotmail.com>
2022-12-01 08:57:23 +01:00
dadd7358f4 Makefile: Read GO_BUILD_FLAGS from env and prepend
Build flags read from env GO_BUILD_FLAGS are prepended to
flags in Makefile and sent to scripts/build.sh for building
executables (etcd, etcdctl & etcdutl).

Signed-off-by: Bhargav Ravuri <bhargav.ravuri@infracloud.io>
2022-12-01 09:43:26 +05:30
898415dc90 Merge pull request #14871 from ahrtr/bump_x_20221130
Bump golang.org/x imports to address a bunch of CVEs
2022-11-30 18:17:58 +08:00
0fd40769b7 lease: fix potential goroutine leak in lessor_test.go
Signed-off-by: Oskar Haarklou Veileborg <ohv1020@hotmail.com>
2022-11-30 10:17:22 +01:00
3f86db5e53 bump golang.org/x imports to address CVEs
Reference: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-32149

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-30 05:03:43 +08:00
61e9ec9833 Merge pull request #14865 from ahrtr/fix_unit_test_20221129
test: fix unit test Instability
2022-11-29 10:56:49 +01:00
fae9435b66 test: fix unit test Instability
When two members in a 5 member cluster are corrupted, and they
have different hashes, etcd will raise alarm for both members,
but the order isn't guaranteed. But if the two corrupted members
have the same hash, then the order is guaranteed. The leader
always raise alarm in the same order as the member list.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-29 06:51:50 +08:00
319651b784 Merge pull request #14862 from ahrtr/add_log_open_wal_failure_20221128
add more debug info for opening WAL files failure
2022-11-29 06:10:16 +08:00
cf171fdd1d Merge pull request #14828 from ahrtr/identify_corrupted_member_20221123
Identify corrupted member depending on quorum
2022-11-29 06:08:25 +08:00
686846ec65 add more debug info for opening WAL files failure
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-28 18:58:01 +08:00
6a156bd555 Merge pull request #14859 from serathius/gofail-cleanup
tests: Cleanup gofail
2022-11-27 21:12:43 +01:00
1503f46fd5 Merge pull request #14861 from fuweid/deflake-transport-timeout-case
Deflake transport timeout case
2022-11-27 21:06:28 +01:00
dd4d69ca91 tests: Cleanup gofail
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-11-27 20:35:39 +01:00
cd9ade5403 client/pkg/transport: fix typo in _test.go
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-11-27 22:10:06 +08:00
8a88660262 client/pkg/transport: deflake TestWriteReadTimeoutListener
There is data race on `stop` channel. After verify write-timeout successfully,
the case won't wait for `blocker` to receive close signal from `stop` channel.
If the new `blocker`, which is to read-timeout verifier, get dial's result
immediately, the new `blocker` might fetch the message from `stop` channel
before old one and then close the connection, which causes that the
`conn.Read` returns `EOF` when it reads data.

How to reproduce this in linux devbox?

Use `taskset` to limit the test process in one-cpu.

```bash
cd ./client/pkg/transport
go test -c -o /tmp/test --race=true ./
taskset -c 0 /tmp/test -test.run TestWriteReadTimeoutListener -test.v -test.cpu 4 -test.count=10000 -test.failfast
```

To fix this, suggest to use seperate `stop` channel to prevent from data
race.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-11-27 22:06:11 +08:00
d545d603e9 test: update both unit test and e2e/integration test for CompactHashCheck
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-26 20:13:20 +08:00
6049af072c etcdserver: intentionally set memberID as 0 when can't identify the corrupted member
If quorum doesn't exist, we don't know which members data are
corrupted. In such situation, we intentionally set the memberID
as 0, it means it affects the whole cluster.
It's align with what we did for 3.4 and 3.5 in
https://github.com/etcd-io/etcd/issues/14849

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-26 19:35:38 +08:00
e95e82f0b9 etcdserver: added a summary for the CompactHashCheck method
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-26 19:35:38 +08:00
85fc09d09b etcdserver: resolve review comments in PR 14828
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-26 19:35:38 +08:00
7b19ee6396 test: add integration test to cover the multiple member corruption case
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-26 19:35:38 +08:00
a3197102e9 test: rollback the change in PR pull/14824
The change did in https://github.com/etcd-io/etcd/pull/14824 fixed
the test instead of the product code. It isn't correct. After we
fixed the product code in this PR, we can revert the change in
that PR.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-26 19:35:38 +08:00
8b98fee9ce etcdserver: detect corrupted member based on quorum
When the leader detects data inconsistency by comparing hashes,
currently it assumes that the follower is the corrupted member.
It isn't correct, the leader might be the corrupted member as well.

We should depend on quorum to identify the corrupted member.
For example, for 3 member cluster, if 2 members have the same hash,
the the member with different hash is the corrupted one. For 5 member
cluster, if 3 members have the same same, the corrupted member is one
of the left two members; it's also possible that both the left members
are corrupted.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-26 19:35:38 +08:00
cdb9b8b2a0 Merge pull request #14858 from ahrtr/fix_release_failure_20221126
fix release pipeline failure
2022-11-26 12:32:14 +01:00
72b9d1d31b fix release pipeline failure
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-26 18:40:54 +08:00
08cb83ab87 Merge pull request #14856 from ahrtr/bump_testify_20221126
bump github.com/stretchr/testify from v1.7.2 to v1.8.1
2022-11-26 11:11:32 +01:00
285e44378f bump github.com/stretchr/testify from v1.7.2 to v1.8.1
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-26 10:51:32 +08:00
488e5413d7 Merge pull request #14812 from ahrtr/add_hash_revision_etcdctl_20221121
Display hash_revision for `etcdctl endpoint hash`
2022-11-25 19:36:27 +08:00
9a7f9609d6 etcdctl: changed 'revision' to 'hash_revision' in hashkv table output
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-25 18:59:49 +08:00
f2d765d247 etcdctl: update the examples for endpoint hashkv command in readme
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-25 18:49:16 +08:00
cd15507c65 test: enhance case TestEndpointHashKV to check both hash and hashRevision
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-25 18:49:16 +08:00
3b50c60dd7 changelog: cover the change of adding HashRevision into HashKVResponse
Two chanages:
1. Add field `HashRevision` into `HashKVResponse`;
2. Display the new field when executing `etcdctl endpoint hash`.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-25 18:49:16 +08:00
48b8210044 etcdctl: display HashRevision for 127.0.0.1:2379, 1084519789 command
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-25 18:49:16 +08:00
590911dfe3 Merge pull request #14847 from mkumatag/fix_expect
fix TestSignal test
2022-11-25 10:39:25 +01:00
bad80dc2de Merge pull request #14854 from ahrtr/changelog_memberid_20221125
changelog: add items for both 3.4 and 3.5 changelog to cover the case of removing memberid from corrupt alarm
2022-11-25 17:01:18 +08:00
8e3b87b61f changelog: add items for both 3.4 and 3.5 changelog to cover the case of removing memberid from corrupt alarm
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-25 16:28:38 +08:00
0bc46ec92c fix TestSignal test
Signed-off-by: Manjunath A Kumatagi <mkumatag@in.ibm.com>
2022-11-25 12:50:02 +05:30
f18ac02e0f Merge pull request #14834 from fuweid/bump-grpc-1.51
bump grpc to v1.51.0 from v1.47.0
2022-11-24 09:07:56 +01:00
b6a3594710 Merge pull request #14840 from Bhargav-InfraCloud/copyright-check-in-test-files
Shell func go_srcs_in_module to list go src+test files (#14827)
2022-11-24 06:03:21 +08:00
dbfe42bbd2 comments: fix comments as per goword in go _test pkg files
Comments fixed as per goword in go _test package files that
shell function go_srcs_in_module lists as per changes on #14827

Helps in #14827

Signed-off-by: Bhargav Ravuri <bhargav.ravuri@infracloud.io>
2022-11-24 00:03:00 +05:30
18463081ad scripts: go_srcs_in_module to list test packages files
The shell func go_srcs_in_module will now list
1. go src files
2. go test files belong to same packages
3. go test files that belong to _test packages

Fixes #14827

Signed-off-by: Bhargav Ravuri <bhargav.ravuri@infracloud.io>
2022-11-23 23:50:21 +05:30
2feec4fe68 comments: fix comments as per goword in go test files
Comments fixed as per goword in go test files that shell
function go_srcs_in_module lists as per changes on #14827

Helps in #14827

Signed-off-by: Bhargav Ravuri <bhargav.ravuri@infracloud.io>
2022-11-23 23:05:42 +05:30
cc77eb1011 scripts: go_srcs_in_module to list go source + test files
The shell function go_srcs_in_module will list go test files
along with go src files in the specified module. This helps
in identifying the copyright header misses in test files.

Fixes #14827

Signed-off-by: Bhargav Ravuri <bhargav.ravuri@infracloud.io>
2022-11-23 21:52:09 +05:30
cf285ea3c7 bump grpc to v1.51.0 from v1.47.0
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-11-23 22:16:22 +08:00
51c0b4dff3 Merge pull request #14825 from clarkfw/EtcdProcessClusterConfig-antipattern-name
tests: fix anti-pattern name in `NewEtcdProcessCluster`
2022-11-23 15:11:36 +01:00
a47cdc3951 Merge pull request #14831 from andrewcameronsims/add_copyright_header_issue-14827
Add missing copyright headers
2022-11-23 17:56:42 +08:00
f656fa0f49 add missing copyright headers
Signed-off-by: Andrew Sims <andrew.cameron.sims@gmail.com>
2022-11-23 19:13:43 +11:00
b298c85a34 tests: fix anti-pattern name in NewEtcdProcessCluster
Signed-off-by: Clark <fwyongxing@gmail.com>
2022-11-23 00:32:10 +08:00
a87c993bdf Merge pull request #14824 from fuweid/deflake-TestCompactHashCheckDetectCorruption
tests/integration: deflake Corruption cases
2022-11-22 17:07:23 +01:00
0b30e83b1d tests/integration: deflake Corruption cases
If the corrupted member has been elected as leader, the memberID in alert
response won't be the corrupted one. It will be a smaller follower ID since
the raftCluster.Members always sorts by ID. We should check the leader
ID and decide to use which memberID.

Fixes: #14823

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-11-22 22:19:55 +08:00
5a39c0f6b9 Merge pull request #14822 from shreemaan-abhishek/fix-comment
client: update comment for clarity
2022-11-22 15:18:42 +01:00
0721d2f254 client: update comment for clarity
Signed-off-by: Abhishek Choudhary <shreemaan.abhishek@gmail.com>
2022-11-22 19:25:46 +05:30
9cc2f645cb Merge pull request #14817 from serathius/changelog-v3.5.6
Update changelog for v3.5.6 release
2022-11-21 20:59:43 +01:00
d4316f34ac Merge pull request #14795 from falser101/fix/log_unstable
Fixed https://github.com/etcd-io/etcd/issues/14709
2022-11-21 20:57:05 +01:00
99e302e8ea Update changelog for v3.5.6 release
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-11-21 16:11:43 +01:00
16862fa0bf Merge pull request #13552 from dbussink/small-build-improvement
release: build with consistent paths
2022-11-21 15:45:44 +01:00
c26dabacbd release: build with consistent paths
This changes the builds to always add -trimpath which removes specific
build time paths from the binary (like current directories etc).

Improves build reproducability to make the final binary independent from
the specific build path.

Lastly, when stripping debug symbols, also add -w to strip DWARF symbols
as well which aren't needed in that case either.

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
2022-11-21 15:06:11 +01:00
ddd65e7fe2 Merge pull request #14803 from ahrtr/experimental_flag
Graduate `--experimental-warning-unary-request-duration` to `--warning-unary-request-duration`
2022-11-19 02:40:50 +08:00
ebfcaaed34 test: fix the test failures in e2e/warning_logging_test.go
1. Fixed the test failures which are caused by recent test framework rafactoring;
2. renamed the file to promote_experimental_flag_test.go.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-19 01:51:06 +08:00
de6b5797ed feat: raft/log_unstable_test use testify packages in tests
Signed-off-by: jianfei.zhang <jianfei.zhang@daocloud.io>
2022-11-18 19:41:31 +08:00
8265e9fe55 etcdserver: resolve the changelog comment
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-18 18:06:00 +08:00
7e8ebf7727 server: added duplicate warning-unary-request-duration flag
--warning-unary-request-duration is a duplicate of --experimental-warning-unary-request-duration
experimental-warning-unary-request-duration will be removed in v3.7.

fixes https://github.com/etcd-io/etcd/issues/13783

Signed-off-by: Bogdan Kanivets <bkanivets@apple.com>
2022-11-18 18:06:00 +08:00
07a3cfe22e Merge pull request #14804 from ahrtr/update_gofail
tool: bump gofail version
2022-11-18 11:02:26 +01:00
150ea9d880 tool: bump gofail version
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-18 15:19:18 +08:00
6d8139dcea Merge pull request #14788 from sashamelentyev/imports
all: goimports -w .
2022-11-18 09:03:43 +08:00
2742bdc32a Merge pull request #14752 from serathius/linearizability-raftBeforeLeaderSend
Linearizability raft before leader send
2022-11-18 08:56:11 +08:00
67408930a1 Merge pull request #14669 from vivekpatani/upgrade-1.19.2
.github: make govuln-check generic
2022-11-18 08:12:18 +08:00
0e65199e1a .github: make govuln-check generic
Signed-off-by: vivekpatani <9080894+vivekpatani@users.noreply.github.com>
2022-11-17 13:10:01 -08:00
993f3c0942 Fix priority/important label 2022-11-17 20:44:31 +01:00
c3b6cbdb73 all: goimports -w .
Signed-off-by: Sasha Melentyev <sasha@melentyev.io>
2022-11-17 19:07:04 +03:00
9b3bfcdfeb Merge pull request #14798 from tjungblu/fix_locking_tests
Fix TestCtlV3Lock/Elect flakes
2022-11-17 15:40:47 +01:00
371179e292 tests: Trigger raftBeforeLeaderSend
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-11-17 14:17:16 +01:00
bba8e6259c Merge pull request #14794 from cleverhu/fix-max-recv-msg-size-description
docs: fix max recv msg size description
2022-11-17 18:05:47 +08:00
eebfd15983 Fix TestCtlV3Lock/Elect flakes
waiting for a proper exit after a signal should ensure the goroutines
don't leak.

Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
2022-11-17 10:59:22 +01:00
bf3eea8831 tests: Allow creating client for EtcdProcess
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-11-17 10:48:14 +01:00
8329c9cbb1 Merge pull request #14793 from ahrtr/changelog_20221117
changelog: add items to cover the issue of refreshing token on CommonName based authentication
2022-11-17 17:22:27 +08:00
d726e9a183 docs: fix max recv msg size description
The correct param forMaxCallRecvMsgSize is '--max-recv-bytes' instead of '--max-request-bytes', so I fixed the documentation and description.

Signed-off-by: cleverhu <shouping.hu@daocloud.io>
2022-11-17 10:37:55 +08:00
9648a291fb changelog: add items to cover the issue of refreshing token on CommonName based authentication
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-17 09:27:09 +08:00
719a0a4249 Merge pull request #14770 from ahrtr/auth_20221116
clientv3: do not refresh token when users use CommonName based authentication
2022-11-16 19:46:15 +08:00
e7400b8890 Merge pull request #14766 from serathius/failpoints-disable
Avoid getting gofail/runtime when failpoints are disabled
2022-11-16 12:33:32 +01:00
0c1901466f test: add test case to cover the CommonName based authentication
Refer to https://github.com/etcd-io/etcd/issues/14764

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-16 18:34:34 +08:00
585054e448 test: add certificate with root CommonName
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-16 18:31:53 +08:00
f32ac6e069 clientv3: do not refresh token when using TLS CommonName based authentication
When users use the TLS CommonName based authentication, the
authTokenBundle is always nil. But it's possible for the clients
to get `rpctypes.ErrAuthOldRevision` response when the clients
concurrently modify auth data (e.g, addUser, deleteUser etc.).
In this case, there is no need to refresh the token; instead the
clients just need to retry the operations (e.g. Put, Delete etc).

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-16 18:31:53 +08:00
acfd39f5af Merge pull request #14785 from clarkfw/functional-options-pattern-EtcdProcessClusterConfig-2-2
tests: refactor EtcdProcessClusterConfig using Functional Options Pattern
2022-11-16 18:29:49 +08:00
ebf41c2d48 Avoid getting gofail/runtime when failpoints are disabled
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-11-16 11:09:38 +01:00
7180267d56 tests: refactor EtcdProcessClusterConfig with Functional Options Pattern
remove `cfg *EtcdProcessClusterConfig` param from `NewEtcdProcessCluster` function

Signed-off-by: Clark <fwyongxing@gmail.com>
2022-11-16 15:05:29 +08:00
9406de0033 tests: refactor EtcdProcessClusterConfig with Functional Options Pattern
replace all initialisations with `DefaultConfig`, `NewConfig` and `EPClusterOption`

Signed-off-by: Clark <fwyongxing@gmail.com>
2022-11-16 15:05:28 +08:00
8438ddae3e Merge pull request #14767 from sashamelentyev/print
all: Change Printf and friends to Print if there is no formatting
2022-11-16 10:38:20 +08:00
bf5c936ff1 Merge pull request #14731 from ramil600/grpc_withinsecure
client/v3: replace deprecated grpc.WithInsecure()  issue #14732
2022-11-16 06:41:29 +08:00
47e71d925a Merge pull request #14765 from serathius/linearizability-compact
Linearizability compact
2022-11-16 06:23:14 +08:00
2c9c209eb6 all: Changing Printf and friends to Print if there is no formatting
Signed-off-by: Sasha Melentyev <sasha@melentyev.io>
2022-11-15 22:11:23 +03:00
8ae4420c4c tests: Add compact failpoints
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-11-15 15:00:18 +01:00
f96957adba tests: Add compact failpoints
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-11-15 14:59:03 +01:00
a6997644c3 Merge pull request #14761 from tjungblu/main
Update CodeQL to v2
2022-11-15 13:58:47 +01:00
89bfa4b95c Update CodeQL to v2
CodeQL@v1 is going to be deprecated in three weeks. This PR updates the
branches to track only the currently maintained release branches and
moves the actions to its v2 version.

Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
2022-11-15 13:30:44 +01:00
39ca876f38 Merge pull request #14757 from ahrtr/add_failpoint_20221115
etcdserver: add failpoints for backend
2022-11-15 17:14:14 +08:00
cf190fb5b0 test: apply backend failpoints into the linearizablity test
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-15 16:36:56 +08:00
f8162919f9 Merge pull request #14744 from clarkfw/functional-options-pattern-EtcdProcessClusterConfig-2-1
tests: refactor `EtcdProcessClusterConfig` using Functional Options Pattern
2022-11-15 09:27:24 +01:00
f49d96f8b7 Merge pull request #14756 from sashamelentyev/time
all: Change time unit
2022-11-15 15:54:30 +08:00
015196ec10 Merge pull request #14754 from sashamelentyev/clientfmt
client: Use func without format
2022-11-15 15:25:22 +08:00
386e08f5fa Merge pull request #14747 from falser101/fix/log_test
feat: raft/log_test se testify packages in tests
2022-11-15 11:10:08 +08:00
cadf9de3f8 feat: raft/log_test se testify packages in tests
Signed-off-by: jianfei.zhang <jianfei.zhang@daocloud.io>
2022-11-15 10:35:30 +08:00
d62e018495 Merge pull request #14755 from serathius/linearizability-traffic
tests: Make linearizability traffic extendable
2022-11-15 09:11:40 +08:00
4f824336ad etcdserver: add two failpoints for backend
1. before and after create boltDB transaction;
2. before and after writebuf back to read buffer;

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-15 08:09:05 +08:00
970ecfcddb Merge pull request #14721 from nvanbenschoten/nvanbenschoten/noCommittedOnSnap
raft: don't apply entries when applying snapshot
2022-11-15 06:41:12 +08:00
edd4d5122f Merge pull request #14723 from nvanbenschoten/nvanbenschoten/localMsgCleanup 2022-11-14 23:34:39 +01:00
006e747a44 all: Change time unit
Signed-off-by: Sasha Melentyev <sasha@melentyev.io>
2022-11-15 01:15:01 +03:00
2fc1485f29 tests: Make linearizability traffic extendable
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-11-14 23:14:10 +01:00
95c520976a client: Use func without format
Signed-off-by: Sasha Melentyev <sasha@melentyev.io>
2022-11-15 01:02:24 +03:00
efa144a66a Merge pull request #14753 from sashamelentyev/replaceall
all: Use ReplaceAll instead of Replace with -1 pos
2022-11-15 05:43:10 +08:00
855aa4f7a7 all: Use ReplaceAll instead of Replace with -1 pos
Signed-off-by: Sasha Melentyev <sasha@melentyev.io>
2022-11-15 00:06:09 +03:00
ca8baeb308 Merge pull request #14685 from serathius/linearizability-revision
Revision inconsistency caused by panic during defrag
2022-11-14 12:49:22 +01:00
77cd6a660f Merge pull request #14742 from fuweid/deflake-issue-14694
tests/e2e: disable testShellCompletion if enable cov flag
2022-11-14 12:41:40 +01:00
4cdcb91fac Merge pull request #14672 from tjungblu/etcd-14638
Expect exit code enhancement
2022-11-14 12:34:43 +01:00
ff6c93f630 tests: Add revision to etcd linearizability model
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-11-14 12:20:55 +01:00
e64d644989 Merge pull request #14624 from pavelkalinnikov/limit_inflight_bytes 2022-11-14 12:10:13 +01:00
ae7e7241b3 Merge pull request #14734 from ahrtr/changelog_rev_inconsistency
changelog: add item for 3.5 to cover the revision inconsistency issue
2022-11-14 18:28:51 +08:00
5b163aa507 Expect exit code enhancement
ExpectProcess and ExpectFunc now take the exit code of the process into
account, not just the matching of the tty output.

This also refactors the many tests that were previously succeeding on
matching an output from a failing cmd execution.

Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
2022-11-14 11:19:41 +01:00
c2f27a0070 tests/e2e: disable testShellCompletion if enable cov flag
The etcdctl and etcdutl built with `-tags cov` mode will show go-test result
after each execution, like

```
...

PASS
coverage: 0.0% of statements in ./...
```

Since the PASS is not real command, the `source completion` command will
fail with command-not-found error. And there is no easy way to disable
the (*testing.M).Run's output. Therefore, this patch uses build tag !cov
to disable cases when enable coverage.

Fixes: #14694

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-11-14 17:58:18 +08:00
3232c04138 Merge pull request #14746 from ahrtr/add_gofailpoint_OnPreCommitUnsafe
etcdserver: Add gofailpoints for pre commit hook
2022-11-14 17:54:04 +08:00
d3c64ed94f Merge pull request #14743 from fuweid/test-downgrade-with-latest-point-release
e2e: test DowngradeVersion with latest point release
2022-11-14 15:23:50 +08:00
2532ca84d1 test: add failpoints into linearizablity test for commitBeforePreCommitHook and commitAfterPreCommitHook
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-14 11:11:48 +08:00
3f18816e7d etcdserver: add gofail points before and after OnPreCommitUnsafe
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-14 11:02:18 +08:00
3cf2e79e16 Merge pull request #14537 from ahrtr/add_hash_rev
Add a new field hash_revision into HashKVResponse
2022-11-14 09:20:44 +08:00
f77b8a735f etcdserver: populate HashRevision when responding to leader or client's HashKV request
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-14 08:33:44 +08:00
228f493c76 rpc.proto: regenerate rpc.proto related files
Run
1. ./script/genproto.sh
2. ./scripts/update_proto_annotations.sh

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-14 08:33:44 +08:00
cd746de14e rpc.proto: added a new field hash_revision into HashKVResponse
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-14 08:33:44 +08:00
4c8244622e Merge pull request #14717 from falser101/fix/testify 2022-11-13 23:08:30 +01:00
0ef5df11a6 raft: update changelog
Signed-off-by: Pavel Kalinnikov <pavel@cockroachlabs.com>
2022-11-13 23:05:16 +01:00
68af01ca6e raft: add MaxInflightBytes to Config
This commit introduces the max inflight bytes setting at the Config level, and
tests that raft flow control honours it.

Signed-off-by: Pavel Kalinnikov <pavel@cockroachlabs.com>
2022-11-13 23:05:16 +01:00
8c9c557d85 raft: factor out payloadsSize helper
Signed-off-by: Pavel Kalinnikov <pavel@cockroachlabs.com>
2022-11-13 23:05:16 +01:00
7bda0d7773 raft/tracker: add MaxInflightBytes to ProgressTracker
This commit plumbs the max total byte size of the Inflights type higher up the
stack to the ProgressTracker.

Signed-off-by: Pavel Kalinnikov <pavel@cockroachlabs.com>
2022-11-13 23:05:16 +01:00
bfb7b16f4f raft/tracker: add byte size limit to Inflights type
The Inflights type has limits on the message size and the number of inflight
messages. However, a single large entry that exceeds the size limit can still
be sent. In combination with the max messages count limit, many large messages
can be sent in a row and overflow the receiver. In effect, the "max" values act
as "target" rather than hard limits.

This commit adds an additional soft limit on the total size of inflight
messages, which catches such situations and prevents the receiver overflow.

Signed-off-by: Pavel Kalinnikov <pavel@cockroachlabs.com>
2022-11-13 23:05:16 +01:00
de97f6aa3d raft: tidy up the unit tests some more
Use `t.Run` for each test case, and make some tests more idiomatic.

Signed-off-by: Tobias Grieger <tobias.b.grieger@gmail.com>
2022-11-13 22:34:47 +01:00
3510680c32 tests: refactor EtcdProcessClusterConfig using Functional Options Pattern
replace some initialisations with `DefaultConfig`, `NewConfig` and `EPClusterOption`

Signed-off-by: Clark <fwyongxing@gmail.com>
2022-11-14 03:07:51 +08:00
1f4f70723f feat: use testify packages in tests
Signed-off-by: jianfei.zhang <jianfei.zhang@daocloud.io>
2022-11-13 23:38:57 +08:00
d5a6d2518d tests: Optimize checking failed writes
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-11-13 13:36:21 +01:00
0e4bf4ac4e Merge pull request #14730 from ahrtr/rev_inconsistency_20221111
etcdserver: call the OnPreCommitUnsafe in unsafeCommit
2022-11-13 13:34:39 +01:00
2a6e57d4fc Merge pull request #14741 from ahrtr/update_readme_20221112
README: remove Tobias Grieger from the Emeritus Maintainers list
2022-11-13 12:21:52 +01:00
71d45461ff e2e: test DowngradeVersion with latest point release
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-11-13 17:21:13 +08:00
e8097fe030 README: remove Tobias Grieger from the Emeritus Maintainers list
Tobias Grieger is actively working on etcd/raft, and has already
been added back as a raft maintainer, so no reason to keep him
in the Emeritus Maintainers list.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-13 13:15:49 +08:00
62cba5b4f1 Merge pull request #14725 from clarkfw/functional-options-pattern-EtcdProcessClusterConfig-2022-11-11
tests: refactor `EtcdProcessClusterConfig` using Functional Options Pattern
2022-11-13 07:00:10 +08:00
caaeee2920 tests: refactor EtcdProcessClusterConfig with Functional Options Pattern
replace some initialisations with `DefaultConfig`, `NewConfig` and `EPClusterOption`

Signed-off-by: Clark <fwyongxing@gmail.com>
2022-11-13 00:27:41 +08:00
539a8410f4 raft: don't apply entries when applying snapshot
This commit removes the ability to apply log entries at the same time as
applying a snapshot. Doing so it possible, but it leads to complex code and
raises questions about what should be applied first. It also raises additional
complexity when we start allowing concurrent, asynchronous log appends and log
application. It's easiest to just disallow this.

Signed-off-by: Nathan VanBenschoten <nvanbenschoten@gmail.com>
2022-11-11 13:58:09 -05:00
95c5fed3cf raft: remove IsEmptySnap check from raftLog.hasPendingSnapshot
unstable.snapshot is never an empty snapshot. This check made it look
like it could be.

Signed-off-by: Nathan VanBenschoten <nvanbenschoten@gmail.com>
2022-11-11 13:57:40 -05:00
bdd5347313 Merge pull request #14719 from nvanbenschoten/nvanbenschoten/nextCommittedEnts
raft: rename raftLog.nextEnts to raftLog.nextCommittedEnts
2022-11-12 02:51:30 +08:00
3711fde822 raft: rename raftLog.nextEnts to raftLog.nextCommittedEnts
Also rename hasNextEnts to hasNextCommittedEnts.
Also rename maxNextEntsSize to maxNextCommittedEntsSize.

Pure refactor.

Signed-off-by: Nathan VanBenschoten <nvanbenschoten@gmail.com>
2022-11-11 13:21:20 -05:00
22d930b3d5 Merge pull request #14722 from nvanbenschoten/nvanbenschoten/unusedReadyContainsUpdates 2022-11-11 16:25:46 +01:00
910b81b153 Merge pull request #14720 from nvanbenschoten/nvanbenschoten/clarifyUnstableStableTo 2022-11-11 16:25:37 +01:00
da619c3567 Merge pull request #14718 from ahrtr/fix_e2e_datadir_20221110
test: Create a subdirectory for each member when DataDirPath is specified
2022-11-11 19:15:06 +08:00
dbc7204610 test: Create a subdirectory for each member when DataDirPath is specified
When e2e test cases specify the DataDirPath and there are more than
one member in the cluster, we need to create a subdirectory for each
member. Otherwise all members share the same directory and accordingly
lead to conflict.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-11 18:48:42 +08:00
3d5f293f3e changelog: add item for 3.5 to cover the revision inconsistency issue
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-11 17:40:20 +08:00
44d8e732cf client/v3: replace deprecated grpc.WithInsecure()
Deprecated: use WithTransportCredentials and insecure.NewCredentials() instead. Will be supported throughout 1.x.

Signed-off-by: Ramil Mirhasanov <ramil600@yahoo.com>
2022-11-11 12:08:50 +03:00
5a3ef953eb etcdserver: call the OnPreCommitUnsafe in unsafeCommit
`unsafeCommit` is called by both `(*batchTxBuffered) commit` and
`(*backend) defrag`. When users perform the defragmentation
operation, etcd doesn't update the consistent index. If etcd
crashes(e.g. panicking) in the process for whatever reason, then
etcd replays the WAL entries starting from the latest snapshot,
accordingly it may re-apply entries which might have already been
applied, eventually the revision isn't consistent with other members.

Refer to discussion in https://github.com/etcd-io/etcd/pull/14685

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-11 10:57:15 +08:00
2f558ca0db Merge pull request #14714 from serathius/linearizability-data-dir
tests: Preserve data dir from failed linearizability tests
2022-11-10 13:58:23 +01:00
04caec5960 tests: Preserve data dir from failed linearizability tests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-11-10 11:05:59 +01:00
0ea6fa542a raft: clean up IsLocalMsg and IsResponseMsg logic
Use array indexing to clean up the code and make it constant time.

Also, add a test for IsResponseMsg.

Signed-off-by: Nathan VanBenschoten <nvanbenschoten@gmail.com>
2022-11-10 03:31:31 +00:00
e0beef6830 raft: delete unused Ready.containsUpdates method
Signed-off-by: Nathan VanBenschoten <nvanbenschoten@gmail.com>
2022-11-09 22:25:34 -05:00
c18d79df37 raft: clarify conditions in unstable.stableTo
No change in behavior, but clarify interaction with unstable snapshot.

Signed-off-by: Nathan VanBenschoten <nvanbenschoten@gmail.com>
2022-11-09 22:12:49 -05:00
0bff3ade4d Merge pull request #14704 from chenyahui/mutex_unlock_state
etcdclient: check mutex state in Unlock method of concurrency.Mutex
2022-11-10 10:38:03 +08:00
ccec27be62 Merge pull request #14592 from nvanbenschoten/nvanbenschoten/nilSnapMsg
raft: make Message.Snapshot nullable, halve struct size
2022-11-10 05:47:21 +08:00
0f9d7a4f95 raft: make Message.Snapshot nullable, halve struct size
This commit makes the rarely used `raftpb.Message.Snapshot` field nullable.
In doing so, it reduces the memory size of a `raftpb.Message` message from
264 bytes to 128 bytes — a 52% reduction in size.

While this commit does not change the protobuf encoding, it does change
how that encoding is used. `(gogoproto.nullable) = false` instruct the
generated proto marshaling logic to always encode a value for the field,
even if that value is empty. `(gogoproto.nullable) = true` instructs the
generated proto marshaling logic to omit an encoded value for the field
if the field is nil.

This raises compatibility concerns in both directions. Messages encoded
by new binary versions without a `Snapshot` field will be decoded as an
empty field by old binary versions. In other words, old binary versions
can't tell the difference. However, messages encoded by old binary versions
with an empty Snapshot field will be decoded as a non-nil, empty field by
new binary versions. As a result, new binary versions need to be prepared
to handle such messages.

While Message.Snapshot is not intentionally part of the external interface
of this library, it was possible for users of the library to access it and
manipulate it. As such, this change may be considered a breaking change.

Signed-off-by: Nathan VanBenschoten <nvanbenschoten@gmail.com>
2022-11-09 17:35:52 +00:00
00820f0fc9 Merge pull request #14708 from pavelkalinnikov/testify_demo 2022-11-09 15:26:26 +01:00
0d4a516d11 Merge pull request #14710 from tjungblu/downgrade_binary
Take binary version in Downgrade/Upgrade Test
2022-11-09 13:44:15 +01:00
0daf153b4f Take binary version in Downgrade/Upgrade Test
This fix avoids the assumption of knowing the current version of the
binary. We can query the binary with the version flag to get the actual
version of the given binary we upgrade and downgrade to. The
respectively reported versions should match what is returned by the
version endpoint.

Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
2022-11-09 10:41:07 +01:00
6ac76c5991 Merge pull request #14707 from ahrtr/mix_version_snapshot_20221108
test: support mix versions sending snapshot test
2022-11-09 17:38:14 +08:00
b32cd938b3 test: add mix versions sending snapshot test
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-09 16:04:22 +08:00
080effc935 test: enhance StartNewProc to accept one more parameter: EtcdProcessClusterConfig
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-09 16:04:22 +08:00
765a2660bc raft/tracker: use testify packages in tests
This commit removes the verbose comparisons in tests, in favor of using
assert/require helpers from the testify packages.

Signed-off-by: Pavel Kalinnikov <pavel@cockroachlabs.com>
2022-11-08 23:08:54 +00:00
49ecea5dae Merge pull request #14633 from pavelkalinnikov/send_empty_append
raft: send empty appends when replication is paused
2022-11-09 06:51:46 +08:00
1ea13494eb raft/tracker: rename and comment MsgApp paused field
Make the field name and comment clearer on the fact that it's used both in
StateProbe and StateReplicate. The old name ProbeSent was slightly confusing,
and also triggered thinking that it's used only in StateProbe.

Signed-off-by: Pavel Kalinnikov <pavel@cockroachlabs.com>
2022-11-08 22:21:39 +00:00
467114ed87 raft/tracker: remove unused Inflights.FreeFirstOne
Signed-off-by: Pavel Kalinnikov <pavel@cockroachlabs.com>
2022-11-08 22:21:39 +00:00
4969aa81ae raft: send empty appends when replication is paused
When Inflights to a particular node is full, i.e. MaxInflightMsgs for the
append messages flow is saturated, it is still necessary to continue sending
MsgApp to ensure progress. Currently this is achieved by "forgetting" the first
in-flight message in the window, which frees up quota for one new MsgApp.

This new message is constructed in such a way that it potentially has multiple
entries, or a large entry. The effect of this is that the in-flight limitations
can be exceeded arbitrarily, for as long as the flow to this node continues
being saturated. In particular, if a follower is stuck, the leader will keep
sending entries to it.

This commit makes the MsgApp empty when Inflights is saturated, and prevents
the described leakage of Entries to slow followers.

Signed-off-by: Pavel Kalinnikov <pavel@cockroachlabs.com>
2022-11-08 22:21:39 +00:00
3bc3d2071e raft: extract Progress update on MsgApp to a method
Previously, Progress update on MsgApp send was scattered across raft.go and
tracker/progress.go. This commit better encapsulates this logic in the Progress
type.

Signed-off-by: Pavel Kalinnikov <pavel@cockroachlabs.com>
2022-11-08 22:21:38 +00:00
d5ac7b833f raft: cleanup maybeSendAppend method
- avoid large indented blocks, leave the main block unindented
- declare pb.Message inlined in the sending call

Signed-off-by: Pavel Kalinnikov <pavel@cockroachlabs.com>
2022-11-08 22:21:38 +00:00
5619953f33 raft: elaborate checks in flow control tests
Signed-off-by: Pavel Kalinnikov <pavel@cockroachlabs.com>
2022-11-08 22:21:38 +00:00
0a0f0ae719 raft/rafttest: add test for replication pausing
This commit adds a data-driven test which simulates conditions under which Raft
messages flow to a particular node is throttled while in StateReplicate. The
test demonstrates that MsgApp messages with non-empty Entries may "leak" to a
paused stream every time there is successful heartbeat exchange.

Signed-off-by: Pavel Kalinnikov <pavel@cockroachlabs.com>
2022-11-08 22:21:38 +00:00
4d15f5074c Merge pull request #14711 from clarkfw/functional-options-pattern-EtcdProcessClusterConfig-1
tests: refactor `EtcdProcessClusterConfig` using Functional Options Pattern
2022-11-08 22:47:40 +01:00
269a0beb41 tests: refactor EtcdProcessClusterConfig with Functional Options Pattern
add `DefaultConfig`, `NewConfig` and `EPClusterOption`

Signed-off-by: Clark <fwyongxing@gmail.com>
2022-11-09 03:37:42 +08:00
5b8c6b548f etcdclient: check mutex state in Unlock method of concurrency.Mutex
Check the values of myKey and myRev first in Unlock method to prevent calling Unlock without Lock. Because this may cause the value of pfx to be deleted by mistake.

Signed-off-by: chenyahui <cyhone@qq.com>
2022-11-08 22:24:52 +08:00
f482f7b4a4 Merge pull request #14705 from serathius/raftapi
raft: Remove dependency on etcd api
2022-11-08 14:52:57 +01:00
2a1055c7f3 raft: Remove dependency on etcd api
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-11-08 13:56:46 +01:00
3e903d0b12 Merge pull request #14706 from ahrtr/version_20221108
etcdserver: fix log typo when checking version compatiblity
2022-11-08 18:56:10 +08:00
2ac149b96a etcdserver: fix log typo when checking version compatiblity
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-08 18:27:46 +08:00
1f863f7961 Merge pull request #14703 from ahrtr/raft_remove_etcd_client_20221108
raft: remove the raft dependency on go.etcd.io/etcd/client/pkg/v3
2022-11-08 18:24:33 +08:00
fe7da79594 raft: remove the raft dependency on go.etcd.io/etcd/client/pkg/v3
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-08 09:20:19 +08:00
554b1bd0b0 Merge pull request #14687 from serathius/random-failpoint
tests: Add triggering random go failpoints to linearizability tests
2022-11-07 20:59:39 +01:00
f64bed6033 Merge pull request #14698 from ahrtr/raft_warn_20221107
raft: change the log from debug to warning when uncommitted size exceeds threshold
2022-11-07 19:57:33 +08:00
3e07097d77 Merge pull request #14545 from nvanbenschoten/nvanbenschoten/simplifyAutoLeave
raft: simplify auto-leave joint config on entry application logic
2022-11-07 17:20:26 +08:00
a671e3ebd1 raft: change the log from debug to warning when uncommitted size exceeds max threshold
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-07 17:17:48 +08:00
5268db50ce Merge pull request #14677 from ahrtr/3.4.22
changelog: update 3.4.22's release date
2022-11-07 09:50:15 +01:00
13dd8ef607 Merge pull request #14697 from ahrtr/hybrid_20221107
test: support mix versions testing
2022-11-07 09:49:11 +01:00
0dd88467fa Merge pull request #14659 from ahrtr/changelog_3.5_double_barrier 2022-11-07 13:01:22 +09:00
757cf33c00 test: update e2e test cases to use e2e specfic configuration from e2e package
Afer moving `ClusterVersion` and related constants into e2e packages,
some e2e test cases are broken, so we need to update them to use the
correct definitions.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-07 10:25:04 +08:00
86e71f026e test: update the definition of testRunner and clusterTestCases
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-07 10:18:51 +08:00
fc23d0e83a test: add ClusterContext into the common ClusterConfig
ClusterContext is used by "e2e" or "integration" to extend the
ClusterConfig. The common test cases shouldn't care about what
data is encoded or included; instead "e2e" or "integration"
framework should decode or parse it separately.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-07 10:05:45 +08:00
71b40b3abf tests: Extend common test to run previous release
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-11-07 06:51:59 +08:00
b08209447a Merge pull request #14368 from happlins/main
clientv3: fix init client error
2022-11-07 06:36:13 +08:00
219278b298 tests: Add triggering random go failpoints to linearizability tests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-11-06 15:56:28 +01:00
6bfaf8de33 Merge pull request #14695 from ahrtr/changelog_main_20221106
changelog: add item to cover the fix on adding protection on maintenance requests when auth is enabled
2022-11-06 14:49:17 +09:00
cda14cd3f3 changelog: add item to cover the fix on adding protection on maintenance requests when auth is enabled
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-06 13:25:35 +08:00
e68acb1a95 Merge pull request #14693 from ahrtr/pipeline_failure_20221106
test: fix pipeline errors due to PRs conflict
2022-11-06 06:51:31 +08:00
c00ede393f test: fix pipeline errors due to PRs conflict
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-06 06:28:51 +08:00
49db50c117 Merge pull request #14663 from ahrtr/auth_20221031
auth: check permission when performing maintainenence operations if auth is enabled
2022-11-05 23:13:29 +09:00
d71762f4f0 Merge pull request #14683 from ahrtr/test_framework_20221104
test: refactor the framework structure to make it clearer
2022-11-05 04:30:59 +08:00
dc0273b049 test: refactor the struct to make it clearer
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-04 19:28:32 +08:00
e614eec948 Merge pull request #14560 from serathius/env
tests: Pass only etcd related environment variables during e2e tests
2022-11-04 11:24:07 +01:00
0dfd7264c0 Merge pull request #14681 from tbg/tbg-maintainer
(Re-) add @tbg as maintainer
2022-11-03 15:04:07 +01:00
99d5364e57 (Re-) add @tbg as maintainer
As discussed with @serathius and @ptabor[^1].

[^1]: https://github.com/etcd-io/etcd/pull/14238#issuecomment-1268281624

Signed-off-by: Tobias Grieger <tobias.b.grieger@gmail.com>
2022-11-03 14:53:02 +01:00
be686b1bae changelog: update 3.4.22's release date
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-03 05:04:44 +08:00
74085136b3 etcdctl: connect to the same endpoint as the target to be maintained
The client may connect to a different endpint as the target to be
maintained. When auth is enabled, the target endpoint might haven't
finished applying the authentiation request, so it might reject the
corresponding maintenance request due to permission denied.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-03 04:55:27 +08:00
7f46da223d client: no need to getToken when dial specific endpoint for maintenance
The existing client may connect to different endpoint from the
specific endpoint to be maintained. Maintenance operations do not
go through raft at all, so it might run into issue if the server
hasn't finished applying the authentication request.

Let's work with an example. Assuming the existing client connects to
ep1, while the user wants to maintain ep2. If we getToken again, it
sends an authentication request, which goes through raft. When the
specific endpoint receives the maintenance request, it might haven't
finished previous authentication request, but the new token is already
carried in the context, so it will reject the maintenance request
due to invalid token.

We already have retry logic in `unaryClientInterceptor` and
`streamClientInterceptor`. When the token expires, it can automatically
refresh the token, so it should be safe to remove the `getToken`
logic in `maintenance.dial`

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-03 04:39:42 +08:00
f782891246 test: added auth test on maintenance API
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-03 04:39:42 +08:00
1791ab5754 test: add common functions for auth test
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-03 04:39:42 +08:00
c967715d93 auth: protect all maintainence APIs when auth is enabled
All maintenance APIs require admin privilege when auth is enabled,
otherwise, the request will be rejected. If auth isn't enabled,
then no such requirement any more.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-03 04:39:42 +08:00
7ed4eda4c1 Merge pull request #14657 from fuweid/test-fix-TestDowngradeUpgradeClusterOf3
test: deflake TestDowngradeUpgradeClusterOf3 timeout
2022-11-02 16:51:24 +01:00
3ddcb3ddef test: deflake TestDowngradeUpgradeClusterOf3 timeout
In the TestDowngradeUpgradeCluster case, the brand-new cluster is using
simple-config-changer, which means that entries has been committed
before leader election and these entries will be applied when etcdserver
starts to receive apply-requests. The simple-config-changer will mark
the `confState` dirty and the storage backend precommit hook will update
the `confState`.

For the new cluster, the storage version is nil at the beginning. And
it will be v3.5 if the `confState` record has been committed. And it
will be >v3.5 if the `storageVersion` record has been committed.

When the new cluster is ready, the leader will set init cluster version
with v3.6.x. And then it will trigger the `monitorStorageVersion` to
update the `storageVersion` to v3.6.x. If the `confState` record has
been updated before cluster version update, we will get storageVersion
record.

If the storage backend doesn't commit in time, the
`monitorStorageVersion` won't update the version because of `cannot
detect storage schema version: missing confstate information`.

And then we file the downgrade request before next round of
`monitorStorageVersion`(per 4 second), the cluster version will be
v3.5.0 which is equal to the `UnsafeDetectSchemaVersion`'s result.
And we won't see that `The server is ready to downgrade`.

It is easy to reproduce the issue if you use cpuset or taskset to limit
in two cpus.

So, we should wait for the new cluster's storage ready before downgrade
request.

Fixes: #14540

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-11-02 22:50:31 +08:00
e25090f3fb Merge pull request #14678 from ahrtr/go1.19.3
bump go version to 1.19.3 to address security fixes
2022-11-02 12:12:48 +01:00
94e0c2410b bump go version to 1.19.3 to address security fixes
FYI. https://groups.google.com/g/golang-announce/c/dRtDK7WS78g

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-11-02 09:07:22 +08:00
2e790d2c4f Merge pull request #14664 from spacewander/ra1
ci: ensure the generated code is up-to-date
2022-11-01 13:21:57 +01:00
06ff2c905f Merge pull request #14667 from cenkalti/range-panic
server: add more context to panic message
2022-11-01 17:39:03 +08:00
580a86ebe5 server: add more context to panic message
Signed-off-by: Cenk Alti <cenkalti@gmail.com>
2022-10-31 20:29:15 -04:00
a774510a90 address review
Signed-off-by: spacewander <spacewanderlzx@gmail.com>
2022-10-31 21:23:48 +08:00
e73a25a1d0 ci: ensure the generated code is up-to-date
See https://github.com/etcd-io/etcd/pull/14612#issue-1419792069
Signed-off-by: spacewander <spacewanderlzx@gmail.com>
2022-10-31 19:58:21 +08:00
5073af6521 Merge pull request #14660 from clarkfw/new-cluster-accept-configuration-as-options
tests: TestRunner.NewCluster accepts options
2022-10-31 19:15:23 +08:00
fa9ee5cce9 tests: TestRunner.NewCluster accepts options
Signed-off-by: Clark <fwyongxing@gmail.com>
2022-10-31 15:26:08 +08:00
378da24c79 changelog: add item to cover the fix for double barrier running into stack overflow error
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-10-31 08:24:58 +08:00
a1018dbddf Merge pull request #14604 from ahrtr/double_barrier
clientv3: fix the implementation of double barrier
2022-10-31 08:13:12 +08:00
d1f7136a50 Merge pull request #14621 from ahrtr/functional_test_20221025
test: terminate functional test on failure and code cleanup
2022-10-31 07:42:29 +08:00
0a19ee7a11 Merge pull request #14650 from mitake/changelog-14574
update changelogs of 3.4 and 3.5 for backporting PR 14574 and 14647
2022-10-29 13:47:34 +08:00
d0f5f1ba20 update changelogs of 3.4 and 3.5 for backporting PR 14574 and 14647
Signed-off-by: Hitoshi Mitake <h.mitake@gmail.com>
2022-10-29 14:24:04 +09:00
aeaa1f8b27 Merge pull request #14647 from mitake/auth-testrecover
server: add a unit test case for authStore.Reocver() with empty rangePermCache
2022-10-29 12:47:24 +08:00
b7146f8f33 server: add a unit test case for authStore.Reocver() with empty rangePermCache
Signed-off-by: Hitoshi Mitake <h.mitake@gmail.com>
2022-10-29 12:54:34 +09:00
d668b5ce92 Merge pull request #14644 from serathius/reviewers
remove inactive reviewers
2022-10-29 00:20:44 +02:00
0713c79851 Merge pull request #14642 from nic-chen/update-warn-message
chore: update the warn message on startup when the server name is default
2022-10-29 05:59:04 +08:00
de6b4b9a20 Merge pull request #14524 from dusk125/update-changelog
Update 3.4, 3.5, and 3.6 changelogs for adding configurable cipher list to gRPC proxy
2022-10-29 05:57:40 +08:00
70c57c5651 Merge pull request #14646 from joycebrum/main
Fix error on Scorecard run by upgrading the action version
2022-10-29 05:29:13 +08:00
0bc8895d7b fix: upgrade scorecard github action to avoid crashes
Signed-off-by: Joyce Brum <joycebrum@google.com>
2022-10-28 17:26:04 -03:00
e0e8759bf5 remove inactive reviewers
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-10-28 12:24:57 -05:00
514c8b2d5a Move grpc-proxy item from 3.6 to 3.5 changelog
Signed-off-by: Allen Ray <alray@redhat.com>
2022-10-28 13:07:59 -04:00
ac1b07626d Merge pull request #14625 from vivekpatani/main
.github: add govuln check
2022-10-28 15:52:51 +02:00
6f6275e1ab chore: update the warn message on startup when the server name is default
Signed-off-by: nic-chen <chenjunxu6@gmail.com>
2022-10-28 20:56:45 +08:00
52cac17c24 Merge pull request #14639 from vivekpatani/upgrade-1.19.2
*: bump to go1.19.2 from 1.19.1
2022-10-28 05:04:19 +02:00
680310a6c9 *: bump to go1.19.2 from 1.19.1
- update .github workflows
- update tests

Signed-off-by: vivekpatani <9080894+vivekpatani@users.noreply.github.com>
2022-10-27 18:45:02 -07:00
1570dc9c43 Merge pull request #14574 from veshij/main
etcdserver: call refreshRangePermCache on Recover() in AuthStore.
2022-10-28 06:39:21 +08:00
fbed8cb645 etcdserver: call refreshRangePermCache on Recover() in AuthStore
Signed-off-by: Oleg Guba <oleg@dropbox.com>
2022-10-27 15:05:05 -07:00
b22e3ff4eb Allow passing client options to Client()
Signed-off-by: Oleg Guba <oleg@dropbox.com>
2022-10-27 14:08:23 -07:00
c45f3388ac Merge pull request #14632 from clarkfw/functional-options-pattern-of-cluster-config
tests: add a ClusterOption interface for ClusterSize in config.Cluster
2022-10-27 16:29:57 +02:00
b9c0684981 Merge pull request #14637 from veshij/hashkv_fix
[e2e] don't pass --endpoints flag in test HashKV implementation
2022-10-27 18:12:01 +08:00
47c558e605 [e2e] don't pass --endpoints flag in test HashKV implementation
Signed-off-by: Oleg Guba <oleg@dropbox.com>
2022-10-27 02:02:58 -07:00
c3fa71b960 Merge pull request #14635 from falser101/fix/14169
fix: close conn
2022-10-27 13:45:32 +08:00
d75d1e575a fix: close conn
Signed-off-by: jianfei.zhang <jianfei.zhang@daocloud.io>
2022-10-27 11:09:14 +08:00
1e124262bc Merge pull request #14613 from nic-chen/fix/duplicate-cluster-name
fix: add a warning message on startup if the server name is default
2022-10-27 09:25:21 +08:00
5c0d653958 .github: add govuln check
- add job for govuln job
- allow to continue on failure, until all issues are addressed
- address: https://github.com/etcd-io/etcd/issues/14449

Signed-off-by: vivekpatani <9080894+vivekpatani@users.noreply.github.com>
2022-10-26 17:25:35 -07:00
191fb306ef fix: apply review suggestion
Signed-off-by: nic-chen <chenjunxu6@gmail.com>
2022-10-27 08:23:22 +08:00
9bc4a63a41 Merge pull request #14626 from chaochn47/auth_test_fix
common test: update auth test interface
2022-10-27 06:45:30 +08:00
e28b66f751 tests: add a ClusterOption interface for ClusterSize in config.ClusterConfig
Signed-off-by: Clark <fwyongxing@gmail.com>
2022-10-26 23:41:09 +08:00
d4fbfb8cfb fix: add a warning message on startup if the server name is default
Signed-off-by: nic-chen <chenjunxu6@gmail.com>
2022-10-26 23:30:25 +08:00
f3c47d760c update auth test interface
Signed-off-by: Chao Chen <chaochn@amazon.com>
2022-10-26 09:56:22 -04:00
5550041633 Merge pull request #14629 from clarkfw/fix-anti-pattern-naming
test: fix anti-pattern naming problem in config.ClusterConfig
2022-10-26 20:01:43 +08:00
2fcf197e68 Merge pull request #14628 from ahrtr/withauth_default
test: define a default WithAuth to resolve Unresolved reference error
2022-10-26 18:44:44 +08:00
5544f9ff61 Merge pull request #14630 from qsyqian/etcd-dump-db_enhance
etcd-dump-db: enhance metaDecoder
2022-10-26 17:55:37 +08:00
946d120c7c etcd-dump-db: enhance metaDecoder
Signed-off-by: qsyqian <qsyqian@gmail.com>
2022-10-26 17:32:00 +08:00
08284c56e0 test: fix anti-pattern naming problem in config.ClusterConfig
Signed-off-by: Clark <fwyongxing@gmail.com>
2022-10-26 15:47:19 +08:00
42cfb74b4c test: define a default WithAuth to resolve error Unresolved reference 'WithAuth' from IDE
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-10-26 14:30:47 +08:00
8ce81a1624 Merge pull request #14611 from serathius/issue14370
tests: Add linearizability tests scenario for #14370
2022-10-25 14:03:39 +02:00
36cbd6aff3 test: terminate functional test on failure
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-10-25 17:15:11 +08:00
b37532db8f Merge pull request #14618 from ahrtr/username_password_cont
test: add common function "WithAuth"
2022-10-25 11:29:26 +08:00
3ee2f5711e test: add common function "WithAuth"
We defines two common `WithAuth` functions for e2e and integration
test respectively. They are calling `integration.WithAuth` and
`e2e.WithAuth` respectively.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-10-25 02:41:49 +08:00
f215cd89d2 Merge pull request #14612 from spacewander/azq
chore: commit the change generated by scripts/genproto.sh
2022-10-24 20:00:52 +02:00
837819860b tests: Add linearizability tests scenario for #14370
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-10-24 13:36:12 +02:00
3b8b432b23 Merge pull request #14615 from ahrtr/username_password
test: refactor the client interface
2022-10-24 19:25:25 +08:00
4e0ccc69c9 test: refactor the client interface
It doesn't make sense to always pass a AuthConfig parameter for
test cases which do not enable auth at all. So refactoring the
Client interface method so that it accepts a `ClientOption`
variadic parameter.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-10-24 19:04:34 +08:00
0d46a6ef6a Merge pull request #14561 from samueleresca/fuzzing-validation
Ensure that input validation between API and Apply is consistent
2022-10-24 10:21:59 +08:00
3a63a0d5e3 chore: commit the change generated by scripts/genproto.sh
TODO: ensure the generated code is up-to-date in the CI.
Signed-off-by: spacewander <spacewanderlzx@gmail.com>
2022-10-23 21:13:55 +08:00
bbda80486f Updating script for static analysis readiness.
Signed-off-by: Samuele Resca <samuele.resca@gmail.com>
2022-10-23 13:46:10 +01:00
37d62ba477 Updating fuzzing script with list of target.
Signed-off-by: Samuele Resca <samuele.resca@gmail.com>
2022-10-23 13:46:10 +01:00
b58f9c27e4 Refactoring code to remove duplicate code test.
Signed-off-by: Samuele Resca <sr7@ad.datcon.co.uk>
Signed-off-by: Samuele Resca <samuele.resca@gmail.com>
2022-10-23 13:46:10 +01:00
3d9c5c6166 Adding fuzz test on v3rpc interfaces.
Signed-off-by: Samuele Resca <sr7@ad.datcon.co.uk>
Signed-off-by: Samuele Resca <samuele.resca@gmail.com>
2022-10-23 13:46:10 +01:00
e5790d204c Merge pull request #14398 from serathius/linearizability
Validate etcd linearizability
2022-10-23 12:09:30 +02:00
069e26e284 tests: Validate etcd linearizability
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-10-23 06:41:38 +02:00
61c8888440 Merge pull request #14602 from ahrtr/enhance_functional_test_20221020
functional_test: code cleanup and minor enhancements
2022-10-23 11:00:25 +08:00
655865fd09 Merge pull request #14609 from ZoeShaw101/remove-duplicate-letter
raft: remove duplicate letter in comment.
2022-10-22 22:52:55 +08:00
aac5feec94 raft: remove duplicate letter in comment.
Signed-off-by: Wang Xiaoxiao 1141195807@qq.com
Signed-off-by: 王霄霄 <1141195807@qq.com>
2022-10-22 19:13:40 +08:00
3b4c255444 Merge pull request #14608 from veshij/auth
[e2e] Fix AuthEnable/Disable e2e test implementations
2022-10-22 08:19:05 +08:00
44bc007494 Update tests/framework/e2e/etcdctl.go
address comment

Co-authored-by: Benjamin Wang <wachao@vmware.com>
Signed-off-by: Oleg Guba <oleg@dropbox.com>
2022-10-21 10:44:09 -07:00
24831a0242 Update tests/framework/e2e/etcdctl.go
address comment

Co-authored-by: Benjamin Wang <wachao@vmware.com>
Signed-off-by: Oleg Guba <oleg@dropbox.com>
2022-10-21 10:44:09 -07:00
023e3409e9 Merge pull request #14600 from qsyqian/refactor/expireExists
lessor: simplify expireExists to make it more clear
2022-10-21 09:46:57 +02:00
a39374f33a [e2e] Fix AuthEnable/Disable e2e test implementations
Signed-off-by: Oleg Guba <oleg@dropbox.com>
2022-10-20 19:15:31 -04:00
b5751636e3 Merge pull request #14607 from veshij/hashkv
[e2e] Fix bug in EtcdctlV3.HashKV() e2e implementation.
2022-10-21 06:02:01 +08:00
a466d5cc2e [e2e] Fix bug in EtcdctlV3.HashKV()
Signed-off-by: Oleg Guba <oleg@dropbox.com>
2022-10-20 17:37:16 -04:00
62167d1f1f clientv3: fix the design & implementation of double barrier
Check the client count before creating the ephemeral key, do not
create the key if there are already too many clients. Check the
count after creating the key again, if the total kvs is bigger
than the expected count, then check the rev of the current key,
and take action accordingly based on its rev. If its rev is in
the first ${count}, then it's valid client, otherwise, it should
fail.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-10-20 16:24:20 +08:00
bbda1daecf functional_test: code cleanup and minor enhancements
Cleaned up some useless or dead code;
Remove some unnecessary methods.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-10-20 10:35:30 +08:00
1771cec23d lessor: refactor expireExists to make it more clear
Signed-off-by: qsyqian <qsyqian@gmail.com>
2022-10-20 09:26:04 +08:00
e24402d39f Merge pull request #14596 from serathius/simplify-e2e-coverage
Simplify e2e coverage code
2022-10-18 17:47:16 +08:00
5e791a0a59 Merge pull request #14588 from serathius/downgrade-proceed
server: Handle cluster version equal downgrade version
2022-10-18 06:58:25 +08:00
e3dca5ed2f Merge pull request #14590 from katul979/main
etcdmain: Corrects the link to supported-platform.md docs
2022-10-17 17:51:50 +02:00
97c14d6a80 Merge branch 'etcd-io:main' into main 2022-10-17 18:59:07 +05:30
1b3f301cc2 tests: Share SpawnCmdWithLogger between coverage and no coverage scenarios
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-10-17 14:10:11 +02:00
574b3d33d1 test: Remove BinDir global variable
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-10-17 14:09:51 +02:00
9bba38e51f tests: Include etcd-last-release in BinPath
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-10-17 14:09:51 +02:00
0f9e15fc37 test: Remove accessing etcd via BinDir
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-10-17 14:09:51 +02:00
89a1e7978c tests: Configure coverage binary paths via init
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-10-17 14:09:51 +02:00
d3b9951126 tests: Refactor BinPath into struct
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-10-17 14:09:49 +02:00
de0efc9aa4 tests: Move global e2e configuration into one file
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-10-17 14:09:28 +02:00
0ff632c004 Merge pull request #14597 from serathius/MustAbsPath
tests: Move MustAbsPath function to testutils
2022-10-17 14:05:03 +02:00
24bd276915 Version parameter for the doc link.
Co-authored-by: Benjamin Wang <wachao@vmware.com>
Signed-off-by: Atul Kumar <atul.kumar@swiggy.in>
2022-10-17 17:07:51 +05:30
55df4e6ef3 etcdmain: Updates v3.5 supported platform docs
Signed-off-by: Atul Kumar (katul979@gmail.com)
Signed-off-by: Atul Kumar <atul.kumar@swiggy.in>
2022-10-17 17:07:51 +05:30
07ca384753 tests: Move MustAbsPath function to testutils
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-10-17 13:37:14 +02:00
2b178fdd96 server: Handle cluster version equal downgrade version
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-10-17 12:05:57 +02:00
bf6a1d7264 Merge pull request #14591 from ZoeShaw101/dev
Tests: Check Watch response error not nil to avoid runtime panic.
2022-10-16 17:00:18 +08:00
0fb4130815 Merge pull request #14589 from ahrtr/add_new_member
[test] Support dynamically adding & starting new member
2022-10-16 16:01:16 +08:00
2751ec6479 integration: check Watch response error not nil to avoid runtime panic.
Fixes issue: #14259

Signed-off-by: 王霄霄 <1141195807@qq.com>
2022-10-16 11:41:11 +08:00
24ad49091e test: resolve review comment for the feature of dynamically adding new member
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-10-15 06:09:58 +08:00
11e23f1ef7 Added member interaction into EtcdProcessCluster
Rebased this PR. There is no response from the original author,
so Benjamin (ahrtr@) continue to work on this PR.

Signed-off-by: Vitalii Levitskii <vitalii@uber.com>
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-10-15 05:53:07 +08:00
f97aac9d61 Merge pull request #14570 from ahrtr/changelog_rules
Update changelog readme to add rules on how to add changelog items
2022-10-14 16:12:54 +08:00
a861bfed03 Merge pull request #14585 from tjungblu/testport
Test port allocating using net.Listen
2022-10-14 10:00:40 +02:00
20dccfa484 Test port allocating using net.Listen
To avoid port clashes during integration tests, we let the OS give us a
free port.

Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
2022-10-14 09:40:04 +02:00
e913a55f11 Update changelog readme to add rules on how to add changelog items
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-10-14 10:40:50 +08:00
a5fb57b485 Merge pull request #14586 from serathius/pattern
tests: Use bash like patterns in TestAuthority instead of string fo…
2022-10-14 06:11:36 +08:00
fdce1b38fb tests: Use bash like patterns in TestAuthority instead of string formating
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-10-13 16:45:27 +02:00
81bd3fb9f9 tests: Pass only etcd related environment variables during e2e tests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-10-13 16:44:22 +02:00
39e3c39a1b Merge pull request #14583 from ahrtr/changelog_20221013
Update both 3.4 and 3.5 changelog to cover two fixes
2022-10-13 19:21:11 +08:00
8a587447d2 clientv3: fix errors init client RejectOldCluster
Signed-off-by: happlins <happlins@foxmail.com>
2022-10-13 17:24:24 +08:00
e19bb869c7 Merge pull request #14584 from ahrtr/functional_test_check_logoutput
functional-test: move the check on log-outputs out of the 'if clientTLS' branch
2022-10-13 17:16:35 +08:00
78380ae6b8 functional-test: move the check on log-outputs out of the 'if clientTLS' branch
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-10-13 16:33:02 +08:00
d15a9d0edc Merge pull request #14457 from jbml/hashbyrev_compact_main
etcdserver: fix corruption check when server has just been compacted
2022-10-13 15:17:38 +08:00
e4cfa07d09 Update both 3.4 and 3.5 changelog to cover two fixes
Two fixes:
1. netutil: add url comparison without resolver to URLStringsEqual
2. client/v3: Add backoff before retry when watch stream returns unavailable

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-10-13 08:29:45 +08:00
b48641e5f2 Merge pull request #14348 from VinozzZ/add-integration-test-for-tracing
embed: add integration test for distributed tracing
2022-10-13 02:11:59 +08:00
1d77b4bd32 Merge pull request #14556 from tomari/tomari/watch-backoff
client/v3: Add backoff before retry when watch stream returns unavailable
2022-10-13 02:10:25 +08:00
3b29811dd8 Merge pull request #14565 from ahrtr/functional_test_cleanup_data
functional_test: stop etcd and cleanup data when test is successful
2022-10-13 02:07:59 +08:00
81dfc4be9a Merge pull request #14576 from ahrtr/wal_log
etcdserver: added more debug log for the purgeFile goroutine
2022-10-12 19:22:53 +08:00
5746d6eb86 etcdserver: added more debug log for the purgeFile goroutine
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-10-12 17:32:33 +08:00
920eb20279 Merge pull request #14567 from kafuu-chino/changelog-14296
update changelogs of 3.4 and 3.5 for fixing avoid closing a watch with ID 0 incorrectly
2022-10-11 03:22:47 +08:00
5739c82be2 update changelogs of 3.4 and 3.5 for fixing avoid closing a watch with ID 0 incorrectly
Signed-off-by: Kafuu Chino <KafuuChinoQ@gmail.com>

Update CHANGELOG/CHANGELOG-3.5.md

Co-authored-by: Benjamin Wang <wachao@vmware.com>

Update CHANGELOG/CHANGELOG-3.4.md

Co-authored-by: Benjamin Wang <wachao@vmware.com>
2022-10-10 20:15:19 +08:00
966561c722 Merge pull request #14555 from nvanbenschoten/nvanbenschoten/selfMsgPanic 2022-10-10 10:48:39 +02:00
d19116e6ee Merge pull request #14568 from mrueg/egrep
Replace egrep with grep -E
2022-10-09 22:10:06 +02:00
0f4d6fbc5e .github/workflows: Replace egrep with grep -E
Signed-off-by: Manuel Rüger <manuel@rueg.eu>
2022-10-09 21:22:36 +02:00
328a33668b functional_test: stop etcd and cleanup data when test is successful
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-10-09 09:23:13 +08:00
742c925a27 Merge pull request #14387 from lavacat/main-functional
functional: remove SIGQUIT_ETCD_AND_REMOVE_DATA_AND_STOP_AGENT command
2022-10-09 08:25:25 +08:00
2d638e0fd2 Merge pull request #14559 from serathius/etcdctl_api
Remove mention of ETCDCTL_API environment variable as it was removed from etcdctl
2022-10-08 14:37:25 +02:00
428fb9623a client/v3: Add backoff before retry when watch stream returns unavailable
The client retries connection without backoff when the server is gone
after the watch stream is established. This results in high CPU usage
in the client process. This change introduces backoff when the stream is
failed and unavailable.

Signed-off-by: Hisanobu Tomari <posco.grubb@gmail.com>
2022-10-08 06:57:30 +09:00
510f26e34c Remove mention of ETCDCTL_API environment variable as it was removed on main branch
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-10-07 21:22:06 +02:00
419ee8a9c6 raft: panic on self-addressed messages
These are nonsensical and a network implementation is not required
to handle them correctly, so panic instead of sending them out.

Signed-off-by: Nathan VanBenschoten <nvanbenschoten@gmail.com>
2022-10-06 20:25:07 -04:00
6a0bbf3462 Merge pull request #14552 from fuweid/deflaking-14477
integration: deflaking TestMaintenanceSnapshotCancel/Timeout
2022-10-06 09:52:14 +02:00
b15f6bf978 integration: deflaking TestMaintenanceSnapshotCancel/Timeout
Since http2 spec defines the receive windows's size and max size of
frame in the stream, the underlayer - gRPC client can pre-read data
from server even if the application layer hasn't read it yet.

And the initialized cluster has 20KiB snapshot, which can be pre-read
by underlayer. We should increase the snapshot's size, just in case
that the io.Copy won't return the canceled or timeout error.

Fixes: #14477

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-10-06 11:03:51 +08:00
b81e20b7ad Merge pull request #14551 from ahrtr/update_3.6_changelog_goversion
Update changelog 3.6 to clearly requiring applications which depend on etcd 3.6 packages must be built with go version >= 1.18
2022-10-06 07:02:05 +08:00
ad4e256175 Update changelog 3.6 to clearly requiring applications which depend on etcd 3.6 packages must be built with go version >= 1.18
etcdserver starts to using generic in https://github.com/etcd-io/etcd/pull/14515,
so any applications which depend on package `go.etcd.io/etcd/server/v3' must be
built with go version >= 1.18.

Most likely we may depends on go 1.18 new features in other packages, i.e. client, pkg,
so we just simplify the changelog message to require applications depending on any
etcd 3.6 pacakges must be built with go version >= 1.18, although only etcdserver uses
go generic for now.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-10-05 22:56:40 +08:00
f3e2d7b0bb Merge pull request #14549 from mitake/changelog-backport-14322
update changelogs of 3.4 and 3.5 for handling auth invalid token and old revision errors in watch
2022-10-05 08:06:56 +08:00
b13b19871f update changelogs of 3.4 and 3.5 for handling auth invalid token and old revision errors in watch
Signed-off-by: Hitoshi Mitake <h.mitake@gmail.com>
2022-10-05 08:12:54 +09:00
c50e728518 raft: simplify auto-leave joint config on entry application logic
This commit simplifies the logic added in 37c7e4d to auto-leave joint
configurations. It does so by making the following adjustments to the
code:

- remove the `oldApplied <= r.pendingConfIndex` condition. This does
  not seem necessary. When a node first attempts to auto-leave a joint
  config, it will bump `r.pendingConfIndex` when proposing. In cases
  where `oldApplied >= r.pendingConfIndex`, the proposal must have
  already been applied. Reviewers should double check this.
- use raft.Step instead of custom proposal code. This code was already
  present in stepLeader, so there was no reason to duplicate it. This
  would have avoided bugs like the one we fixed in #14538.
- use `confChangeToMsg` to generate message, to centralize the creation
  of all `MsgProp{EntryConfChange}` messages.

Signed-off-by: Nathan VanBenschoten <nvanbenschoten@gmail.com>
2022-10-03 02:11:56 -04:00
a932fb58f2 Merge pull request #14539 from nvanbenschoten/nvanbenschoten/advanceHardState
raft: update prevHardSt on Ready accept, not advance
2022-09-30 16:55:45 +08:00
c102c07081 Merge pull request #14538 from nvanbenschoten/nvanbenschoten/broadcastOnLeave
raft: broadcast MsgApp on auto-leave joint config proposal
2022-09-30 15:43:26 +08:00
7fff4c4241 Merge pull request #14331 from chaochn47/auth_test_framework_update
common tests framework: cluster client creation could fail with invalid auth
2022-09-30 15:38:47 +08:00
62d979be5b Merge pull request #14536 from ahrtr/update_hash_rev
etcdserver: get peer's hash using the same revision as the value used by leader
2022-09-30 15:09:05 +08:00
8d057ea2b8 common tests framework: cluster client creation fail with invalid auth
Signed-off-by: Chao Chen <chaochn@amazon.com>
2022-09-29 23:09:32 -07:00
1ccdb3762d Test: fix all corruption detection related unit test cases
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-09-30 06:06:41 +08:00
d116d02e04 etcdserver: update corrupt hash detection's logic
get peer's hash using the same revision as the value used by leader

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-09-30 06:03:50 +08:00
bd34388721 raft: broadcast MsgApp on auto-leave joint config proposal
This commit ensures that the raft leader eagerly broadcasts a MsgApp to
each follower when initiating an automatic transition out of a joint
configuration. This had been missed previously, which could lead to
delayed completion of an auto-transition.

Signed-off-by: Nathan VanBenschoten <nvanbenschoten@gmail.com>
2022-09-29 12:33:20 -04:00
9a03632043 raft: update prevHardSt on Ready accept, not advance
This commit updates the `RawNode`'s `prevHardSt` to the new HardState in
`acceptReady` instead of on `Advance`. This aligns the handling of
`prevHardSt` with that of `prevSoftSt` (and other fields like `msgs`)
and simplifies the logic in `Advance`.

Signed-off-by: Nathan VanBenschoten <nvanbenschoten@gmail.com>
2022-09-29 12:33:04 -04:00
cd9764a99f Merge pull request #14534 from demoManito/feat/golangci
golangci: add import order check
2022-09-29 15:26:00 +08:00
7020e2fd2b fix lint
Signed-off-by: demoManito <1430482733@qq.com>
2022-09-29 13:57:55 +08:00
ae118a17f0 fix goimorts local-prefixes
Signed-off-by: demoManito <1430482733@qq.com>
2022-09-29 13:55:47 +08:00
0a08fa2b43 golangci: add import order check
Signed-off-by: demoManito <1430482733@qq.com>
2022-09-29 11:30:04 +08:00
d379e6221e Merge pull request #14535 from demoManito/feat/golangci-unconvert
golangci: add unconvert check
2022-09-28 14:04:04 +02:00
93b9dc6583 golangci: add unconvert check
Signed-off-by: demoManito <1430482733@qq.com>
2022-09-28 19:13:58 +08:00
6828e53b0a Merge pull request #14531 from ahrtr/changelog_3.4_memberId_zero
Update changelog-3.4 to cover the issue: memberID equals zero in corruption alarm
2022-09-28 09:30:45 +02:00
ea17d9d6bf update changelog-3.4 to cover the issue: memberID equals zero in corruption alarm
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-09-28 11:05:53 +08:00
abef537a90 Merge pull request #14515 from spongecaptain/btree-generics
upate:use google/btree in the genric way
2022-09-27 16:44:13 +08:00
319db38b0a update: add benchmark test
benchmark result:
(1) master branch
$ go test -bench='BenchmarkIndexPut$' -count=5
goos: darwin
goarch: amd64
pkg: go.etcd.io/etcd/server/v3/storage/mvcc
cpu: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
BenchmarkIndexPut-12             1000000              2591 ns/op
BenchmarkIndexPut-12             1000000              2531 ns/op
BenchmarkIndexPut-12             1000000              2536 ns/op
BenchmarkIndexPut-12             1000000              2546 ns/op
BenchmarkIndexPut-12             1000000              2538 ns/op
PASS
ok      go.etcd.io/etcd/server/v3/storage/mvcc  167.439s

$ go test -bench='BenchmarkIndexGet$' -count=5
goos: darwin
goarch: amd64
pkg: go.etcd.io/etcd/server/v3/storage/mvcc
cpu: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
BenchmarkIndexGet-12             1000000              2021 ns/op
BenchmarkIndexGet-12             1000000              2029 ns/op
BenchmarkIndexGet-12             1000000              2044 ns/op
BenchmarkIndexGet-12             1000000              1973 ns/op
BenchmarkIndexGet-12             1000000              2027 ns/op
PASS
ok      go.etcd.io/etcd/server/v3/storage/mvcc  177.815s

(2) google/btree in the generic way
$ go test -bench='BenchmarkIndexPut$' -count=5
goos: darwin
goarch: amd64
pkg: go.etcd.io/etcd/server/v3/storage/mvcc
cpu: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
BenchmarkIndexPut-12             1000000              2477 ns/op
BenchmarkIndexPut-12             1000000              2380 ns/op
BenchmarkIndexPut-12             1000000              2360 ns/op
BenchmarkIndexPut-12             1000000              2396 ns/op
BenchmarkIndexPut-12             1000000              2382 ns/op
PASS
ok      go.etcd.io/etcd/server/v3/storage/mvcc  165.841s

$ go test -bench='BenchmarkIndexGet$' -count=5
goos: darwin
goarch: amd64
pkg: go.etcd.io/etcd/server/v3/storage/mvcc
cpu: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
BenchmarkIndexGet-12             1000000              1985 ns/op
BenchmarkIndexGet-12             1000000              1914 ns/op
BenchmarkIndexGet-12             1000000              1900 ns/op
BenchmarkIndexGet-12             1000000              1905 ns/op
BenchmarkIndexGet-12             1000000              1894 ns/op
PASS
ok      go.etcd.io/etcd/server/v3/storage/mvcc  177.573s

Signed-off-by: wathenjiang <wathenjiang@tencent.com>
2022-09-27 14:33:02 +08:00
c53dfc7c5b upate:use google/btree in the genric way
Signed-off-by: wathenjiang <wathenjiang@tencent.com>
2022-09-27 10:16:15 +08:00
1c20ed2cc5 Merge pull request #14521 from lovehhf/remove_pick_peer_url
membership: Remove PickPeerURL Method
2022-09-27 02:10:35 +08:00
9cb5764859 Merge pull request #14296 from kafuu-chino/fix
Fixed unexpected cancelled watch with WatchID=0.
2022-09-27 02:08:23 +08:00
f6d808736c membership: Remove PickPeerURL Method
PickPeerURL only used by unit test

Signed-off-by: Hongfei Huang <853885165@qq.com>
2022-09-26 23:21:10 +08:00
f1d4935e91 *: avoid closing a watch with ID 0 incorrectly
Signed-off-by: Kafuu Chino <KafuuChinoQ@gmail.com>

add test
2022-09-26 20:30:33 +08:00
434c7c4309 Merge pull request #14506 from SimFG/main
wal: Fix the `walWriteBytes` metric
2022-09-26 09:36:07 +08:00
cc1e245368 etcdserver: fix corruption check when server has just been compacted
When a key-value store corruption check happens immediately after a
compaction, the revision at which the key-value store hash is computed,
is the compacted revision itself.
In that case, the hash computation logic was incorrect because it
returned an ErrCompacted error; this error should instead be returned when
the revision at which the key-value store is hashed, is strictly lower
than the compacted revision.

Fixes #14325

Signed-off-by: Jeremy Leach <44558776+jbml@users.noreply.github.com>
2022-09-24 22:20:26 +10:00
4513671b69 Merge pull request #14512 from joycebrum/main
Enable the OpenSSF Scorecard Github Action
2022-09-23 19:02:17 +02:00
c6dd01f337 add scorecard badge to README file
Signed-off-by: Joyce Brum <joycebrumu.u@gmail.com>
2022-09-23 13:59:17 -03:00
336bae2d4e github: enable the scorecard github action
Signed-off-by: Joyce Brum <joycebrumu.u@gmail.com>
2022-09-23 13:57:22 -03:00
5702765729 wal: Fix the walWriteBytes metric
Signed-off-by: SimFG <1142838399@qq.com>
2022-09-22 19:23:06 +08:00
54f9483e72 Merge pull request #14504 from ahrtr/update_changelog_go1.19
Update changelog-3.6 to reflect the bumping of go 1.19
2022-09-22 17:06:46 +08:00
ea3d78faae Merge pull request #14505 from ahrtr/revert_14400
etcdserve: revert the etcdserver side change for the data loss in one node cluster
2022-09-22 17:06:10 +08:00
9097e61b40 etcdserve: revert the etcdserver side change for the data loss on one node cluster
Since the raft side change has been merged, so we need to revert the etcdserver
side change.
Refer to
  https://github.com/etcd-io/etcd/pull/14413
  https://github.com/etcd-io/etcd/pull/14400

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-09-22 15:19:20 +08:00
da7e640473 Update changelog-3.6 to reflect the bumping of go 1.19
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-09-22 15:07:52 +08:00
997260a832 Merge pull request #14463 from ahrtr/bump_go_1.19
Bump golang version to 1.19.1
2022-09-22 09:25:58 +08:00
dd7d30017c Bump go 1.19: revert the change to pkg/adt/interval_tree.go
Some comments in the file are formatted automatically into ugly style,
because the hierarchical structure is missing. After removing the
leading numbers in the comments, `go fmt` will not format the comments
anymore.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-09-22 08:47:46 +08:00
7f10dccbaf Bump go 1.19: update all the dependencies and go.sum files
1. run ./scripts/fix.sh;
2. cd tools/mod; gofmt -w . & go mod tidy;

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-09-22 08:47:46 +08:00
cb5f7276c3 Bump go 1.19: upgrade go version to 1.19.1 in the pipeline
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-09-22 08:47:46 +08:00
cd0b1d0c66 Bump go 1.19: upgrade go version to 1.19 in all go.mod files
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-09-22 08:47:46 +08:00
31d9664cb5 Merge pull request #14413 from tbg/raft-single-voter
raft: don't emit unstable CommittedEntries
2022-09-22 08:43:37 +08:00
026794495f Merge pull request #14494 from demoManito/remove/redundant-type-conversion
etcd: remove redundant type conversion
2022-09-21 11:34:19 +02:00
6333f375a7 Merge pull request #14488 from serathius/update-fix
Improve static analysis fixing scripts
2022-09-21 06:20:08 +08:00
2441a24cee Merge pull request #14493 from demoManito/style/format-import-order
etcd: format import order
2022-09-21 06:03:31 +08:00
bea478266e makefile: Raname targets update* to fix* to distinquish from update_dep
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-09-20 13:58:17 +02:00
5bfda80836 makefile: test the update target
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-09-20 13:57:59 +02:00
bb139b15f8 makefile: Don't run update_dep.sh as it's not a check
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-09-20 13:55:51 +02:00
05104ee9a7 makefile: Remove verify-revive as it is already run by golangci
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-09-20 13:55:51 +02:00
f67ec10779 etcd: format import order
golang CodeReviewComments:
https://github.com/golang/go/wiki/CodeReviewComments#imports

Signed-off-by: demoManito <1430482733@qq.com>
2022-09-20 18:41:39 +08:00
d56676c9b3 raft: benchmark results for ./benchmark put
I ran this PR against its main merge-base twice (on my 2021 Mac M1 pro),
and in both cases this PR was slightly faster, using the benchmark
invocation from [^1].

2819.6 vs 2808.4
2873.1 vs 2835

Full output below.

----

Script:

```
killall etcd
rm -rf default.etcd
scripts/build.sh
nohup ./bin/etcd  --quota-backend-bytes=4300000000 &
sleep 10
f=bench-$(git log -1 --pretty=%s | sed -E 's/[^A-Za-z0-9]+/_/g').txt
go run ./tools/benchmark txn-put --endpoints="http://127.0.0.1:2379" --clients=200 --conns=200 --key-space-size=4000000000 --key-size=128 --val-size=10240  --total=200000 --rate=40000 | tee "${f}"
```

PR:

```
Summary:
  Total:	70.9320 secs.
  Slowest:	0.3003 secs.
  Fastest:	0.0044 secs.
  Average:	0.0707 secs.
  Stddev:	0.0437 secs.
  Requests/sec:	2819.6030 (second run: 2873.0935)

Response time histogram:
  0.0044 [1]	|
  0.0340 [2877]	|
  0.0636 [119485]	|∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
  0.0932 [17436]	|∎∎∎∎∎
  0.1228 [27364]	|∎∎∎∎∎∎∎∎∎
  0.1524 [20349]	|∎∎∎∎∎∎
  0.1820 [10214]	|∎∎∎
  0.2116 [1248]	|
  0.2412 [564]	|
  0.2707 [318]	|
  0.3003 [144]	|

Latency distribution:
  10% in 0.0368 secs.
  25% in 0.0381 secs.
  50% in 0.0416 secs.
  75% in 0.0998 secs.
  90% in 0.1375 secs.
  95% in 0.1571 secs.
  99% in 0.1850 secs.
  99.9% in 0.2650 secs.
```

main:

```
Summary:
  Total:	71.2152 secs.
  Slowest:	0.6926 secs.
  Fastest:	0.0040 secs.
  Average:	0.0710 secs.
  Stddev:	0.0461 secs.
  Requests/sec:	2808.3903 (second run: 2834.98)

Response time histogram:
  0.0040 [1]	|
  0.0728 [125816]	|∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
  0.1417 [59127]	|∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
  0.2105 [13476]	|∎∎∎∎
  0.2794 [1125]	|
  0.3483 [137]	|
  0.4171 [93]	|
  0.4860 [193]	|
  0.5549 [4]	|
  0.6237 [16]	|
  0.6926 [12]	|

Latency distribution:
  10% in 0.0367 secs.
  25% in 0.0379 secs.
  50% in 0.0417 secs.
  75% in 0.0993 secs.
  90% in 0.1367 secs.
  95% in 0.1567 secs.
  99% in 0.1957 secs.
  99.9% in 0.4361 secs.
```

[^1]: https://github.com/etcd-io/etcd/pull/14394#issuecomment-1229606410

Signed-off-by: Tobias Grieger <tobias.b.grieger@gmail.com>
2022-09-20 09:01:42 +02:00
9ad36eecab fixup! address comments
Signed-off-by: Tobias Grieger <tobias.b.grieger@gmail.com>
2022-09-20 09:01:42 +02:00
304e260038 raft: benchmark results
```
for sha in :/^Revert :/BenchmarkRawNode :/^raft:.directly; do git checkout raft-single-voter && git checkout $(git log -n 1 '--pretty=format:%H' $sha) && f=$(git log -1 --pretty=%s | sed -E 's/[^A-Za-z0-9]+/_/g').txt && go test -run - -count 10 -bench BenchmarkRawNode -benchmem -benchtime=100000x . > $f; done; git checkout raft-single-voter
```

The two possible solutions (directly updating progress and calling
maybeCommit in `(*raft).advance` vs calling `r.Step`) are identical.  In
fact, we've gotten a tiny bit better with the `.Step` solution in terms
of not calling `firstIndex` as much, in the common case of not being a
single voter.

```
$ benchstat raft_directly_update_leader_in_advance.txt Revert_raft_directly_update_leader_in_advance_.txt
name                     old time/op        new time/op        delta
RawNode/single-voter-10         482ns ± 2%         742ns ± 1%   +54.02%  (p=0.000 n=9+9)
RawNode/two-voters-10          1.29µs ± 1%        1.31µs ± 2%    +1.70%  (p=0.000 n=9+10)

name                     old firstIndex/op  new firstIndex/op  delta
RawNode/single-voter-10          4.00 ± 0%          5.00 ± 0%   +25.00%  (p=0.000 n=10+10)
RawNode/two-voters-10            10.0 ± 0%           9.0 ± 0%   -10.00%  (p=0.000 n=10+10)

name                     old lastIndex/op   new lastIndex/op   delta
RawNode/single-voter-10          1.00 ± 0%          2.00 ± 0%  +100.00%  (p=0.000 n=10+10)
RawNode/two-voters-10            2.00 ± 0%          2.00 ± 0%      ~     (all equal)

name                     old ready/op       new ready/op       delta
RawNode/single-voter-10          1.00 ± 0%          2.00 ± 0%  +100.00%  (p=0.000 n=10+10)
RawNode/two-voters-10            2.00 ± 0%          2.00 ± 0%      ~     (all equal)

name                     old term/op        new term/op        delta
RawNode/single-voter-10          0.00 ± 0%          0.00 ± 0%      ~     (all equal)
RawNode/two-voters-10            1.00 ± 0%          1.00 ± 0%      ~     (all equal)

name                     old alloc/op       new alloc/op       delta
RawNode/single-voter-10          372B ± 0%          388B ± 0%    +4.30%  (p=0.000 n=10+10)
RawNode/two-voters-10            964B ± 0%          964B ± 0%      ~     (all equal)

name                     old allocs/op      new allocs/op      delta
RawNode/single-voter-10          4.00 ± 0%          5.00 ± 0%   +25.00%  (p=0.000 n=10+10)
RawNode/two-voters-10            7.00 ± 0%          7.00 ± 0%      ~     (all equal)
```

We then compare the `.Step` solution against the previous "status quo"
that prematurely emitted uncommitted entries for command application
below.

Importantly, we don't regress in the case of multiple peers. We actually
gain slightly in terms of `lastIndex` calls, but run a bit more code;
acceptable.

In the single-voter case, since we now need two Ready handling cycles
per op instead of one, we see additional calls to lastIndex and
firstIndex as well as slightly increased allocations. These are expected
and trade-offs we're willing to make to avoid correctness problems. Note
that the benchmark intentionally forces full processing of each
individual entries, so some of the new overhead would likely amortize on
a singleton voter seeing high throughput as multiple proposals could
share the Ready cycles.

```
$ benchstat raft_add_BenchmarkRawNode.txt Revert_raft_directly_update_leader_in_advance_.txt
name                     old time/op        new time/op        delta
RawNode/single-voter-10         482ns ± 2%         742ns ± 1%   +54.02%  (p=0.000 n=9+9)
RawNode/two-voters-10          1.29µs ± 1%        1.31µs ± 2%    +1.70%  (p=0.000 n=9+10)

name                     old firstIndex/op  new firstIndex/op  delta
RawNode/single-voter-10          4.00 ± 0%          5.00 ± 0%   +25.00%  (p=0.000 n=10+10)
RawNode/two-voters-10            10.0 ± 0%           9.0 ± 0%   -10.00%  (p=0.000 n=10+10)

name                     old lastIndex/op   new lastIndex/op   delta
RawNode/single-voter-10          1.00 ± 0%          2.00 ± 0%  +100.00%  (p=0.000 n=10+10)
RawNode/two-voters-10            2.00 ± 0%          2.00 ± 0%      ~     (all equal)

name                     old ready/op       new ready/op       delta
RawNode/single-voter-10          1.00 ± 0%          2.00 ± 0%  +100.00%  (p=0.000 n=10+10)
RawNode/two-voters-10            2.00 ± 0%          2.00 ± 0%      ~     (all equal)

name                     old term/op        new term/op        delta
RawNode/single-voter-10          0.00 ± 0%          0.00 ± 0%      ~     (all equal)
RawNode/two-voters-10            1.00 ± 0%          1.00 ± 0%      ~     (all equal)

name                     old alloc/op       new alloc/op       delta
RawNode/single-voter-10          372B ± 0%          388B ± 0%    +4.30%  (p=0.000 n=10+10)
RawNode/two-voters-10            964B ± 0%          964B ± 0%      ~     (all equal)

name                     old allocs/op      new allocs/op      delta
RawNode/single-voter-10          4.00 ± 0%          5.00 ± 0%   +25.00%  (p=0.000 n=10+10)
RawNode/two-voters-10            7.00 ± 0%          7.00 ± 0%      ~     (all equal)
```

`tools/benchmark put`:

```
Summary[main]:                                                        |          Summary[this PR]:
Total:  284.4443 secs.                                                |          Total:    288.1100 secs.
Slowest:        0.1626 secs.                                          |          Slowest:    0.1456 secs.
Fastest:        0.0027 secs.                                          |          Fastest:    0.0018 secs.
Average:        0.0284 secs.                                          |          Average:    0.0288 secs.
Stddev:         0.0178 secs.                                          |          Stddev:    0.0182 secs.
Requests/sec:   35.1563                                               |          Requests/sec:    34.7090 [=0.98727681809x main]

Response time histogram:                                              |          Response time histogram:
0.0027 [1]      |                                                     |          0.0018 [1]       |
0.0187 [137]    |                                                     |          0.0162 [34]      |
0.0347 [7895]   |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎             |          0.0305 [7938]    |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
0.0507 [86]     |                                                     |          0.0449 [103]     |
0.0667 [1328]   |∎∎∎∎∎∎                                               |          0.0593 [1056]    |∎∎∎∎∎
0.0827 [480]    |∎∎                                                   |          0.0737 [420]     |∎∎
0.0987 [45]     |                                                     |          0.0881 [370]     |∎
0.1147 [18]     |                                                     |          0.1025 [48]      |
0.1306 [7]      |                                                     |          0.1168 [19]      |
0.1466 [2]      |                                                     |          0.1312 [6]       |
0.1626 [1]      |                                                     |          0.1456 [5]       |

Latency distribution:                                                 |          Latency distribution:
10% in 0.0195 secs.                                                   |          10% in 0.0194 secs.
25% in 0.0198 secs.                                                   |          25% in 0.0198 secs.
50% in 0.0201 secs.                                                   |          50% in 0.0201 secs.
75% in 0.0210 secs.                                                   |          75% in 0.0214 secs.
90% in 0.0585 secs.                                                   |          90% in 0.0589 secs.
95% in 0.0727 secs.                                                   |          95% in 0.0731 secs.
99% in 0.0762 secs.                                                   |          99% in 0.0788 secs.
99.9% in 0.1244 secs.                                                 |          99.9% in 0.1240 secs.
```

Signed-off-by: Tobias Grieger <tobias.b.grieger@gmail.com>
2022-09-20 09:01:42 +02:00
3c3e30a30e Revert "raft: directly update leader in advance"
This reverts commit d73a986e4edb15ef9dbfc994f1cbf5e96694d877, which
was added only for benchmarking purposes.

Signed-off-by: Tobias Grieger <tobias.b.grieger@gmail.com>
2022-09-20 09:01:42 +02:00
67c3522893 raft: directly update leader in advance
This makes the alternative option of implementing the leader's self-ack
of entry append the default.

Signed-off-by: Tobias Grieger <tobias.b.grieger@gmail.com>
2022-09-20 09:01:42 +02:00
894e5cb685 move ctx param to the front
to appease linter

Signed-off-by: Tobias Grieger <tobias.b.grieger@gmail.com>
2022-09-20 09:01:42 +02:00
f62b9d5e19 remove TestNodeReadIndex
This is tested directly at the level of `RawNode` in
`TestRawNodeReadIndex`. `*node` is a thin wrapper around `RawNode` so
this is sufficient.

The reason to remove the test is that it now incurs data races
since it's not possible to adjust the `readStates` and `step`
fields while the node is running, and there is no primitive
to synchronize with its goroutine. This could all be fixed
but it's not worth it.

Signed-off-by: Tobias Grieger <tobias.b.grieger@gmail.com>
2022-09-20 09:01:40 +02:00
f7dcb9ec2a TestInteraction
Reviewed the diff in detail.
The changes here were benign, just the extra raft cycle.

Signed-off-by: Tobias Grieger <tobias.b.grieger@gmail.com>
2022-09-20 08:59:37 +02:00
f7b0a6ad33 TestRawNodeBoundedLogGrowthWithPartition
Signed-off-by: Tobias Grieger <tobias.b.grieger@gmail.com>
2022-09-20 08:59:37 +02:00
02efe5135d TestRawNodeStart
Now also sees the extra Ready cycle.

Signed-off-by: Tobias Grieger <tobias.b.grieger@gmail.com>
2022-09-20 08:59:37 +02:00
79bf3b0df4 TestRawNodeJointAutoLeave
This now needs an additional Ready cycle to apply the previous conf change,
so the finalizing conf change does too.

Signed-off-by: Tobias Grieger <tobias.b.grieger@gmail.com>
2022-09-20 08:59:37 +02:00
fbe4d40086 TestLeaderTransferIgnoreProposal
Signed-off-by: Tobias Grieger <tobias.b.grieger@gmail.com>
2022-09-20 08:59:37 +02:00
182e1a371d TestReadOnlyWithLearner
Signed-off-by: Tobias Grieger <tobias.b.grieger@gmail.com>
2022-09-20 08:59:37 +02:00
b462fd15c2 TestMsgAppRespWaitReset
Signed-off-by: Tobias Grieger <tobias.b.grieger@gmail.com>
2022-09-20 08:59:37 +02:00
ff837f3a0b TestProposal
Don't check on `committed` but `lastIndex` instead.

Signed-off-by: Tobias Grieger <tobias.b.grieger@gmail.com>
2022-09-20 08:59:37 +02:00
15abe294e7 TestDueling{Pre,}Candidates
Signed-off-by: Tobias Grieger <tobias.b.grieger@gmail.com>
2022-09-20 08:59:37 +02:00
d6f3e88a52 TestSingleNodeCommit
Signed-off-by: Tobias Grieger <tobias.b.grieger@gmail.com>
2022-09-20 08:59:37 +02:00
99adcaa299 TestLearnerLogReplication
Needed to `(*raft).advance` on `n1` so that it would actually commit
the entry.

Signed-off-by: Tobias Grieger <tobias.b.grieger@gmail.com>
2022-09-20 08:59:37 +02:00
7060d75527 TestLeaderOnlyCommitsLogFromCurrentTerm
Leader only acks to itself on `(*raft).advance` so we have to
make this test a bit more like the real thing.

Signed-off-by: Tobias Grieger <tobias.b.grieger@gmail.com>
2022-09-20 08:59:37 +02:00
9ff144ef75 TestProgressLeader
This was expecting the progress of the leader to be updated as a
result of MsgProp but it is now happening in `(*raft).advance`.

Signed-off-by: Tobias Grieger <tobias.b.grieger@gmail.com>
2022-09-20 08:59:37 +02:00
bd46776f03 Commit + apply all in nextEnts
This fixes essentially all tests using this, since now they don't have
to do anything special about the extra cycle introduced for single
nodes.

Signed-off-by: Tobias Grieger <tobias.b.grieger@gmail.com>
2022-09-20 08:59:37 +02:00
f10579d3b5 TestLeaderAcknowledgeCommit
This needed to call `(*raft).advance` so that the leader would
self-ack the entries.

Signed-off-by: Tobias Grieger <tobias.b.grieger@gmail.com>
2022-09-20 08:59:37 +02:00
b2dba1c86c TestNodeAdvance
Switched this to baking the conf changes into the initial state
to have fewer cycles to walk through in the test.

Signed-off-by: Tobias Grieger <tobias.b.grieger@gmail.com>
2022-09-20 08:59:37 +02:00
0d9a6061c3 TestNodeReadIndex
Needs to ignore the injected MsgAppResp.

Signed-off-by: Tobias Grieger <tobias.b.grieger@gmail.com>
2022-09-20 08:59:37 +02:00
14a76d755f TestNodeStart
This now sees the extra append-then-commit cycle.

Signed-off-by: Tobias Grieger <tobias.b.grieger@gmail.com>
2022-09-20 08:59:37 +02:00
873cdf3fa6 TestNodeProposeWaitDropped
The test just needs to ignore the MsgAppResp.

Signed-off-by: Tobias Grieger <tobias.b.grieger@gmail.com>
2022-09-20 08:59:37 +02:00
1a81b27bed TestNodePropose{,Config}
This test now observes the `MsgAppResp` injected in `(*raft).advance`.

Signed-off-by: Tobias Grieger <tobias.b.grieger@gmail.com>
2022-09-20 08:59:37 +02:00
87a9b80d7b TestNodeProposeAddDuplicateNode
This needed to apply entries from CommittedEntries, not Entries.
Previously the test got away with it because the two slices were
equal. Now it was hanging because when it proposed the second
conf change the first one hadn't applied yet, and so it got dropped,
and the test would hang.

Signed-off-by: Tobias Grieger <tobias.b.grieger@gmail.com>
2022-09-20 08:59:37 +02:00
931fec3b6d TestCommitPagination
Signed-off-by: Tobias Grieger <tobias.b.grieger@gmail.com>
2022-09-20 08:59:37 +02:00
1f39a8fe79 raft: teach readyWithTimeout to log received Readys
Signed-off-by: Tobias Grieger <tobias.b.grieger@gmail.com>
2022-09-20 08:59:37 +02:00
36860f863f TestLeaderAcknowledgeCommit
Signed-off-by: Tobias Grieger <tobias.b.grieger@gmail.com>
2022-09-20 08:59:37 +02:00
dad8208a4d raft: avoid panics during *node tests
`StartNode` runs a naked goroutine, so it's impossible to test against
it in a way that will reliably produce contained test failures when
assertions are hit on the `(*node).run` goroutine.

This commit introduces a harness that we can use in tests to wrap
this goroutine and allow it to defer errors to `*testing.T`.

Note that tests of `Node` still need to be architected carefully
since it's easy to produce a deadlock in them should things not
go exactly as planned.

Signed-off-by: Tobias Grieger <tobias.b.grieger@gmail.com>
2022-09-20 08:59:37 +02:00
169f4c3cc7 raft: don't emit unstable CommittedEntries
See https://github.com/etcd-io/etcd/issues/14370.

When run in a single-voter configuration, prior to this PR
raft would emit `HardState`s that would emit a proposed `Entry`
simultaneously in `CommittedEntries` and `Entries`.

To be correct, this requires users of the raft library to enforce an
ordering between appending to the log and notifying the client about
`CommittedEntries` also present in `Entries`. This was easy to miss.

Walk back this behavior to arrive at a simpler contract: what's
emitted in `CommittedEntries` is truly committed, i.e. present
in stable storage on a quorum of voters.

This in turn pessimizes the single-voter case: rather than fully
handling an `Entry` in just one `Ready`, now two are required,
and in particular one has to do extra work to save on allocations.

We accept this as a good tradeoff, since raft primarily serves
multi-voter configurations.

Signed-off-by: Tobias Grieger <tobias.b.grieger@gmail.com>
2022-09-20 08:59:37 +02:00
21be9fa337 raft: add single_node InteractionEnv test case
Show-cases the current behavior and changes made in future commits for [^1].

The test demonstrates that a single-voter raft instance will emit an
entry as committed while it still needs to be appended to the log.

[^1]: https://github.com/etcd-io/etcd/issues/14370

Signed-off-by: Tobias Grieger <tobias.b.grieger@gmail.com>
2022-09-20 08:59:37 +02:00
5e3314da42 raft: add BenchmarkRawNode
This is a speed-of-light benchmark that uses an in-memory single-voter
RawNode to sequentially propose and process entries.

As a bonus, it also measures the number of calls to the underlying
Storage. Calls to the Storage are cheap since the benchmark is in-
memory, but in a real-world implementation, especially one that doesn't
cache results, additional calls to the Storage interface can translate
to a heavy hit as they might involve additional I/O.

Signed-off-by: Tobias Grieger <tobias.b.grieger@gmail.com>
2022-09-20 08:59:37 +02:00
3ad363d070 raft: always mark leader as RecentActive
RecentActive is now initialized to true in `becomeLeader`. Both
configuration changes and CheckQuorum make sure not to break this,
so we now now that the leader is always RecentActive.

Signed-off-by: Tobias Grieger <tobias.b.grieger@gmail.com>
2022-09-20 08:59:37 +02:00
c113f93d79 Merge pull request #14482 from fuweid/testing-curl-maxstream
e2e: make maxstream test stable
2022-09-20 12:30:10 +08:00
a9c3d56508 etcd: remove redundant type conversion
Signed-off-by: demoManito <1430482733@qq.com>
2022-09-20 11:26:02 +08:00
16884373b9 e2e: submitConcurrentWatch runs with ExecuteWithTimeout
Use testutils.ExecuteWithTimeout to make sure that the all active
streams are ready in time.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-09-20 11:03:51 +08:00
ec847337d7 e2e: make maxstream test stable
submitConcurrentWatch use sleep 3s to wait for all the watch connections
ready. When the number of connections increases, like 1000, the 3s is not
enough and the test case becomes flaky.

In this commit, spawn curl process and check the ouput line with
`created":true}}` to make sure that the connection has been initialized
and ready to receive the events. It is reliable to test the following
range request.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-09-20 10:41:59 +08:00
5344085338 Merge pull request #14491 from ahrtr/bump_jwt_4.4.2
etcd: Bump golang-jwt/jwt/ version to 4.4.2
2022-09-20 10:18:44 +08:00
ad4a465383 Merge pull request #14492 from cmurphy/bump-golang-x-net
*: Update golang.org/x/net to latest
2022-09-19 22:11:43 -04:00
7ea2a3d7cb *: Update golang.org/x/net to latest
Update golang.org/x/net to address CVE-2022-27664.

Signed-off-by: Colleen Murphy <colleen.murphy@suse.com>
2022-09-19 16:01:45 -07:00
159ed15afc Merge pull request #14479 from demoManito/fix/declaring-empty-slice
etcd: modify declaring empty slices
2022-09-20 05:22:59 +08:00
09db6ec1d7 etcd: Bump golang-jwt/jwt/ version to 4.4.2
github.com/golang-jwt/jwt adds go mod support startig from 4.0.0,
and it's backwards-compatible with existing v3.x.y tags.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-09-20 04:06:47 +08:00
f12374b7b5 Merge pull request #14483 from spzala/featuregraduation
Doc: Add feature graduation and deprecation policies
2022-09-20 03:09:45 +08:00
9f27d459b0 Doc: Add feature graduation and deprecation policies
Related https://github.com/etcd-io/etcd/pull/14428

Signed-off-by: Sahdev Zala <spzala@us.ibm.com>
2022-09-19 11:13:14 -04:00
c793f18238 Merge pull request #14322 from mitake/watch-auth-err
*: handle auth invalid token and old revision errors in watch
2022-09-19 23:33:49 +09:00
e0647b9d42 Merge pull request #14481 from serathius/verify-fmt
makefile: Split fmt into separate verify commands
2022-09-19 12:38:30 +02:00
8650ae83f7 Merge pull request #14485 from ahrtr/fix_build_tools
Build: remove the invalid quote character ' for flag -ldflags
2022-09-17 23:52:36 -04:00
35bc65d3ec Merge pull request #14484 from ahrtr/remove_go_version_from_glangci
CI: remove hardcode go version in .golangci.yaml
2022-09-18 06:42:14 +08:00
5e61b1c59b Merge pull request #14486 from ahrtr/fix_flaky_TestKVDelete
Test: increase the TestKVDelete's timeout to 15s
2022-09-17 18:28:36 -04:00
d657f2f66b Test: increase the TestKVDelete's timeout to 15s
Sometimes it just needs more time to execute the test case,
so increase the timeout from 10s to 15s.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-09-18 04:26:30 +08:00
536743042b Build: remove the invalid quote character ' for flag -ldflags
It isn't valid to start with quote character ' for flag -ldflags.
Go cmd older than 1.19 just ignores the error. Starting from go 1.19,
Go cmd will fail with error message something like below,
```
stderr: invalid value "'-X=go.etcd.io/etcd/api/v3/version.GitSHA=01250c9'" for flag -ldflags: parameter may not start with quote character '
```

Actually we don't have such quote character ' when building
etcd/etcdctl/etcdutl.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-09-18 04:19:40 +08:00
4f907e950e CI: remove hardcode go version in .golangci.yaml
The default Go version used by golinter is coming from the go.mod
file, fallback on the env var `GOVERSION`. So no need to configure
the go version in .golangci.yaml.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-09-18 04:04:35 +08:00
c5614520d5 tests: a test case for watch with auth token expiration
Signed-off-by: Hitoshi Mitake <h.mitake@gmail.com>
2022-09-17 21:51:36 +09:00
2dcfa83094 *: handle auth invalid token and old revision errors in watch
Signed-off-by: Hitoshi Mitake <h.mitake@gmail.com>
2022-09-17 21:51:36 +09:00
b8347edf3b makefile: Split fmt into separate verify commands
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-09-16 22:37:10 +02:00
cdf4228673 Merge pull request #14308 from dusk125/main
server/etcdmain: add configurable cipher list to gRPC proxy listener
2022-09-16 12:15:08 -04:00
72912fbc20 Merge pull request #14470 from serathius/verify-update
makefile: Make static analysis commands easier to use
2022-09-16 12:02:37 -04:00
c8fef9b7bd Merge pull request #14480 from ahrtr/clelanup_changelog_3.6
Changelog: cleanup 3.6 changelog to remove all bug fixes
2022-09-16 19:48:05 +08:00
fe24de857a Changelog: cleanup 3.6 changelog to remove all bug fixes
The rules should be:
1. Each patch release should only include change against previous
   patch, such as 3.5.4 vs 3.5.5.
2. For the first release (e.g. 3.6.0) for each minor version, we
   should only describe new features or changes which are not
   included in any releases in previous minor version.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-09-16 19:18:42 +08:00
fd0283d045 Merge pull request #14472 from serathius/changelog-3.5.5
Update changelog for v3.5.5 release
2022-09-16 12:38:05 +02:00
f655f667f2 Update changelog for v3.5.5 release
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-09-16 12:04:54 +02:00
5b26fc0101 fix test
Signed-off-by: demoManito <1430482733@qq.com>
2022-09-16 17:08:29 +08:00
d6f76e1aa3 Merge pull request #14471 from demoManito/cleanup/remove-assert
pkg: replace the deprecated Expect with ExpectWithContext in pkg/expect/expect_test.go
2022-09-16 15:28:57 +08:00
72cf0cc04a etcd: modify declaring empty slices
declare an empty slice to var s []int replace  s :=[]int{}, https://github.com/golang/go/wiki/CodeReviewComments#declaring-empty-slices

Signed-off-by: demoManito <1430482733@qq.com>
2022-09-16 14:41:14 +08:00
a281bb0494 pkg: replace the deprecated Expect with ExpectWithContext in pkg/expect/expect_test.go
Signed-off-by: demoManito <1430482733@qq.com>
2022-09-16 14:39:14 +08:00
b7ba0542f6 Merge pull request #14422 from kkkkun/remove-redundant-code
remove redundant log messsages
2022-09-16 12:18:43 +08:00
c4582aaaee remove redundant log messages
Signed-off-by: kkkkun <scuzk373x@gmail.com>
2022-09-16 11:45:43 +08:00
c31d758189 functional: remove SIGQUIT_ETCD_AND_REMOVE_DATA_AND_STOP_AGENT command
Problem: both SIGQUIT_ETCD_AND_REMOVE_DATA_AND_STOP_AGENT and test.sh
will attempt to stop agents and remove directories.

Solution: since test.sh creates directories and starts test, it should be
responsible for cleanup.

See https://github.com/etcd-io/etcd/issues/14384

Signed-off-by: Bogdan Kanivets <bkanivets@apple.com>
2022-09-15 10:55:32 -07:00
2fa73023a0 Merge pull request #14428 from spzala/featuresguide
Add features dev and support guidelines doc
2022-09-15 10:22:08 -04:00
9678697027 Merge pull request #14475 from serathius/fix-flake2
really fix measure-test-flakiness
2022-09-15 16:15:55 +02:00
54bd105805 really fix measure-test-flakiness
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-09-15 16:15:25 +02:00
f6ee4c3b60 Merge pull request #14473 from serathius/flake
Fix measuring test flakiness
2022-09-15 16:01:25 +02:00
e270967ab9 Fix measuring test flakiness 2022-09-15 16:00:53 +02:00
a7136933dd Merge pull request #14469 from ahrtr/update_changelog_3.4
Changelog: correct the 3.4 changelog item
2022-09-15 18:37:05 +08:00
7bb114d171 makefile: Make static analysis commands easier to use
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-09-15 11:54:14 +02:00
102ec3ccd3 Changelog: correct the 3.4 changelog item
There are duplicated items for https://github.com/etcd-io/etcd/pull/14441.
Since it's a etcdctl side change, so we should keep the item under etcdctl,
and remove the duplicated item under "etcd server"

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-09-15 15:51:19 +08:00
f7bae0da4e Merge pull request #14468 from ahrtr/update_changelog_3.4.21
Update changelog for 3.4.21
2022-09-15 09:44:10 +02:00
ceefbce140 Merge pull request #14464 from lovehhf/remove_unused_revisions
mvcc: Remove unused revisions and change comment rev to modified
2022-09-15 08:58:27 +02:00
3e4715e3a3 Changelog: Update changelog for 3.4.21
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-09-15 09:31:25 +08:00
1222269eba Merge pull request #14458 from serathius/contributing
Improve contributor guidelines and simplify development commands
2022-09-15 06:02:43 +08:00
35801ddf02 Add an initial features doc
Add an overview and initial development guidelines. Restructured
the doc for a better readabiltiy and easier review, and per the
previous review feedback. The TODOs will be addressed iteratively.

Related #13775

Signed-off-by: Sahdev Zala <spzala@us.ibm.com>
2022-09-14 17:53:55 -04:00
3b585e94fc mvcc: Remove unused revisions and change comment rev to modified
Signed-off-by: Hongfei Huang <853885165@qq.com>
2022-09-14 23:36:54 +08:00
2b17db8e17 Merge pull request #14461 from ahrtr/recommended_version
changelog: update the recommended version to 3.5.4+
2022-09-14 12:02:59 +02:00
4a6afdd2e0 changelog: update the recommended version to 3.5.4+
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-09-14 15:53:14 +08:00
b5bbf04503 Merge pull request #14460 from ahrtr/fix_TestV3AuthRestartMember_20220913
Integration_test: fix the flaky test TestV3AuthRestartMember
2022-09-14 09:44:15 +02:00
a36bcfff1f Improve contributor guidelines and simplify development commands
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-09-14 09:39:32 +02:00
df891e3c2f Merge pull request #14451 from serathius/clean
Just some cleanup of expect
2022-09-14 09:20:20 +02:00
e8ad008067 integration_test: fix the flaky test TestV3AuthRestartMembe
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-09-14 14:30:37 +08:00
bbcbcd9db4 Merge pull request #14459 from serathius/template
github: Improve issue templates to speed up issue triage
2022-09-13 21:09:31 +02:00
481f73c066 github: Improve issue templates to speed up issue triage
Add feature request and test flake template to stop users from using wrong or empty
template
Redirect questions to discuss page to remove load from maintainers.
Remove distributors appliations as they are not used at all.

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-09-13 17:19:13 +02:00
157ee32da4 test: Clean incorrectly used StopSignal field from expect
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-09-13 15:22:45 +02:00
37220a97dc Merge pull request #14452 from ahrtr/pagewriter_update
add a verification on the pagebytes which must be > 0
2022-09-13 19:38:48 +08:00
5f62375d62 Merge pull request #14455 from ahrtr/nil_log_assert
add verification on nil log
2022-09-13 20:14:56 +09:00
47d460b8dc add verification on nil log
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-09-13 17:11:36 +08:00
5a315ef88f add a verification on the pagebytes which must be > 0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-09-13 16:35:31 +08:00
1038c2f45c tests: Extract expect configuration into struct
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-09-13 09:20:35 +02:00
959ef2062c Update CHANGELOG/CHANGELOG-3.6.md
Co-authored-by: Benjamin Wang <wachao@vmware.com>
Signed-off-by: Allen Ray <alray@redhat.com>
2022-09-12 14:12:55 -04:00
d38132e367 Add features dev and support policy doc
Addressed feedback with some added thoughts. Also, added
Unsafe features.

Related #13775

Signed-off-by: Sahdev Zala <spzala@us.ibm.com>
2022-09-10 16:46:00 -04:00
b886bbc89f Merge pull request #14443 from ahrtr/changelog_auth_restart_20220909
Updated changelog to cover the two issues
2022-09-09 18:30:23 +08:00
92d8d7f41e Merge pull request #14445 from tjungblu/movelead_main
etcdctl: fix move-leader for multiple endpoints
2022-09-09 11:20:33 +02:00
01f2de662a updated changelog to cover the two issues:
1. authentication data not loaded on member startup
2. etcdctl move-leader may fail for multiple endpoints

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-09-09 16:43:48 +08:00
3fc16608f7 etcdctl: fix move-leader for multiple endpoints
Due to a duplicate call of clientConfigFromCmd, the move-leader command
would fail with "conflicting environment variable is shadowed by corresponding command-line flag".
Also in scenarios where no command-line flag was supplied.

Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
2022-09-09 10:38:13 +02:00
1ee1eff0c5 Merge pull request #14437 from clarkfw/migrate-member-remove-tests
tests: Migrate member remove tests to common framework
2022-09-09 16:37:56 +08:00
6a5dd09fe6 tests: Migrate member remove tests to common framework
Signed-off-by: Clark <fwyongxing@gmail.com>
2022-09-09 15:09:10 +08:00
0e1c895108 Merge pull request #14373 from serathius/maintainers
Move inactive maintainers to emeritus
2022-09-08 16:48:02 +02:00
e8c9163da7 Merge pull request #14435 from serathius/changelog-compac-hash-check
Document compact-hash-check flags in changelog
2022-09-08 09:54:15 +02:00
0315b317d1 Document compact-hash-check flags in changelog
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-09-08 09:23:54 +02:00
1d95b82b19 Merge pull request #14421 from vsvastey/usr/vsvastey/open-with-max-index-test-fix
testing: fix TestOpenWithMaxIndex cleanup
2022-09-08 06:41:36 +08:00
a4f140c9fa testing: fix TestOpenWithMaxIndex cleanup
A WAL object was closed by defer, however the WAL was rewritten afterwards,
so defer closed already closed WAL but not the new one. It caused a data
race between writing file and cleaning up a temporary test directory,
which led to a non-deterministic bug.

Fixes #14332

Signed-off-by: Vladimir Sokolov <vsvastey@gmail.com>
2022-09-07 21:30:16 +03:00
e782619415 Add features dev and support policy doc
Related https://github.com/etcd-io/etcd/issues/13775

Signed-off-by: Sahdev Zala <spzala@us.ibm.com>
2022-09-07 11:15:10 -04:00
098354859c Merge pull request #14427 from BabisK/issue-14426
Mockserver can handle requests to the leases API
2022-09-07 15:26:36 +08:00
0eb642c4d9 Mockserver can handle requests to the leases API
This should allow clients using the leases API to perform UTs.

Fixes #14426

Signed-off-by: Babis Kaidos <babis_k@outlook.com>
2022-09-06 18:48:51 +03:00
57206f9dfb shutdown tracer provider first
Signed-off-by: Yingrong Zhao <yingrong.zhao@gmail.com>
2022-09-06 11:26:31 -04:00
f40a650e76 Merge pull request #14430 from ahrtr/changelog_ci_log
Update changelog to cover some PRs
2022-09-06 09:29:24 +02:00
f0c95cadea Merge pull request #14281 from clarkfw/migrate-member-add-tests
tests: Migrate member add tests to common framework
2022-09-06 09:27:28 +02:00
92ddc940ca Update changelog to cover some PRs
Issues:
1. https://github.com/etcd-io/etcd/issues/14402 fixed in 3.4 only;
2. https://github.com/etcd-io/etcd/issues/14382 fixed in both 3.5 and main.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-09-06 12:56:42 +08:00
fcc076fb78 tests: Migrate member add tests to common framework
Signed-off-by: Clark <fwyongxing@gmail.com>
2022-09-06 11:02:54 +08:00
a55265513e Merge pull request #14425 from ahrtr/update_changelog_data_loss
Update changelog for 3.4, 3.5 and 3.6 for the potential data loss in one-node cluster
2022-09-06 08:41:51 +08:00
ed0730c02e update changelog for 3.4, 3.5 and 3.6 for the potential data loss in one-node cluster
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-09-06 05:19:45 +08:00
3dc5348d94 Merge pull request #14419 from ahrtr/alarm_list_ci
Move consistent_index forward when executing alarmList operation
2022-09-06 03:50:58 +08:00
73029fe89f Merge pull request #14400 from ahrtr/one_member_data_loss_raft
[Second Solution] Fix the potential data loss for clusters with only one member (simpler solution)
2022-09-05 20:00:20 +08:00
cc840336f0 move consistent_index forward when executing alarmList operation
The alarm list is the only exception that doesn't move consistent_index
forward. The reproduction steps are as simple as,

```
etcd --snapshot-count=5 &
for i in {1..6}; do etcdctl  alarm list; done
kill -9 <etcd_pid>
etcd
```

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-09-05 10:05:55 +08:00
4d57eb8d3b Merge pull request #14360 from clarkfw/common-test-of-e2e-disable-strict-reconfig-check-by-default
tests: unify `--strict-reconfig-check` config of common framework
2022-09-05 03:24:07 +08:00
3f3149b15f tests: fix failed integration test cases after enabling --strict-reconfig-check by default
Signed-off-by: Clark <fwyongxing@gmail.com>
2022-09-03 15:56:51 +08:00
3c79a4dc38 Merge pull request #14418 from lovehhf/update_goreman_install_comment
Procfiles: Update Goreman Installation Command
2022-09-03 15:18:10 +08:00
d8ddb2dc52 Procfiles: Update Goreman Installation Command
Starting in Go 1.17, Installing executables with go get is deprecated. go install may be used instead.

Refer to https://go.dev/doc/go-get-install-deprecation

Signed-off-by: Hongfei Huang <853885165@qq.com>
2022-09-03 10:34:19 +08:00
3beb25489d tests: enable --strict-reconfig-check by default and expose it to common framework
Signed-off-by: Clark <fwyongxing@gmail.com>
2022-08-31 22:21:23 +08:00
5707147363 Merge pull request #14391 from cenkalti/revive
Add revive to the list of linters.
2022-08-31 16:38:51 +08:00
30d5f0a8f9 Merge pull request #14392 from cenkalti/golangci-lint-github-action
Setup golangci-lint GitHub action
2022-08-31 16:21:15 +08:00
a285b06d63 Merge pull request #14405 from Abirdcfly/main
chore: remove duplicate word in comments
2022-08-31 16:19:30 +08:00
858afba44e chore: remove duplicate word in comments
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
2022-08-30 20:00:26 +08:00
2a10049e47 fix the potential data loss for clusters with only one member
For a cluster with only one member, the raft always send identical
unstable entries and committed entries to etcdserver, and etcd
responds to the client once it finishes (actually partially) the
applying workflow.

When the client receives the response, it doesn't mean etcd has already
successfully saved the data, including BoltDB and WAL, because:
   1. etcd commits the boltDB transaction periodically instead of on each request;
   2. etcd saves WAL entries in parallel with applying the committed entries.
Accordingly, it may run into a situation of data loss when the etcd crashes
immediately after responding to the client and before the boltDB and WAL
successfully save the data to disk.
Note that this issue can only happen for clusters with only one member.

For clusters with multiple members, it isn't an issue, because etcd will
not commit & apply the data before it being replicated to majority members.
When the client receives the response, it means the data must have been applied.
It further means the data must have been committed.
Note: for clusters with multiple members, the raft will never send identical
unstable entries and committed entries to etcdserver.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-08-30 15:29:20 +08:00
cdd2b737f0 Merge pull request #14401 from ahrtr/ctx_error_20220830
[test] Fix test code compiling error due to not enough arguments
2022-08-30 09:18:21 +02:00
e1c5d2a9ac fix test code compiling error due to not enough arguments in call to node0.Restart
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-08-30 13:15:04 +08:00
77773c7798 Merge pull request #14374 from Comolli/main
Reduce redundant code and memory allocation.
2022-08-29 21:15:06 +02:00
de41f83343 Merge pull request #14383 from serathius/context-e2e
tests: Add context to e2e cluster start
2022-08-29 21:12:12 +02:00
c52108942b Merge branch 'main' into main 2022-08-29 12:07:27 -04:00
f56e0d0e15 Merge pull request #14395 from ahrtr/SpawnCmdWithLogger_name
[test] add the missing parameter 'name' into SpawnCmdWithLogger for cov test
2022-08-29 09:02:07 +02:00
fdf22b241a add the missing parameter 'name' into SpawnCmdWithLogger for cov test
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-08-29 13:37:23 +08:00
66d37aaf1d Setup golangci-lint GitHub action.
Part of "Enhance the static-analysis workflow" issue. #14164

Signed-off-by: Cenk Alti <cenkalti@gmail.com>
2022-08-27 14:06:11 -04:00
f8b65d53ba Add revive to the list of linters.
Part of "Enhance the static-analysis workflow" issue. #14164

Signed-off-by: Cenk Alti <cenkalti@gmail.com>
2022-08-27 13:41:14 -04:00
eb25e433cd Merge pull request #14390 from Abirdcfly/main
chore: remove duplicate word in comments
2022-08-27 15:38:03 +08:00
08a9d1da07 chore: remove duplicate word in comments
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
2022-08-27 13:39:48 +08:00
9c8326bb50 Merge pull request #14358 from vivekpatani/main
server/auth: refresh cache on each NewAuthStore
2022-08-27 11:13:59 +09:00
a3f15645d8 Merge pull request #14386 from DevMayurJ/main
Readme: Removed unnecessary comma.
2022-08-26 19:05:55 +08:00
dc4b810195 Merge pull request #14388 from niconorsk/fix/notify-systemd-when-cluster-ready-times-out
etcdmain: Honour ExperimentalWaitClusterReadyTimeout in startEtcd
2022-08-26 18:34:52 +08:00
e15bdd9df1 etcdmain: Honour ExperimentalWaitClusterReadyTimeout in startEtcd
When we can't reach quorum, we were waiting forever and never sending
the systemd notify message. As a result, systemd would eventually time out
and restart the etcd process which likely would make the unhealthy cluster
in an even worse state

Improves #13785

Signed-off-by: Nicolai Moore <niconorsk@gmail.com>
2022-08-26 18:06:50 +10:00
f00578c3cd Merge pull request #14389 from ahrtr/cleanup_e2e_fields
Cleanup some e2e test configurations
2022-08-26 15:05:53 +08:00
70de5c8937 tests: Add context to e2e cluster start
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-08-26 08:08:17 +02:00
dd3cf97dfb Merge pull request #14381 from serathius/context
Add context to tests common client interface
2022-08-26 08:06:16 +02:00
17b83ea810 Cleanup some e2e test configurations
Notes:
1. compactPhysical in ctlCtx and withQuota aren't used at all, they are dead code.
2. quotaBackendBytes in ctlCtx isn't used either. Instead, users (test cases) set the QuotaBackendBytes directly.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-08-26 13:53:33 +08:00
46fe4b8e1c tests: Rename common client lease methods to match
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-08-26 07:12:47 +02:00
b7272df69f tests: Remove dummy client implementations
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-08-26 07:12:47 +02:00
72bec6fbc2 tests: Add context to common client interface
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-08-26 07:12:45 +02:00
b39506b4e7 Update README.md
Signed-off-by: Mayur Jadhav <jadhav.mayur30@gmail.com>
2022-08-26 09:32:20 +05:30
e40828540c Merge pull request #14354 from biosvs/add-client-auto-sync-to-proxy
Added client-auto-sync-interval argument to the grpc-proxy
2022-08-26 05:36:01 +08:00
be58a2539c Added client-auto-sync-interval argument to the grpc-proxy
Signed-off-by: Vitalii Levitskii <vitalii@uber.com>
2022-08-25 15:33:38 +03:00
f36a8782f0 Merge pull request #14345 from nic-chen/tests/watch
tests: Migrate watch test to common framework
2022-08-25 13:35:34 +02:00
96a2669839 Merge pull request #14380 from ahrtr/cleanup_etcdctl_mod
Cleanup the go.mod for etcdctl
2022-08-25 16:14:50 +08:00
7086a06490 Merge pull request #14377 from tjungblu/flake_14333
Add ErrTimeoutDueToLeaderFail as expected error
2022-08-25 10:04:53 +02:00
3196c2cb5f Cleanup the go.mod for etcdctl
etcdctl doesn't depend on the following packages at all,
1. go.etcd.io/etcd/client/v2
2. go.etcd.io/etcd/etcdutl/v3
3. go.etcd.io/etcd/raft/v3
4. go.etcd.io/etcd/server/v3

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-08-25 13:30:55 +08:00
82bf79d4ce Merge pull request #14376 from biosvs/fix-expect-package
Fixed infinite loop in ExpectProcess.ExpectFunc
2022-08-25 05:29:30 +08:00
e363480089 Merge pull request #14378 from spzala/removeircref
Remove IRC ref
2022-08-24 22:28:26 +02:00
e3787ef706 Remove IRC ref
The IRC is not used and so removing it as per previous discussion
with the etcd team.

Signed-off-by: Sahdev Zala <spzala@us.ibm.com>
2022-08-24 15:52:05 -04:00
71c5360f98 Fixed infinite loop in ExpectProcess.ExpectFunc
Signed-off-by: Vitalii Levitskii <vitalii@uber.com>
2022-08-24 16:46:24 +03:00
e1e92e9c0d Add ErrTimeoutDueToLeaderFail as expected error
This fixes ci flakes where timeouts are expected to happen in network
partitions.
issue: #14333

Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
2022-08-24 13:56:45 +02:00
ae608da7e6 server,test: refresh cache on each NewAuthStore
- permissions were incorrectly loaded on restarts.
- https://github.com/etcd-io/etcd/issues/14355

Signed-off-by: vivekpatani <9080894+vivekpatani@users.noreply.github.com>
2022-08-23 20:11:47 -07:00
c29dbf3400 Merge pull request #14367 from ahrtr/update_3.5_changelog_keepalive
Update changelog-3.5 to cover the change for refactoring the keepAliveListener and keepAliveConn
2022-08-24 10:14:42 +08:00
a5515171c3 Reduce redundant code and memory allocation.
Signed-off-by: comolli <liangweicheng2@gmail.com>
2022-08-24 09:15:34 +08:00
e9c53a0875 Merge pull request #14375 from AustinBenoit/Docs/update_links
Documentation: Update Broken Links
2022-08-23 21:10:13 +02:00
91e76eccd2 Documentation: Update Broken Links
Fix broken links in documentation.

Signed-off-by: Austin Benoit <austinryanbenoit@gmail.com>
2022-08-23 14:35:32 -04:00
0785ef493b Move inactive maintainers to emeritus
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-08-23 11:50:56 +02:00
e087c349e1 Merge pull request #14238 from serathius/emeritus
Add process to remove maintainers that don't fulfill their duties
2022-08-23 11:43:05 +02:00
f6ed36372b tests: Migrate watch test to common framework
Signed-off-by: nic-chen <chenjunxu6@gmail.com>
2022-08-22 21:55:57 +08:00
93be38856c Update changelog-3.5 to cover the change for refactoring the keepAliveListener and keepAliveConn
Refer to https://github.com/etcd-io/etcd/pull/14366,
Also refer to https://github.com/etcd-io/etcd/pull/14356

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-08-21 13:06:56 +08:00
192d635da9 Merge pull request #14292 from tjungblu/debug_e2e
Add test name to e2e cluster members
2022-08-20 19:30:44 -04:00
1869fa9db2 have the tracingExporter to own resources it initializes
Signed-off-by: Yingrong Zhao <yingrong.zhao@gmail.com>
2022-08-19 11:31:52 -04:00
1851316519 Merge pull request #14266 from stefanmonkey/feat/grpc-logging
Add logging grpc request and response content with grpc-proxy mode
2022-08-19 05:52:16 +08:00
3c306c53bc Merge pull request #14359 from ahrtr/functional_test_20220818
Cleanup all etcd-agent and etcd processes when the test finishes
2022-08-18 11:44:51 -04:00
12d63d100e Merge pull request #14357 from amdprophet/close-keepalive-stream
clientv3: close streams after use in lessor keepAliveOnce method
2022-08-18 11:30:44 -04:00
d8ee37641d Cleanup all etcd-agent and etcd processes when the test finishes
There are two cases, when interrupted by users, then forcibly kill
all processes. Otherwise, gracefully terminate all processes.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-08-18 17:15:39 +08:00
27ffd7e1cf Merge pull request #14351 from spacewander/rca
chore: log when an invalid watch request is received
2022-08-18 09:45:29 +08:00
295044fba2 clientv3: close streams after use in lessor keepAliveOnce method
Streams are now closed after being used in the lessor `keepAliveOnce` method.
This prevents the "failed to receive lease keepalive request from gRPC stream"
message from being logged by the server after the context is cancelled by the
client.

Signed-off-by: Justin Kolberg <amd.prophet@gmail.com>
2022-08-17 18:02:13 -07:00
ba0c7c31a7 Merge pull request #14356 from ahrtr/functional_test_20220816
Minor refactoring on the keepAliveListener and keepAliveConn
2022-08-17 17:34:09 -04:00
74506738b8 Refactor the keepAliveListener and keepAliveConn
Only `net.TCPConn` supports `SetKeepAlive` and `SetKeepAlivePeriod`
by default, so if you want to warp multiple layers of net.Listener,
the `keepaliveListener` should be the one which is closest to the
original `net.Listener` implementation, namely `TCPListener`.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-08-18 04:24:05 +08:00
2f51d3d9b7 improve the performance of starting functional test
The proxy must be waiting for the etcd to be running, but the current
implementation hard codes the wating time as 5 seconds. The improvement
is to dynamically check whether the etcd is running, and start the
proxy when etcd port is reachable.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-08-18 04:18:11 +08:00
76a5902efa server/etcdmain: add configurable cipher list to gRPC proxy listener
Signed-off-by: Allen Ray <alray@redhat.com>
2022-08-17 10:56:27 -04:00
508ce517e0 update according to the review
Signed-off-by: spacewander <spacewanderlzx@gmail.com>
2022-08-17 09:25:37 +08:00
ff6b85da83 Merge pull request #14340 from xakdwch/main
etcdctl: add --max-txn-ops flag to make-mirror command
2022-08-17 05:36:16 +08:00
bebefd8b80 chore: log when an invalid watch request is received
As protobuf doesn't have required field, user may send an empty
WatchRequest by mistake. Currently, etcd will ignore the invalid request
and keep the stream opening. If we don't reject the invalid request by
closing the stream, it would be better to leave a log there.

This commit also fixes a typo in the comment.

Signed-off-by: spacewander <spacewanderlzx@gmail.com>
2022-08-16 11:33:01 +08:00
22cc682606 Merge pull request #14346 from ahrtr/functional_test_upadte_20220815
Improve functional test code
2022-08-16 05:09:49 +08:00
ea2f299ba0 embed: add integration test for distributed tracing
To verify distributed tracing feature is correctly setup, this PR adds
an integration test for this feature.
In the process of writing the test, I discovered a goroutine leak due to
the TraceProvider not being closed. This PR fixs this issue as well.

Signed-off-by: Yingrong Zhao <yingrong.zhao@gmail.com>
2022-08-15 11:19:10 -04:00
bba4eb4d81 Improve functional test code
Get duplicated code wraped in common functions, and simplify
error handling.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-08-15 16:59:39 +08:00
7cc3f5f97e etcdctl: add --max-txn-ops flag to make-mirror command
--max-txn-ops flag allows users to define the maximum number of operations permitted in
a transaction during syncing updates.if unlimited syncing may fail when number of txn ops
exceeds the maximum number of server side.

Signed-off-by: xakdwch <xakdwch5@gmail.com>
2022-08-15 13:38:32 +08:00
a1405e9633 Merge pull request #14344 from clarkfw/common-framework-share-constants
tests: e2e and integration share TickDuration constant
2022-08-14 21:22:35 -04:00
0b9f43410a tests: e2e and integration share TickDuration constant
Signed-off-by: Clark <fwyongxing@gmail.com>
2022-08-14 18:49:46 +08:00
012fc51390 Merge pull request #14304 from clarkfw/e2e-cluster-waitleader
tests: add WaitLeader function to common framework
2022-08-14 13:44:28 +08:00
fff5d00ccf Merge pull request #14149 from lavacat/main-txn-panic
server: don't panic in readonly serializable txn
2022-08-14 05:41:57 +08:00
52f367b1f6 Merge pull request #14208 from ahrtr/print_lease_hex
Print clusterID, memberID and leaseID in hexdecimal
2022-08-13 05:31:40 +08:00
a5409c62e6 tests: add WaitLeader function to common framework
Signed-off-by: Clark <fwyongxing@gmail.com>
2022-08-11 12:46:40 +08:00
043a3aa70e Merge pull request #14334 from chaochn47/more_logging_around_autoSync
more logging around auto sync
2022-08-11 10:16:19 +08:00
d4778e78c8 more logging around auto sync
Signed-off-by: Chao Chen <chaochn@amazon.com>
2022-08-10 18:00:06 -07:00
cb5f358b5f Merge pull request #14330 from chaochn47/auth_test_logging
logging RoleGrantPermission key and range end
2022-08-11 06:39:56 +08:00
78a4b64084 Merge pull request #14327 from ahrtr/gitignore_20220810
add .DS_Store into .gitignore
2022-08-11 06:18:23 +08:00
ccd4efc3b3 logging RoleGrantPermission key and range end
Signed-off-by: Chao Chen <chaochn@amazon.com>
2022-08-10 14:51:25 -07:00
658d570b0b change flag name in changelog-3.6
Signed-off-by: stefan bo <stefan_bo@163.com>
2022-08-10 16:24:29 +08:00
6a04f7fbd6 With go-grpc-middleware, add grpc_zap to logging grpc request and response content in grpc-proxy mode In our test environment, it may be very useful to debug who delete etcd's key with grpc-proxy mode
inspired by https://github.com/grpc-ecosystem/go-grpc-middleware

Signed-off-by: stefanbo <stefan_bo@163.com>

Update flag name

1. add changelog
2. update flag name to `experimental-enable-grpc-debug`

Signed-off-by: stefan bo <stefan_bo@163.com>

Update CHANGELOG-3.6.md

Signed-off-by: stefan bo <stefan_bo@163.com>

change flag name

Signed-off-by: stefan bo <stefan_bo@163.com>
2022-08-10 16:10:05 +08:00
292d03b28a add .DS_Store into .gitignore
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-08-10 13:00:06 +08:00
9592e33b90 Merge pull request #14212 from SimFG/benchmark_watch
benchmark: Fix the panic when running `benchmark watch`
2022-08-10 12:50:36 +08:00
43bb9d5c22 server: don't panic in readonly serializable txn
Problem: We pass grpc context down to applier in readonly serializable txn.
This context can be cancelled for example due to timeout.
This will trigger panic inside applyTxn

Solution: Only panic for transactions with write operations

fixes https://github.com/etcd-io/etcd/issues/14110

Signed-off-by: Bogdan Kanivets <bkanivets@apple.com>
2022-08-09 00:46:50 -07:00
b2726c4da3 Merge pull request #12469 from trawler/client_listen_unix_socket
pkg/types: Support Unix sockets in NewURLS
2022-08-09 06:40:31 +08:00
649babaf4a Merge pull request #14276 from yuzhiquan/add-alarm-metrics
Add alarms metrics for server
2022-08-09 05:06:35 +08:00
eea4c10d2f Merge pull request #14299 from clarkfw/fix-status
tests: fix status responses size and nil
2022-08-09 04:01:21 +08:00
216f0ae7e9 Merge pull request #14317 from QianChenglong/fix/insecure-skip-tls-verify
clientv3: fix --insecure-skip-tls-verify not working when not specify…
2022-08-09 01:43:59 +08:00
8e1e118fea clientv3: fix --insecure-skip-tls-verify not working when not specify --cert-path and --key-path
Fixes 14315

Signed-off-by: QianChenglong <qian_cheng_long@163.com>
2022-08-08 16:24:12 +08:00
c070dedb92 Merge pull request #14306 from spzala/updatechanglogversion
CHANGELOG: update version recommendation
2022-08-06 10:15:03 +08:00
f7a21c1b4e Merge pull request #14320 from ahrtr/3.5_changelog_bump_otl_grpc
[CHANGELOG-3.5] Bump OpenTelemetry to 1.0.1 and gRPC to 1.41.0
2022-08-05 20:37:31 -04:00
871d8fdaf1 Merge pull request #14300 from ahrtr/enhance_wal_find_error
Enhance the WAL file related error
2022-08-05 20:35:48 -04:00
c9578c41dd CHANGELOG: update version recommendation
Update version recommendation per the current policy.

For more details, see discussions under
https://github.com/etcd-io/website/pull/601

Signed-off-by: Sahdev Zala <spzala@us.ibm.com>
2022-08-05 20:26:13 -04:00
bc206bc86b bump OpenTelemetry to 1.0.1 and gRPC to 1.41.0
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-08-06 06:15:48 +08:00
2fbe399a56 Merge pull request #14319 from ahrtr/3.4.20_date
Update the release date for 3.4.20
2022-08-06 06:05:28 +08:00
b124904972 update the release date for 3.4.20
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-08-06 05:46:51 +08:00
4c13767881 etcdserver: add alarms metrics for server
Signed-off-by: yuzhiquanlong <yuzhiquanlong@gmail.com>
2022-08-03 09:33:02 +08:00
ae36a577d7 Merge pull request #14286 from VladSaioc/bugfix-goroutine-leak
Fixed goroutine leak in server/etcdserver/raft_test.go
2022-08-03 06:02:54 +08:00
3dd7d3f9af enhance the WAL file related error
The `ErrFileNotFound` was used for for three cases:
1. There is no any WAL files (probably due to no read permission);
2. There is no WAL files matching the snapshot index;
3. The WAL file seqs do not increase continuously.

It's not good for debug when users see the `ErrFileNotFound` error,
so in this PR, a different error is returned for each case above.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-08-03 05:37:30 +08:00
6cded3d94c Fixed goroutine leak in server/etcdserver/raft_test.go
Signed-off-by: VladSaioc <vladsaioc10@gmail.com>
2022-08-02 23:22:55 +02:00
7fa88fb8f7 tests: fix status responses size and nil
Signed-off-by: Clark <fwyongxing@gmail.com>
2022-08-03 03:10:45 +08:00
4f0e92d94c Merge pull request #14262 from mind1949/update-server-etcdserver-raft
server/etcdserver: check whether raftNode has stopped
2022-08-02 05:58:30 +08:00
51933a7c8b Add test name to e2e cluster members
This should aid in debugging test flakes, especially in tests where the process is restarted very often and thus changes its pid.
Now it's a lot easier to grep for different members, also when different tests fail at the same time.
The test TestDowngradeUpgradeClusterOf3 as mentioned in #13167 is a good example for that.

Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
2022-08-01 15:57:16 +02:00
21995a3b76 Merge pull request #14284 from AustinBenoit/test/server_transport_test_remove
rafthttp: test multiple transport removes
2022-08-01 07:12:05 +08:00
68c0cf834a Merge pull request #14288 from VladSaioc/bugfix-goleak-watchtest
Fixed goroutine leak in tests/integration/clientv3/watch_test.go
2022-08-01 06:55:57 +08:00
9e9e500d57 Merge pull request #14287 from VladSaioc/bugfix-queue-test
Fixed goroutine leak
2022-08-01 06:52:40 +08:00
6b19267628 Merge pull request #14289 from VladSaioc/bugfix-goleak-watch-restore-test
Fixed goroutine leak in tests/integration/v3_watch_restore_test.go
2022-08-01 06:24:36 +08:00
2c89834608 Fixed goroutine leak in tests/integration/v3_watch_restore_test.go
Signed-off-by: VladSaioc <vladsaioc10@gmail.com>
2022-07-31 23:28:26 +02:00
cbfddfe63f Fixed goroutine leak in tests/integration/clientv3/watch_test.go
Signed-off-by: VladSaioc <vladsaioc10@gmail.com>
2022-07-31 23:09:50 +02:00
3a775201c0 Fixed goroutine leak
Signed-off-by: VladSaioc <vladsaioc10@gmail.com>
2022-07-31 22:19:59 +02:00
046c46e52e Merge pull request #14255 from ramses/golangci-config
Add golangci-lint config file and `make` target.
2022-07-29 15:47:43 +08:00
3cdc4225e1 Followup to "Add golangci-lint config file"
Addressed comments by @ldez and added `lint-fix` target.

Signed-off-by: Ramsés Morales <ramses@gmail.com>
2022-07-28 17:55:22 -07:00
a7a48168a0 Add golangci-lint config file and make target.
Here we add file `.golangci.yaml`, to have a common configuration for
static analysis. If you use the following IDEs/editors, they will read
the file:

- `vim` with vim-go.
- VSCode.

The initial configuration file is based on Kubernetes' HEAD. We removed
a custom kubernetes-linter for custom kubernetes-logging. We also
changed to Golang version 1.17 (etcd's current target Golang version)
from 1.18.

Also, we added a new target to `Makefile`: `lint`. NOTE that auto-fixing
should be part of a later commit, once we are all happy with how the
configuration file is working for us.

As expected, this change fixes two issues found by this `.golangci.yaml`
in file `contrib/lock/client/client.go`:

- Dead code, removed.
- Innefective assignment, removed.

Finally, we are updating `CONTRIBUTING.md` to mention `golangci-lint`.

We will add a GitHub-action to run `golangci-lint` in a future change.

Local testing done:

- `make build`.
- `make test`.

Both are happy.

This is the initial step to fix
https://github.com/etcd-io/etcd/issues/14164.

Signed-off-by: Ramsés Morales <ramses@gmail.com>
2022-07-28 17:55:08 -07:00
ff56da7745 rafthttp: test transport multiple transport removes
Unit test to verify multiple transport removes does not create an
  issue.

Signed-off-by: Austin Benoit <22805659+AustinBenoit@users.noreply.github.com>
2022-07-28 18:23:17 -04:00
223b33f23c Merge pull request #14283 from tjungblu/issue_14275
Reduce ExpectFunc polling interval
2022-07-28 14:57:49 +02:00
eb59368440 Reduce ExpectFunc polling interval.
Fixes issue 14275, flakes close to timeout like TestKVDelete.

Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
2022-07-28 14:38:44 +02:00
5d96a7273b Merge pull request #14261 from tjungblu/update_locking
update contrib/lock example
2022-07-28 15:18:47 +08:00
0535742a1f Transition my maintainer status to emeritus
My responsibilities have long since been handed off to ptab@google.com and siarkowicz@google.com. I'd like to reflect that here in the MAINTAINERS file.
2022-07-27 09:50:10 -07:00
baf777fa63 Apply @spzala feedback
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-07-27 15:08:05 +02:00
fae4650834 Merge pull request #14280 from falser101/fix/zjf
fix: code cleanup
2022-07-27 07:20:43 +08:00
37e4193c60 Merge pull request #14272 from serathius/memberID
memberID equals zero in corruption alarm
2022-07-27 06:32:52 +08:00
c04c65c181 Merge pull request #14278 from clarkfw/migrate-member-tests
tests: Migrate member list tests to common framework
2022-07-26 19:17:36 +02:00
13d20f8d28 tests: Migrate member list tests to common framework
Signed-off-by: Clark <fwyongxing@gmail.com>
2022-07-26 23:28:19 +08:00
c26d7f5389 fix: code cleanup
Signed-off-by: jianfei.zhang <jianfei.zhang@daocloud.io>
2022-07-26 22:07:22 +08:00
bb7e4653c8 tests: Fix member id in CORRUPT alarm
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-07-26 15:55:22 +02:00
a3b410cac7 Merge pull request #14120 from serathius/compact-check
server: Implement compaction hash checking
2022-07-26 15:36:31 +02:00
66edfab75f Merge pull request #14277 from ahrtr/3.4.20_changelog
Update changelog for 3.4.20
2022-07-26 21:24:58 +08:00
cfa3b5b956 Update changelog for 3.4.20
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-07-26 16:38:00 +08:00
188ea5424d Add process to remove maintainers that don't fulfill their duties
When asking CNCF for support due to reduced community activity we stumbled upon a problem,
governing board was surprised that project is unmaintained as there is so many maintainers listed for the project.

Feedback was to improve accuracy of maintainers list so it reflects only active maintainers.
Self nominating process it not enough and we need to start enforcing
moving maintainers to emeritus status. Period of 12 months to take maternity leave into account.

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-07-26 10:35:35 +02:00
d44bbff278 server: Make corrtuption check optional and period configurable
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-07-26 09:31:15 +02:00
6697fca97d server: Implement compaction hash checking
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-07-26 09:31:14 +02:00
5fab045242 Merge pull request #14273 from RobertIndie/fix-test
tests: fix the logic of testNonleaderElectionTimeoutRandomized in raft_paper_test.go
2022-07-26 09:22:57 +02:00
f3bd535747 server/etcdserver: fix test
Signed-off-by: mind1949 <lianjie1949@gmail.com>
2022-07-25 23:20:21 +08:00
b77f56ac25 tests: fix the logic of testNonleaderElectionTimeoutRandomized in raft_paper_test.go
In the test `testNonleaderElectionTimeoutRandomized`, the possible values of election timeout randomized out should be 10-19(inclusive), but the current test only tests the possible values as 11-19(inclusive), which is incorrect here. We need to expand the scope of the tests to ensure robustness, and also to make the logic clearer.

Signed-off-by: Zike Yang <zike@apache.org>
2022-07-25 23:16:02 +08:00
f0f750f4c0 tests: Cover periodic check in tests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-07-25 13:59:31 +02:00
c58ec9fe13 server: Refactor compaction checker
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-07-25 13:59:30 +02:00
264498258b tests: Move CorruptBBolt to testutil
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-07-25 13:59:30 +02:00
99b982e71a tests: Rename corruptHash to CorruptBBolt
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-07-25 13:28:30 +02:00
4977877730 Merge pull request #14231 from mitake/changelog-3.4-for-pr-14230
update changelog-3.4 to protection for rangePermCache with a RW lock
2022-07-25 07:24:12 +08:00
97222a5277 update changelog-3.4 to protection for rangePermCache with a RW lock
Signed-off-by: Hitoshi Mitake <h.mitake@gmail.com>
2022-07-24 23:34:05 +09:00
2b0596f859 server/etcdserver: check if raftNode has been stopped
Signed-off-by: mind1949 <lianjie1949@gmail.com>
2022-07-23 08:49:07 +08:00
118ab24b39 update contrib/lock example
Updating the locking example to avoid relying on GC to break the lease.
Updating the documentation to reflect the build process better, improve
error messages and logging to not confuse first time users.

Fixes #14224

Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
2022-07-22 12:14:37 +02:00
6d27a42b7d Merge pull request #14248 from ahrtr/update_TestRemoveMatchFile
No need to manually remove tmp directory created by t.TempDir()
2022-07-21 17:31:43 +08:00
4c2aab97c8 Merge pull request #14247 from AustinBenoit/update_readme
readme: remove broken roadmap link
2022-07-21 11:20:36 +02:00
b71a641c93 Merge pull request #14235 from Abirdcfly/main
delete unreachable code
2022-07-21 13:54:01 +08:00
37b920e9f4 delete unreachable code
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
2022-07-21 12:54:29 +08:00
f6cfd465cc No need to manually remove tmp directory created by t.TempDir()
The temporary directory created by t.TempDir() can be automatically removed by
the golang testing utilities. So no need to remove it manually.

FYI.

    https://github.com/golang/go/blob/go1.16.15/src/testing/testing.go#L911-L915
    https://github.com/golang/go/blob/go1.16.15/src/testing/testing.go#L957

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-07-21 08:20:52 +08:00
790a461c16 readme: remove broken roadmap link
The ROADMAP.md file was deleted as a part of commit
a722827c96 and the readme
file was not updated. I could not find a suitable alternative
resource so I am removing the link.

Signed-off-by: Austin Benoit <22805659+AustinBenoit@users.noreply.github.com>
2022-07-20 19:37:27 -04:00
b75aa3eb4c Merge pull request #14242 from Elbehery/etcd-mixin_replace_backend_with_database
etcd-mixin: fix etcdDatabaseQuotaLowSpace alert name
2022-07-20 12:40:56 +08:00
75d7bd0155 etcd-mixin: fix etcdDatabaseQuotaLowSpace alert name
Signed-off-by: Mustafa Elbehery <melbeher@redhat.com>
2022-07-20 06:11:13 +02:00
2ef4043979 Merge pull request #14237 from Elbehery/use-last_over_time
etcd-mixin: use-last_over_time-with-etcdBackendQuotaLowSpace-alert
2022-07-19 21:43:57 -04:00
674ef6c32f Merge pull request #14221 from Elbehery/add_etcdBackendHighFragmentationRatio_alert
etcd-mixin:add etcdDatabaseHighFragmentationRatio alert
2022-07-20 05:20:09 +08:00
0d0fc573ba etcd-mixin:use-last_over_time-with-etcdBackendQuotaLowSpace-alert
Signed-off-by: Mustafa Elbehery <melbeher@redhat.com>
2022-07-19 18:10:19 +02:00
7de89e8db6 etcd-mixin:add etcdBackendHighFragmentationRatio alert
Signed-off-by: Mustafa Elbehery <melbeher@redhat.com>
:wq
2022-07-19 18:03:08 +02:00
525d53bd41 Merge pull request #14228 from mitake/changelog-3.5-for-pr-13954
update changelog-3.5 to protection for rangePermCache with a RW lock
2022-07-18 09:59:58 +02:00
874561448d update changelog-3.5 to protection for rangePermCache with a RW lock
Signed-off-by: Hitoshi Mitake <h.mitake@gmail.com>
2022-07-18 00:22:01 +09:00
5cae1a1c48 Print clusterID, memberID and leaseID in hexdecimal
ClusterID, memberID and leaseID are just identifies, so it doesn't
make sense to print them in decimal. Instead, we should always print
them in hexdecimal.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-07-16 07:21:13 +08:00
508fa22a91 benchmark: Fix the panic when running benchmark watch
Signed-off-by: SimFG <1142838399@qq.com>
2022-07-15 11:33:11 +08:00
73c714bf3d Merge pull request #14196 from Elbehery/use-derive-insteadof-increase
fix:etcd-mixin:use-predictlinear-insteadof-increase
2022-07-14 06:20:37 +08:00
16c10d6910 Merge pull request #14203 from Jille/patch-1
clientv3: Fix parsing of ETCD_CLIENT_DEBUG
2022-07-14 05:54:04 +08:00
ac3f913dad Improve error message for incorrect values of ETCD_CLIENT_DEBUG
Signed-off-by: Jille Timmermans <jille@quis.cx>
2022-07-13 18:55:51 +02:00
dae7838c44 Merge pull request #14201 from lishaokai1995/main
Fix syntax errors in comments
2022-07-13 16:33:01 +02:00
53bfdc11d8 Merge pull request #14220 from ahrtr/changelog_maxstream
Update both 3.5 and 3.6 changelog to cover the new flag `--max-concurrent-streams`
2022-07-13 17:16:19 +08:00
575a901c08 update both 3.5 and 3.6 changelog to cover the new flag --max-concurrent-streams
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-07-13 14:58:29 +08:00
6c5dfcf140 Merge pull request #14215 from etcd-io/serathius-patch-1
Make Benjamin an official v3.4 release manager
2022-07-12 13:37:15 +02:00
25ad3cffe8 Make Benjamin an official v3.4 release manager
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-07-12 12:26:09 +02:00
9c4fe12a88 Merge pull request #14169 from ahrtr/http_max_stream_20220628
Support configuring `MaxConcurrentStreams` for http2
2022-07-12 17:38:43 +08:00
c72f786750 Merge pull request #14214 from ahrtr/3.4.19_date
update v3.4.19 release date
2022-07-12 17:23:45 +08:00
d3a96f3485 update v3.4.19 release date
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-07-12 16:59:07 +08:00
9609a46629 Merge pull request #14207 from ahrtr/dev_guide_local_cluster
Update goreman installation command in local_cluster.md
2022-07-11 10:15:08 +02:00
12ee494ebc Merge pull request #14206 from ahrtr/relase_update_travis
Update scripts/release.sh to remove message related to travis.yml
2022-07-11 10:14:39 +02:00
39486c4289 update goreman installation command in local_cluster.md
`go install` is the recommended way to build and install packages in
module mode. `go get` should be used with the -d flag to adjust the
current module's dependencies without building packages, and use of
`go get` to build and install packages is deprecated. In a future
release, the -d flag will always be enabled.

Refer to https://go.dev/doc/go1.16.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-07-11 13:51:57 +08:00
7400d6c363 Update scripts/release.sh to remove message related to travis.yml
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-07-11 10:31:51 +08:00
e3fd58df46 clientv3: Fix parsing of ETCD_CLIENT_DEBUG
It checked `err == nil` rather than `err != nil`.

Signed-off-by: Jille Timmermans <jille@quis.cx>
2022-07-10 11:21:15 +02:00
91f8eb1bd6 fix:etcd-mixin:use-predictLinear-insteadof-increase
Signed-off-by: Mustafa Elbehery <melbeher@redhat.com>
2022-07-08 16:16:54 +02:00
20bf49c24e Merge pull request #14202 from ahrtr/changlog_3.4.19
Update 3.4 changelog to prepare for the release of 3.4.19
2022-07-08 10:23:52 +02:00
1914e425bf update 3.4 changelog to prepare for the release of 3.4.19
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-07-08 14:06:02 +08:00
c4e89b4186 Fix syntax errors in comments
Signed-off-by: sky li (李少凯)-浪潮数据 <lishaokai1995@126.com>
2022-07-08 09:48:13 +08:00
186c895da8 Merge pull request #14198 from SimFG/heap_top
lease: Rename `Poll` to `Peek` in the `LeaseExpiredNotifier`
2022-07-08 04:59:43 +08:00
e586dc19df lease: Rename Poll to Peek in the LeaseExpiredNotifier
`Poll` means that the elements in the heap will be removed.
And it is more appropriate to use `Peek` to get the top of the heap.

Signed-off-by: SimFG <1142838399@qq.com>
2022-07-07 16:25:26 +08:00
8b6c8b4c96 add unit test for pkg/flags/Uint32FromFlag in uint32_test.go
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-07-07 04:52:28 +08:00
1a6fe4dbc6 update the comment for MaxConcurrentStreams to clearly state it's the max value for each client.
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-07-07 04:51:20 +08:00
f40b676701 add e2e test cases to cover the maxConcurrentStreams
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-07-06 03:43:46 +08:00
053ba95ed5 set max concurrent streams to the http2 server
The default max stream is 250 in http2. When there are more then
250 streams, the client side may be blocked until some previous
streams are released. So we need to support configuring a larger
`MaxConcurrentStreams`.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-07-06 03:43:46 +08:00
d8347ec683 add & refine the uint32Value data type
The golang buildin package `flag` doesn't support `uint32` data
type, so we need to support it via the `flag.Var`.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-07-06 03:43:46 +08:00
6220174687 support custom grpc.MaxConcurrentStreams
There is no update on the original PR (see below) for more then 2
weeks. So Benjamin(@ahrtr) continues to work on the PR. The first
step is to rebase the PR, because there are lots of conflicts with
the main branch.

The change to go.mod and go.sum reverted, because they are not needed.
The e2e test cases are also reverted, because they are not correct.

```
https://github.com/etcd-io/etcd/pull/14081
```

Signed-off-by: nic-chen <chenjunxu6@gmail.com>
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-07-06 03:43:46 +08:00
248f072370 Merge pull request #14194 from ahrtr/update_etcdctl_typo
Fix a typo in etcdctl readme for the elect command
2022-07-05 14:55:41 +02:00
231bee6fe2 fix a typo in etcdctl readme for the elect command
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-07-05 16:03:45 +08:00
07d620822f Merge pull request #14173 from SimFG/ctl_err
ectdctl: Add the `SilenceErrors` config For the `cobra.Command`
2022-07-05 06:10:11 +08:00
960d4c2dce Merge pull request #14154 from ahrtr/3.4_changelog_lease_revoke_20220624
Update 3.4 change log to cover fixes for two issues
2022-07-05 06:09:38 +08:00
1749a07a20 Merge pull request #14172 from SimFG/snap_log
snap: Delete the nil judgment of the log object
2022-07-04 23:57:15 +02:00
66f15f8efb ectdctl: Handle the repeat error message when the unknown command error occurs
Avoid repeated printing of error messages.

Signed-off-by: SimFG <1142838399@qq.com>
2022-07-04 11:02:08 +08:00
33347b6845 Merge pull request #13954 from mitake/perm-cache-lock
server/auth: protect rangePermCache with a mutex
2022-07-03 07:01:46 +08:00
de09174a3f server/auth: protect rangePermCache with a RW lock
Signed-off-by: Hitoshi Mitake <h.mitake@gmail.com>
2022-07-02 23:23:13 +09:00
f94af77d4a Merge pull request #14184 from ahrtr/fix_proxy_test_certificate_20220630
Remove duplicate certificate configuration for proxy test
2022-07-01 05:33:50 +08:00
ae9ca48a3f remove duplicate certificate configuration for proxy test
The issue was introduced in the following commit,
093282f5ea

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-06-30 10:26:36 +08:00
2a0e92fac0 Merge pull request #14182 from spzala/isoptswithprefix
Client: fix check for WithPrefix op
2022-06-29 19:32:05 -04:00
8637c54bcc Client: fix check for WithPrefix op
Make sure that WithPrefix correctly set the flag, and add test.
Also, add test for WithFromKey.

fixes #14056

Signed-off-by: Sahdev Zala <spzala@us.ibm.com>
2022-06-29 17:52:05 -04:00
107b7c06ab sanp: Delete the nil judgment of the log object
Move some methods into the `Snapshotter` object for removing the `lg == nil` judgment

Signed-off-by: SimFG <1142838399@qq.com>
2022-06-28 19:35:33 +08:00
7a1cecd5fa Merge pull request #14165 from eval-exec/expected-process-stopsignal
pkg/expect: send SIGTERM to target expect process instead of SIGKILL for `Stop()`
2022-06-28 12:38:59 +08:00
19f5ff664a Merge pull request #14166 from chavacava/fix-14162
fix #14162
2022-06-27 09:38:33 +08:00
815e05d226 Merge pull request #14160 from chavacava/patch-1
removes empty option in JSON tag
2022-06-26 18:55:51 +02:00
64443f108b Merge pull request #14157 from SimFG/proxy_pb
proxy: Put the pb object into the struct
2022-06-26 18:53:42 +02:00
c1da9dd0f0 Merge pull request #14153 from SimFG/verfiy_backend
verify: Get backend using simple api
2022-06-26 18:49:44 +02:00
756d77663b removes empty option in JSON tag
option can not be empty in JSON tag

Signed-off-by: chavacava <salvadorcavadini+github@gmail.com>
2022-06-26 12:13:20 +02:00
f220bfe1e0 fix #14162
Signed-off-by: chavacava <salvadorcavadini+github@gmail.com>
2022-06-26 11:44:11 +02:00
e2bff7cfe1 pkg/expect: send SIGTERM to target expect process instead of SIGKILL
Signed-off-by: Eval EXEC <execvy@gmail.com>
2022-06-26 16:39:30 +08:00
f99c68839f Merge pull request #14163 from chavacava/fix-14161
fix #14161
2022-06-26 12:43:06 +08:00
0887d9acf1 fix #14161
Signed-off-by: chavacava <salvadorcavadini+github@gmail.com>
2022-06-25 10:09:05 +00:00
a6bbf7c10b proxy: Put the pb object into the struct
Avoid repeated creation of pb objects.

Signed-off-by: SimFG <1142838399@qq.com>
2022-06-25 10:15:03 +08:00
cabdb13dad Merge pull request #14152 from pacoxu/patch-2
sync-changelog: /health break change was reverted
2022-06-25 04:42:50 +08:00
899bcc8fe5 update 3.4 change log to cover fixes for two issues
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-06-24 17:46:51 +08:00
2a1b7fdb52 verify: Get backend using simple api
Make the code simple and clear.

Signed-off-by: SimFG <1142838399@qq.com>
2022-06-24 16:58:18 +08:00
8e80173887 sync-changelog: /health break change was reverted
Signed-off-by: Paco Xu <paco.xu@daocloud.io>
2022-06-24 14:57:05 +08:00
33ba5380df Merge pull request #14146 from SimFG/parse_config
config: Add the default case when failing to parse the log rotate config json
2022-06-24 06:13:29 +08:00
1dcd75f8a2 config: Add the default case when failing to parse the log rotate config json
Make sure that the `setupLogRotation` function must return the error when failing parse json.

Signed-off-by: SimFG <1142838399@qq.com>
2022-06-23 19:41:30 +08:00
1da0b011c0 Merge pull request #14141 from ahrtr/3.4_changelog_go_1.16
Update 3.4 change log item for 3.4.19
2022-06-23 04:54:57 +08:00
685435ba34 Update 3.4 change log item for 3.4.19
Changes:
1. Upgrade go version to 1.16 in both go.mod and pieplines;
2. Upgrade boltdb from 1.3.3 to 1.3.6;

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-06-22 10:08:46 +08:00
1a1238814f Merge pull request #14082 from mikelolasagasti/pb.v3
tools/benchmark: migrate cheggaaa/pb.v1 to cheggaaa/pb/v3
2022-06-21 13:46:20 +02:00
e0998f49e1 Merge pull request #14124 from wayblink/index-op
mvcc:add ut for Revisions/CountRevisions and remove RangeSince as it …
2022-06-21 12:41:25 +08:00
428d21f5eb mvcc:add ut for Revisions/CountRevisions and remove RangeSince as it is not used
Signed-off-by: wayblink <wayasxxx@gmail.com>
2022-06-21 11:41:44 +08:00
89637a4223 Tools/benchmark: migrate cheggaaa/pb.v1 to cheggaaa/pb/v3
etcdctl/ctlv3: migrate cheggaaa/pb.v1 to cheggaaa/pb/v3

This commit also changes the format of the progress bar, from using a
custom progress bar to the default provided by the library.

Old behaviour:

./benchmarkv1  put
 0 / 10000 B                                                   !   0.00%
 3987 / 10000 Boooooooooooooom                                 !  39.87%
 10000 / 10000 Boooooooooooooooooooooooooooooooooooooooooooo! 100.00% 1s

New behaviour:

./benchmark put
 6536 / 10000 [----------------------->________________] 65.36% 7053 p/s
10000 / 10000 [---------------------------------------] 100.00% 7581 p/s

Signed-off-by: Mikel Olasagasti Uranga <mikel@olasagasti.info>
2022-06-20 15:47:23 +02:00
0bac609632 Merge pull request #14133 from ahrtr/changelog_auth_bundle_20220618
update changelog for both 3.5 and 3.6 to cover the authBundle overwrite issue
2022-06-20 10:47:09 +02:00
449ff7b8cb update changelog for both 3.5 and 3.6 to cover the authBundle overwrite issue
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-06-18 07:11:50 +08:00
43434afd48 Merge pull request #14111 from patrocinio/check_perf_doc
Doc: provide more clarify to the usage of check perf command
2022-06-18 05:07:26 +08:00
72b2a06fdb Merge pull request #14126 from ptabor/20220615-update-grpc3
Update dependencies - including zap (1.21)
2022-06-17 20:25:43 +02:00
e1e3ed11e3 Doc: provide more clarify to the usage of check perf command
This PR describes the fact that different workloads in the `check perf` command
are different, and the results might vary.

Signed-off-by: Eduardo Patrocinio <epatro@gmail.com>
2022-06-17 13:13:58 -03:00
88cd0fe695 Refresh minor dependencies.
Signed-off-by: Piotr Tabor <ptab@google.com>
2022-06-17 10:23:03 +02:00
e7a84b69c8 Update zap to 1.21.
Signed-off-by: Piotr Tabor <ptab@google.com>
2022-06-17 10:05:25 +02:00
8ac23dad88 Merge pull request #14125 from ptabor/20220615-update-grpc2
Update to grpc-1.47 (and fix the connection-string format)
2022-06-17 10:04:11 +02:00
3e61412ae2 Merge pull request #14129 from ahrtr/changelog_wal_entry_limit
Update 3.5 and 3.6 changelog to cover the fix of restricting the max WAL entry
2022-06-17 15:03:52 +08:00
6d1041dc62 Merge pull request #14128 from ahrtr/remove_ioutil
replace ioutil with os package
2022-06-17 15:03:07 +08:00
cbf54a0421 Use proper grpc schema (unix:file) for unix sockets.
Signed-off-by: Piotr Tabor <ptab@google.com>
2022-06-17 08:57:23 +02:00
17c1dcd614 Update grpc to 1.47 and go-cmp to 0.5.8.
Signed-off-by: Piotr Tabor <ptab@google.com>
2022-06-17 08:57:22 +02:00
fa68664a26 update 3.5 and 3.6 changelog to cover the fix of restricting the max size of each WAL entry to remaining size of the WAL file
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-06-17 10:17:02 +08:00
8038e876d3 replace ioutil with os package
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-06-17 10:11:30 +08:00
4c95878f00 Merge pull request #14122 from ahrtr/threshold_20220615
Restrict the max size of each WAL entry to the remaining size of the WAL file
2022-06-17 08:19:42 +08:00
ccf477d12b restrict the max size of each WAL entry to the remaining size of the file
Currently the max size of each WAL entry is hard coded as 10MB. If users
set a value > 10MB for the flag --max-request-bytes, then etcd may run
into a situation that it successfully processes a big request, but fails
to decode it when replaying the WAL file on startup.

On the other hand, we can't just remove the limitation, because if a
WAL entry is somehow corrupted, and its recByte is a huge value, then
etcd may run out of memory. So the solution is to restrict the max size
of each WAL entry as a dynamic value, which is the remaining size of
the WAL file.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-06-17 05:41:49 +08:00
427372b6ee Merge pull request #14123 from tsonglew/patch-1
fix: typo gouroutine
2022-06-16 13:28:45 +02:00
e5a80f5049 fix: typo gouroutine
fix: typo gouroutine
2022-06-16 16:35:06 +08:00
d23917c576 Add FileReader and FileBufReader utilities
The FileReader interface is the wrapper of io.Reader. It provides
the fs.FileInfo as well. The FileBufReader struct is the wrapper of
bufio.Reader, it also provides fs.FileInfo.

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-06-16 15:32:16 +08:00
a1fe0b8ea3 Merge pull request #14116 from ptabor/20220613-embed-errors
Embed server should log errors (and not get stuck)
2022-06-15 22:37:40 +02:00
e61d431792 Merge pull request #14109 from SimFG/fifo_panic
schedule: Provide logs when the fifo job panic happens
2022-06-15 22:24:42 +02:00
509a01861c Merge pull request #14117 from ptabor/20220614-gitignore
Extend .gitignore to ignore intelij config/generated files.
2022-06-15 22:10:38 +02:00
c4e7224946 Merge pull request #14121 from L2ncE/main
Fix a syntax error in a code comment
2022-06-15 15:41:30 -04:00
637afd359b Fix a syntax error in a code comment
Signed-off-by: L2ncE <llance_24@foxmail.com>
2022-06-15 23:19:12 +08:00
d83925e357 schedule: Provide logs when the fifo job panic happens
To make the fifo scheduler better debuggability.

Signed-off-by: SimFG <1142838399@qq.com>
2022-06-15 20:58:17 +08:00
1c401581e3 Close channel of started servers even if embed server fails to start.
Before this change:

```
gwmux, err = sctx.registerGateway([]grpc.DialOption{grpc.WithInsecure()})
if err != nil { return err; }
```

caused the Etcd.Serve() method finish without sctx.serversC channel being closed.
The code closing Etcd got stuck waiting for all the servers to be running.

Signed-off-by: Piotr Tabor <ptab@google.com>
2022-06-15 13:50:17 +02:00
fcc8fce4d2 Expand logging in case of embed server not being able to successfully start.
So far the errors were directed to Etcd.Errc (channel) that is not being consumed in practice.

Signed-off-by: Piotr Tabor <ptab@google.com>
2022-06-15 13:50:17 +02:00
f9e9f50a13 Extend .gitignore to ignore intelij config/generated files.
Signed-off-by: Piotr Tabor <ptab@google.com>
2022-06-15 13:14:08 +02:00
71bba3c761 Merge pull request #14106 from SimFG/remove_case
wal: remove the repeated test case
2022-06-14 12:13:00 +02:00
402188a98c wal: remove the repeated test case
The TestFilePipelineFailLockFile case maybe test the line 77 in the alloc function. But the LockFile will not throw an error when the file lock is hold. And TestFilePipelineFailPreallocate and TestFilePipelineFailLockFile are exactly the same except for the comments.

Signed-off-by: SimFG <1142838399@qq.com>
2022-06-14 17:26:20 +08:00
2c12954158 Merge pull request #14049 from serathius/compact-hash
Calculate hash during compaction
2022-06-14 11:10:19 +02:00
9612fc1194 tests: Unify TestCompactionHash and extend it to also Delete keys and Defrag
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-06-13 18:20:19 +02:00
f5eadf5452 tests: Add tests for HashByRev HTTP API
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-06-13 18:20:19 +02:00
1581eef888 tests: Add integration tests for compact hash
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-06-13 18:20:19 +02:00
0e739da9a4 server: Cache compaction hash for HashByRev API
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-06-13 18:20:18 +02:00
2b090e86a6 server: Extract hasher to separate interface
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-06-13 18:20:18 +02:00
80828b593a server: Remove duplicated compaction revision
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-06-13 18:20:18 +02:00
34a02ba621 server: Return revision range that hash was calcualted for
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-06-13 18:20:17 +02:00
76d3c527ae server: Store real rv range in hasher
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-06-13 18:19:26 +02:00
8f7b053480 server: Move adjusting revision to hasher
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-06-13 18:19:26 +02:00
19941654fe server: Pass revision as int
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-06-13 18:19:26 +02:00
887e53e61a server: Calculate hash during compaction
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-06-13 18:19:26 +02:00
7381c81a7e server: Fix range in mock not returning same number of keys and values
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-06-13 18:19:26 +02:00
08a43178fa server: Move reading KV index inside scheduleCompaction function
Makes it easier to test hash match between scheduleCompaction and
HashByRev.

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-06-13 18:19:26 +02:00
638ca1006a server: Return error from scheduleCompaction
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-06-13 18:19:26 +02:00
0f90359c4b server: Refactor hasher
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-06-13 18:19:25 +02:00
e62c358793 server: Extract kvHash struct
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-06-13 18:19:25 +02:00
fcaf76dbca server: Move unsafeHashByRev to new hash.go file
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-06-13 18:19:25 +02:00
0984878ae7 server: Extract unsafeHashByRev function
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-06-13 18:19:25 +02:00
39c6935c65 server: Test HashByRev values to make sure they don't change
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-06-13 18:19:25 +02:00
01e85be159 server: Cover corruptionMonitor with tests
Get 100% coverage on InitialCheck and PeriodicCheck functions to avoid
any mistakes.

Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-06-13 18:19:25 +02:00
7c35dadc25 server: Extract corruption detection to dedicated struct
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-06-13 18:19:24 +02:00
70fbc0b3e7 server: Extract triggerCorruptAlarm to function
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-06-13 18:04:24 +02:00
fc690531e2 Merge pull request #14108 from serathius/tracked
Use single "stage/tracked" label to prevent issue from getting stale
2022-06-13 13:03:41 +02:00
bce22b587c Use single "stage/tracked" label to prevent issue from getting stale
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
2022-06-13 11:48:34 +02:00
4ce7a85188 Merge pull request #14097 from patrocinio/buildtools
Update build file to run with an argument
2022-06-13 10:55:54 +02:00
4592af25ba Merge pull request #14107 from ahrtr/version_refactor_20220613
Get all constant etcd versions defined in a centralized place
2022-06-13 10:31:46 +02:00
5f8cd5bd39 Replace all etcd versions with the centralized definitions
We have already defined all the constant etcd versions in the
centralized place api/version/version.go. So we should replace all
the versions with the centralized definitions.
2022-06-13 14:08:39 +08:00
4f202a6429 Define all versions in a centralized place
The versions such as V3_5, V3_6, etc. are defined everywhere in
the repo. In this commit, we get all of the constant versions defined
in a centralized place, so that they can be reused by all cases.
2022-06-13 13:37:41 +08:00
144f445838 Merge pull request #13747 from kkkkun/add-flag-for-del
add flag range for del in etcdctl
2022-06-13 08:22:50 +08:00
5a93b087a6 Separate the build library functions and add a top level tools script
The current Makefile doesn't allow the compilation of the tools directory.
This commit creates a build library file, updates the Makefile
and a top level script fod building tools.

To build the tools, you can run make build_tools.

As before, you can run make build to build etcd binaries.
2022-06-10 11:43:10 -04:00
4b41f74ff8 Merge pull request #14103 from ahrtr/update_changelog_3.5.0
Update 3.5 changelog to add an entry to cover the new flag `---experimental-bootstrap-defrag-threshold-megabytes`
2022-06-10 11:10:59 +02:00
a7aca4a7a2 update 3.5 changelog to add the --experimental-bootstrap-defrag-threshold-megabytes flag 2022-06-10 09:10:10 +08:00
31cd4e7c2d Merge pull request #14084 from SimFG/mvcc-range-since
mvcc: improve the use of locks in index.go
2022-06-09 15:39:18 +02:00
b295cebc05 mvcc: improve the use of locks in index.go
To make the meaning of the RangeSince function in treeIndex clearer.
2022-06-09 20:35:02 +08:00
05e4a5ad23 Merge pull request #14101 from serathius/fix-merge
server: Fix broken code during merge
2022-06-09 20:25:27 +08:00
72a84ddbcf server: Fix broken code during merge 2022-06-09 13:34:33 +02:00
5a7df03592 Merge pull request #14080 from ahrtr/lease_revoke_lock
Fix potential deadlock between Revoke and (Grant or Checkpoint)
2022-06-09 16:52:36 +08:00
d9e5460ca8 Merge pull request #13829 from qsyqian/feature/skip_compact_when_rev_not_change
skip compact when rev not change at period compact mode
2022-06-08 22:54:39 -04:00
29b964df25 Merge pull request #14099 from Dirc/main
Update link to tuning page
2022-06-08 16:46:16 +08:00
ba405f64c1 Update link to tuning page 2022-06-08 10:16:04 +02:00
e1fd5b1c35 Merge pull request #14095 from ahrtr/fix_raftexample_test_error
Fix the DATA RACE issue of TestCloseProposerInflight
2022-06-08 05:19:12 +08:00
73766a92fb Update build file to run with an argument
The current Makefile doesn't allow the compilation of the tools directory.
This commit updates the Makefile and the build file to add an option
to build the tools.

To build the tools, you can run make build_tools.
2022-06-07 11:47:28 -04:00
8ad87be7a6 fix the DATA RACE issue of TestCloseProposerInflight 2022-06-07 18:59:00 +08:00
dabf6978cc Fix potential deadlock between Revoke and (Grant or Checkpoint) 2022-06-07 18:45:43 +08:00
50d93ebea1 Merge pull request #14088 from ahrtr/3.5_changelog_revoke_lease_race
Update 3.5 changelog to cover the two bug fixes related to leases revoke and checkpoint
2022-06-07 11:32:05 +02:00
800d3ec3ca update 3.5 changelog to cover the two bug fix related to leases revoke and checkpoint 2022-06-04 14:12:57 +08:00
08f4c340eb Merge pull request #14078 from ahrtr/checkpoint_reset
Clean up the local variable cps so that it will not continue to schedule checkpoint
2022-05-31 07:56:53 +08:00
1d482bfc08 Move the local variable cps into the loop so that it will not continue to schedule checkpoints after it steps down the leader 2022-05-29 05:08:41 +08:00
ce77d83ee6 Merge pull request #14067 from ahrtr/lease_revoke
Fix the race condition between goroutine and channel on the same leases to be revoked
2022-05-29 05:04:26 +08:00
2d6aadec24 Merge pull request #14079 from ahrtr/split_lease
Move lease related code into a separate file lease.go
2022-05-29 05:02:59 +08:00
6e9397d171 move lease related code into a separate file lease.go 2022-05-27 20:22:29 +08:00
25deb436af fix the race condition between goroutine and channel on the same leases to be revoked 2022-05-25 16:44:41 +08:00
908faa44c4 Merge pull request #14069 from ahrtr/update_3.5_changelog_migrate
Update changelog-3.5 to correct the entry for decommissioning `etcdctl migrate`
2022-05-25 10:36:45 +02:00
42797d88ec update changelog-3.5 to correct the entry for decommissioning etcdctl migrate command 2022-05-25 05:47:40 +08:00
c3bc4116dc Merge pull request #14063 from ahrtr/ignore_etcd_tool_binaries
Add etcd tool binaries into .gitignore
2022-05-22 19:19:35 +08:00
c75bdef4d2 add etcd tool binaries into .gitignore 2022-05-21 06:58:05 +08:00
8093fc90ab Merge pull request #14060 from spongecaptain/patch-1
use go install instead of go get
2022-05-21 06:26:24 +08:00
9bb134233a Merge pull request #13878 from ptabor/20220403-applier-clean
Encapsulation of applier logic: Move Txn related code out of applier.go.
2022-05-20 18:07:51 +02:00
1988324b12 Merge pull request #14053 from spzala/governanceupdate
Governance: Use lazy consensus when needed to make decision
2022-05-20 12:06:23 -04:00
534d7b4795 use go install instead of go get 2022-05-20 23:45:14 +08:00
41ff2370e9 Remove unused code and apply code-quality suggestions. 2022-05-20 14:42:39 +02:00
85b18c9b3e Rename WrapApply to Apply. 2022-05-20 14:32:04 +02:00
87b80f16ca Fixing missing comment on the dispatch() function. 2022-05-20 14:32:04 +02:00
42c6e08f22 Rename the txn, so as not to be the same as the package name. 2022-05-20 14:32:04 +02:00
0da0cf4795 expose UberApplier as interface (not as implementation struct). 2022-05-20 14:32:04 +02:00
5097b33ab9 Rename etcdserver/etcderrors package to etcdserver/errors. 2022-05-20 14:32:04 +02:00
63b2f63cc1 Rename package alising "apply2" -> apply. 2022-05-20 14:32:04 +02:00
c62f01e5fe Move CheckTxnAuth to txn. 2022-05-20 14:32:04 +02:00
c78bf655a7 Simplify imports and improve comments. 2022-05-20 14:32:04 +02:00
4e04770bac Apply encapsulation: Cleanup metrics reporting.
Side effect: applySec(0.4s) used to be reported as 0s, now it's correctly 0.4s.
2022-05-20 14:32:04 +02:00
47a771871b Move apply to its own package (no dependency on etcdserver). 2022-05-20 14:32:04 +02:00
fc6a6c3c27 Move etcdserver/errors.go to sepatate package to avoid cyclic dependencies. 2022-05-20 14:32:04 +02:00
e2ae9b1d13 Move server/etcdserver/txn.go to new package: server/etcdserver/txn 2022-05-20 14:32:04 +02:00
b073129d03 Applier does not depend on EtcdServer any longer.
All the depencies are explicily passed to the UberApplier factory method.
2022-05-20 14:32:04 +02:00
651de5a057 Rename EtcdServer.Id with EtcdServer.MemberId.
It was misleading and error prone vs. ClusterId.
2022-05-20 14:32:04 +02:00
f348134edd Marge applierV3Internal into applierV3 interface 2022-05-20 14:32:04 +02:00
b7ad746bfe Encapsulating applier logic: UberApplier coordinates all appliers for server
This PR:
 - moves wrapping of appliers (due to Alarms) out of server.go into uber_applier.go
 - clearly devides the application logic into: chain of:
     a) 'WrapApply' (generic logic across all the methods)
     b) dispatcher (translation of Apply into specific method like 'Put')
     c) chain of 'wrappers' of the specific methods (like Put).
 - when we do recovery (restore from snapshot) we create new instance of appliers.

The purpose is to make sure we control all the depencies of the apply process, i.e.
we can supply e.g. special instance of 'backend' to the application logic.
2022-05-20 14:32:04 +02:00
cdf9869d70 Encapsulation of applier logic: Move Txn related code out of applier.go.
The PR removes calls to applierV3base logic from server.go that is NOT part of 'application'.
The original idea was that read-only transaction and Range call shared logic with Apply,
so they can call appliers directly (but bypassing all 'corrupt', 'quota' and 'auth' wrappers).

This PR moves all the logic to a separate file (that later can become package on its own).
2022-05-20 14:32:04 +02:00
e02ceee9f3 Governance: Use lazy consensus when needed to make decision
In lack of supermajority, we sometimes required to hold on to
important decisions for long time. In order to speed up, after
giving enough time for supermajority, use lazy consensus.
2022-05-19 11:58:22 -04:00
cc5d6f7dc3 Merge pull request #14052 from ahrtr/snapshot_save_error
Fix a typo: print the correct error info
2022-05-19 09:44:42 +02:00
b32ac1f67b fix a typo: print the correct error info 2022-05-19 07:19:44 +08:00
8e74358117 Merge pull request #14051 from serathius/detect-staged
scripts: Detect staged files before building release
2022-05-18 13:09:50 +02:00
63e47656e0 scripts: Detect staged files before building release 2022-05-18 12:21:43 +02:00
57515f23f7 Merge pull request #14044 from serathius/avoid-clone
scripts: Avoid additional repo clone
2022-05-18 10:17:47 +02:00
08be44c7de Merge pull request #14046 from serathius/pm-publish
Documentation: Publish v3.5 data inconsistency postmortem
2022-05-17 14:15:59 +02:00
657a197bfa add range flag for delete in etcdctl 2022-05-17 11:17:42 +08:00
b99ba06eb3 Merge pull request #14042 from serathius/common-context
tests: Make common framework context aware
2022-05-16 16:08:53 +02:00
31bcae0dcf Documentation: Publish v3.5 data inconsistency postmortem 2022-05-16 16:02:18 +02:00
e737f4296c scripts: Avoid additional repo clone
This PR removes additional clone when building artifacts.

When releasing v3.5.4 this clone was main cause of issues and
confusion about what release script is doing.

release.sh script already clones repo in /tmp/ directory, so clonning
before build is not needed. As precautions for bug in script leaving
/tmp/ clone in bad state  I moved "Verify the latest commit has the
version tag" and added "Verify the clean working tree" to be always run
before build.
2022-05-16 14:37:47 +02:00
ee08770bfb tests: Make common framework context aware 2022-05-16 14:35:44 +02:00
7ec336f80c Merge pull request #14033 from ahrtr/hide_revision
Hide the revision field when it isn't populated
2022-05-14 05:37:22 +08:00
29f090b5c0 Merge pull request #14029 from serathius/spawn-json-command
tests: Refactor spawn json command
2022-05-14 05:06:03 +08:00
bcebd1212d Merge pull request #14038 from serathius/cluster-tc
tests: Extract cluster test cases
2022-05-13 15:39:43 +02:00
83a4309f3b tests: Refactor spawn json command 2022-05-13 15:04:45 +02:00
9beb29916e tests: Extract cluster test cases 2022-05-13 14:41:53 +02:00
beeb44d4ee hide the revision field when it isn't populated 2022-05-13 19:40:57 +08:00
29d30ab7b0 Merge pull request #14034 from ahrtr/remove_httpproxy
Remove v2 http proxy
2022-05-13 18:09:50 +08:00
1e6163ba27 remove v2 http proxy in 3.6 2022-05-13 17:44:58 +08:00
153824be58 Merge pull request #14032 from caproven/close_director_goroutine
server: Director can be stopped
2022-05-13 17:43:32 +08:00
30daf4e3c9 Merge pull request #14036 from ahrtr/add_assert
Provide a generic assert function
2022-05-13 11:38:33 +02:00
4fc9721fa6 provide a generic assert function 2022-05-13 10:50:19 +08:00
c1e58ee91f server: Don't register director interrupt handler 2022-05-11 21:21:06 -04:00
b5b466088d server: Move director interrupt handler to method 2022-05-11 20:41:10 -04:00
655d171eca server: Add director interrupt handler
Director's goroutine would not be properly stopped in a non-test
scenario. Handler stops it when process is interrupted.
2022-05-11 18:19:22 -04:00
5fd69102ce Merge pull request #14000 from vimalk78/e2e-txn-test
tests: Migrate Txn tests to common framework
2022-05-11 11:50:07 +02:00
55f0c96fa0 tests: Migrate Txn tests to common functional test framework 2022-05-11 10:33:47 +05:30
70a7674e20 server: Director can be stopped
Goroutine for new directors would live past director scope. Tests
could occassionally fail if this goroutine had log events after
test execution should have ended.
2022-05-10 23:36:14 -04:00
066e510731 Merge pull request #14020 from chaochn47/role_test
migrate e2e & integration role_test to common
2022-05-10 23:39:14 +02:00
e004c91d36 migrate e2e & integration role_test to common 2022-05-10 10:17:16 -07:00
b7be91f98b Merge pull request #14017 from ahrtr/3.4_changelog_3.4.19
Update 3.4 change log for 3.4.19
2022-05-08 00:29:43 +09:00
dac04911a8 Merge pull request #14018 from ahrtr/3.5_changelog_20220507
Update 3.5 and 3.6 changelog for recent merged PRs
2022-05-07 15:03:41 +02:00
983e8ff118 update 3.5 and 3.6 changelog for recent merged PRs 2022-05-07 14:31:03 +08:00
cfc88b5d38 update 3.4 change log for 3.4.19 2022-05-07 14:09:15 +08:00
e7effc0a08 Merge pull request #13772 from ahrtr/display_storage_version
Enhance the '/version' endpoint to add storageVersion
2022-05-06 21:49:57 +02:00
e7f8bf7c44 enhance the /version endpoint to add storageVersion 2022-05-06 20:29:42 +08:00
56830df3ef Merge pull request #14016 from serathius/coverage-push
coverage: Run coverage only on push
2022-05-06 13:13:18 +02:00
a7f0bc0d43 Merge pull request #13881 from serathius/logs-missed
tests: Use zaptest.NewLogger in places we missed
2022-05-06 13:10:13 +02:00
02c0321084 Merge pull request #13696 from serathius/ha-e2e
Implement HA E2e for downgrades
2022-05-06 13:08:00 +02:00
474aa323de Merge pull request #14011 from ptabor/20220501-arthr-maintainer
Nomination for Benjamin (ahrtr@) as a project maintainer
2022-05-06 12:55:33 +02:00
d58f971895 tests: Use zaptest.NewLogger in places we missed 2022-05-06 12:23:20 +02:00
e292e5b0b4 tests: Apply suggestions from code-review 2022-05-06 12:09:44 +02:00
a65f7da5cb server: Implement HA downgrade test 2022-05-06 12:09:44 +02:00
c50fbb9ad6 tests: Retry validating version during downgrades 2022-05-06 12:09:44 +02:00
c9af75dd8d tests: Improve logging in downgrade tests 2022-05-06 12:09:43 +02:00
7b04674d17 server: Move fatal calls out of internal function to make stacktrace cleaner 2022-05-06 12:09:43 +02:00
75449c075d tests: Allow sepecting member to in curl commands 2022-05-06 12:09:43 +02:00
923096a2bb tests: Simplify downgrade tests 2022-05-06 12:09:43 +02:00
3f05f7de92 tests: Use restart in downgrade tests 2022-05-06 12:09:43 +02:00
f09da32f9d Merge pull request #13655 from serathius/health
Cleanup healthcheck code after V2 removal
2022-05-06 12:08:36 +02:00
8cfb658ddb coverage: Run coverage only on push 2022-05-06 11:50:25 +02:00
83403118fe Merge pull request #14014 from ahrtr/remove_asset_verification
Remove the workflow/transparency.yaml
2022-05-06 11:16:39 +02:00
8abff7918b remove the asset workflow/transparency.yaml
The service at https://beta.transparencylog.net/ has already been
shutdown on November 9th 2021, and we start to see failure after
that.
2022-05-06 15:49:55 +08:00
545f04f90d Merge pull request #14005 from mitake/changelog-3.4-for-pr-13999
Update CHANGELOG for PR 13999
2022-05-05 11:24:01 +02:00
89f455be7e Add Benjamin (ahrtr@) as a project maintainer
Benjamin is one of the current reviewers. Benjamin has proven high level of etcd expertise
and impact on the project, including delivering fixes to data-corruption bugs in etcd,
care about test quality and overall project health.

Per discussion with existing maintainers, I nominate him for the maintainer role.
Benjamin, thank you for your outstanding contributions to the project.
2022-05-05 10:51:57 +02:00
50ebb82aac Merge pull request #13988 from ahrtr/verify_snapshot
Verify consistent_index in snapshot must be greater than the snapshot index
2022-05-05 10:42:21 +02:00
0040f707e4 Merge pull request #14010 from serathius/codeql-permissions
github: Add necessery permissions for CodeQL
2022-05-05 10:32:43 +02:00
96840277d0 github: Add necessery permissions for CodeQL 2022-05-05 10:07:02 +02:00
26f42e7a9e server: Apply review comments and split basic handler 2022-05-05 09:52:14 +02:00
fb361e43f0 server: Split code for debug and version endpoints 2022-05-05 09:52:14 +02:00
722ec487df server: Split metrics and health code 2022-05-05 09:52:14 +02:00
600ee13ac0 server: Cover V3 health with tests 2022-05-05 09:52:14 +02:00
e9dec74ded server: Refactor health checks 2022-05-05 09:52:14 +02:00
191aed645e server: Run health check tests in subtests 2022-05-05 09:52:14 +02:00
e4e391792a server: Rename test case expect fields 2022-05-05 09:52:13 +02:00
0fb194d6f2 server: Use named struct initialization in healthcheck test 2022-05-05 09:52:13 +02:00
0096d2ecdb server: Remove unused NewClientHandler 2022-05-05 09:52:13 +02:00
b58fce3100 Merge pull request #14007 from ahrtr/fix_build_ci
change ARCH to GOARCH in build.yaml
2022-05-04 10:21:38 +02:00
df25844284 change ARCH to GOARCH in build.yaml 2022-05-04 05:48:53 +08:00
bf472ec058 Update CHANGELOG for PR 13999 2022-05-04 00:41:36 +09:00
fb2eeb9027 verify consistent_index in snapshot must be equal to the snapshot index
Usually the consistent_index should be greater than the index of the
latest snapshot with suffix .snap. But for the snapshot coming from the
leader, the consistent_index should be equal to the snapshot index.
2022-05-03 20:02:47 +08:00
1597219ca7 Merge pull request #14004 from eval-exec/fix-race
Fix data race in testWatchOverlapContextCancel #14003
2022-05-02 11:03:16 -04:00
755e2e7755 fix data race in testWatchOverlapContextCancel #14003 2022-05-01 21:12:38 +08:00
00d6d40aea Merge pull request #13940 from lavacat/leases-list-test
tests/common/lease: don't use revision to wait for leases
2022-04-29 10:12:18 +02:00
e74c72ef4f Merge pull request #13972 from ahrtr/simplify_etcdctl_backup
Simply etcdutl backup command to cleanup v2 related implementation
2022-04-29 10:11:32 +02:00
52ea811af8 Merge pull request #13966 from VladSaioc/blocking-readyc
Fixed potential goroutine leak due to p.Ready() receive in pkg/proxy and dependents.
2022-04-28 16:12:02 +02:00
28240cf0c8 simply etcdutl backup command to cleanup v2 related implementation 2022-04-28 19:23:38 +08:00
7ebebb4ff6 Merge pull request #13969 from cmurphy/update-crypto
*: Update golang.org/x/crypto to latest
2022-04-28 12:35:14 +02:00
63d6c0e519 Merge pull request #13994 from spzala/toolsinstall
Doc: add installtion instructions for tools
2022-04-28 11:41:56 +02:00
02236b2773 Doc: add installtion instructions for tools
Add missing install commands. Update benchmark to go install as go
get usage is deprecated. Also, improve overall instructions and
experience.

related #13991
2022-04-28 01:13:02 -04:00
bb63484dce Merge pull request #13982 from ahrtr/fix_conflict_port
allocate unique port for each member in v3_snapshot_test cases
2022-04-27 16:06:26 +02:00
82a258dc3c Merge pull request #13981 from serathius/test-release
scripts: Add tests for release scripts
2022-04-26 16:46:11 +02:00
dd98f1ceb3 Make DRY_RUN explicit 2022-04-26 15:42:45 +02:00
24002fb099 allocate unique port for each member in test cases 2022-04-26 12:32:00 +08:00
67f3bb3ad4 tests/common/lease: don't use revision to wait for leases
Problem: TestLeaseGrantAndList is flaky because lists won't match at the end.
Test uses revision to verify that all members got leases. But checking for revision isn't enough.

Solution: use size of the list to stop polling.
2022-04-25 10:24:32 -07:00
27bd78f6ab Update golang.org/x/crypto to latest
Update crypto to address CVE-2022-27191.

The CVE fix is added in 0.0.0-20220315160706-3147a52a75dd but this
change updates to latest.
2022-04-25 09:52:12 -07:00
d849269dab Merge pull request #13986 from Sea-n/fix-md
doc: Fix Markdown code block
2022-04-25 13:01:29 +02:00
887f95d0d3 Merge pull request #13963 from ptabor/20220412-verify-assert
Add verification consistent index is (nearly) never decreasing
2022-04-25 10:13:44 +02:00
5472e589cf scripts: Add tests for release scripts 2022-04-25 10:12:01 +02:00
6d133aaf6a doc: Fix Markdown code block 2022-04-25 15:06:38 +08:00
b00bb535f0 Merge pull request #13643 from serathius/remove-etcdctl-v2
etcdctl: Remove V2 API commands
2022-04-24 14:13:17 +02:00
c3ef24081b Merge pull request #13967 from serathius/pm
Documentation: Create a data inconsistency postmortem
2022-04-24 13:41:59 +02:00
26625ecb07 Merge pull request #13977 from ahrtr/update_changelog_3.5.4
Update the release date of 3.5.4
2022-04-24 13:35:57 +02:00
ccf178cce3 update the release date of 3.5.4 2022-04-24 19:10:54 +08:00
d6368a20cf etcdctl: Remove V2 API commands 2022-04-24 12:08:42 +02:00
a379ffcfca Merge pull request #13974 from tabboud/patch-1
embed: Fix logger spelling in NewZapLoggerBuilder godoc
2022-04-23 14:56:12 -04:00
3cde98ca8c Merge pull request #13965 from serathius/release-update
Documentation: Update contributor guide and remove outdated ROADMAP.md
2022-04-23 13:43:44 -04:00
6205f1a4c7 Merge pull request #13970 from ahrtr/update_changelog_ci_panic
Update changelog for 3.5.4 and 3.6
2022-04-23 13:41:55 -04:00
5ae3ebb497 Merge pull request #13971 from spzala/logging
Doc: update logging convention
2022-04-23 13:37:55 -04:00
d4a21b5d17 Doc: update logging convention
Update the logging convention as capnslog is replaced by zap.
2022-04-22 14:38:48 -04:00
7fe1bf52d6 Documentation: Update postmortem based on feedback from @ptabor 2022-04-22 18:30:21 +02:00
1d13e0733c Fix logger spelling in NewZapLoggerBuilder godoc
Just a small docs fix that I happened to notice when setting up a new zap logger for etcd
2022-04-22 12:08:54 -04:00
d69e07dd3a Verification framework and check whether cindex is not decreasing. 2022-04-22 12:32:05 +02:00
e9bc382c82 Documentation: Lowercase etcd in postmortem 2022-04-22 11:41:03 +02:00
00ca558167 Fixed goroutine leak on NewServer 2022-04-22 08:57:19 +02:00
e85dc3e854 update changelog for 3.5.4 and 3.6 2022-04-22 06:17:14 +08:00
b97f28c908 Documentation: Create a draft data inconsistency postmortem 2022-04-21 18:16:20 +02:00
a722827c96 Documentation: Update contributor guide and remove outdated ROADMAP.md 2022-04-21 12:33:10 +02:00
e02ac59cfc Merge pull request #13942 from ahrtr/move_cindex_on_apply_fail
Update consitent_index when applying fails
2022-04-21 12:26:31 +02:00
6eef7ede40 Update conssitent_index when applying fails
When clients have no permission to perform whatever operation, then
the applying may fail. We should also move consistent_index forward
in this case, otherwise the consitent_index may smaller than the
snapshot index.
2022-04-20 21:44:48 +08:00
4555fc3998 Merge pull request #13962 from serathius/contributor-docs
Add contributor docs
2022-04-20 11:39:13 +02:00
efa52c4e1d docs: Add contributor documentation 2022-04-20 10:58:57 +02:00
52662ccd06 Merge pull request #13959 from ptabor/20220419-log-injection
Fix code scanning alert: This log write receives unsanitized user input
2022-04-19 16:26:25 +02:00
fe35b5130e Fix code scanning alert: This log write receives unsanitized user input 2022-04-19 13:49:08 +02:00
03091b8146 Merge pull request #13949 from liggitt/revert-srv-dot
Revert #13712
2022-04-19 12:22:00 +02:00
8d36956d0e Merge pull request #13955 from ptabor/20220417-tests-improvements
test.sh script improvement (OsX centric)
2022-04-19 12:18:45 +02:00
1b28597ba3 Merge pull request #13956 from vimalk78/fix-license-header-check
smoke test:fix license header check
2022-04-19 07:23:51 +02:00
12ab72a6ff smoke test:fix license header check 2022-04-19 08:35:22 +05:30
8a22d640a7 add OUTPUT_FILE='foo.log' env variable support to test.sh script.
Side consequence of this is that `make test-smoke` can become interactive again.
2022-04-18 22:54:51 +02:00
f07745a21c Add unit test for canonical SRV records 2022-04-18 08:48:42 -04:00
1f9a5d5fd6 Revert "update changelog for both 3.5 and 3.6 for the PRs of trimming the suffix dot from the target in SRV record"
This reverts commit 6781651e0b.
2022-04-18 08:48:42 -04:00
d02a5363b3 Revert "trim the suffix dot from the srv.Target for etcd-client DNS lookup"
This reverts commit 5fc0092c87.
2022-04-18 08:48:42 -04:00
93c54b816d Merge pull request #13957 from ahrtr/fix_TestKVPut
Use lineariziable range request in TestKVGet
2022-04-18 10:00:14 +02:00
842fed52c7 use lineariziable range request in TestKVGet 2022-04-18 08:56:19 +08:00
55a7c91de9 test.sh: Tools run correctly on OsX
- The location of installed tools is found using `go list`
- ETCD_VERIFY env variable is printed in repro command line.
2022-04-17 23:28:26 +02:00
cf2d98cc88 Fix PASSES="build" on OSX
`readlink -f` is supported since OsX 12.3.

```
% env GO_BUILD_FLAGS=-v CGO_ENABLED=0 go build -v -installsuffix=cgo -ldflags='-X=go.etcd.io/etcd/api/v3/version.GitSHA=4ac59dbe3' -o=bin/tools/local-tester/bridge ./tools/local-tester/bridge
readlink: illegal option -- m
usage: readlink [-fn] [file ...]
mkdir: /functional: Read-only file system
% ./tests/functional/build.sh
stderr: go build go.etcd.io/etcd/tests/v3/functional/cmd/etcd-agent: mkdir /functional: read-only file system
stderr: go build go.etcd.io/etcd/tests/v3/functional/cmd/etcd-proxy: mkdir /functional: read-only file system
stderr: go build go.etcd.io/etcd/tests/v3/functional/cmd/etcd-runner: mkdir /functional: read-only file system
stderr: go test go.etcd.io/etcd/tests/v3/functional/cmd/etcd-tester.test: mkdir /functional: read-only file system
```
2022-04-17 23:21:37 +02:00
81491914fb Merge pull request #13945 from ahrtr/rollback_opentelemetry_bump
Rollback the opentelemetry bumpping to recover the pipeline failures
2022-04-16 21:33:00 +02:00
0dae4b3b1e rollback the opentelemetry bumpping to recover the pipeline failures 2022-04-14 16:13:28 +08:00
ff1569f134 Merge pull request #13941 from serathius/recommendation-v3.5.3
Update production recommendation for v3.5.3
2022-04-13 21:57:20 +02:00
f409f39bb8 Update production recommendation for v3.5.3 2022-04-13 21:55:56 +02:00
2e034d2b65 Merge pull request #13888 from willbeason/upgrade-opentelemetry
go.mod: upgrade opentelemetry deps
2022-04-13 18:42:47 +02:00
d888118171 Merge pull request #13929 from wyrobnik/raftexample-snap-pre-hard-state
contrib/raftexample: Save snapshot and WAL before hard state
2022-04-13 18:30:34 +02:00
eab1e0c5d5 go.mod: upgrade opentelemetry deps
Downstream users of etcd experience build issues when using dependencies
which require more recent (incompatible) versions of opentelemetry. This
commit upgrades the dependencies so that downstream users stop
experiencing these issues.
2022-04-13 07:14:10 -07:00
f341b9526a Merge pull request #13923 from endocrimes/dani/syncer
cv3/mirror: Fetch the most recent revision from the prefix
2022-04-13 11:51:33 +02:00
3a239f7b3b Merge pull request #13935 from mrueg/update-changelog-3.5.3
CHANGELOG-3.5: Add #13862
2022-04-12 22:24:36 +02:00
d7e498a5c6 CHANGELOG-3.5: Add #13862
Signed-off-by: Manuel Rüger <manuel@rueg.eu>
2022-04-12 16:53:09 +02:00
6cb7372e6d clientv3: disable mirror auth test with proxy 2022-04-12 13:42:13 +00:00
d927f7c7da Merge pull request #13710 from serathius/windows
scripts: Remove Windows build scripts
2022-04-12 11:50:07 +02:00
fd0d637429 Merge pull request #13934 from ahrtr/changelog_snapshot_cindex_and_lease
Update 3.6 and 3.5 change log to cover two issues
2022-04-12 11:49:03 +02:00
98764fadef scripts: Remove Windows build scripts 2022-04-12 10:34:10 +02:00
dfd1d49c97 update 3.6 and 3.5 change log to cover two issues
The first issue is to support linearizable lease renewal request.
The second issue is to prevent the consistent_index coming from
a snapshot is overwritten by the local old value.
2022-04-12 16:31:26 +08:00
b018742c4b Merge pull request #13930 from ahrtr/fix_snapshot_recover_cindex
Set backend to cindex before recovering the lessor in applySnapshot
2022-04-12 09:52:51 +02:00
484d2f01f3 set backend to cindex before recovering the lessor in applySnapshot 2022-04-12 10:36:29 +08:00
3152dc8174 contrib/raftexample: Save snapshot and WAL before hard state
Update raftexample to save the snapshot file and WAL snapshot entry
before hardstate to ensure the snapshot exists during recovery.
Otherwise if there is a failure after storing the hard state there may
be reference to a non-existent snapshot.
This PR introduces the fix from #10219 to the raftexample.
2022-04-11 23:44:54 +00:00
e324cc1cbe cv3/mirror: Fetch the most recent prefix revision
When a user sets up a Mirror with a restricted user that doesn't have
access to the `foo` path, we will fail to get the most recent revision
due to permissions issues.

With this change, when a prefix is provided we will get the initial
revision from the prefix rather than /foo. This allows restricted users
to setup sync.
2022-04-11 13:42:03 +00:00
dd08e15d7c Merge pull request #13690 from ahrtr/lease_renew_linearizable
Leases wait for entries to be applied
2022-04-11 14:53:18 +02:00
1b3d6cb0c8 set an separate applyTimeout for the waitAppliedIndex 2022-04-10 14:44:55 +08:00
fe3a57976e support linearizable renew lease
When etcdserver receives a LeaseRenew request, it may be still in
progress of processing the LeaseGrantRequest on exact the same
leaseID. Accordingly it may return a TTL=0 to client due to the
leaseID not found error. So the leader should wait for the appliedID
to be available before processing client requests.
2022-04-10 14:44:55 +08:00
0c9a4e0f93 Merge pull request #13837 from chrisayoub/main
clientv3: filter learner members during autosync
2022-04-09 19:00:55 -04:00
1d8c06ac50 Merge pull request #13916 from hexfusion/email
MAINTAINERS: update Sam's contact email
2022-04-09 20:01:01 +02:00
cd8f8b9e0b MAINTAINERS: update Sam's contact email
Signed-off-by: Sam Batschelet <sbatschelet@gmail.com>
2022-04-09 13:53:21 -04:00
09b299e906 Merge pull request #13914 from ahrtr/data_corruption_changelog
Update 3.5 and 3.6 changelog to cover the data inconsistency issue
2022-04-09 13:07:06 +02:00
12bdd1c5e4 Merge pull request #13910 from serathius/crypto
*: update golang.org/x/crypto
2022-04-09 09:41:49 +02:00
7d3ca1f516 Merge pull request #13906 from donalhunt/main
*: drop use of humanize.Time() in favour of zap.Duration and time.Duration
2022-04-08 23:41:50 +02:00
bd0c5a74a3 update 3.5 and 3.6 changelog to cover the data inconsistency issue 2022-04-09 05:34:24 +08:00
d659403955 Update server/etcdserver/api/v3rpc/maintenance.go
Co-authored-by: Marek Siarkowicz <marek.siarkowicz@protonmail.com>
2022-04-08 18:45:13 +01:00
6e1afa9677 Update client/v3/snapshot/v3_snapshot.go
Co-authored-by: Marek Siarkowicz <marek.siarkowicz@protonmail.com>
2022-04-08 18:44:50 +01:00
1bb59adb1e *: update golang.org/x/crypto 2022-04-08 16:27:52 +02:00
f026a37474 Merge pull request #13907 from ahrtr/kvstore_readtx
Use readTx in (*store).restore
2022-04-08 14:14:51 +02:00
05e6527d26 Merge pull request #13756 from serathius/test-snapshot
tests: Add tests for snapshot compatibility and recovery between versions
2022-04-08 14:14:19 +02:00
a3650db574 use readTx in (*store).restore 2022-04-08 15:45:05 +08:00
76543d06ce Merge pull request #13898 from mrueg/update-tools
tools/mod: Update tools
2022-04-08 09:16:58 +02:00
4c8ef011e0 *: drop use of humanize.Time() in favour of time.Duration.String()
humanize.Time() drops precision resulting in some events reporting they took
"now" time to complete. Using time.Duration.String() results in accurate
duration being reported.

Fixes #13905
2022-04-07 23:24:35 +01:00
3dce38085d Merge pull request #13903 from serathius/term
server: Save consistency index and term to backend even when they decease
2022-04-07 21:12:23 +02:00
1ea53d527e server: Save consistency index and term to backend even when they decrease
Reason to store CI and term in backend was to make db fully independent
snapshot, it was never meant to interfere with apply logic. Skip of CI
was introduced for v2->v3 migration where we wanted to prevent it from
decreasing when replaying wal in
https://github.com/etcd-io/etcd/pull/5391. By mistake it was added to
apply flow during refactor in
https://github.com/etcd-io/etcd/pull/12855#commitcomment-70713670.

Consistency index and term should only be negotiated and used by raft to make
decisions. Their values should only driven by raft state machine and
backend should only be responsible for storing them.
2022-04-07 19:00:03 +02:00
a5b9f72da6 Merge pull request #13807 from endocrimes/dani/before-test-fix
tests/framework/integration: Fail BeforeTest nesting early
2022-04-07 15:37:06 +02:00
7cc00ec981 tests/framework/integration: Fail nesting early
Currently there are a handful of tests within etcd that silently fail
because LeakDetection will skip the test before it manages to hit this
check.

Here we move the check to the beginning of the process to highlight
these cases earlier, and to avoid them accidentally presenting as leaks.
2022-04-07 13:10:15 +00:00
dedb661d92 tools/mod: Update tools
github.com/google/addlicense v0.0.0-20210428195630-6d92264d7170 -> v1.0.0
github.com/gordonklaus/ineffassign v0.0.0-20200809085317-e36bfde3bb78 -> v0.0.0-20210914165742-4cc7213b9bc8
github.com/grpc-ecosystem/grpc-gateway v1.14.6 -> v1.16.0
github.com/hexfusion/schwag v0.0.0-20170606222847-b7d0fc9aadaa -> v0.0.0-20211117114134-3ceb0191ccbf
github.com/mgechev/revive v1.0.2 -> v1.2.0
github.com/mikefarah/yq/v3 v3.0.0-20201125113350-f42728eef735 -> v4.24.2
gotest.tools v2.2.0+incompatible -> v3.1.0
gotest.tools/gotestsum v0.3.5 -> v1.7.0
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc -> v0.3.0
mvdan.cc/unparam v0.0.0-20200501210554-b37ab49443f7 -> v0.0.0-20220316160445-06cc5682983b

Signed-off-by: Manuel Rüger <manuel@rueg.eu>
2022-04-07 14:27:51 +02:00
c83b1ad9ba Merge pull request #13854 from ahrtr/data_corruption
Fix the data inconsistency issue by moving the SetConsistentIndex into the transaction lock
2022-04-07 14:20:19 +02:00
706cde86d0 Merge pull request #13897 from mrueg/bump_client-golang
go.mod: Bump prometheus/client_golang to v1.12.1
2022-04-07 09:36:36 +02:00
4033f5c2b9 move the consistentIdx and consistentTerm from Etcdserver to cindex package
Removed the fields consistentIdx and consistentTerm from struct EtcdServer,
and added applyingIndex and applyingTerm into struct consistentIndex in
package cindex. We may remove the two fields completely if we decide to
remove the OnPreCommitUnsafe, and it will depend on the performance test
result.
2022-04-07 15:16:49 +08:00
47bb48dfdc Merge pull request #13869 from wking/test-fail-exit-code-with-log-redirect-upstream
Makefile: Drop log tee calls
2022-04-07 09:12:19 +02:00
e155e50886 rename LockWithoutHook to LockOutsideApply and add LockInsideApply 2022-04-07 05:35:13 +08:00
47038593e9 set the consistent_index directly when applyV3 isn't performed 2022-04-07 05:35:13 +08:00
7ac995cdde enhanced authBackend to support authReadTx 2022-04-07 05:35:13 +08:00
a4c5da844d added detailed comment to explain the difference between Lock and LockWithoutHook 2022-04-07 05:35:13 +08:00
bfd5170f66 add a txPostLockHook into the backend
Previously the SetConsistentIndex() is called during the apply workflow,
but it's outside the db transaction. If a commit happens between SetConsistentIndex
and the following apply workflow, and etcd crashes for whatever reason right
after the commit, then etcd commits an incomplete transaction to db.
Eventually etcd runs into the data inconsistency issue.

In this commit, we move the SetConsistentIndex into a txPostLockHook, so
it will be executed inside the transaction lock.
2022-04-07 05:35:13 +08:00
f0f77fc14e go.mod: Bump prometheus/client_golang to v1.12.1
Signed-off-by: Manuel Rüger <manuel@rueg.eu>
2022-04-06 19:03:24 +02:00
3ffa253516 tests: Add tests for snapshot compatibility and recovery between versions 2022-04-06 16:10:38 +02:00
c4d055fe7b Merge pull request #13819 from endocrimes/dani/auth_test.go
migrate e2e/users tests to common framework
2022-04-06 16:02:46 +02:00
d24ef3ac20 Merge pull request #13893 from ls-2018/todo
fix unexpose todo
2022-04-06 14:31:26 +02:00
5b84b30fce fix unexpose todo
Signed-off-by: ls-2018 <acejilam@gmail.com>
2022-04-06 17:38:46 +08:00
047e61df7a Merge pull request #13880 from ahrtr/fix_dump_logs_panic
etcd-dump-logs will panic if there is no WAL entry after the snapshot
2022-04-06 09:25:17 +02:00
ad03f2076a Merge pull request #13886 from serathius/backend-logger
tests: Pass logger to backend
2022-04-05 16:35:07 +02:00
ae57fe5d30 Merge pull request #13885 from serathius/verify
server: Add verification of whether lock was called within out outside of apply
2022-04-05 16:22:52 +02:00
73fc864247 tests: Pass logger to backend 2022-04-05 15:53:38 +02:00
1d3517020b server: Add verification of whether lock was called within out outside of apply 2022-04-05 15:34:45 +02:00
8d8271f6d1 Merge pull request #13175 from karuppiah7890/issue-13167-measure-flakyness
scripts: add script to measure percentage of commits with failed status
2022-04-05 15:25:47 +02:00
a08d479463 Merge pull request #13868 from endocrimes/dani/leasefix
tests/common/lease: Wait for correct lease list response
2022-04-04 17:51:57 +02:00
f71196d113 tests/common/lease: Wait for correct lease list response
We don't consistently reach the same etcd server during the lifetime of
a test and in some cases, this means that this test will flake if an
etcd server was slow to update its state and the test hits the outdated
server.

Here we switch to using an `Eventually` case which will wait upto a
second for the expected result before failing - with a 10ms gap between
invocations.

```
[tests(dani/leasefix)] $ gotestsum -- ./common -tags integration -count 100 -timeout 15m -run TestLeaseGrantAndList
✓  common (2m26.71s)

DONE 1600 tests in 147.258s
```
2022-04-04 15:43:17 +02:00
6c974a3e31 Merge pull request #13867 from serathius/logs-test
tests: Use zaptest.NewLogger in tests
2022-04-04 14:47:04 +02:00
5b84d3934e Merge pull request #13876 from ptabor/20220403-integration-test-fixes
Integration tests flake fixes
2022-04-04 14:46:29 +02:00
9dc8bbb7cf Merge pull request #13875 from ahrtr/be_race
fix WARNING: DATA RACE issue when multiple goroutines access the backend
2022-04-04 13:31:19 +02:00
804fddf921 tests: Use zaptest.NewLogger in tests 2022-04-04 13:03:15 +02:00
543c87cc38 etcd-dump-logs will panic if there is no WAL entry after the snapshot 2022-04-04 18:58:18 +08:00
d4dcd3061d Fix flakes in TestV3LeaseCheckpoint/Checkpointing_disabled,_lease_TTL_is_reset
I think strong (not-equal) relationship was too restrictive when expressed with 1s granularity.

```
        logger.go:130: 2022-04-03T22:15:15.242+0200	WARN	m1	leader failed to send out heartbeat on time; took too long, leader is overloaded likely from slow disk	{"member": "m1", "to": "cb785755eb80ac1", "heartbeat-interval": "10ms", "expected-duration": "20ms", "exceeded-duration": "24.666613ms"}
        logger.go:130: 2022-04-03T22:15:15.262+0200	INFO	m-1	published local member to cluster through raft	{"member": "m-1", "local-member-id": "e2dd9f523aa7be87", "local-member-attributes": "{Name:m-1 ClientURLs:[unix://127.0.0.1:2196386040]}", "cluster-id": "b4b8e7e41c23c8b5", "publish-timeout": "5.2s"}
        v3_lease_test.go:415: Expected lease ttl (4m58s) to be greather than (4m58s)
```
2022-04-03 23:13:01 +02:00
90796720c1 Reduce integration test parallelism to 2 packages at once.
Especially with 'race' detection, running O(cpu) integrational tests was causing CPU overloads and timeouts.
2022-04-03 14:48:36 +02:00
ed1bc447c7 Flakes: Additional logging and timeouts to understand common flakes. 2022-04-03 14:48:36 +02:00
68f2cb8c77 Fix ExampleAuth from integration/clientv3/examples (on OsX)
The code now ensures that each of the test is running in its own directory as opposed to shared os.tempdir.
```
$  (cd tests && env go test -timeout=15m --race go.etcd.io/etcd/tests/v3/integration/clientv3/examples -run ExampleAuth)
2022/04/03 10:24:59 Running tests (examples): ...
2022/04/03 10:24:59 the function can be called only in the test context. Was integration.BeforeTest() called ?
2022/04/03 10:24:59 2022-04-03T10:24:59.462+0200	INFO	m0	LISTEN GRPC	{"member": "m0", "grpcAddr": "localhost:m0", "m.Name": "m0"}
```
2022-04-03 14:16:45 +02:00
d57f8dba62 Deflaking: Make WaitLeader (and WaitMembersForLeader) aggressively (30s) wait for leader being established.
Nearly none of the tests was checking the value... just assuming WaitLeader success.

```
    maintenance_test.go:277: Waiting for leader...
    logger.go:130: 2022-04-03T08:01:09.914+0200	INFO	m0	cluster version differs from storage version.	{"member": "m0", "cluster-version": "3.6.0", "storage-version": "3.5.0"}
    logger.go:130: 2022-04-03T08:01:09.915+0200	WARN	m0	leader failed to send out heartbeat on time; took too long, leader is overloaded likely from slow disk	{"member": "m0", "to": "2acc3d3b521981", "heartbeat-interval": "10ms", "expected-duration": "20ms", "exceeded-duration": "103.756219ms"}
    logger.go:130: 2022-04-03T08:01:09.916+0200	INFO	m0	updated storage version	{"member": "m0", "new-storage-version": "3.6.0"}
    ...
    logger.go:130: 2022-04-03T08:01:09.926+0200	INFO	grpc	[[roundrobin] roundrobinPicker: Build called with info: {map[0xc002630ac0:{{unix:localhost:m0 localhost <nil> 0 <nil>}} 0xc002630af0:{{unix:localhost:m1 localhost <nil> 0 <nil>}} 0xc002630b20:{{unix:localhost:m2 localhost <nil> 0 <nil>}}]}]
    logger.go:130: 2022-04-03T08:01:09.926+0200	WARN	m0	apply request took too long	{"member": "m0", "took": "114.661766ms", "expected-duration": "100ms", "prefix": "", "request": "header:<ID:12658633312866157316 > cluster_version_set:<ver:\"3.6.0\" > ", "response": ""}
    logger.go:130: 2022-04-03T08:01:09.927+0200	INFO	m0	cluster version is updated	{"member": "m0", "cluster-version": "3.6"}
    logger.go:130: 2022-04-03T08:01:09.955+0200	INFO	m2.raft	9f96af25a04e2ec3 [logterm: 2, index: 8, vote: 9903a56eaf96afac] ignored MsgVote from 2acc3d3b521981 [logterm: 2, index: 8] at term 2: lease is not expired (remaining ticks: 10)	{"member": "m2"}
    logger.go:130: 2022-04-03T08:01:09.955+0200	INFO	m0.raft	9903a56eaf96afac [logterm: 2, index: 8, vote: 9903a56eaf96afac] ignored MsgVote from 2acc3d3b521981 [logterm: 2, index: 8] at term 2: lease is not expired (remaining ticks: 5)	{"member": "m0"}
    logger.go:130: 2022-04-03T08:01:09.955+0200	INFO	m0.raft	9903a56eaf96afac [term: 2] received a MsgAppResp message with higher term from 2acc3d3b521981 [term: 3]	{"member": "m0"}
    logger.go:130: 2022-04-03T08:01:09.955+0200	INFO	m0.raft	9903a56eaf96afac became follower at term 3	{"member": "m0"}
    logger.go:130: 2022-04-03T08:01:09.955+0200	INFO	m0.raft	raft.node: 9903a56eaf96afac lost leader 9903a56eaf96afac at term 3	{"member": "m0"}
    maintenance_test.go:279: Leader established.
```

Tmp
2022-04-03 12:23:09 +02:00
2fab3f3ae5 Make naming of test-nodes consistent and positive: m0, m1, m2
The nodes used to be named: m-1, m0, m1, that was generating very confusing logs
in integration tests.
2022-04-03 09:16:55 +02:00
836bd6bc3a fix WARNING: DATA RACE issue when multiple goroutines access the backend concurrently 2022-04-03 06:13:09 +08:00
3d3c4373e3 Merge pull request #13860 from mrueg/fix-make2
Makefile: Additional logic fix
2022-04-02 14:43:19 -04:00
f85cd0296f Merge pull request #13872 from ptabor/20220402-osx-unit-test-pass
Fix TestauthTokenBundleOnOverwrite on OsX:
2022-04-02 20:03:38 +02:00
3bb2d0c716 Merge pull request #13870 from howz97/main
fix comment in raft.go
2022-04-02 16:50:26 +02:00
8cd8a1ea10 Flakes in integration/clientv3/examples/...
The tests sometimes flaked due to already existing socket-files.
Now each execution works in a tempoarary directory.
2022-04-02 16:16:25 +02:00
3b589fb3b2 Fix TestauthTokenBundleOnOverwrite on OsX:
```
% (cd client/v3 && env go test -short -timeout=3m --race ./...)
--- FAIL: TestAuthTokenBundleNoOverwrite (0.00s)
    client_test.go:210: listen unix /var/folders/t1/3m8z9xz93t9c3vpt7zyzjm6w00374n/T/TestAuthTokenBundleNoOverwrite3197524989/001/etcd-auth-test:0: bind: invalid argument
FAIL
FAIL	go.etcd.io/etcd/client/v3	4.270s
```

The reason was that the path exceeded 108 chars (that is too much for socket).
In the mitigation we first change chroot (working directory) to the tempDir... such the path is 'local'.
2022-04-02 16:12:02 +02:00
f9c9bfa44c fix comment in raft.go 2022-04-02 14:27:33 +08:00
c59cae5aaa Makefile: Drop log tee calls
We've had these since in one form or another since 23a302364c
(Makefile: initial commit, 2017-09-29), but in at least some cases the
underlying shell does not pipefail, a test failure gets swallowed, and
the make call exits zero despite failing the tests [1]:

  $ curl -s https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/origin-ci-test/pr-logs/pull/openshift_etcd/109/pull-ci-openshift-etcd-openshift-4.11-unit/1509260812278042624/artifacts/test/build-log.txt
  TEST_OPTS: PASSES='unit'
  log-file: test-MTY0ODY3MTA1MQo.log
  PASSES='unit' ./test.sh 2>&1 | tee test-MTY0ODY3MTA1MQo.log
  % env GO111MODULE=off go get github.com/myitcv/gobin
  Running with --race
  Starting at: Wed Mar 30 20:10:52 UTC 2022

  'unit' started at Wed Mar 30 20:10:52 UTC 2022
  % (cd api && env go test -short -timeout=3m --race ./...)
  stderr: authpb/auth.pb.go:12:2: open /go/pkg/mod/github.com/gogo/protobuf@v1.3.2/gogoproto: permission denied
  stderr: authpb/auth.pb.go:13:2: open /go/pkg/mod/github.com/golang/protobuf@v1.5.2/proto: permission denied
  stderr: etcdserverpb/rpc.pb.go:17:2: open /go/pkg/mod/google.golang.org/genproto@v0.0.0-20210602131652-f16073e35f0c/googleapis/api/annotations: permission denied
  stderr: etcdserverpb/rpc.pb.go:18:2: open /go/pkg/mod/google.golang.org/grpc@v1.38.0: permission denied
  stderr: etcdserverpb/rpc.pb.go:19:2: open /go/pkg/mod/google.golang.org/grpc@v1.38.0/codes: permission denied
  stderr: etcdserverpb/rpc.pb.go:20:2: open /go/pkg/mod/google.golang.org/grpc@v1.38.0/status: permission denied
  stderr: etcdserverpb/gw/rpc.pb.gw.go:17:2: open /go/pkg/mod/github.com/golang/protobuf@v1.5.2/descriptor: permission denied
  stderr: etcdserverpb/gw/rpc.pb.gw.go:19:2: open /go/pkg/mod/github.com/grpc-ecosystem/grpc-gateway@v1.16.0/runtime: permission denied
  stderr: etcdserverpb/gw/rpc.pb.gw.go:20:2: open /go/pkg/mod/github.com/grpc-ecosystem/grpc-gateway@v1.16.0/utilities: permission denied
  FAIL: (code:1):
    % (cd api && env go test -short -timeout=3m --race ./...)
  stderr: etcdserverpb/gw/rpc.pb.gw.go:23:2: open /go/pkg/mod/google.golang.org/grpc@v1.38.0/grpclog: permission denied
  stderr: version/version.go:23:2: open /go/pkg/mod/github.com/coreos/go-semver@v0.3.0/semver: permission denied
  FAIL: 'unit' failed at Wed Mar 30 20:10:52 UTC 2022
  ! egrep "(--- FAIL:|DATA RACE|panic: test timed out|appears to have leaked)" -B50 -A10 test-MTY0ODY3MTA1MQo.log

We can't drop the log aggregation, because the log files are used for
the panic/race grepping.  But I'm dropping the tee (so no more
synchronous updates, but we no longer have to worry about pipefail
handling).  And then if the test script fails, I'm dumping the log
file to stdout and exiting 1, so the overall run fails.

[1]: https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/openshift_etcd/109/pull-ci-openshift-etcd-openshift-4.11-unit/1509260812278042624
2022-04-01 11:06:50 -07:00
b1610934e3 Merge pull request #13864 from serathius/logs
Fix inconsistent log format
2022-04-01 11:00:48 +02:00
63346bfead server: Use default logging configuration instead of zap production one
This fixes problem where logs json changes format of timestamp.
2022-04-01 10:23:42 +02:00
e4d34f21bc Merge pull request #13856 from ahrtr/cleanup_unused_code
The file server/storage/mvcc/util.go isn't used at all, so removing it
2022-03-31 21:16:02 +02:00
e5bf23037a tests: Keeps log in expect to allow their analysis 2022-03-31 21:02:36 +02:00
29905029f6 Makefile: Additional logic fix
Signed-off-by: Manuel Rüger <manuel@rueg.eu>
2022-03-31 11:18:36 +02:00
0d5c1dce49 Merge pull request #13857 from mrueg/fix-make
Makefile: Fix wrong target
2022-03-31 11:04:52 +02:00
ec29b9ee36 Makefile: Fix wrong target
Signed-off-by: Manuel Rüger <manuel@rueg.eu>
2022-03-31 09:48:21 +02:00
9b3b383366 the file server/storage/mvcc/util.go isn't used at all, so removing it 2022-03-31 10:14:46 +08:00
125f3c3f9a clientv3: filter learners members during autosync
This change is to ensure that all members returned during the client's
AutoSync are started and are not learners, which are not valid
etcd members to make requests to.
2022-03-29 13:38:21 -04:00
0e83f62e0c Merge pull request #13852 from serathius/recommend
changelog: Update and deduplicate production recommendations
2022-03-29 19:12:46 +02:00
88a39d780f changelog: Update and deduplicate production recommendations 2022-03-29 19:09:01 +02:00
27e222e2d7 Merge pull request #13802 from yankay/fix-the-api-dependency-in-pkg-and-update-cobra-to-1.4.0
Fix the etcd api dependency in pkg. And Update Cobra Version to1.4.0
2022-03-28 10:40:24 +02:00
be2929568f Merge pull request #13834 from ahrtr/tool_decode_meta
enhance etcd-dump-db to display keys in meta more friendly
2022-03-26 13:38:06 -04:00
dcc226491f Merge pull request #13836 from kkkkun/set-etcdutl-default
test: set etcdutl to default
2022-03-25 20:13:21 -04:00
afecd3139c fix the api dependency in pkg, and update cobra to 1.4.0
Signed-off-by: Kay Yan <kay.yan@daocloud.io>
2022-03-25 17:18:56 +08:00
4019c592ea Merge pull request #13831 from mrueg/go-1.17.8
Update go to 1.17.8
2022-03-24 16:23:33 -04:00
2ed87b9f2f skip compact when rev not change at period compact mode 2022-03-24 20:59:25 +08:00
0d55a1ca2a Merge pull request #13821 from ahrtr/configspec_config
Move the newClientCfg into clientv3 package so as to be reused by both etcdctl and v3discovery
2022-03-24 10:12:55 +01:00
cc33b7cee1 Merge pull request #13824 from eval-exec/patch-1
Fix panic in etcd validate secure endpoints #13810
2022-03-24 10:05:58 +01:00
b8c1ac8efd Add Changelog entry 2022-03-24 10:00:09 +01:00
62641d3385 set etcdutl to default 2022-03-24 16:20:28 +08:00
49e9a14580 migrate unit test to cover the logic of converting ConfigSpec to Config 2022-03-24 07:24:22 +08:00
f978da4f4f move the newClientCfg into clientv3 package so as to be reused by both etcdctl and v3discovery 2022-03-24 06:18:25 +08:00
c544b2a2a5 Update go to 1.17.8 2022-03-23 20:11:12 +01:00
8d01ac2816 remove endpoints length check in TestValidateSecureEndpoints() 2022-03-23 23:37:31 +08:00
ad78a74c42 Update client/pkg/transport/tls_test.go
Co-authored-by: Marek Siarkowicz <marek.siarkowicz@protonmail.com>
2022-03-23 23:37:31 +08:00
88e1d6b126 using subtests for TestValidateSecureEndpoints() 2022-03-23 23:37:31 +08:00
4786a72cfc Update client/pkg/transport/tls_test.go
Co-authored-by: Marek Siarkowicz <marek.siarkowicz@protonmail.com>
2022-03-23 23:37:31 +08:00
df71f59c0e close idle connections 2022-03-23 23:37:31 +08:00
983ee82c98 add test for transport/tls.go:ValidateSecureEndpoints() 2022-03-23 23:37:31 +08:00
bd7d09255b Fix panic in etcd validate secure endpoints #13810
`ValidateSecureEndpoints()` should call `t.DialContext()` instead of `t.Dial()`, because `t.Dial` is `nil`
2022-03-23 23:37:31 +08:00
3254125e6c Merge pull request #13809 from kkkkun/cleanup-deprecated-commands
Removing deprecated commands in etcdctl & etcdutl
2022-03-23 11:21:01 -04:00
43e39d362d Merge pull request #13301 from mitake/jwt-exp-log
server/auth: avoid logging for JWT token
2022-03-23 22:39:28 +09:00
bbc81bb6b7 enhance etcd-dump-db to display keys in meta more friendly 2022-03-23 18:32:13 +08:00
4504daa6b0 Merge pull request #13830 from ahrtr/add_ut_newClientCfg
Add unit test for newClientCfg
2022-03-23 11:22:42 +01:00
3b2f0589ff Merge pull request #13835 from ahrtr/update_3.5_changelog
Update changelog to cover the fix for the watchablestore runlock bug
2022-03-23 11:15:32 +01:00
780e3ae935 update 3.5 changelog to cover the fix for the watchablestore runlock bug 2022-03-23 14:24:48 +08:00
1649c9dfc2 Removing deprecated commands in etcdctl & etcdutl 2022-03-23 11:05:52 +08:00
3780435831 added unit test for newClientCfg 2022-03-22 19:07:40 +08:00
5fe4d551df Merge pull request #13754 from serathius/common-noquorum
tests: Migrate noquorum kv tests to common framework
2022-03-22 10:54:38 +01:00
6d39359a29 Merge pull request #13828 from mitake/test-v3-auth-old-rev-concurrent
tests/integration: re-enable TestV3AuthOldRevConcurrent
2022-03-21 15:41:06 +01:00
44aad460db tests: Migrate noquorum kv tests to common framework 2022-03-21 14:53:29 +01:00
7a0c254b73 tests/integration: re-enable TestV3AuthOldRevConcurrent 2022-03-21 22:25:58 +09:00
3416042c50 tests: migrate user tests to common fw 2022-03-21 12:46:00 +00:00
adae7a659e tests/framework: Add User operations 2022-03-21 12:44:51 +00:00
4787e71921 Merge pull request #13823 from nic-chen/tests/ctl-alarm
tests: Migrate alarm tests to common framework
2022-03-20 12:16:47 +01:00
c6488a2c56 fix review 2022-03-20 10:09:27 +08:00
89146aa157 chore: delete useless file 2022-03-20 02:06:42 +08:00
bb7856090a fix: set cluster size to 1 to avoid unstable 2022-03-20 02:01:30 +08:00
527edd39a6 fix alarm test 2022-03-20 01:40:53 +08:00
02516ab266 Merge branch 'main' into tests/ctl-alarm
# Conflicts:
#	tests/framework/e2e/etcdctl.go
#	tests/framework/interface.go
2022-03-19 16:36:15 +08:00
e9fa171665 fix test fail 2022-03-19 16:31:19 +08:00
1b208aa9d9 Merge pull request #13812 from endocrimes/dani/leases
Migrate e2e Lease tests to common
2022-03-18 19:23:26 +01:00
3e657bdc50 tests: Migrate key value Get to common framework 2022-03-19 00:51:29 +08:00
87740f6c7b tests: Migrate TestCtlV3LeaseRevoke.* to common 2022-03-18 16:47:42 +00:00
ab3353582d tests/framework: Add Client.LeaseRevoke 2022-03-18 16:47:42 +00:00
36279e0797 tests: migrate TestCtlV3LeaseKeepAliveOnce.* to common 2022-03-18 16:47:42 +00:00
353b011f59 tests/framework: Add Client.LeaseKeepAliveOnce 2022-03-18 16:47:42 +00:00
c12e03c8e6 tests: migrate TestCtlV3LeaseTestTimeToLiveExpired.* to common 2022-03-18 16:47:42 +00:00
b50f10299b tests/framework: Add PutOptions
Put can take a leaseid to associate a value with a lease. This adds the
ability for tests to make use of this.
2022-03-18 16:47:42 +00:00
dca5874d44 tests: Migrate key value Get to common framework 2022-03-19 00:46:42 +08:00
b7beaf9c62 tests: migrate TestCtlV3LeaseGrantLeases.* to common 2022-03-18 16:43:55 +00:00
68e6493977 tests/framework: add Client.LeaseList 2022-03-18 16:43:53 +00:00
6b7be72a43 tests: migrate TestCtlV3LeaseGrantTimeToLive.* to common 2022-03-18 16:43:20 +00:00
a533584738 tests/framework: add basic lease operations 2022-03-18 16:43:19 +00:00
34f0ab4f4f Merge pull request #13820 from kkkkun/defrag-test
tests: Migrate defrag tests to common framework
2022-03-18 16:50:39 +01:00
66eb3dbbdc tests: Migrate defrag tests to common framework 2022-03-18 19:17:48 +08:00
8c074c975e Merge pull request #13773 from ahrtr/display_store_version_etcdctl_endpoint
Add one more field storageVersion into StatusResponse
2022-03-18 09:52:42 +01:00
d0688e0158 update the example output of 'etcdctl endpoint status -w table' 2022-03-18 07:04:44 +08:00
edce939f6e add one more field storageVersion into StatusResponse
When performing the downgrade operation, users can confirm whether each member
is ready to be downgraded using the field 'storageVersion'. If it's equal to the
'target version' in the downgrade command, then it's ready to be downgraded;
otherwise, the etcd member is still in progress of processing the db file.
2022-03-18 07:04:44 +08:00
c633e39102 Merge pull request #13803 from endocrimes/dani/expect-weird-systems
expect_test: Look up binaries from the path
2022-03-17 14:16:02 +01:00
a045e4bbfc expect_test: Look up binaries from the path
Not all systems include binaries in the same location. On my (NixOS, so
albeit a little weird) system these binaries exist in very different
locations.

This test switches to looking up the paths from the users PATH or skips
the test if they do not exist to improve the `make test` experience on
such systems.
2022-03-17 12:55:08 +00:00
a1f24af310 Merge pull request #13804 from endocrimes/dani/watch-fix
integration/client/watch.TestWatchCancelRunning: remove duplicate setup
2022-03-16 15:43:35 +01:00
5f7df583c6 Merge pull request #13806 from endocrimes/dani/mutex-test-fix
integration/clientv3/exp/recipes: Fix lock tests
2022-03-16 15:40:37 +01:00
5ff2eccf80 Merge pull request #13774 from kkkkun/endpoint-test
tests: Migrate endpoint tests to common framework
2022-03-16 14:46:06 +01:00
35c3ceaa84 Merge pull request #13799 from serathius/release-doc
*: Restore release documentation
2022-03-15 15:31:24 -04:00
3bbbef54c1 integration/clientv3/exp/recipes: Fix lock test
TestMutexTryLock(SingleNode|MultiNode) were being skipped as they had duplicate calls to integration2.BeginTest. These duplicate calls registered a second handler for leak detection which failed and skipped the test as the wrappers had already started a cluster.

part of #13698
2022-03-15 17:42:47 +00:00
b50239f9a4 integration/client/watch: remove duplicate setup
This test was being skipped as it has a duplicate call to
integration2.BeginTest. This duplicate call registered a second handler
for leak detection which failed and skipped the test as the wrapper
(runWatchTest) has already started a cluster.
2022-03-15 16:41:14 +00:00
fa4859f86a Merge pull request #13793 from kkkkun/delete-defrag-offline-ctlv3
delete offline defrag in etcdctl
2022-03-15 12:23:54 -04:00
a1f24e9afc tests: Migrate endpoint tests to common framework 2022-03-15 22:50:56 +08:00
494a471248 *: Restore release documentation 2022-03-14 14:09:35 +01:00
bfb9aa4205 Merge pull request #13751 from ahrtr/reuse_client_config2
Move clientconfig into clientv3 so that it can be reused by both etcd…
2022-03-14 12:06:50 +01:00
8c0e4fe559 delete offline defrag in etcdctl 2022-03-14 11:07:57 +08:00
1a3822f2c3 Rename ClientConfig to ConfigSpec
The ClientConfig is a fully declarive configuration, so it makes more
sense to rename it to ConfigSpec. It can also mitigate the confusion
between Config and ClientConfig.
2022-03-13 05:41:49 +08:00
3dcbbf62d9 Move clientconfig into clientv3 so that it can be reused by both etcdctl and v3 discovery 2022-03-12 06:38:41 +08:00
5ed7f00166 Merge pull request #13788 from AdamKorcz/fuzz1
Add fuzzing audit report
2022-03-11 16:44:54 -05:00
1bfc88a8d6 Add fuzzing audit report 2022-03-11 20:52:29 +00:00
4e97271e4e Merge pull request #13770 from kkkkun/add-compact-test
tests: Migrate compact tests to common framework
2022-03-10 21:28:55 -05:00
34cd8ae1a2 tests: Migrate compact tests to common framework 2022-03-10 17:01:47 +08:00
91f9ce9f5b Merge pull request #13771 from ahrtr/fix_fmt_error_log
Fix some log format typos
2022-03-09 16:41:17 -05:00
3ecd8d2364 update incorrect migration log message
It can be upgrade or downgrade, so we should use word "updated" here.
2022-03-10 04:39:56 +08:00
d578a86a59 fix some log format typos 2022-03-10 03:26:34 +08:00
b8be237d16 Merge pull request #13769 from ahrtr/fix_typo_downgrade
Fix some typos related to downgrade
2022-03-09 10:01:00 +01:00
1ae5aa52de fix some typos related to downgrade 2022-03-09 16:07:18 +08:00
85d4567ead Merge pull request #13767 from kkkkun/delete-restore-stack
clean up unnecessary stack log when restore
2022-03-08 11:58:08 +01:00
01035878de Merge pull request #13760 from ahrtr/fix_raftexample_snapshot
Update the confstate before sending snapshot
2022-03-08 10:34:02 +01:00
8800f0cabb clean up stack log 2022-03-08 17:04:03 +08:00
b6a2d2d48a tools: Add -wal-dir flag on etcd-dump-logs to make it compatible with ETCD_WAL_DIR variable (#13672) 2022-03-07 21:29:20 -08:00
5cf6ba48de added a unit test for the method processMessages 2022-03-08 09:38:23 +08:00
950a47504e Merge pull request #13759 from cuishuang/main
fix some typos
2022-03-07 17:48:39 +01:00
b7824b794b fix some typos
Signed-off-by: cuishuang <imcusg@gmail.com>

fix some typos

Signed-off-by: cuishuang <imcusg@gmail.com>
2022-03-07 20:28:53 +08:00
793218ed2b update the confstate before sending snapshot
When there is a `raftpb.EntryConfChange` after creating the snapshot,
then the confState included in the snapshot is out of date. so We need
to update the confState before sending a snapshot to a follower.
2022-03-07 12:18:29 +08:00
8ac44ffa5f Merge pull request #13753 from serathius/common-delete
tests: Migrate kv delete tests to common framework.
2022-03-02 20:36:10 -05:00
a60abee0d4 tests: Migrate kv delete tests to common framework. 2022-03-02 11:37:24 +01:00
d2e5a8cb5d Merge pull request #13750 from kkkkun/add-timeout
add timeout for http client
2022-03-02 10:15:44 +01:00
31de503859 Merge pull request #13740 from serathius/common-get
Migrate key value Get to common framework
2022-03-02 10:14:34 +01:00
7c472a964e Merge pull request #13752 from kkkkun/delete-duplicate-code
mvcc: clean up duplicate metrics name
2022-03-01 17:09:40 +01:00
088807c08e Merge pull request #13565 from ahrtr/remove_peer_serve_client_requests
Updated servePeers to remove the grpc server
2022-03-01 16:24:42 +01:00
124bc1ebbc mvcc: clean up duplicate metrics name 2022-03-01 18:00:07 +08:00
1406a9919c Merge pull request #13700 from AdamKorcz/fuzz8
server/etcdserver: fix oss-fuzz issue
2022-03-01 10:48:29 +01:00
49e9cb5f53 tests: Test multi member cluster 2022-03-01 10:43:33 +01:00
bd9f366f40 tests: Migrate TestKVRange integration test to TestKVGet 2022-03-01 10:43:31 +01:00
74d77dbaaa tests: Migrate TestKVGet e2e test to common test framework 2022-03-01 10:41:57 +01:00
81ef11ffb8 tests: Test different TLS configuration with TestKVPut 2022-03-01 10:41:21 +01:00
58c3808919 tests: Handle multiple cluster configurations 2022-03-01 10:40:43 +01:00
1c8adcd830 tests: Handle simple TLS configuration for cluster in common framework 2022-03-01 10:40:42 +01:00
f7ee30cc41 tests: Implement remaining GetOptions fields 2022-03-01 10:35:18 +01:00
59f7764772 add timeout for http client 2022-03-01 11:11:09 +08:00
fb55910500 version: bump up to 3.6.0-alpha.0 2022-02-28 13:20:27 +01:00
fd5cd9fd98 Merge pull request #13744 from serathius/release-scripts
scripts: Fix release scripts
2022-02-28 12:14:47 +01:00
d5f3796c13 Merge pull request #13746 from kkkkun/delete-duplicate-metrics
delete duplicate metrics rangeCounterDebug
2022-02-28 12:14:14 +01:00
0ecd4de923 delete duplicate metrics rangeCounterDebug 2022-02-28 16:22:40 +08:00
af7154c1f4 Merge pull request #13704 from kumakichi/main
fix: a little grammar issue
2022-02-25 18:55:45 +01:00
778c95fdf4 scripts: Fix release scripts 2022-02-25 13:30:34 +01:00
599bbf269c Merge pull request #13728 from ahrtr/update_3.5_changelog_for_raft_term_decimal
Update 3.5 changelog to cover the PR of always printing raft_term in decimal
2022-02-25 09:04:53 +01:00
f4f5ae77ab Merge pull request #13737 from ahrtr/add_failover_test2
Add failover test cases
2022-02-25 08:58:51 +01:00
9b6681fffd add failover test cases 2022-02-25 09:55:36 +08:00
a7106dc585 Merge pull request #13731 from serathius/ahrtr
Add ahrthr@ to reviewers
2022-02-24 22:52:31 +01:00
9aaa6d8e7c Merge pull request #13708 from serathius/common
Create common framework for e2e and integration tests and migrate TestKVPut test
2022-02-24 11:21:49 +01:00
65be41dd6e tests: Rename framework to runner and document the runners 2022-02-24 10:36:46 +01:00
10998ab90b Merge pull request #13733 from ahrtr/change_discovery_url_to_endpoints
Change v3 discovery url to endpoints so as to support failover
2022-02-24 10:08:02 +01:00
6f03dc7416 update 3.5 changelog to cover the PR of always printing raft_term in decimal when displaying member list in json 2022-02-24 15:24:43 +08:00
2f36e0c62b Change discovery url to endpoints
Currently the discovery url is just one endpoint. But actually it
should be the same as the etcdctl, which means that it should be
a list of endpoints. When one endpoint is down, the clientv3 can
fail over to the next endpoint automatically.
2022-02-24 09:11:41 +08:00
def122871c tests: Use GetOptions to configure serializble get 2022-02-23 16:47:52 +01:00
744dd077cd tests: Create common framework for e2e and integration tests and migrate TestKVPut test 2022-02-23 16:47:02 +01:00
c4e5c14011 Update Benjamin contact 2022-02-23 10:36:59 +01:00
d61e9d967f Add Benjamin to reviewers 2022-02-22 18:55:13 +01:00
6af760131e Merge pull request #13687 from serathius/etcdctl
Add downgrade commands
2022-02-22 17:12:23 +01:00
42faf9fe06 etcdctl: Use minor versions for downgrade 2022-02-22 16:30:08 +01:00
c1c2f1233d etcdctl: Documment downgrade commands 2022-02-22 16:29:35 +01:00
509d8461a6 Merge pull request #13711 from ahrtr/quote_raft_term_on_display
Always print the raft_term in decimal
2022-02-22 09:51:18 +01:00
7da36800b3 Merge pull request #13725 from ahrtr/update_changelog3.5_health_check
Update 3.5 changelog to cover the PR of improving health check
2022-02-22 09:50:21 +01:00
5ac2c0d432 Merge pull request #13309 from presztak/proxyV2_with_stop_signal
e2e: Call WithStopSignal on proxyV2 object
2022-02-22 09:48:28 +01:00
13e20cce5e update 3.5 changelog to cover the PR of improving health check 2022-02-22 09:12:03 +08:00
5d3847577f always print the raft_term in decimal even flag --hex is provided 2022-02-22 09:00:24 +08:00
b5e224db7d Merge pull request #13635 from ahrtr/v3_discovery
support v3 discovery to bootstrap a new etcd cluster
2022-02-21 21:50:40 +01:00
f80f477073 Merge pull request #13644 from Juneezee/refactor/t.TempDir
*: use `T.TempDir` to create temporary test directory
2022-02-21 19:52:37 +01:00
2ea702c852 Merge pull request #13720 from ahrtr/3.5_changelog_for_correct_dns_pr
Update changelog for both 3.5 and 3.6 for the PRs of trimming the suffix dot from target in SRV record
2022-02-21 18:28:30 +01:00
16d7005137 etcdctl: Add dot at the end of sentences 2022-02-21 17:58:20 +01:00
d0c1c3a1fd client: Alias downgrade action enum 2022-02-21 17:58:20 +01:00
22ee50e005 etcdctl: Fix target version not provided message 2022-02-21 17:58:20 +01:00
2a7766c8cd tests: Switch downgradetests to use etcdctl 2022-02-21 17:58:19 +01:00
2db4d35554 tests: Move etcdctl to e2e framework 2022-02-21 17:58:19 +01:00
8e71ebf071 Add downgrade commands 2022-02-21 17:58:19 +01:00
bf0b1a7e1d Merge pull request #13686 from serathius/snapshot
server: Snapshot after cluster version downgrade
2022-02-21 17:57:27 +01:00
ebc86d12c0 support v3 discovery to bootstrap a new etcd cluster 2022-02-21 23:22:49 +08:00
a0f26ff4ea server: Snapshot after cluster version downgrade 2022-02-21 15:48:00 +01:00
6105a6f0e8 Merge pull request #13683 from serathius/publishV3
server: Switch to publishV3
2022-02-21 14:16:22 +01:00
b976074ef2 Merge pull request #13721 from ahrtr/correct_typo
Fix typo, renamed ErrGPRCNotSupportedForLearner to ErrGRPCNotSupportedForLearner
2022-02-21 10:19:23 +01:00
8681888012 fix typo, renamed ErrGPRCNotSupportedForLearner to ErrGRPCNotSupportedForLearner 2022-02-21 14:46:58 +08:00
6781651e0b update changelog for both 3.5 and 3.6 for the PRs of trimming the suffix dot from the target in SRV record 2022-02-21 07:15:19 +08:00
a63fa17b76 Merge pull request #13645 from yangxuanjia/yxjetcd_fix_panic_when_restart_after_removeMember
fix panic when restart after removeMember
2022-02-20 12:28:14 +01:00
20bf96dc40 Merge pull request #13712 from ahrtr/correct_dns_etcd_client
Trim the suffix dot from the srv.Target for etcd-client DNS lookup
2022-02-18 12:06:48 +01:00
5fc0092c87 trim the suffix dot from the srv.Target for etcd-client DNS lookup 2022-02-18 18:16:19 +08:00
5649cf3f1a Log and return instead of panic 2022-02-16 10:31:08 +00:00
caeec38c2a fix: a little grammar issue 2022-02-16 17:44:46 +08:00
e814f6f78a Merge pull request #13671 from mrueg/mixin-generate-manifests
contrib/mixin: Generate rules, fix tests
2022-02-15 23:06:52 +01:00
fad82c1b6f server/etcdserver: fix oss-fuzz issue N 2022-02-15 15:32:31 +00:00
8c91d60a6f server: Switch to publishV3 2022-02-14 23:06:45 +01:00
aa75fd0850 Merge pull request #13689 from AdamKorcz/fuzz7
server/storage/wal: fix oss-fuzz issue 44433
2022-02-14 15:48:55 -05:00
830f00d105 Merge pull request #13695 from AdamKorcz/fuzz1
server/etcdserver: fix oss-fuzz issue 42181
2022-02-14 15:36:41 -05:00
09e35a44ec Merge pull request #13676 from chaochn47/fix_12535
Load all leases from backend
2022-02-14 21:32:33 +01:00
2923960ecd Merge pull request #13693 from chaochn47/fix_coverage
Fix coverage failures
2022-02-14 15:03:56 -05:00
a0347261e4 Merge pull request #13679 from lavacat/defrag-bopts-fix
server/storage/backend: restore original bolt db options after defrag
2022-02-14 20:24:02 +01:00
310de9bd8b Merge pull request #13612 from serathius/write-only
server: Make --v2-deprecation=write-only the default and remove not-y…
2022-02-14 17:09:42 +01:00
9ebaf58dd6 Merge pull request #13694 from serathius/timeout
tests: Fix cluster version and downgrade request timeout
2022-02-14 14:53:34 +01:00
3de5e221a8 tests: Fix cluster version and downgrade request timeout
Returning nil means that raft.Trigger was not called, causing member to
wait infinitly for response for response on raft request.
2022-02-14 14:19:06 +01:00
0fcb2a628c server/storage/wal: fix oss-fuzz issue 44433 2022-02-14 11:50:27 +00:00
0df768d2b1 server/etcdserver: fix oss-fuzz issue 42181 2022-02-14 10:59:41 +00:00
1675df37de update 3.6 CHANGELOG 2022-02-13 20:35:51 -08:00
fd79af9ee7 load all leases from backend 2022-02-13 20:30:20 -08:00
bdb13e2e12 Merge pull request #13681 from AdamKorcz/fuzz5
server/storage/mvcc: fix oss-fuzz issue 44449
2022-02-13 19:35:21 +01:00
489b30828d Merge pull request #13682 from AdamKorcz/fuzz6
server/auth: fix oss-fuzz issue 44478
2022-02-13 17:43:43 +01:00
b683aa1254 fix ctl_v3_kv_no_quorum_test.go and coverage failures 2022-02-12 18:00:02 -08:00
bba3937f69 Merge pull request #13649 from serathius/scripts
Cleanup scripts in root directory
2022-02-11 15:40:53 -05:00
01347a8f53 server/storage/backend: restore original bolt db options after defrag
Problem: Defrag was implemented before custom bolt options were added.
Currently defrag doesn't restore backend options.
For example BackendFreelistType will be unset after defrag.

Solution: save bolt db options and use them in defrag.
2022-02-11 11:01:27 -08:00
029c354316 server/storage/mvcc: fix oss-fuzz issue 44449 2022-02-11 10:57:02 +00:00
9d83325db8 server/auth: fix oss-fuzz issue 44478 2022-02-11 10:51:01 +00:00
bcadd039a1 Merge pull request #13673 from ahrtr/replace_gobin
Replace gobin with go install
2022-02-11 10:26:31 +01:00
72c33d8b05 contrib/mixin: Generate rules, fix tests
* Add Makefile
* Make tests runnable
* Add generated rule manifest file

Signed-off-by: Manuel Rüger <manuel@rueg.eu>
2022-02-10 16:17:03 +01:00
20c89df5e5 Merge pull request #13525 from ahrtr/do_not_wait_ReadyNotify_infinitely
Etcd server shouldn't wait for the ready notification infinitely on startup
2022-02-08 14:50:09 +01:00
900fc8dd7e replace gobin with go install
The repository github.com/myitcv/gobin has already been archived,
and the `go install` command accepts arguments with version suffixs
starting from 1.16 (for example, go install example.com/cmd@v1.0.0).
So there is no reason to continue to use gobin.
2022-02-08 05:41:21 +08:00
a1f3c2c7cc server: Make --v2-deprecation=write-only the default and remove not-yet option 2022-02-02 13:55:52 +01:00
396efd9608 Cleanup scripts in root directory 2022-02-02 13:50:44 +01:00
986a2b51f4 Merge pull request #13636 from serathius/remove-v2-client
Remove v2 server
2022-02-02 11:41:56 +01:00
1986357b4c Merge pull request #13663 from serathius/post-3.5.2
release: Post v3.5.2 release updates and fixes
2022-02-01 18:45:00 -05:00
902dc05014 tests: Update assertAuthority to explain filtering put method requests 2022-02-01 16:47:23 +01:00
43c1631f26 tests: Use cmp.Equal to avoid mutating arguments 2022-02-01 16:47:18 +01:00
ec8d8802fc Merge pull request #13490 from serathius/wal-static-analysis
Implement WAL static analysis to ensure that new entries will be properly annotated
2022-02-01 16:15:07 +01:00
aa76b32a05 release: Post v3.5.2 release updates and fixes 2022-02-01 15:36:45 +01:00
95ae9c19f0 Show db in use when print endpoint status (#13639) 2022-01-29 19:01:45 -08:00
02d4de6200 Merge pull request #13652 from spzala/addmaintainer
Add Marek as a project maintainer
2022-01-28 10:59:20 -10:00
9d1c02cfa0 Merge pull request #13647 from serathius/words
Remove unused .words file
2022-01-28 19:41:41 +01:00
58a6b798b7 Merge pull request #13157 from serathius/travis
Remove travis
2022-01-28 19:39:25 +01:00
28cf7e96c2 Merge pull request #13638 from serathius/bug-template
Add bug report issue template
2022-01-28 10:54:19 -05:00
0c67c5ca49 tools: Move external packages constant to top level 2022-01-28 16:12:00 +01:00
3df14fc24f Document proto annotations scripts 2022-01-28 16:08:28 +01:00
a99c919a9f Merge pull request #13651 from serathius/coverage
Re-enable code coverage upload
2022-01-28 13:54:33 +01:00
178bef917e Merge pull request #13657 from serathius/grpcproxy-pararellize
tests: Parallelize grpcproxy tests
2022-01-28 13:53:35 +01:00
099cffcaa0 tests: Parallelize grpcproxy tests 2022-01-28 12:00:15 +01:00
f4187b4460 tools: Improve proto annotation documentation 2022-01-28 11:40:55 +01:00
c836905a1d proxy: Fix proxy not passing Linearizable field by using GRPC client 2022-01-28 11:39:19 +01:00
1beae5428e Add bug report issue template 2022-01-28 11:24:09 +01:00
2e74e4d636 server/auth: avoid logging for JWT token for a case of failed parsing 2022-01-27 22:33:03 +09:00
a879ccf152 updated servePeers to remvoe the grpc server 2022-01-27 16:22:01 +08:00
1713dc67b5 etcd server shouldn't wait for the ready notification infinitely on startup 2022-01-27 16:19:20 +08:00
7101e8569d Merge pull request #13646 from serathius/changelog
Move changelogs to subdirectory
2022-01-27 09:17:17 +01:00
86a5b1e70a Merge pull request #13650 from serathius/graviton2
Remove badge for disabled test suite
2022-01-27 09:15:58 +01:00
f57e4a207d Add Marek as a project maintainer
Marek is one of the current reviewers. He has consistently
performed all the tasks to earn a top-level maintainer role as
described in the
https://github.com/etcd-io/etcd/blob/main/GOVERNANCE.md#maintainers
Per discussion with existing maintainers, I nominate him for the
maintainer role.
Marek, thank you for your outstanding contributions to the project.
2022-01-26 18:24:49 -05:00
50b09d4f88 Re-enable code coverage upload 2022-01-26 20:18:43 +01:00
4bfcd84259 server: Handle V2Request when analysis WAL entries 2022-01-26 15:50:14 +01:00
d865bb96f1 server: Refactor wal version to use visitor pattern 2022-01-26 15:50:14 +01:00
6d808e5d7d *: Add static validation to etcd_version proto annotation 2022-01-26 15:50:14 +01:00
2d336a11c8 Remove badge for disabled test suite 2022-01-26 15:24:15 +01:00
178bfc5a5a Remove unused .words file 2022-01-26 12:00:27 +01:00
e65b64ad36 Remove .travis.yaml 2022-01-26 11:48:52 +01:00
db5b3a9a6d Move changelogs to subdirectory 2022-01-26 11:46:20 +01:00
d108a241d0 fix panic when restart after removeMember
fix panic when restart after removeMember

fix panic when restart after removeMember
2022-01-26 16:03:00 +08:00
692b3c4cd7 server: Remove most of V2 API 2022-01-25 15:24:13 +01:00
37879eb5f9 test: Migrate WaitMembersMatch to V3 API 2022-01-25 13:56:17 +01:00
682b867653 Merge pull request #13640 from serathius/revision
tests: Move revision tests out of concurrency
2022-01-24 13:57:11 -05:00
c59694d41e test: Migrate WaitMembersForLeader to V3 API 2022-01-24 17:26:51 +01:00
81490c25d1 test: Migrate WaitStarted to V3 API 2022-01-24 17:26:50 +01:00
ee6306b9f9 Migrate RemoveMember and AddMember to V3 API 2022-01-24 17:01:22 +01:00
e9edc5432c *: use T.TempDir to create temporary test directory
The directory created by `T.TempDir()` and is automatically removed when
the test and all its subtests complete.

Reference: https://pkg.go.dev/testing#T.TempDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-01-25 00:00:46 +08:00
3788523a3e tests: Move revision tests out of concurrency 2022-01-24 15:33:30 +01:00
a1fb9ff1e4 Merge pull request #13621 from serathius/integration-v2-api
Remove V2 API usage from Integration tests
2022-01-24 12:28:42 +01:00
f9a8c49c69 Merge pull request #13555 from ahrtr/protect_range_sort
Add protection code for Range when the sortTarget is an invalid value
2022-01-22 16:05:43 +01:00
451ea5406e Merge pull request #13556 from yank1/use-distroless-as-base-image
Use Distroless as base image
2022-01-22 16:03:14 +01:00
17568a19f4 Merge pull request #13568 from horizonzy/avoid-always-put-metaterm
Avoid always update meta term.
2022-01-22 16:02:50 +01:00
f73d625da6 Merge pull request #13633 from spzala/ghactionpermission
Revert CodeQL permission
2022-01-21 17:12:46 -05:00
f8eeecc359 Revert CodeQL permission
Reverting per the latest discussion in the issue 13588 to
test if we can remove the write permission.
2022-01-21 16:45:08 -05:00
32dc022ea4 Merge pull request #13631 from serathius/patch-3
Add required permissions for CodeQL
2022-01-21 14:57:12 +01:00
0ab7c7842e Add required permissions for CodeQL 2022-01-21 14:21:10 +01:00
a53074542b test: Run v2 discovery tests on previous version binary 2022-01-20 14:10:09 +01:00
264fdbb6a1 test: Remove separation between V2 and V3 cluster in integration tests 2022-01-20 14:10:09 +01:00
7b365e48d3 test: Remove usage of V2 Put API in tests 2022-01-20 14:10:09 +01:00
de30257d79 test: Always run server with grpc enabled 2022-01-20 14:10:09 +01:00
51f72915e4 test: Move UseGRPC to member config 2022-01-20 14:10:09 +01:00
87c8e8b868 test: Migrate to ClusterV3 cluster in integration tests 2022-01-20 14:10:09 +01:00
69fc517e56 test: Add StrictReconfigCheck to cluster 2022-01-20 14:10:09 +01:00
98242da5f1 test: Handle adding new members for clusters with TCP enabled 2022-01-20 14:10:09 +01:00
5bcbf77980 tests: Move client to member struct 2022-01-20 14:10:09 +01:00
b8182cd2af Merge pull request #13627 from a523/update-readme
README: fix go version that development required
2022-01-20 10:42:22 +01:00
dc90699db2 README: fix go version that development required 2022-01-20 16:17:10 +08:00
1ec3722ce5 Merge pull request #13626 from ml-/alerts-summary
contrib/mixin: add missing summary to alerts
2022-01-19 17:00:31 -05:00
21687ba013 Merge pull request #13625 from spzala/updatemaintainers
Update maintainers
2022-01-19 14:37:31 -05:00
7460379bad contrib/mixin: add missing summary to alerts
to avoid alert messages being templated with undefined values lets
set summary for alerts that are currently missing one
2022-01-19 19:55:40 +01:00
fff5c11ee9 Update maintainers
Move Brandon Philips to emeritus. Thank you Brandon for your
contributions and leadership to the project.
2022-01-19 13:32:23 -05:00
282e4e6e88 make code more readable. 2022-01-19 22:24:49 +08:00
14a661e643 Merge pull request #13601 from lixd/op-put-lease
mvcc: add a fast return at put method
2022-01-19 14:47:26 +01:00
381752182a Fix for code style
Signed-off-by: yankay <kay.yan@daocloud.io>
2022-01-18 21:13:35 +08:00
15568f4c00 add protection code for Range when the sortTarget is an invalid value 2022-01-18 07:46:37 +08:00
36351744eb Merge pull request #13551 from ahrtr/check_ipv6_for_gateway
format listenning address correctly for IPv6 ip address
2022-01-17 18:42:17 -05:00
8d8247b092 format listenning address correctly for IPv6 ip address 2022-01-18 06:11:33 +08:00
9451a41d90 Merge pull request #13560 from ahrtr/protect_invalid_client_api_version
Add protection code to prevent etcd from panic when the client api version is not valid UTF-8 string
2022-01-17 20:09:59 +01:00
271daa204d Merge pull request #13614 from ptabor/20220217-update-yaml
Update dep: gopkg.in/yaml.v2 v2.2.8 -> v2.4.0 due to: CVE-2019-11254
2022-01-17 20:07:33 +01:00
2d7bc2f59e Merge pull request #13561 from horizonzy/code-clean
Code clean: make rangeKeys close to storeTxnRead.
2022-01-17 16:55:05 +01:00
fdd98477ef Update dep: require gopkg.in/yaml.v2 v2.2.8 -> v2.4.0 due to: CVE-2019-11254 2022-01-17 16:52:58 +01:00
22f142a9f5 Merge pull request #13603 from AdamKorcz/fuzz3
raft: fix out-of-bounds in maybeAppend
2022-01-17 16:11:46 +01:00
23f3bdd184 Empty Commit for CI 2022-01-17 19:04:40 +08:00
7ef4fe3288 raft: fix out-of-bounds in maybeAppend 2022-01-17 10:01:46 +00:00
5b09de33a5 code clean: make rangeKeys close to storeTxnRead. 2022-01-17 11:12:25 +08:00
f8aafea504 add protection code to prevent etcd from panic when the client api version is not valid UTF-8 2022-01-17 06:21:22 +08:00
28b9089de9 Merge pull request #13607 from Jille/log-method
client: retry_interceptor.go: Log the method that failed
2022-01-16 17:02:29 +01:00
87408d6f88 Merge pull request #13605 from ahrtr/fix_ci_test_386
Use test.sh instead of test for linux-386-unit-1-cpu
2022-01-16 16:47:56 +01:00
3710083dc3 retry_interceptor.go: Log the method that failed
When getting warnings from the retry_interceptors that RPCs failed, they
provide very little context as to what exactly failed.

I used this patch to try debugging
https://groups.google.com/g/etcd-dev/c/3hxxr9ktdpM.
2022-01-16 16:46:50 +01:00
b095588446 use test.sh instead of test for linux-386-unit-1-cpu 2022-01-16 14:55:36 +08:00
f4266e2d75 Merge pull request #13575 from AdamKorcz/fuzz1
v2auth: fix out of bounds in test
2022-01-15 23:30:10 -05:00
1d706179be mvcc: add test-case
a test-case for new code-path.
2022-01-16 10:43:15 +08:00
b8c5d44a1d Merge pull request #13382 from ahrtr/public_key_match_issue
The public key doesn't match if any field doesn't match
2022-01-15 17:14:02 +01:00
3814d0800f Merge pull request #13438 from lx1036/patch-2
raft: avoid jump tag to make code more understandable
2022-01-15 17:05:22 +01:00
19cb0a4252 Merge pull request #13519 from ahrtr/enhance_make_mirror_command
Add a new flag "--rev" to make-mirror command to support incremental mirror
2022-01-15 17:02:12 +01:00
1237b3576c Merge pull request #13487 from mrueg/go-1.17.3
*: Bump to go 1.17.6
2022-01-15 17:01:17 +01:00
0285f74aea Merge pull request #13558 from gfuzz-asplos/main
fixing goroutine leaks
2022-01-15 16:58:19 +01:00
b2f6ffdd81 Merge pull request #13595 from serathius/enable-v2
server: --enable-v2 and --enable-v2v3 is decomissioned
2022-01-15 16:48:29 +01:00
401cc1a575 mvcc: add a fast return at put method
return when two leaseID is equal, avoid invalid operations.

Fixes #13600
2022-01-15 13:16:44 +08:00
f75549d53b Merge pull request #13571 from yank1/update-cobra-version
Update Cobra version to 1.2.1
2022-01-14 14:54:28 +01:00
f70c14128d Merge pull request #13597 from mhoffm-aiven/mhoffm-add-forgotten-method-to-printerrpc
ctlv3: add forgotten member promote method to printerRPC
2022-01-14 14:54:00 +01:00
68fa5dcf99 Merge pull request #13549 from songlh-psu/main
fixing the goroutine leaks in TestHashKVWhenCompacting
2022-01-14 13:58:16 +01:00
f2e49b5771 Merge pull request #13562 from timmyyuan/main
Fix goroutine leaks in TestNodeProposeAddDuplicateNode
2022-01-14 13:52:18 +01:00
f72688e248 Merge pull request #13563 from timmyyuan/ting/fix-goroutine-leaks
Fix goroutine leaks in TestCommitPagination
2022-01-14 13:51:55 +01:00
8b91b8296b Merge pull request #13584 from serathius/monotonic
tests: Add integration test for revision monotonic under failure injection
2022-01-14 13:36:13 +01:00
ee5ef42c5c server: --enable-v2 and --enable-v2v3 is decomissioned 2022-01-14 13:19:30 +01:00
357006172d ctlv3: add forgotten member promote method to printerRPC
The printerRPC struct was missing a MemberPromote method, leading to
panic in ectdctl when trying to print it as JSON. This PR fixes that
panic.
2022-01-14 12:53:09 +01:00
3c77c7fd3c Merge pull request #13591 from serathius/codeql
Remove CodeQL errors
2022-01-13 15:21:05 +01:00
4032d4f66a Remove CodeQL errors 2022-01-13 14:29:09 +01:00
e433d12656 Merge pull request #13594 from ahrtr/update_changelog_3.5_for_pull_13501
update CHANGELOG-3.5.md to cover the fix for issue 13494
2022-01-13 09:04:53 +01:00
6ef154e548 update CHANGELOG-3.5.md to cover the fix for issue 13494 2022-01-13 14:55:08 +08:00
f184dfd9dc Merge pull request #13590 from serathius/recordings
README: Cleanup community meetings video recordings
2022-01-12 18:43:59 +01:00
5e06fd40da README: Cleanup community meetings video recordings 2022-01-12 13:39:30 +01:00
eac6d71352 tests: Add integration test for revision monotonic under failure injection 2022-01-12 11:51:12 +01:00
e0a0fdc984 Merge pull request #13572 from microyahoo/update_lease_tools
update dump db tool
2022-01-12 10:33:28 +01:00
868c51b95a Merge pull request #13581 from spzala/versionsupport
Update supported versions and ref to the policy
2022-01-12 10:21:38 +01:00
ce086a4ba6 *: Bump to go 1.17.6
Signed-off-by: Manuel Rüger <manuel@rueg.eu>
2022-01-12 03:13:27 +01:00
746c0ea276 tests/Dockerfile: Update base to ubuntu 21.10
Signed-off-by: Manuel Rüger <manuel@rueg.eu>
2022-01-12 03:00:08 +01:00
cf7e8b3535 go.mod: Bump golang.org/x/net dependency; regenerate go.sum
Bumps golang.org/x/net dependency due to fix CVE-2021-44716
as requested in https://github.com/etcd-io/etcd/pull/13487#issuecomment-997065540

Signed-off-by: Manuel Rüger <manuel@rueg.eu>
2022-01-12 03:00:08 +01:00
9404d523b8 Build locally if docker-test container image does not exist
This should make it easier to bump the golang version
2022-01-12 03:00:08 +01:00
ce50f68166 *: Bump to go 1.17.5 2022-01-12 03:00:08 +01:00
6aac35dd32 v2auth: fix out of bounds in test 2022-01-10 19:06:07 +00:00
1e5bd39571 Update supported versions and ref to the policy
We support current release and two previous minor versions, and so
making changes accordingly. Also, adding link to the details of
the versioning.
2022-01-05 21:36:27 -05:00
a9652b4b4e fixing the leaks in TestStressWatchCancelClose 2022-01-04 17:57:19 -05:00
96a9fd0a1e Merge pull request #13574 from cunnie/defer_cancel
Golang Client docs: defer `cancel()`, avoid erroring
2022-01-03 20:03:22 -05:00
a96f5ee8a1 Merge pull request #13577 from sayap/auth-graceful-disable
Disable auth gracefully without impacting existing watchers
2022-01-03 20:02:21 -05:00
0cc789d81d update dump db tool
Signed-off-by: Liang Zheng <zhengliang0901@gmail.com>
2022-01-01 00:13:33 +08:00
17fd2e7282 Disable auth gracefully without impacting existing watchers
This attempts to fix a special case of the problem described in #12385,
where trying to do `clientv3.Watch` with an expired token would result
in `ErrGRPCPermissionDenied`, due to the failing authorization check in
`isWatchPermitted`. Furthermore, the client can't auto recover, since
`shouldRefreshToken` rightly returns false for the permission denied
error.

In this case, we would like to have a runbook to dynamically disable
auth, without causing any disruption. Doing so would immediately expire
all existing tokens, which would then cause the behavior described
above. This means existing watchers would still work for a period of
time after disabling auth, until they have to reconnect, e.g. due to a
rolling restart of server nodes.

This commit adds a client-side fix and a server-side fix, either of
which is sufficient to get the added test case to pass. Note that it is
an e2e test case instead of an integration one, as the reconnect only
happens if the server node is stopped via SIGINT or SIGTERM.

A generic fix for the problem described in #12385 would be better, as
that shall also fix this special case. However, the fix would likely be
a lot more involved, as some untangling of authn/authz is required.
2021-12-31 14:39:46 +07:00
5620a9c227 Golang Client docs: defer cancel(), avoid erroring
In the sample code demonstrating how to specify a client request
timeout, the `cancel()` is called immediately after the Put, but it
should be deferred instead, giving the Put enough time to complete.

In the canonical Golang context
[docs](https://pkg.go.dev/context#WithTimeout), the sample code sets a
`defer cancel()` immediately after context creation, and with this
commit we adhere to that convention.

fixes:
```json
{
  "level": "warn",
  "ts": "2021-12-29T09:56:42.439-0800",
  "logger": "etcd-client",
  "caller": "v3@v3.5.1/retry_interceptor.go:62",
  "msg": "retrying of unary invoker failed",
  "target": "etcd-endpoints://0xc000213340/localhost:2379",
  "attempt": 0,
  "error": "rpc error: code = Canceled desc = context canceled"
}
```
2021-12-29 14:10:36 -08:00
77bf0a5a9e update cobra version to 1.2.1
Signed-off-by: yankay <kay.yan@daocloud.io>
2021-12-29 17:35:25 +08:00
97d1f935f6 avoid always update meta term. 2021-12-29 11:23:38 +08:00
df8efd3853 Fix goroutine leaks in TestCommitPagination
raft: fix goroutine leaks in TestCommitPagination

The goroutine created with n.run() will leak if we forget to call n.Stop().

We can replay the goroutine leaks by using [goleak](https://github.com/uber-go/goleak):

```
$ cd raft &&  env go test -short -v -timeout=3m --race -run=TestCommitPagination.
... ...
raft2021/12/27 20:47:15 INFO: raft.node: 1 elected leader 1 at term 1
    leaks.go:78: found unexpected goroutines:
        [Goroutine 20 in state select, with go.etcd.io/etcd/raft/v3.(*node).run on top of the stack:
        goroutine 20 [select]:
        go.etcd.io/etcd/raft/v3.(*node).run(0xc00036f260)
                /home/yuanting/work/dev/goprojects/etcd/raft/node.go:344 +0xc1d
        created by go.etcd.io/etcd/raft/v3.TestCommitPagination
                /home/yuanting/work/dev/goprojects/etcd/raft/node_test.go:920 +0x554
        ]
--- FAIL: TestCommitPagination (0.45s)
FAIL
FAIL    go.etcd.io/etcd/raft/v3 0.508s
FAIL
```
2021-12-27 20:55:02 +08:00
e6f28dbeb2 Fix goroutine leaks in TestNodeProposeAddDuplicateNode
raft: fix goroutine leaks in TestNodeProposeAddDuplicateNode

The goroutine created with `n.run()` will leak if we forget to call `n.Stop()`
2021-12-27 20:36:26 +08:00
98b0d901e8 fixing goroutine leaks 2021-12-24 15:57:38 -05:00
f24e0234b3 Use Distroless as base image
Signed-off-by: yankay <kay.yan@daocloud.io>
2021-12-23 21:23:58 +08:00
661e0a91ef added a new flag --rev to make-mirror command to support incremental mirror 2021-12-22 16:59:44 +08:00
a45c73d9b1 resolve the conflict 2021-12-21 17:49:47 -05:00
69279532f4 Merge pull request #13540 from songlh-psu/fixing-3
fixing one panic and two goroutine leaks
2021-12-21 11:03:59 +01:00
1e4a345706 Merge pull request #13545 from dbussink/build-apple-m1
server/etcdmain: add build support for Apple M1
2021-12-21 11:00:58 +01:00
5b0bb07cb0 Merge pull request #13500 from ahrtr/reset_ci_after_reload_db
Set the backend again after recovering v3 backend from snapshot
2021-12-21 10:50:30 +01:00
0bdc660ec2 Merge pull request #13537 from songlh/main
fix potential goroutine leaks
2021-12-21 10:47:54 +01:00
246e7eba09 fixing the goroutine in two unit tests 2021-12-21 04:46:39 -05:00
7ff2c7714e Merge pull request #13546 from justaugustus/debian-base-bullseye
images: Use Kubernetes debian-base:bullseye-v1.1.0 as base image
2021-12-21 10:44:03 +01:00
5e8f50bb09 remove the extra stop 2021-12-17 20:03:19 -05:00
bbb187dcc0 images: Use Kubernetes debian-base:bullseye-v1.1.0 as base image
Signed-off-by: Stephen Augustus <foo@auggie.dev>
2021-12-17 16:06:37 -05:00
ddb9554eec server/etcdmain: add build support for Apple M1
This has been additionally verified by running the tests locally as a
basic smoke test. GitHub Actions doesn't provide MacOS M1 (arm64) yet,
so there's no good way to automate testing.

Ran `TMPDIR=/tmp make test` locally. The `TMPDIR` bit is needed so
there's no really long path used that breaks Unix socket setup in one of
the tests.
2021-12-17 17:35:36 +01:00
42840d0fda Merge pull request #13528 from ahrtr/update_test_remove_redundant_line
Remove the redundant line from test.sh
2021-12-16 11:47:39 +01:00
0098dbf350 fixing two goroutine leaks and one panic 2021-12-15 22:38:25 -05:00
0213b8baed fixing goroutine leaks in testServer 2021-12-15 02:43:49 -05:00
3ebd0a7d00 fixing the goroutine leak in TestBackendClose 2021-12-15 01:54:51 -05:00
d1194977eb fix potential goroutine leaks in TestTxnPanics 2021-12-15 01:22:56 -05:00
793e081a5b remove the redundant line from test.sh 2021-12-10 05:05:48 +08:00
29292aa7bd Merge pull request #13505 from LeoYang90/fix_watchable_runlock
fix watchablestore runlock bug
2021-12-03 12:21:30 +01:00
7be1464ef1 set the backend again after recovering v3 backend from snapshot 2021-12-03 05:52:12 +08:00
170d9b9d73 Merge pull request #13508 from serathius/checkpoints-fix
Lease Checkpoints fix
2021-12-02 16:08:40 +01:00
3e391f4fba Merge pull request #13513 from ahrtr/enhance_etcdctl_make_mirror_log
etcdctl: enhance the make-mirror command to return error asap when invalid flags are provided
2021-12-02 16:05:22 +01:00
48a7aab2bc server: Add lease checkpointing fix information to CHANGELOG 2021-12-02 14:36:57 +01:00
7d10899d7f server: Require either cluster version v3.6 or --experimental-enable-lease-checkpoint-persist to persist lease remainingTTL
To avoid inconsistant behavior during cluster upgrade we are feature
gating persistance behind cluster version. This should ensure that
all cluster members are upgraded to v3.6 before changing behavior.

To allow backporting this fix to v3.5 we are also introducing flag
--experimental-enable-lease-checkpoint-persist that will allow for
smooth upgrade in v3.5 clusters with this feature enabled.
2021-12-02 12:26:47 +01:00
e24796e8eb e2e: Call WithStopSignal on proxyV2 object 2021-12-02 01:02:24 +01:00
8b3405bdb8 etcdctl: enhance the make-mirror command to return error asap with wrong command line parameters 2021-11-30 06:26:11 +08:00
fd77b2700c etcdserver,integration: Store remaining TTL on checkpoint
To extend lease checkpointing mechanism to cases when the whole etcd
cluster is restarted.
2021-11-26 15:17:22 +01:00
48a360aad0 lease,integration: add checkpoint scheduling after leader change
Current checkpointing mechanism is buggy. New checkpoints for any lease
are scheduled only until the first leader change. Added fix for that
and a test that will check it.
2021-11-26 14:34:19 +01:00
7e6c29c198 fix runlock bug 2021-11-26 11:05:36 +08:00
7572a61a39 Merge pull request #13498 from KushalP/upgrade-otel-version
*: Upgrade to use go.opentelemetry.io/otel@v1.2.0
2021-11-24 21:08:29 -05:00
63ff6d403d correct the public key comparison logic 2021-11-25 05:57:55 +08:00
71493bde3e *: Upgrade to use go.opentelemetry.io/otel@v1.2.0
Upgrading from v1.0.1.

Upgrading related dependencies
------------------------------

The following dependencies also had to be upgraded:

- go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.26.1
  From v0.25.0. This gets rid of a transitive dependency on go.opentelemetry.io/otel@v1.0.1.
- google.golang.org/genproto@v0.0.0-20211118181313-81c1377c94b1
2021-11-24 16:03:33 +00:00
e2273f94c4 Merge pull request #13497 from microyahoo/benchmark_not_found
fix etcd benchmark binary not found
2021-11-24 09:34:18 -05:00
7eb4bed254 fix etcd benchmark binary not found
Signed-off-by: Liang Zheng <zhengliang0901@gmail.com>
2021-11-24 09:56:33 +00:00
8f17652c60 Merge pull request #13492 from mitake/changelog-3.5-for-pr-13477
Update CHANGELOG for PR 13477
2021-11-21 14:45:32 -05:00
ae71439037 Update CHANGELOG for PR 13477 2021-11-21 23:04:58 +09:00
7e0248b367 Merge pull request #13461 from qsyqian/etcdctl-command-defrag
etcdctl/ctlv3/command: add use time for defrag command
2021-11-17 13:36:23 -05:00
eccabd237b etcdctl/ctlv3/command: add use time for defrag command 2021-11-16 22:39:31 +08:00
b87793836c Merge pull request #13481 from hexfusion/bump-3.6-cl
CHANGELOG: add experimental-max-learners
2021-11-15 17:42:12 -05:00
23146a9faf CHANGELOG: add experimental-max-learners
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2021-11-15 17:21:32 -05:00
d357f9b361 Merge pull request #13399 from ahrtr/serializable_health_check
Enhance health check endpoint to support serializable request
2021-11-15 11:46:55 -05:00
29c3b0f307 Merge pull request #13377 from hexfusion/add-learner-limit-flag
Add experimental-max-learners flag
2021-11-15 09:49:18 -05:00
09ff05108b enhance health check endpoint to support serializable request 2021-11-15 05:57:54 +08:00
db6cd70b54 Merge pull request #13470 from Clivern/main
Fix undefined io
2021-11-14 16:32:05 -05:00
1577cddda5 Merge pull request #13467 from chaochn47/fix_exclude_alarms
server/etcdserver/api/etcdhttp: exclude the same alarm type activated by multiple peers
2021-11-13 22:10:06 -05:00
d6161ec387 Update CHANGELOG 2021-11-12 14:34:33 -08:00
729af2ad2e fix undefined io 2021-11-10 20:12:28 +01:00
15b0820e2f Merge pull request #13439 from chaochn47/remove_json_iterator_reflect2
client/v2: remove unsafe json-iterator/reflect2
2021-11-09 18:20:32 -05:00
f6f27d32d1 server/etcdserver/api/etcdhttp: exclude the same alarm type activated by multiple peers 2021-11-09 11:33:59 -08:00
b5e4c2d3c4 client/v2: remove unsafe json-iterator/reflect2 2021-11-09 11:16:40 -08:00
63a1cc3fe4 add --experimental-max-learner flag
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2021-11-09 09:52:00 -05:00
6656181d31 Merge pull request #13358 from LeoYang90/fix_genprotobuf
Fix genproto path error:./server/wal/walpb
2021-10-29 23:27:47 +02:00
fd0b98b6c0 Merge pull request #13404 from JmPotato/refine_periodic
v3compactor: refine some code and fix a typo
2021-10-29 23:25:23 +02:00
6c2f5dc78a Merge pull request #13405 from serathius/downgrade-b
Implement single node downgrades
2021-10-29 23:22:10 +02:00
9c28e07588 Merge pull request #13447 from Juneezee/deprecate-ioutil
*: move from io/ioutil to io and os packages
2021-10-29 23:18:36 +02:00
9d47a97b0b server: Remove lock from adapter to avoid deadlock 2021-10-29 12:47:19 +02:00
6c2be0822d tests: Add e2e tests for downgrades 2021-10-29 12:47:19 +02:00
431adc5878 server: Implement storage downgrades
By validating if WAL doesn't include any incompatible entries we can
implement storage downgrades.
2021-10-29 12:47:19 +02:00
335dc98c8d server: Use server version to decide if to downgrade has finished 2021-10-29 12:47:19 +02:00
f5d71fa389 server: Detect when WAL includes unapplied cluster version set to higher version
This is because etcd v3.5 will panic when it encounters
ClusterVersionSet entry with version >3.5.0. For downgrades to v3.5 to
work we need to make sure this entry is snapshotted.
2021-10-29 12:47:19 +02:00
758fc0f8ad server: Depend only on cluster version to detect downgrade
Problem with old code was that during downgrade only members with
downgrade target version were allowed to join. This is unrealistic as
it doesn't handle any members to disconnect/rejoin.
2021-10-29 12:47:17 +02:00
11f7729660 Merge pull request #13450 from etcd-io/fix-1.17
*: fixup go 1.17 bump
2021-10-27 20:19:03 -04:00
a0bdfc4fc9 tests/integration/clientv3: allow time for endpoints to update
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2021-10-27 17:26:30 -04:00
316e62b4e1 *: fixup go 1.17 bump
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2021-10-27 14:26:55 -04:00
2a151c8982 *: move from io/ioutil to io and os packages
The io/ioutil package has been deprecated as of Go 1.16, see
https://golang.org/doc/go1.16#ioutil. This commit replaces the existing
io/ioutil functions with their new definitions in io and os packages.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2021-10-28 00:05:28 +08:00
0acbf2fc85 Merge pull request #13440 from lilic/bump-go-17 2021-10-27 08:12:37 -04:00
e6e279a14d *: Bump go to go v1.17.2 2021-10-27 13:44:54 +02:00
e699a12e15 Merge pull request #13436 from cockroachdb/shralex_test_leadership_transfer
raft: add test for leadership transfer in joint configuration
2021-10-26 14:26:09 +02:00
42789e4440 fix genproto 2021-10-26 16:41:55 +08:00
ea3c86ef5b raft: add test for leadership transfer in joint configuration 2021-10-25 14:10:27 -07:00
3b1ecc4cbe Merge pull request #13412 from Jille/known-peers-metric
etcdserver: Expose metrics with all known peers
2021-10-25 10:08:33 -04:00
02cdd19539 Merge pull request #13435 from chaochn47/kube_apiserver_delete_success_when_etcd_NOSPACE
etcdserver: non-mutating requests pass through quotaKVServer when NOS…
2021-10-24 21:35:32 -07:00
020c4f8ca7 raft: avoid jump tag to make code more understandable 2021-10-24 19:33:22 +08:00
c534a78340 Merge pull request #13437 from gyuho/update-maintainers
MAINTAINERS: update Gyuho's contact email
2021-10-23 06:33:06 -04:00
89ac2b3069 MAINTAINERS: update Gyuho's contact email
Became independent contributor.

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2021-10-22 21:51:06 -07:00
9c6d57918d update CHANGELOG 2021-10-22 16:36:59 -07:00
7b6554fd30 non mutating requests pass through quotaKVServer when NOSPACE 2021-10-22 16:36:37 -07:00
ef1f71a9f6 Merge pull request #13411 from serathius/framework
Move e2e/integration cluster setup to separate package
2021-10-21 17:09:49 +02:00
5991da1534 Merge pull request #13388 from grafana/mixin-rate-interval
contrib/mixin: Update dashboard promql to use $__rate_interval.
2021-10-21 08:14:25 -04:00
38a7d79810 Merge pull request #13430 from grafana/datasource-label
Grafana datasource template should be labelled 'Data Source'.
2021-10-20 20:06:24 -04:00
fead3be933 Grafana datasource template should be labelled 'Data Source'.
Signed-off-by: Tom Wilkie <tom@grafana.com>
2021-10-20 13:42:43 +01:00
8aa6ae9bbb Merge pull request #13361 from vooon/otel-1.0.0
server: update OpenTelemetry to 1.0.1
2021-10-20 14:14:00 +02:00
d127b65f18 Merge pull request #13427 from cfz/main
CHANGELOG: add v3.5 to recommended version list
2021-10-20 06:19:29 -04:00
691dcd51f6 Merge pull request #13339 from ardaguclu/support-zap-console-encoding 2021-10-20 05:39:43 -04:00
ca9b720c1d tests: Move integration setup to separa framework package 2021-10-20 10:34:35 +02:00
cfz
007a775006 CHANGELOG: add v3.5 to recommended version list
Closes #13425
2021-10-20 12:00:42 +08:00
dcd0d3fc9c tests: Extract e2e cluster setup to separate package 2021-10-19 13:06:40 +02:00
547ec8d868 Merge pull request #13419 from lilic/enhance-alerts
contrib/mixin/mixin.libsonnet: Include gRPC method in alert description
2021-10-18 10:48:52 -04:00
c72947d87f Merge pull request #13416 from chaochn47/autoSync_benchmark
add autoSync flag in benchmark tool
2021-10-16 10:57:43 -04:00
02abfbd32e Merge pull request #13424 from chaochn47/fix_gen_proto
scripts/genproto.sh: fix module path of wal proto files
2021-10-16 10:55:08 -04:00
9084acceac tools/benchmark: add autoSync flag 2021-10-15 22:03:23 -07:00
9038e65359 scripts/genproto.sh: fix module path of wal proto files 2021-10-15 22:00:16 -07:00
c0ab5708a5 Merge pull request #13422 from hasbro17/changelog-3.5.1
CHANGELOG: 3.5.1
2021-10-15 17:57:23 -04:00
74d2621266 CHANGELOG: 3.5.1 2021-10-15 14:55:00 -07:00
fbf83a3746 Merge pull request #13421 from hasbro17/update-changelog-3.4.18
CHANGELOG: 3.4.18
2021-10-15 16:46:04 -04:00
f2e7063a83 Merge pull request #13420 from hasbro17/update-changelog-3.3.27
CHANGELOG: 3.3.27
2021-10-15 16:45:42 -04:00
f8c1f7804d CHANGELOG: 3.4.18 2021-10-15 13:27:51 -07:00
a3b17b3d9f CHANGELOG: 3.3.27 2021-10-15 13:13:46 -07:00
aef9131c81 contrib/mixin/mixin.libsonnet: Include gRPC method in alert description
This makes it easier for admin to determine the alert issue.
2021-10-15 15:10:52 +02:00
49a8aa7f49 run fix.sh
To fix dependencies.

Signed-off-by: Vladimir Ermakov <vooon341@gmail.com>
2021-10-13 14:08:27 +03:00
4f4b12d521 server: update OpenTelemetry to 1.0.1
Update API of the OpenTelemetry library and updates gRPC to 1.41.0.

Fixes #13141

Signed-off-by: Vladimir Ermakov <vooon341@gmail.com>
2021-10-13 13:51:58 +03:00
519f62b269 Merge pull request #13407 from hexfusion/fix-grpc-slow
contrib/mixin: omit Defragment method from etcdGRPCRequestsSlow
2021-10-11 13:33:43 -04:00
923f0aa3e7 etcdserver: Expose metrics with all known peers
To make it possible to alert on misconfigured etcd clusters that have
missing/superfluous peers, expose the list of peers as a metric.
This metric can, for example, be compared to the control-plane nodes of
a kubernetes cluster.
2021-10-09 14:27:10 +02:00
0eb72bde2c contrib/mixin: omit Defragment method from etcdGRPCRequestsSlow
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2021-10-08 16:21:46 -04:00
4bcdee5c65 tests: Extract flag init from main_test.go 2021-10-08 22:01:11 +02:00
5b226e0abf Merge pull request #13391 from serathius/downgrade-refactor
Refactor code to make place for downgrade logic
2021-10-08 12:38:25 +02:00
f92b4f9a28 server: Integrate version validation logic into tests 2021-10-08 12:01:54 +02:00
620832a4a5 server: Use panic instead of os.Exit in mustDetectDowngrade 2021-10-08 12:01:54 +02:00
d039f016c5 server: Move Storage interface to storage package 2021-10-08 12:01:53 +02:00
703df1c491 server: Move wal versioning functions to wal package 2021-10-08 12:01:53 +02:00
e47c3c22d2 server: Move downgrade API logic into version package 2021-10-08 12:01:51 +02:00
1e5e57f268 server: Move downgrade detection code to version package 2021-10-08 10:41:37 +02:00
378159af30 server: Refactor cluster version decision code 2021-10-08 10:41:37 +02:00
2de36c0596 server: Cover monitor with upgrade unit tests 2021-10-08 10:41:35 +02:00
d7fa8022e6 Merge branch 'main' into support-zap-console-encoding 2021-10-08 11:00:57 +03:00
471a804665 Remove the unnecessary code
Signed-off-by: JmPotato <ghzpotato@gmail.com>
2021-10-08 14:59:41 +08:00
0504ecdc70 Refine some code and fix a typo
Signed-off-by: JmPotato <ghzpotato@gmail.com>
2021-10-08 12:07:02 +08:00
b28146f56f Merge pull request #13401 from ernado/testutil/populate-logger-dir-all
client/pkg/fileutil: add missing logger to {Create,Touch}DirAll
2021-10-07 19:06:45 +02:00
33623c3f03 Merge pull request #13224 from sakateka/issue-7798-netutil-fix
netutil: add url comparison without resolver to URLStringsEqual
2021-10-07 18:19:42 +02:00
3644c9d67b client/pkg/fileutil: add missing logger to {Create,Touch}DirAll
Also populate it to every invocation.
2021-10-07 17:53:59 +03:00
75747f24bc Add unix socket test to TestNewURLsValue 2021-10-07 11:59:32 +02:00
d93b7c8cb1 pkg/types: Support Unix sockets in NewURLS
Resolves #12450
This commits adds support to unix/unixs socket URLs, which currently
fail with the message "URL address does not have the form "host:port".
It also replaces the work started in #11747.
2021-10-07 11:59:32 +02:00
3f639e59e4 Merge pull request #13398 from geetasg/main
CHANGELOG updating changelogs for etcd_disk_defrag_inflight backport
2021-10-06 11:15:41 -07:00
0804aae754 CHANGELOG updating changelogs for etcd_disk_defrag_inflight backport 2021-10-06 11:09:50 -07:00
b571ec5e67 Merge pull request #13371 from geetasg/main
storage/backend: Add a gauge to indicate if defrag is active
2021-10-05 11:01:49 -07:00
98427d2bed contrib/mixin: Update dashboard queries to use $__rate_interval
A global query variable was introduced in Grafana 7.2 which is "almost always right" for `rate`, `irate`, and `increase` function calls in promql.
2021-10-04 15:02:11 -07:00
205720c696 CHANGELOG-3.6 Add etcd_disk_defrag_inflight to indicate if defrag is active 2021-10-04 12:52:20 -07:00
1d73f3c6f2 Merge pull request #13384 from hexfusion/bump-cl-3.3.26
CHANGELOG: 3.3.26
2021-10-04 00:12:25 -04:00
168b074383 CHANGELOG: 3.3.26
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2021-10-03 23:43:51 -04:00
e66ecd758e Merge pull request #13383 from hexfusion/bump-cl-3.4.17
CHANGELOG: 3.4.17
2021-10-03 23:26:28 -04:00
741e19fb50 CHANGELOG: 3.4.17
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2021-10-03 22:22:44 -04:00
2d7a7d7da4 CHANGELOG - etcd_disk_defrag_inflight
Add a gauge to indicate if defrag is active
2021-10-02 14:53:17 -07:00
5703bb27d7 Merge pull request #13376 from hexfusion/bump-base
Dockerfile: bump debian image to bullseye-20210927
2021-10-01 12:43:57 -04:00
aab7829048 Dockerfile: bump debian bullseye-20210927
fixes: CVE-2021-3711, CVE-2021-35942, CVE-2019-9893

Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2021-09-30 13:56:11 -04:00
f3cfe0f1a5 Merge pull request #13359 from serathius/authority
Fix http2 authority header in single endpoint scenario
2021-09-29 22:38:36 +02:00
d52d7fc21e Update changelog with information about authority header fix 2021-09-29 16:25:01 +02:00
c929a917b6 client: Use first endpoint as http2 authority header 2021-09-29 14:41:35 +02:00
ec419f8613 tests: Add grpc authority e2e tests 2021-09-29 14:41:33 +02:00
90932324b1 client: Add grpc authority header integration tests 2021-09-29 12:42:16 +02:00
c3cc22c60d tests: Allow configuring integration tests to use TCP 2021-09-29 12:42:16 +02:00
77cc91e0b2 test: Use unique number for grpc port 2021-09-29 12:42:16 +02:00
5364758181 tests: Cleanup member interface by exposing Bridge directly 2021-09-29 12:42:16 +02:00
451eb5d711 tests: Make using bridge optional 2021-09-29 12:42:14 +02:00
f2dd5d80a1 tests: Rename grpcAddr to grpcURL to imply that it includes schema 2021-09-28 16:45:06 +02:00
391d662f77 tests: Remove bridge dependency on unix 2021-09-28 16:45:06 +02:00
3df2727746 Merge pull request #13343 from ardaguclu/use-ctlcontext-envmap
Decouple prefixArgs from os.Env dependency
2021-09-28 10:40:31 +02:00
817d2f40d1 storage/backend: Add a gauge to indicate if defrag is active 2021-09-27 17:02:13 -07:00
752a206da4 Merge pull request #13238 from sakateka/etcdserver-logs
etcdserver: remove code duplication from the peer.send func
2021-09-27 09:01:34 +02:00
b272b98b79 netutil: make a raw URL comparison part of the urlsEqual function 2021-09-26 13:58:21 +07:00
ca5bad0e83 Merge pull request #13261 from njhill/sorting
etcdserver,clientv3: server-side ignore sort-ascend-key for range reqs
2021-09-25 17:47:10 +02:00
183cc52bc3 Merge pull request #13230 from serathius/storage
Move storage bootstrap to its package
2021-09-25 17:34:30 +02:00
5103e9d085 Merge pull request #13366 from lx1036/patch-1
mvcc: simplify watchable_store addVictim code
2021-09-24 21:25:07 -04:00
e7a09db019 mvcc: simplify watchable_store addVictim code 2021-09-24 17:49:03 +08:00
3c6e09f932 Handle empty log-format gracefully 2021-09-23 08:17:29 +03:00
ec252d06c9 Return error when log-format is invalid 2021-09-22 19:45:08 +03:00
e647995a38 Add zap encoding configurable
Json encoding is the default zap encoding value and can not be changeable.
This PR enables configuring zap encoding to console via new flag `log-format`.
2021-09-22 15:48:47 +03:00
69015027b6 Merge pull request #13311 from Nordix/etcd-client-solaris-build
client/pkg/v3: fixes Solaris build of transport
2021-09-21 12:21:16 +02:00
35db0a5817 server: Refactor databaseFileMissing function 2021-09-20 12:21:36 +02:00
39f92a32ca server: Move member dir creation up and introduce Close method to bootstrap structs 2021-09-20 12:21:36 +02:00
a206ad2c96 server: Rename GetIDs to GetEffectiveNodeIDsFromWalEntries 2021-09-20 12:21:36 +02:00
a450dc7f91 server: Rename function to NewConfigChangeEntries indicating we are not reading it from wal 2021-09-20 12:21:36 +02:00
4884e7d8cf server: Move wal bootstrap from cluster to storage 2021-09-20 12:21:35 +02:00
d3abf774ea server: Move cluster backend setting up the call hierarchy 2021-09-20 12:20:21 +02:00
049e2d6ec0 server: Move raft up the bootstrap hierarchy 2021-09-20 12:20:19 +02:00
138afa5be9 server: Split wal, cluster and raft bootstraping 2021-09-20 12:19:10 +02:00
5d044563a8 server: Move raft and wal up the bootstrap hierarchy 2021-09-20 12:19:10 +02:00
8b0d8ea2af server: Move cluster up the bootstrap hierarchy 2021-09-20 12:19:09 +02:00
7c8f7166e7 server: Move bootstraping backend from snapshot to bootstrapBackend 2021-09-20 12:17:33 +02:00
0211f5a2e8 server: Move snapshot recovery to separate function 2021-09-20 12:07:42 +02:00
c97ab8f5e0 server: Move cluster up the bootstrap hierarchy 2021-09-20 12:07:41 +02:00
648bac833f server: Move bootstrappedRaft up in file 2021-09-20 12:06:19 +02:00
6a4ea70aef server: Move clusterID and nodeID up the bootstrap hierarchy 2021-09-20 12:06:18 +02:00
db06a4ab28 server: Move wal bootstrap up the hierarchy 2021-09-20 12:04:44 +02:00
aa0c050003 etcdserver: Add more hierarchy bootstap introducing a separate storage bootstrap step 2021-09-20 12:01:45 +02:00
6c8a4fdcc5 server: Rename bootstrappedWal variables to bwal to separate it from wal package 2021-09-20 11:01:26 +02:00
97756e325c Merge pull request #13338 from serathius/go1.16.8
Stop using golang tip version in CI
2021-09-14 13:33:11 -04:00
b2d5168487 Stop using tip golang version in CI 2021-09-14 16:16:08 +02:00
65686efa4a Decouple prefixArgs from os.Env dependency
prefixArgs uses os.Setenv in e2e tests instead envMap.
This creates overwrites in some test cases and have an impact
on test quality and isolation between tests.
This PR uses ctlcontext envMap in each tests with high priority
and merges os environment variables with low priority.
2021-09-13 12:28:56 +03:00
c2937d78d2 Merge pull request #13200 from serathius/downgrade-storage
Implement schema migration and panic when trying to downgrade storage
2021-09-10 10:45:16 +02:00
78463237d4 Merge branch 'main' into etcd-client-solaris-build 2021-09-10 11:31:44 +03:00
79f6faa5c7 Apply suggestions from code review
Co-authored-by: Lili Cosic <cosiclili@gmail.com>
2021-09-10 10:16:48 +02:00
66d05e5496 Try updating storage version immidietly after cluster version is set 2021-09-10 10:16:48 +02:00
ff3729c4d5 server: Implement storage schema migration to follow cluster version change and panic if unknown storage version is found
Storage version should follow cluster version. During upgrades this
should be immidiate as storage version can be always upgraded as storage
is backward compatible. During downgrades it will be delayed and will
require time for incompatible changes to be snapshotted.

As storage version change can happen long after cluster is running, we
need to add a step during bootstrap to validate if loaded data can be
understood by migrator.
2021-09-10 10:16:48 +02:00
0d15ff57e6 server: Implement schema migrations 2021-09-10 10:16:48 +02:00
9d81dde082 server: Extract notifier struct 2021-09-10 10:16:48 +02:00
58fb625d12 Merge pull request #13334 from LeoYang90/fix_IsOptsWithFromKey
fix IsOptsWithFromKey
2021-09-10 10:15:25 +02:00
ad69fe0f40 fix IsOptsWithFromKey
fix IsOptsWithFromKey

fix IsOptsWithFromKey

fix IsOptsWithFromKey

fix IsOptsWithFromKey

fix IsOptsWithFromKey
2021-09-10 00:44:52 +08:00
884e7ddb14 Merge pull request #13318 from LeoYang90/fix-rw-benchmark
rw benchmark add val-size
2021-09-08 19:00:40 -04:00
af22382777 Merge pull request #13321 from patrocinio/main
Fix a few typos
2021-09-08 09:48:33 +02:00
a08cc733bb Merge pull request #13308 from mitake/auth-old-rev 2021-09-07 23:25:12 +09:00
91a5089d17 Merge pull request #13288 from ben1009/etcd-wal-doc
doc, log: fix typo in wal doc, log
2021-09-06 19:47:44 -04:00
2a750a8dba *: implement a retry logic for auth old revision in the client 2021-09-05 01:13:52 +09:00
87f1dc7e40 Fix a few typos 2021-09-03 16:09:09 -04:00
ceb23c9d9b rw benchmark add val-size 2021-09-02 21:11:19 +08:00
af10e8791f fix typo in wal doc, log:
- fix logs in wal Repair

- unify broken file name to val
2021-08-31 11:59:05 +08:00
a4a82cc982 Merge pull request #13248 from lilic/add-sampling-rate
server: Add sampling rate to distributed tracing
2021-08-30 08:31:00 -04:00
810f489017 server: Add sampling rate to distributed tracing
ExperimentalDistributedTracingSamplingRatePerMillion is the
number of samples to collect per million spans.
Defaults to 0.
2021-08-30 13:55:35 +02:00
af626ebfde client/pkg/v3: fixes Solaris build of transport
Add empty implementation for reuse port socket option since Solaris does not
support SO_REUSEPORT.
2021-08-30 11:44:02 +03:00
ef81030105 Merge pull request #13262 from r-ashish/main
client/v3: refresh the token when ErrUserEmpty is received while retrying
2021-08-26 22:36:19 +09:00
6d300fd38b client/v3: refresh the token when ErrUserEmpty is received while retrying
To fix a bug in the retry logic caused when the auth token is cleared after receiving `ErrInvalidAuthToken` from the server and the subsequent call to `getToken` also fails due to some reason (eg. context deadline exceeded).
This leaves the client without a token and the retry will continue to fail with `ErrUserEmpty` unless the token is refreshed.
2021-08-25 11:27:19 +08:00
6a32bbad75 Merge pull request #13239 from sakateka/zap_raft
etcdserver: add zap.AddCallerSkip in NewRaftLoggerZap
2021-08-21 14:11:05 -04:00
4739d3e9d3 Merge pull request #13252 from yuzhiquan/fix-always-true-or-false
etcdserver: remove always true or false in if statement
2021-08-21 14:09:43 -04:00
ab9563dc8e Merge pull request #13290 from spzala/benchmarkput
Benchmark: remove redundant function call
2021-08-16 12:12:20 -04:00
55525e3cc5 Benchmark: remove redundant function call
Remove the redundancy as HashKV func is being called twice.
2021-08-12 09:56:38 -04:00
ea24fb8507 Merge pull request #13282 from yuzhiquan/fix-typo-migrate
migrate_command: Fix typo in migrate
2021-08-09 11:48:10 -04:00
d0b9572fde fix typo in migrate 2021-08-09 17:55:43 +08:00
706f256a05 Merge pull request #13279 from dengziming/typo
MINOR: Fix typos(hearbeat -> heartbeat)
2021-08-08 18:07:52 -04:00
a286f5bb99 MINOR: Fix typos(hearbeat -> heartbeat) 2021-08-07 11:41:13 +08:00
03ffa76db7 Merge pull request #13278 from mrueg/cleanup-todos
Cleanup remaining TODOs for/past 3.5 release
2021-08-06 10:51:51 -04:00
c9b4c866ce Cleanup remaining TODOs for/past 3.5 release 2021-08-06 13:29:25 +02:00
873f3691f1 Merge pull request #13216 from serathius/wal
Annotate proto messages with version and detect etcd version generated the wal
2021-08-06 10:58:57 +02:00
b448daa698 Merge pull request #13275 from lilic/add-peer-dashboard
contrib/mixin/mixin.libsonnet: Add dashboard for peer round trip time
2021-08-05 08:27:38 -04:00
55b697c528 contrib/mixin/mixin.libsonnet: Add dashboard for peer round trip time
This helps users debug firing alerts.
2021-08-05 13:15:34 +02:00
e591fcba33 Merge pull request #13220 from serathius/migrateforce
etcdutl: Implement migrate --force command
2021-08-04 22:50:46 +02:00
b4b50f7852 etcdutl: Implement migrate --force command
Co-authored-by: nic-chen <33000667+nic-chen@users.noreply.github.com>
Co-authored-by: Heisenberg <yuzhiquanlong@gmail.com>
2021-08-04 17:58:18 +02:00
c8c7fc49b8 Merge pull request #13270 from serathius/release-test
*: Bump release tests to use v3.5.0
2021-08-04 11:10:30 -04:00
0ae9f0625c *: Bump release tests to use v3.5.0 2021-08-04 13:41:12 +02:00
1b4e54c238 api: Annotate proto messages and use it to detect etcd version that generated wal
Co-authored-by: Lili Cosic <cosiclili@gmail.com>
2021-08-04 13:36:08 +02:00
1e46145b29 Merge pull request #13268 from serathius/storage-min
Move storage bootstrap dependencies to storage package
2021-08-03 17:28:36 +02:00
1da6c71321 Merge pull request #13256 from Haimantika/replacejwtgo
Replace github.com/form3tech-oss/jwt-go with https://github.com/golang-jwt/jwt
2021-08-03 10:17:43 -04:00
55b7b74589 Merge pull request #13265 from spzala/missingprnum
CHANGELOG: add missing PR number
2021-08-03 09:11:47 -04:00
83a325ac46 server: Move all functions needed for storage bootstrap to storage package
This is prerequestite to move storage bootstrap, splitted to separate PR
to make it easier to review.
2021-08-03 13:09:15 +02:00
23b742cfd3 server: Remove Quota direct dependency on EtcdServer 2021-08-03 12:48:41 +02:00
44b8ae145b etcdserver: Move datadir and wal to storage package 2021-08-03 12:47:37 +02:00
c10d50c4b3 Replace github.com/form3tech-oss/jwt-go with https://github.com/golang-jwt/jwt
Signed-off-by: Haimantika Mitra <haimantikamitra@gmail.com>

Made required adjustments to the go.sum file

Signed-off-by: Haimantika Mitra <haimantikamitra@gmail.com>

Changed go.sum file in the server directory

Signed-off-by: Haimantika Mitra <haimantikamitra@gmail.com>

Removed the white space

Signed-off-by: Haimantika Mitra <haimantikamitra@gmail.com>

Made required changes

Signed-off-by: Haimantika Mitra <haimantikamitra@gmail.com>

Trying to fix the fails

Signed-off-by: haimantika mitra <haimantikamitra@gmail.com>

Removed error

Signed-off-by: haimantika mitra <haimantikamitra@gmail.com>

Fixed bill-of-materials.json file

Signed-off-by: haimantika mitra <haimantikamitra@gmail.com>

Changed go.mod with recent version

Signed-off-by: haimantika mitra <haimantikamitra@gmail.com>

Newer version changes

Signed-off-by: haimantika mitra <haimantikamitra@gmail.com>

Changes to etcdutl directory

Signed-off-by: haimantika mitra <haimantikamitra@gmail.com>
2021-08-03 13:49:47 +05:30
5beca68a11 Add missing PR number
Add missing PR number in the changelog entry.
2021-08-02 17:19:21 -04:00
da34e9bf30 Merge pull request #13245 from serathius/makefile
*: Cleanup Makefile
2021-08-02 10:24:33 -04:00
c58d7218f6 Merge pull request #13255 from discordianfish/mixin-configure-cluster-label
Mixin: Support configuring cluster label
2021-08-02 09:51:27 -04:00
2526463e44 Merge pull request #13236 from roytman/expensiveRequest
etcdserver: configure "expensive" requests duration
2021-08-02 09:33:43 -04:00
eac75c28ae Apply suggestions from code review
Co-authored-by: Lili Cosic <cosiclili@gmail.com>
2021-08-01 00:20:50 +07:00
99182f5404 etcdserver,clientv3: server-side ignore sort-ascend-key for range requests
A client-side optimization was made in #6100 to filter ascending key sorts to avoid an unnecessary re-sort since this is the order already returned by the back-end logic.

It seems to me that this really belongs on the server side since it's tied to the server implementation and should apply for any caller of the kv api (for example non-go clients).

Related, the client/v3 syncer depends on this default sorting which isn't explicit in the kv api contract. So I'm proposing the required sort parameters be included explicitly; it will take the fast path either way.
2021-07-30 15:02:15 -07:00
7885f2a951 Mixin: Support configuring cluster label 2021-07-29 17:54:14 +02:00
90773edb10 remove always true in if statement 2021-07-29 14:33:10 +08:00
4cbb949595 Merge pull request #13203 from yishuT/client-race
client: call .Endpoints() in dial() in client/v3/client.go instead of accessing cfg.Endpoints directly
2021-07-29 00:06:58 -04:00
9182a3c200 Merge pull request #13237 from tangcong/fix-auto-tls
fix self-signed-cert-validity parameter cannot be specified in the co…
2021-07-28 13:55:21 -04:00
8929b8ca46 CHANGELOG: update for 13237 2021-07-29 00:29:11 +08:00
8a3c43827b fix self-signed-cert-validity parameter cannot be specified in the config file 2021-07-29 00:13:13 +08:00
f49ef071eb Merge pull request #13214 from halleyshx/update_test_egrep
update makefile for test egrep
2021-07-28 09:44:42 -04:00
def6f4ce90 Merge pull request #13246 from yuzhiquan/wrong-args
etcdctl|etcdutl: Invaild args
2021-07-28 09:05:23 -04:00
2a5dd39d79 invaild args 2021-07-28 11:39:54 +08:00
2bcfc1ae2e update makefile for test egrep
add 'FAIL:' to egrep
```shell
[root@LF-136-9 etcd]# egrep "(--- FAIL:|DATA RACE|panic: test timed out|appears to have leaked)" -B50 -A10 test-MTYyNjIyOTc0MQo.log
[root@LF-136-9 etcd]# egrep "(--- FAIL:|FAIL:|DATA RACE|panic: test timed out|appears to have leaked)" -B50 -A10 test-MTYyNjIyOTc0MQo.log
ok    go.etcd.io/etcd/server/v3/auth  3.247s
ok    go.etcd.io/etcd/server/v3/config  0.047s
ok    go.etcd.io/etcd/server/v3/datadir 0.035s
ok    go.etcd.io/etcd/server/v3/embed 1.944s
ok    go.etcd.io/etcd/server/v3/etcdmain  0.326s
FAIL  go.etcd.io/etcd/server/v3/etcdserver [build failed]
?     go.etcd.io/etcd/server/v3/etcdserver/api  [no test files]
ok    go.etcd.io/etcd/server/v3/etcdserver/api/etcdhttp 0.110s
ok    go.etcd.io/etcd/server/v3/etcdserver/api/membership 0.479s
ok    go.etcd.io/etcd/server/v3/etcdserver/api/rafthttp 0.251s
ok    go.etcd.io/etcd/server/v3/etcdserver/api/snap 0.045s
?     go.etcd.io/etcd/server/v3/etcdserver/api/snap/snappb  [no test files]
ok    go.etcd.io/etcd/server/v3/etcdserver/api/v2auth 1.470s
ok    go.etcd.io/etcd/server/v3/etcdserver/api/v2discovery  0.088s
ok    go.etcd.io/etcd/server/v3/etcdserver/api/v2error  0.034s
ok    go.etcd.io/etcd/server/v3/etcdserver/api/v2http 0.128s
ok    go.etcd.io/etcd/server/v3/etcdserver/api/v2http/httptypes 0.033s
?     go.etcd.io/etcd/server/v3/etcdserver/api/v2stats  [no test files]
ok    go.etcd.io/etcd/server/v3/etcdserver/api/v2store  0.068s
?     go.etcd.io/etcd/server/v3/etcdserver/api/v2v3 [no test files]
?     go.etcd.io/etcd/server/v3/etcdserver/api/v3alarm  [no test files]
?     go.etcd.io/etcd/server/v3/etcdserver/api/v3client [no test files]
ok    go.etcd.io/etcd/server/v3/etcdserver/api/v3compactor  1.793s
?     go.etcd.io/etcd/server/v3/etcdserver/api/v3election [no test files]
?     go.etcd.io/etcd/server/v3/etcdserver/api/v3election/v3electionpb  [no test files]
?     go.etcd.io/etcd/server/v3/etcdserver/api/v3election/v3electionpb/gw [no test files]
?     go.etcd.io/etcd/server/v3/etcdserver/api/v3lock [no test files]
?     go.etcd.io/etcd/server/v3/etcdserver/api/v3lock/v3lockpb  [no test files]
?     go.etcd.io/etcd/server/v3/etcdserver/api/v3lock/v3lockpb/gw [no test files]
ok    go.etcd.io/etcd/server/v3/etcdserver/api/v3rpc  0.089s
ok    go.etcd.io/etcd/server/v3/etcdserver/cindex 0.045s
ok    go.etcd.io/etcd/server/v3/lease 3.324s
ok    go.etcd.io/etcd/server/v3/lease/leasehttp 2.096s
?     go.etcd.io/etcd/server/v3/lease/leasepb [no test files]
?     go.etcd.io/etcd/server/v3/mock/mockstorage  [no test files]
?     go.etcd.io/etcd/server/v3/mock/mockstore  [no test files]
?     go.etcd.io/etcd/server/v3/mock/mockwait [no test files]
ok    go.etcd.io/etcd/server/v3/mvcc  8.805s
ok    go.etcd.io/etcd/server/v3/mvcc/backend  1.983s
?     go.etcd.io/etcd/server/v3/mvcc/backend/testing  [no test files]
?     go.etcd.io/etcd/server/v3/mvcc/buckets  [no test files]
?     go.etcd.io/etcd/server/v3/proxy/grpcproxy [no test files]
?     go.etcd.io/etcd/server/v3/proxy/grpcproxy/adapter [no test files]
?     go.etcd.io/etcd/server/v3/proxy/grpcproxy/cache [no test files]
ok    go.etcd.io/etcd/server/v3/proxy/httpproxy 0.046s
ok    go.etcd.io/etcd/server/v3/proxy/tcpproxy  0.035s
?     go.etcd.io/etcd/server/v3/verify  [no test files]
ok    go.etcd.io/etcd/server/v3/wal 0.513s
ok    go.etcd.io/etcd/server/v3/wal/walpb 0.045s
FAIL
FAIL: (code:2):
  % (cd server && env go test -short -timeout=3m --race --cpu=16 ./...)
FAIL: 'unit' failed at Wed Jul 14 10:29:37 CST 2021
```
2021-07-28 10:10:40 +08:00
77a5072b69 client: call .Endpoints() in dial() in client/v3/client.go instead of accessing cfg.Endpoints directly
0cdd558361/client/v3/client.go (L299) accesses
endpoints without acquiring lock. Fix it to call Endpoints()

Fix #13201
2021-07-27 15:55:22 -07:00
7b5f8fc71c *: Cleanup Makefile
* Move manual docker tests to ./tests/manual
* Move manual docker makefile targets to ./tests/manual/Makefile
* Remove unused makefile rules
2021-07-27 17:32:39 +02:00
2a26f7ae4c etcdserver: configure "expensive" requests duration
When a unary request takes more than predefined duration, this request
is defined as "expensive" and a warning is printed. The expensive request
duration is hard-coded to 300 ms. It can be not enough for example
for transactions with a lot of operations. The warnings just blow up
the log files and reduce throughput.

This fix allows user to configure the "expensive" request duration.

Signed-off-by: Alexey Roytman <roytman@il.ibm.com>
2021-07-27 08:33:44 +03:00
53d234f1fe Merge pull request #13190 from serathius/backend
Introduces Backend interfaces for alarm and auth bucket
2021-07-23 15:07:14 +02:00
baf594b24a etcdserver: add zap.AddCallerSkip in NewRaftLoggerZap
The file `zap_raft.go` adds the raft.Logger proxy logger on top of `*zap.Logger`.
Adding a proxy requires adding the option `zap.AddCallerSkip(1)`,
so that the logging message specifies the correct caller,
two of the three constructors in the `zap_raft.go` adds this option.
This commit fixes the third constructor so that it also adds `zap.AddCallerSkip`.

Before fix:
`{"level":"info","ts":"2021-07-22T17:46:01.435Z","logger":"raft","caller":"etcdserver/zap_raft.go:77","msg":"bd07d29169ff0c5a [logterm: 2, index: 8, vote: 38447ba545569bbe] ignored MsgPreVote from c7baeaad79d6d5ed [logterm: 2, index: 8] at term 2: lease is not expired (remaining ticks: 10)"}`

After fix:
`{"level":"info","ts":"2021-07-22T17:46:51.227Z","logger":"raft","caller":"raft/raft.go:859","msg":"bd07d29169ff0c5a [logterm: 2, index: 8, vote: c7baeaad79d6d5ed] ignored MsgPreVote from 38447ba545569bbe [logterm: 2, index: 8] at term 2: lease is not expired (remaining ticks: 9)"}`
2021-07-23 00:36:15 +07:00
daf7e0350a etcdserver: remove code duplication from the peer.send func
During the refactoring process, duplicate logging
of the send buffer overflow event was added.
Each of these log lines logs exactly the same information, the logging
context is sufficient to distinguish the cause.
Additionally, the unnecessary context (in parentheses) in the log
message was removed, which was necessary without the zap context (with
the old logger), but now only confuses.
2021-07-22 23:15:20 +07:00
bc16461995 server: Use zaptest in bucket tests and move backendMock to separate file 2021-07-20 18:12:02 +02:00
a0554a6bd3 etcdserver: Create AuthBackend interface 2021-07-20 18:09:53 +02:00
6cd3633543 etcdserver: Rename membershipStore to membershipBackend 2021-07-20 17:56:52 +02:00
2f31cc3fbc etcdserver: Create AlarmBackend interface 2021-07-20 17:53:44 +02:00
a97e48e08d Cleanup references to bucket module 2021-07-20 17:50:47 +02:00
b922a28622 netutil: add url comparison without resolver to URLStringsEqual
If one of the nodes in the cluster has lost a dns record,
restarting the second node will break it.
This PR makes an attempt to add a comparison without using a resolver,
which allows to protect cluster from dns errors and does not break
the current logic of comparing urls in the URLStringsEqual function.
You can read more in the issue #7798

Fixes #7798
2021-07-19 01:31:21 +07:00
a1fd98c6b0 Merge pull request #13221 from lilic/adjust-alert-syntax 2021-07-18 14:27:17 -04:00
85f7b3c406 contrib/mixin/mixin.libsonnet: Unify alerting description 2021-07-16 15:25:53 +02:00
28f86ee2cb Merge pull request #13198 from serathius/bootstrap2
etcdserver: Restructure storage packages to make place for schema
2021-07-15 15:57:15 +02:00
484f39a906 server: Add changelog entries for new storage package 2021-07-15 13:52:14 +02:00
2d059d77a8 Merge pull request #13218 from serathius/release-test
test: Bump release tests to use 3.5.0
2021-07-14 19:12:13 +02:00
027d8efa25 test: Bump release tests to use 3.5.0
Using cut to split by '-' to remove `-rc.0` suffix.
2021-07-14 13:24:50 +02:00
3317716faf workflow: add workflow to invoke script that measures percentage of commits with failed status
The workflow runs on a cron schedule on a weekly basis - once every week

Fixes #13167
2021-07-13 18:50:55 +05:30
2b796a0c9a scripts: add script to measure percentage of commits with failed status
This is to start measuring the test flakiness and see the numbers improving once we improve and deflake flaky tests

Fixes #13167
2021-07-13 18:42:06 +05:30
1ad2150220 Merge pull request #13197 from hainesc/main
Use method const in package http instead of literal
2021-07-13 13:55:39 +02:00
f6534f1e92 server: Move setting storage version to schema 2021-07-12 15:37:21 +02:00
5b6f4579fb server: Rename buckets to schema 2021-07-12 15:37:21 +02:00
5e40a8b00c server: Create storage package and move mvcc files to it 2021-07-12 15:37:21 +02:00
ef6c276fae etcdserver: Move server bootstraping to one file 2021-07-12 15:37:21 +02:00
a2274f55af Merge pull request #13204 from serathius/flakes
test: Prevent TestMaintenanceSnapshotWithVersionVersion & TestSaveSnapshotVersion from flaking
2021-07-12 15:33:44 +02:00
97f2831801 Merge pull request #13172 from cfz/fix-auth-store-recover
server/auth: enable tokenProvider if recoved store enables auth
2021-07-11 21:27:15 +09:00
cfz
b12f8c12ce server/auth: enable tokenProvider if recoved store enables auth
we found a lease leak issue:
if a new member(by member add) is recovered by snapshot, and then
become leader, the lease will never expire afterwards. leader will
log the revoke failure caused by "invalid auth token", since the
token provider is not functional, and drops all generated token
from upper layer, which in this case, is the lease revoking
routine.
2021-07-11 01:17:08 +08:00
9860e1bac7 Merge pull request #13171 from spzala/updatereadme
README: link maintainers role details
2021-07-10 11:12:29 -04:00
e21cf4ef02 tkest: Prevent TestMaintenanceSnapshotWithVersionVersion & TestSaveSnapshotVersion from flaking
When running 100 times in row those tests flaked around 10-20%. Based on
some experimentation 10 keys was enough to ensure that wal snapshot is
created and prevented any flakes.
2021-07-09 13:38:40 +02:00
1bf75117e9 Merge pull request #13199 from ptabor/20210708-maintainers
Add Lili, Marek & Wilson as etcd reviewers.
2021-07-09 09:17:27 +02:00
0cdd558361 Merge pull request #13188 from ahrtr/fix_excluded_alarm_issue
Skip empty query value(alarm) from the query parameter
2021-07-08 10:11:14 -04:00
fa86bc542e Add Lili, Marek & Wilson as etcd reviewers. 2021-07-08 14:53:25 +02:00
1e32a0830b Merge pull request #13194 from serathius/bootstrap
Refactor NewServer function
2021-07-08 14:20:23 +02:00
36bb8d293c Use method const in package http instead of literal 2021-07-08 20:00:03 +08:00
9824cc96ed etcdserver: Fix typos in bootstrap 2021-07-08 13:37:19 +02:00
e1fa356fac etcdserver: Refactor standalone boostrap 2021-07-08 13:34:31 +02:00
58a61a2cd3 Merge pull request #13195 from mamil/fix-typo
fix typo
2021-07-08 00:17:49 -04:00
10c9fae515 fix typo 2021-07-07 20:39:07 -07:00
244e5c2cce etcdserver: Unify memory storage boostrap 2021-07-07 23:36:37 +02:00
a72d4462fe etcdserver: Create boostrap wal functions 2021-07-07 23:36:35 +02:00
e75dfde4cb etcdserver: Move raft node start to just before newRaftNode 2021-07-07 23:26:37 +02:00
08935247a8 etcdserver: Create raftnode based on boostrapRaft struct 2021-07-07 17:38:56 +02:00
554777bba4 etcdserver: Extract boostrapRaft struct 2021-07-07 17:30:27 +02:00
880673c4a0 etcdserver: Extract raftConfig function 2021-07-07 17:22:34 +02:00
7d39c3c655 etcdserver: Extract boostrapSnapshotter function 2021-07-07 16:14:33 +02:00
af0439490c etcdserver: Extract cluster boostrap functions 2021-07-07 16:04:52 +02:00
16b2a8b420 etcdserver: Prepare boostrap to split cluster setup 2021-07-07 15:56:43 +02:00
4dd9424d11 etcdserver: Extract boostrapBackend function 2021-07-07 15:46:38 +02:00
120cd5abe2 etcdserver: Extract etcdserver boostrap function 2021-07-07 15:40:54 +02:00
2db193fda1 etcdserver: Fix snapshot always nil 2021-07-07 13:29:45 +02:00
d38c383c0d etcdserver: skip empty alarm from the query parameter 2021-07-05 23:54:49 +08:00
f4fad92e0d Merge pull request #13155 from serathius/meta
etcdserver: Move Read/Update methods on Meta bucket to one place
2021-07-05 14:15:17 +02:00
bf3e7033e9 etcdserver: Move Read/Update methods on Meta bucket to one place
There are still some left like compact keys, but they will require more
work to avoid circular dependency.
2021-07-05 13:23:53 +02:00
14c527f59a Merge pull request #13181 from gyuho/oss
workflows: disable ARM64 job for maintenance
2021-07-03 13:00:51 -07:00
7cb09ca552 workflows: disable ARM64 job for maintenance
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2021-07-03 12:59:52 -07:00
1c746c7f2f Merge pull request #13180 from nic-chen/fix-broken-links
docs: fix broken links in README
2021-07-03 14:04:23 -04:00
1c57287fc2 docs: fix broken links in README 2021-07-04 00:36:19 +08:00
ac0243bd70 Merge pull request #13160 from serathius/compact
etcdserver: Extract functions for setting and reading compaction information in backend
2021-07-03 11:37:09 +02:00
9530ff93a9 Merge pull request #13152 from serathius/junit
*: Upload test junit results
2021-07-03 11:35:15 +02:00
1208505290 Merge pull request #13161 from serathius/membership
etcdserver: Membership uses MembershipStorage interface instead of directly accessing Backend
2021-07-03 11:33:38 +02:00
33b2cdb957 Merge pull request #13162 from serathius/auth
etcdserver: Move read/update methods on Auth bucket to one place
2021-07-03 11:33:07 +02:00
a8e6016fc6 Merge pull request #13163 from serathius/authusers
etcdserver: Move all get/put/delete on AuthUsers and AuthRoles to buckets module
2021-07-03 11:32:24 +02:00
6825b4da61 Merge pull request #13164 from serathius/alarm
etcdserver: Move put/read/delete on Alarm bucket to bucket package
2021-07-03 11:31:37 +02:00
f7ad896691 Merge pull request #13165 from serathius/lease
etcdserver: Move get/put/delete on Lease bucket to bucket package
2021-07-03 11:31:04 +02:00
af9b5e726a Merge pull request #13143 from avorima/changelog-3.6
CHANGELOG: add 3.6, highlight completion commands
2021-07-01 19:49:44 -04:00
9a6f2e085f README: link maintainers role details
Link the maintainers role and responsibilites.
2021-07-01 15:49:05 -04:00
57a4896704 Merge pull request #13170 from gyuho/maintainers
README: explain "MAINTAINERS"
2021-07-01 09:12:30 -07:00
1b84b5e8df README: explain "MAINTAINERS"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2021-07-01 09:08:39 -07:00
4c5efc970d *: Upload test junit results 2021-07-01 14:41:13 +02:00
e5a026822b etcdserver: Move put/read/delete on Alarm bucket to bucket package 2021-07-01 13:35:10 +02:00
9e511665c5 etcdserver: Move get/put/delete on Lease bucket to bucket package 2021-07-01 13:34:45 +02:00
0c701fb9f3 etcdserver: Move all get/put/delete on AuthUsers and AuthRoles to buckets module 2021-07-01 12:12:15 +02:00
221c887819 etcdserver: Extract functions for setting and reading compaction information in backend 2021-07-01 11:26:27 +02:00
40da254d68 Merge pull request #13146 from tklauser/filelock-x-sys-windows
client/pkg/fileutil: use `golang.org/x/sys/windows` for `FileLockEx`
2021-07-01 10:44:08 +02:00
7271adecc5 Merge pull request #12992 from awly/client-auth-bundle-overwrite
client/v3: do not overwrite authTokenBundle on dial
2021-07-01 10:40:18 +02:00
0d0b6f06fa Merge pull request #13142 from avorima/etcdutl-completion
etcdutl: add command to generate shell completion
2021-06-30 10:33:22 -04:00
2fb919bef9 Merge pull request #13158 from spacewander/blc
CHANGELOG-3.5: fix broken link
2021-06-29 09:36:04 -07:00
b2e08fbfd4 etcdserver: Move read/update methods on Auth bucket to one place 2021-06-29 18:02:11 +02:00
50507d5f3c etcdserver: Membership uses MembershipStorage interface instead of directly accessing Backend 2021-06-29 16:14:06 +02:00
a6317392f4 Merge pull request #13159 from serathius/license
*: Add missing file licenses and Fix the static analysis to prevent skipping them
2021-06-29 13:49:05 +02:00
86f68b9374 *: Add missing file licenses and Fix static analysis prevent skipping them in future 2021-06-29 12:52:02 +02:00
164a1c80f0 CHANGELOG-3.5: fix broken link 2021-06-29 17:18:05 +08:00
6ef7629ec6 Merge pull request #13151 from serathius/buckets
etcdserver: Move all named keys to buckets module
2021-06-29 10:18:42 +02:00
f79d09d48b etcdserver: Move all named keys to buckets module 2021-06-28 16:40:50 +02:00
2a0f8f0738 Merge pull request #13145 from tangcong/fix-endpoint-health
fix health endpoint not usable when authentication is enabled
2021-06-25 18:33:46 -07:00
c3fe63a658 client/pkg/fileutil: use golang.org/x/sys/windows for FileLockEx
Use the FileLockEx wrapper and the corresponding LOCKFILE_* and error
constants from the golang.org/x/sys/windows package rather than
implementing these in the fileutil package.
2021-06-25 14:44:30 +02:00
dcf60888bc Merge pull request #13094 from serathius/etcd-version
[Version in Snapshot] Preserve etcd version in backend allowing etcdutl to read it from snapshot
2021-06-25 14:29:32 +02:00
e2740b4afa server,etcdutl: Preserve etcd version in backend allowing etcdutl to read it from snapshot 2021-06-25 14:06:56 +02:00
3f02686619 Merge pull request #13112 from Rajalakshmi-Girish/junit__test_report
scripts: add option to generate junit xml reports
2021-06-25 10:46:31 +02:00
dd62aebfb5 fix health endpoint not usable when authentication is enabled 2021-06-25 14:02:45 +08:00
bcab57ce00 CHANGELOG: add 3.6, highlight completion commands 2021-06-24 15:12:01 +02:00
8f9829cd2d Merge pull request #13114 from lilic/fix-api-version
Bump etcd version to 3.5.0 and 3.6.0-pre
2021-06-24 14:26:17 +02:00
3c6ace066a etcdutl: add command to generate shell completion
Follow up of #13133.
2021-06-24 12:22:40 +02:00
72cb652332 Merge pull request #13132 from serathius/refactor-monitor
etcdserver: Move version monitor logic to separate module
2021-06-24 10:40:01 +02:00
69fadd41b0 Merge pull request #13133 from avorima/shell-completion
etcdctl: add command to generate shell completion
2021-06-24 10:30:18 +02:00
96b8049d81 Write test for for bash completion 2021-06-23 23:16:47 +02:00
823f85dfc9 etcdserver: Move version monitor logic to separate module 2021-06-23 19:27:29 +02:00
ab8e5a4f8e client/v3: do not overwrite authTokenBundle on dial
`Client.dial` can be called multiple times. For example, from regular
`NewClient` and [from the `Maintenance`
wrapper](6d451ab61d/client/v3/maintenance.go (L81-L84)).

This ends up creating two (if `Client.dial` is called twice) independent
`credentials.Bundle` instances:
- the first one is wired into `PerRPCCredentials` callback in gRPC
  client.
- the second one is in `Client.authTokenBundle` and receives the latest
  auth token updates.

When using username/password authentication and the server is configured
to issue JWTs, token rotation logic breaks because of the above
`credentials.Bundle` confusion.
2021-06-23 09:44:27 -07:00
c44d89f469 Merge pull request #13127 from lilic/fix-grpc-req-alert
contrib/mixin/mixin.libsonnet: Adjust gRPC failed requests
2021-06-23 12:21:41 -04:00
6eabc41aee etcdctl: add command to generate shell completion
To improve the UX of etcdctl. Completion is generated by cobra
according to defined commands and flags.

Fixes #13111
2021-06-22 13:29:23 +02:00
4e060dc127 tests/e2e/ctl_v3_snapshot_test.go: Adjust version to 3.6.0 2021-06-22 12:26:24 +02:00
b9d837183a server/etcdserver/api: Add 3.6 to supported version 2021-06-22 12:25:39 +02:00
5d6be34838 api/version/version.go: Fix the api version 2021-06-22 12:25:39 +02:00
df696a7e76 go.mod: Bump etcd to 3.5.0 2021-06-22 12:25:39 +02:00
5564476831 Merge pull request #13073 from serathius/snapshot-version
[Version in Snapshot] SnapshotResponse includes local etcd version
2021-06-21 16:56:00 +02:00
f00231951d contrib/mixin/mixin.libsonnet: Adjust gRPC failed requests
OK is not the only one that is allowed, this before also captured
context canceled, NotFound, and other non error requests.
2021-06-21 11:47:53 +02:00
f992d697ed Merge pull request #13118 from forging2012/patch-1
Update Readme for install etcd client v3 more visibility #13108
2021-06-18 14:25:19 -04:00
175e235bd5 Update Readme for install etcd client v3 more visibility
Install etcd client v3
2021-06-18 09:34:25 +08:00
3adb2bd57c Update Readme for Install etcd client v3 more visibility #13108
There are many developers on the web, confused by how to install etcd v3 for the development of go project.

A number of similar errors were encountered, as follows:
https://github.com/etcd-io/etcd/issues/13108

```
➜  ~ go version
go version go1.16.5 darwin/amd64

➜  ~  go get go.etcd.io/etcd/clientv3

go: downloading golang.org/x/net v0.0.0-20201021035429-f5854403a974
# github.com/coreos/etcd/clientv3/balancer/picker
go/pkg/mod/github.com/coreos/etcd@v3.3.25+incompatible/clientv3/balancer/picker/err.go:37:44: undefined: balancer.PickOptions
go/pkg/mod/github.com/coreos/etcd@v3.3.25+incompatible/clientv3/balancer/picker/roundrobin_balanced.go:55:54: undefined: balancer.PickOptions
# github.com/coreos/etcd/clientv3/balancer/resolver/endpoint
go/pkg/mod/github.com/coreos/etcd@v3.3.25+incompatible/clientv3/balancer/resolver/endpoint/endpoint.go:114:78: undefined: resolver.BuildOption
go/pkg/mod/github.com/coreos/etcd@v3.3.25+incompatible/clientv3/balancer/resolver/endpoint/endpoint.go:182:31: undefined: resolver.ResolveNowOption
```

There are many examples of confusion here:

- https://github.com/etcd-io/etcd/issues/12577
- https://github.com/etcd-io/etcd/issues/12181
- https://github.com/etcd-io/etcd/issues/12068
- https://github.com/etcd-io/etcd/issues/11931
......

So, As suggested by  @lilic , I submitted Readme update.
2021-06-17 18:45:56 +08:00
09392c5059 Update Readme for install etcd client v3 more visibility #13108
There are many developers on the web, confused by how to install etcd v3 for the development of go project.

A number of similar errors were encountered, as follows:
https://github.com/etcd-io/etcd/issues/13108

```
➜  ~ go version
go version go1.16.5 darwin/amd64

➜  ~  go get go.etcd.io/etcd/clientv3

go: downloading golang.org/x/net v0.0.0-20201021035429-f5854403a974
# github.com/coreos/etcd/clientv3/balancer/picker
go/pkg/mod/github.com/coreos/etcd@v3.3.25+incompatible/clientv3/balancer/picker/err.go:37:44: undefined: balancer.PickOptions
go/pkg/mod/github.com/coreos/etcd@v3.3.25+incompatible/clientv3/balancer/picker/roundrobin_balanced.go:55:54: undefined: balancer.PickOptions
# github.com/coreos/etcd/clientv3/balancer/resolver/endpoint
go/pkg/mod/github.com/coreos/etcd@v3.3.25+incompatible/clientv3/balancer/resolver/endpoint/endpoint.go:114:78: undefined: resolver.BuildOption
go/pkg/mod/github.com/coreos/etcd@v3.3.25+incompatible/clientv3/balancer/resolver/endpoint/endpoint.go:182:31: undefined: resolver.ResolveNowOption
```

There are many examples of confusion here:

- https://github.com/etcd-io/etcd/issues/12577
- https://github.com/etcd-io/etcd/issues/12181
- https://github.com/etcd-io/etcd/issues/12068
- https://github.com/etcd-io/etcd/issues/11931
......

So, As suggested by  @lilic , I submitted Readme update.
2021-06-17 18:42:42 +08:00
8bfce5dc01 Add option to generate junit xml reports 2021-06-16 07:25:50 +00:00
76df94a839 Merge pull request #13113 from etcd-io/philips-patch-1 2021-06-15 20:04:29 -07:00
1a943350b0 client: README: update to new go.mod paths
The paths in the readme and go.dev docs are out of date after v3.5
2021-06-15 19:47:22 -07:00
e1b1d93548 *: Snapshot returns local etcd version
Co-authored-by: Lili Cosic <cosiclili@gmail.com>
2021-06-14 16:36:50 +02:00
56678038b5 Merge pull request #13077 from spacewander/grpc-gateway
embed: unlimit the recv msg size of grpc-gateway
2021-06-10 10:25:15 -07:00
c2b729d8c3 Merge pull request #13098 from mrueg/changelog-fix
CHANGELOG-3.5: Fix a typo, add dates
2021-06-10 09:20:02 -07:00
9a68ee51b2 CHANGELOG-3.5: Fix a typo, add dates 2021-06-10 17:05:19 +02:00
940d1e1ec5 Merge pull request #13049 from mumuhhh/main
[Fix]  --log-outputs relative path are not supported when --log-rotate-config-json is defined
2021-06-08 12:15:21 -07:00
d4b3a28671 Merge pull request #13091 from lilic/bump-client-golang
Update client_golang dependency to v1.11.0
2021-06-07 15:47:45 +02:00
16477a8270 Update client_golang dependency to v1.11.0 2021-06-07 14:49:57 +02:00
eca086e282 Merge pull request #13090 from wilsonwang371/rw-heatmaps-bugfix
tools: rw-heatmaps output format bug fix
2021-06-06 19:34:17 -07:00
0d2dd291bd tools: rw-heatmaps output format bug fix 2021-06-06 14:58:49 -07:00
94ae8ee78c Merge pull request #13089 from wilsonwang371/separate-rw 2021-06-05 23:28:23 -07:00
8a0142c8b1 server: enable getting raft request from cache to avoid extra unmarshalling 2021-06-05 17:37:01 -07:00
23e6bf3671 Merge pull request #13083 from lilic/add-downgrade-client
client/v3/maintenance.go: Add Downgrade support to client
2021-06-04 15:31:48 -07:00
1e18cebcff Merge pull request #13087 from dlowe/changelog-it-up
CHANGELOG: etcdserver: don't attempt to grant nil permission to a role
2021-06-04 15:26:08 -07:00
5f73afb256 CHANGELOG: etcdserver: don't attempt to grant nil permission to a role 2021-06-04 15:17:48 -07:00
ed790d9639 Merge pull request #13086 from dlowe/crash-on-missing-permission
etcdserver: don't attempt to grant nil permission to a role
2021-06-04 15:13:20 -07:00
115c694af6 etcdserver: don't attempt to grant nil permission to a role
Prevent etcd from crashing when given a bad grant payload, e.g.:

$ curl -d '{"name": "foo"}' http://localhost:2379/v3/auth/role/add
{"header":{"cluster_id":"14841639068965178418", ...
$ curl -d '{"name": "foo"}' http://localhost:2379/v3/auth/role/grant
curl: (52) Empty reply from server
2021-06-04 14:20:02 -07:00
9b03d36ffb Merge pull request #13084 from dlowe/crash-on-missing-alarm-type
etcdserver: don't activate alarm w/missing AlarmType
2021-06-04 14:19:47 -07:00
a26fa0c008 CHANGELOG: etcdserver: don't activate alarm w/missing AlarmType 2021-06-04 12:19:06 -07:00
8552d8ec20 etcdserver: don't activate alarm w/missing AlarmType
Narrowly prevent etcd from crashing when given a bad ACTIVATE payload, e.g.:

$ curl -d "{\"action\":\"ACTIVATE\"}" ${ETCD}/v3/maintenance/alarm
curl: (52) Empty reply from server
2021-06-04 12:18:56 -07:00
d563c76e92 client/v3/maintenance.go: Add Downgrade support to client 2021-06-04 13:53:09 +02:00
b00803a9c1 Merge pull request #13071 from serathius/genproto
tests: Switch regenerating functional/rpcpb proto to scripts/genproto.sh
2021-06-04 13:30:02 +02:00
852fae73ae Merge pull request #13082 from wilsonwang371/main_stable
tools: update mixed read/write perf testing script for a larger range of value size
2021-06-04 13:29:31 +02:00
fe2c05275b tools: update mixed read/write perf testing script for a larger range of value size 2021-06-03 22:46:47 -07:00
57034e1b51 Merge pull request #13075 from wilsonwang371/no-unnecessary-proto_size
server: skip unnecessary sprintf which executes proto.Size()
2021-06-03 13:10:11 -07:00
11edc76b15 server: skip unnecessary sprintf which executes proto.Size() 2021-06-03 12:58:42 -07:00
e32e91c791 Merge pull request #13078 from ptabor/20210604-modules-main
Update of dependencies in go.mod: zap, bbolt, grpc, ...
2021-06-03 16:28:33 +02:00
404efd70f7 Upgrade of prometheous deps.
For now we need to depend on unstable: prometheus/client_golang
2021-06-03 16:07:01 +02:00
edcfe575cf Update dependencies:
- github.com/coreos/go-systemd/v22 v22.3.2
  - github.com/google/btree v1.0.1
  - github.com/json-iterator/go v1.1.11
  - github.com/mattn/go-runewidth v0.0.13
  - github.com/prometheus/client_golang v1.10.0
  - github.com/prometheus/common v0.26.0
  - github.com/sirupsen/logrus v1.8.1
2021-06-03 13:03:01 +02:00
b240625d21 Update bbolt to v1.3.6.
`./scripts/update_dep.sh go.etcd.io/bbolt v1.3.6`
2021-06-03 12:39:53 +02:00
90cea7d4e7 Update zap to v1.17.0. 2021-06-03 12:37:43 +02:00
576861e617 embed: unlimit the recv msg size of grpc-gateway
Ensure the client which access etcd via grpc-gateway won't
be limited by the MaxCallRecvMsgSize. Here we choose the same
default value of etcdcli as grpc-gateway's MaxCallRecvMsgSize.

Fix https://github.com/etcd-io/etcd/issues/12576
2021-06-03 16:36:19 +08:00
af6f3dcba5 Merge pull request #13074 from wilsonwang371/rw-bm-bugfix
tools: fix small rw-heatmaps python plot script argument parsing bug
2021-06-02 13:59:48 -07:00
d3ae6f25dd tools: fix small rw-heatmaps python plot script argument parsing bug
(cherry picked from commit 5b6b3ffe0b9fca7c72edfc2218e98357d1152872)
2021-06-02 13:32:02 -07:00
bd475d8731 Merge pull request #13062 from nate-double-u/13050-genproto-updates
updating scripts/genproto.sh
2021-06-02 20:15:05 +02:00
9e4dd4dc4e updating scripts/genproto.sh
Changing API-reference generator

- matching changes mentioned in https://github.com/etcd-io/website/issues/330
- generating page frontmater
- updating .gitignore

Signed-off-by: Nate W <4453979+nate-double-u@users.noreply.github.com>
2021-06-02 10:29:35 -07:00
573e055cd3 Merge pull request #13069 from lilic/log-errors
client, raft: Log unhandled errors
2021-06-02 18:05:58 +02:00
c16805a635 Merge pull request #13072 from lilic/3.5-client
client/v3/README.md: Remove warning
2021-06-02 18:05:25 +02:00
af5cf1ac1c tests: Switch regenerating functional/rpcpb proto to scripts/genproto.sh 2021-06-02 16:42:35 +02:00
3aae7d7823 client/v3/README.md: Remove warning 2021-06-02 16:35:12 +02:00
ddd390af01 raft/raft.go: Log unhandled errors 2021-06-02 11:41:26 +02:00
5e67b40a9e raft/node.go: Log unhandled errors 2021-06-02 11:41:26 +02:00
65cdf43e48 client/v3/lease.go: Log unhandled errors 2021-06-02 11:41:26 +02:00
4c6c506575 Merge pull request #13063 from serathius/integration-defer
integration: Use subtests to defer cluster.Terminate call
2021-06-01 17:19:05 +02:00
c15af6df03 Merge pull request #13058 from ptabor/20210531-functional-test-logging
Improve output of the 'functional' tests
2021-06-01 16:09:03 +02:00
d669eb038d integration: Use subtests to defer cluster.Terminate call
This fixes cases where Terminate is not called due to t.Fatal call
2021-06-01 15:59:02 +02:00
0edb69ae55 Merge pull request #13060 from serathius/limit
etcdserver:  Fix invalid count returned on Range with Limit
2021-06-01 15:56:29 +02:00
182aef6e6b etcdserver: Fix invalid count returned on Range with Limit 2021-06-01 15:04:28 +02:00
ea8b9e6c18 Improve output of the 'functional' tests
- Use go testing infrastructure, such that logs are printed only in
case of failure.
 - Split the test into multiple sub-round and sub-round-testcases such
   that tree of execution reflects the logic.
 - Use 'development' loggers that are formatting the output to be human
readable.
2021-05-31 15:31:48 +02:00
c7cbc6befa Merge pull request #13027 from lilic/benchmark-readme
tools/benchmark/README.md: Update installation as go get does not work
2021-05-31 10:37:49 +02:00
312908c068 tools/benchmark/README.md: Update installation as go get does not work 2021-05-31 10:25:37 +02:00
71448cb516 Merge pull request #13052 from ptabor/20210527-before-test-public
integration.BeforeTest can be run without leak-detection.
2021-05-30 23:20:02 +02:00
004081cc08 Merge pull request #13045 from wilsonwang371/add-benchmark-param
tool: save test parameters in mixed read/write benchmark script.
2021-05-27 20:56:11 +02:00
f15e0b8237 integration.BeforeTest can be run without leak-detection. 2021-05-27 20:55:11 +02:00
0e496ca212 TestLogRotation add log output relative path
TestLogRotation add test log output relative path test
2021-05-27 22:49:41 +08:00
24d8e90dbc [Fix]滚动日志路径解析不正确
例如  rotate:test.log 路径解析不正确
2021-05-27 16:44:12 +08:00
8389ab8751 tool: save test parameters in mixed read/write benchmark script. 2021-05-26 20:38:49 -07:00
71934ff244 Merge pull request #13010 from ipixiu/imp/store-scheduleCompaction-lock
limit tx lock scope in store.scheduleCompaction
2021-05-26 08:51:44 +02:00
db556c11b2 Merge pull request #13042 from wilsonwang371/no-hardcoded-repeat
tools: no hardcoded repeat times in rw-benchmark scripts
2021-05-26 08:36:10 +02:00
2ab2b4035c tools: no hardcoded repeat times in rw-benchmark scripts 2021-05-25 15:43:46 -07:00
adecd73975 Merge pull request #13039 from ptabor/20210525-make-logger-public
Expose clientv3.CreateDefaultZapLoggerConfig
2021-05-25 14:42:42 -07:00
a3f14cdf53 Merge pull request #13040 from wilsonwang371/main
tools: update mixed read/write benchmark script
2021-05-25 14:42:27 -07:00
bda32db121 Expose clientv3.CreateDefaultZapLoggerConfig
Need raised in
f3f4259d3f.

BTW: Alligned the implementation of grpclogs with what we use in embed
server, so reduced the client code dependencies.
2021-05-25 22:59:08 +02:00
db8ce62984 tools: update mixed read/write benchmark script 2021-05-25 13:30:56 -07:00
99c8b4dae1 Merge pull request #13038 from wilsonwang371/perf-eval
tools: add mixed read-write performance evaluation scripts
2021-05-25 12:49:02 -07:00
79b2777482 tools: add mixed read-write performance evaluation scripts 2021-05-25 12:03:42 -07:00
05674c87fb Merge pull request #13018 from ipixiu/feature/bolt-compaction-sleep-interval
add bolt compaction sleep interval
2021-05-25 10:06:47 -04:00
7a7b668edb Merge pull request #12933 from wilsonwang371/shared_txReadBuffer
server: set multiple concurrentReadTx instances share one txReadBuffer
2021-05-24 16:38:14 -07:00
9c82e8c72b server: set multiple concurrentReadTx instances share one txReadBuffer. 2021-05-24 15:16:53 -07:00
64b01a7a8d Enhance the root permission, when root role exist, it always return rootPerm. (#13006)
etcdctl role grant-permission root readwrite foo.
see etcdctl role get root output.
Before:
Role root
KV Read:
        foo
KV Write:
        foo
After:
Role root
KV Read:
        [, <open ended>
KV Write:
        [, <open ended>
2021-05-24 14:58:00 -07:00
d2e04a7171 Merge pull request #13034 from spzala/updatechangelog
CHANGELOG: add missing default setting for grpc gateway flag
2021-05-24 21:59:14 +02:00
30a67850ce CHANGELOG: add missing default setting for grpc gateway flag
Add missing changelog entry for the flag setting for the
enable-grpc-gateway.
2021-05-24 13:30:09 -04:00
06538eee8d Merge pull request #13032 from astromechza/patch-1
CHANGELOG: added missing entry for ClientCertFile
2021-05-24 11:39:46 +02:00
2ca308969d CHANGELOG: added missing entry for ClientCertFile 2021-05-24 10:08:28 +01:00
184b0e5d49 add sleep interval 2021-05-24 16:22:00 +08:00
6c72c1b09c Merge pull request #13024 from timmyyuan/fix-goroutine-leak
Fix the goroutine leak in StubServer
2021-05-21 15:53:57 +02:00
838be9c751 Omit the blank line 2021-05-21 21:25:49 +08:00
2d2a95c3fb Fix the format issue 2021-05-21 21:23:38 +08:00
1b700e5ed8 Fix the goroutine leak in StubServer
---

(If this PR fixes a github issue, please add `Fixes #<xyz>`)

Fixes #13023

(or if this PR is one task of a github issue, please add `Master Issue: #<xyz>`
to link to the master issue)

Master Issue: #13023

*Motivation*

Currently, StubServer can stop itself (by Stop()) before it start its
grpc server (created by Start()). This race condition may lead to a
goroutine leak mentioned by #13023.

*Modifications*

This PR add a channel to force the Stop() started after Start()

*Verify this change*

Please pick either of following options.

- This change is already covered by existing tests, such as *(please describe tests)*.

Test/TestEtcdGrpcResolver
2021-05-21 20:54:06 +08:00
e149da312a Merge pull request #13017 from gpavanb1/assert_replace
*: Replace internal testutil AssertEqual function
2021-05-21 11:30:07 +02:00
facba6c663 client: Replace nil value testing with assert.Nil
Multiple errors in previous commit where `nil` is not being detected by `assert.Equal`
2021-05-21 14:18:01 +05:30
25d3c1b068 *: Fixed go.sum
Ran fix.sh script to correct for differences in go.sum, perhaps due to multiple Golang versions
2021-05-21 13:28:43 +05:30
ce5bb69c28 client: Added missing packages
go.etcd.io/etcd/client/pkg/v3/testutil: package github.com/stretchr/testify/assert imported from implicitly required module; to add missing requirements, run:
2021-05-20 21:44:12 +05:30
319ef4aa42 client: Removed AssertEqual function
Used github.com/stretchr/testify/assert to replace the AssertEqual function definition. Required the use of copyToInterface to copy a string slice to the empty interface slice
2021-05-20 21:33:07 +05:30
d9c5e1f0a2 *: Replace internal testutil AssertEqual function in favour of github.com/stretchr/testify/assert.Equals
To maintain uniformity in testing methodology, assert.Equals has been used everywhere while replacing testutil.AssertEqual

Fixes #13015
2021-05-20 19:55:45 +05:30
b29e8e47a6 Merge pull request #13014 from lilic/functional-socket-reuse
tests/functional: Set socket-reuse-port and socket-reuse-address
2021-05-20 15:00:43 +02:00
e299264cf3 Merge pull request #13011 from lilic/socket-options-file
WIP: client,server: Expose reuse-port and reuse-address so they can be configured via a config file
2021-05-20 13:50:21 +02:00
0ee2aba910 .github/workflows/functional.yaml: Adjust to use new script 2021-05-20 13:41:41 +02:00
b23ab1f759 tests/functional: Require same version of protoc everwhere
The main genproto.sh script requires latest version, this confirms the
test protoc to do the same.
2021-05-20 13:41:41 +02:00
fe2a9bd7e9 Update go.mod and go.sum files after running scripts 2021-05-20 13:41:41 +02:00
cb8c0a0507 tests/functional/rpcpb/rpc.pb.go: Regenerate
run ./scripts/genproto.sh
2021-05-20 13:41:41 +02:00
13bf7b0766 tests/functional: Set socket-reuse-port and socket-reuse-address
Due to flakes in CI and locally which resulted due to shared servers
there is suspcion that fixed port numbers are to blame. This reuses port
and address.
2021-05-20 13:41:41 +02:00
41227b7a2b Merge pull request #13012 from gliptak/patch-2
Correct typo
2021-05-20 12:38:38 +02:00
e0e4ddc268 test.sh: Reference test.sh instead of deprecated test 2021-05-20 10:00:27 +02:00
7957f4461d server/embed/config_test.go: Add unit test for socket options 2021-05-20 10:00:27 +02:00
96a1efded0 Documentation/README simplification (#13007)
In support of https://github.com/etcd-io/website/issues/65, simply direct the reader to the website (rather than once again defining what etcd it).
2021-05-19 17:51:51 -07:00
204e87cfb8 Correct typo
Signed-off-by: Gábor Lipták gliptak@gmail.com
2021-05-19 17:53:00 -04:00
73c530de83 client,server: Expose reuse-port and reuse-address so they can be
configured via a config file.
2021-05-19 18:41:21 +02:00
6d68f7841a limit tx lock scope 2021-05-19 23:47:46 +08:00
5f60e0d799 Merge pull request #12979 from horizonzy/enhance-role-output
Enhance getRole output when the role is 'root'.
2021-05-19 23:39:51 +09:00
6ab56fc237 enhance GetRole output when role is 'root' and the response perm is nil.
Before output:
Role root
KV Read:
KV Write:

After output:
Role root
KV Read:
	[, <open ended>
KV Write:
	[, <open ended>
2021-05-19 17:35:13 +08:00
159d1916fe Merge pull request #12985 from ptabor/20210517-fix-not-a-learner-retries
Fix not retryable error codes from: Unavailable -> FailedPrecondition
2021-05-19 08:05:22 +02:00
788bc5359d Merge pull request #13000 from ptabor/20210519-shouldApplyV3
applyV2 should apply on backend only once
2021-05-19 02:09:36 +02:00
16d51d8c26 Fix not retryable error codes from: Unavailable -> FailedPrecondition
- ErrGRPCNotCapable("etcdserver: not capable") -> codes.FailedPrecondition  (it will not autofix, it requires new version of server)
 - ErrGPRCNotSupportedForLearner("etcdserver: rpc not supported for learner") -> codes.FailedPrecondition (as long as its learner, the call will not work)
 - ErrGRPCClusterVersionUnavailable("etcdserver: cluster version not found during downgrade") -> codes.FailedPrecondition (backend does not contain the version (old etcd?) so retry will not help)

https://github.com/etcd-io/etcd/runs/2599598633?check_suite_focus=true

```
{"level":"warn","ts":"2021-05-17T09:55:30.246Z","logger":"etcd-client","caller":"v3/retry_interceptor.go:62","msg":"retrying of unary invoker failed","target":"etcd-endpoints://0xc000539880/#initially=[unix://localhost:m30]","attempt":0,"error":"rpc error: code = Unavailable desc = etcdserver: rpc not supported for learner"}
{"level":"warn","ts":"2021-05-17T09:55:30.270Z","logger":"etcd-client","caller":"v3/retry_interceptor.go:62","msg":"retrying
of unary invoker
failed","target":"etcd-endpoints://0xc000539880/#initially=[unix://localhost:m30]","attempt":1,"error":"rpc
error: code = Unavailable desc = etcdserver: rpc not supported for
learner"}`
```
2021-05-19 02:08:53 +02:00
0a972a3f05 applyV2 should reapply on backend only once
During review of:  https://github.com/etcd-io/etcd/pull/12988 spotted
that PUT is actially writing to v3-backend.
If we are replaying WAL log, it might happened that backend's
applied_index is > than the WAL's log entry. In such situation we should
skip applying on backend V3.
I think both the methods (setVersion, setMembersAttributes) are in
practice idempotent so its not that 'serious' problem, but for
formal correctness adding the proper checks.
2021-05-18 20:55:05 +02:00
46b49a6ecf Merge pull request #12991 from ptabor/20210519-mlmhl-buffer-seq
Represent bucket as object instead of []byte name.
2021-05-18 19:32:01 +02:00
66752fef2f Represent bucket as object instead of []byte name.
Thanks to this change:
  - all the maps bucket -> buffer are indexed by int's instead of
string. No need to do: byte[] -> string -> hash conversion on each
access.
  - buckets are strongly typed in backend/mvcc API.
2021-05-18 18:58:53 +02:00
80ccb27ea5 Merge pull request #12997 from hexfusion/fix-etcdutl-build
scripts: add missing etcdutl to release pipeline
2021-05-18 07:36:22 -04:00
fe829fa461 Merge pull request #12995 from ptabor/20210519-simplify-loggers
Simplify client's logger configuration in tests.
2021-05-18 13:22:47 +02:00
86393ecfcd scripts: add missing etcdutl to release pipeline
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2021-05-18 07:16:28 -04:00
3dd577ec08 Simplify client's logger configuration in tests. 2021-05-18 13:03:16 +02:00
62b731909f Merge pull request #12587 from mlmhl/buffer-search
backend: fix buffer range bug
2021-05-18 10:54:30 +02:00
6d451ab61d Merge pull request #12989 from gyuho/workflow
github/workflow: run arm64 tests for all branches startin from 3.5
2021-05-17 14:58:22 -07:00
41b325a711 github/workflow: run arm64 tests for all branches startin from 3.5
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2021-05-17 13:46:30 -07:00
1af7cb22f2 Merge pull request #12988 from chaochn47/updateClusterVersionV2
use v2 api to update cluster version
2021-05-17 13:43:36 -07:00
8e9b77a2c7 Update CHANGELOG-3.5.md 2021-05-17 11:46:14 -07:00
783c5ad2d2 use v2 api to update cluster version 2021-05-17 11:45:54 -07:00
e73facb7e2 Merge pull request #12986 from ptabor/20210519-mlmhl-buffer-seq
Reset 'seq' flags between transactions and track per 'bucket'
2021-05-17 20:31:00 +02:00
eebe67d87d Rename seq to bucket2seq. 2021-05-17 17:29:44 +02:00
4a2ffc2cbe Minor formatting fix on top of https://github.com/etcd-io/etcd/pull/12568 2021-05-17 17:08:00 +02:00
79eafb9719 backend: set seq flag for each bucket buffer 2021-05-17 17:08:00 +02:00
932d42b027 Merge pull request #12971 from ptabor/20210514-split-etcdctl
Split etcdctl into etcdctl (public API access) & etcdutl (direct surgery on files)
2021-05-17 14:07:20 +02:00
3f7a038656 Fixed documentation and scripts. 2021-05-17 11:54:03 +02:00
949c1c224b Updated changelog. 2021-05-17 11:54:03 +02:00
d99d0df5a5 Adding etcdutl test coverage. 2021-05-17 11:54:03 +02:00
b6a8ae8372 add etcdutl version. make it cov-tests compatible. 2021-05-17 11:54:03 +02:00
c09aca1ba4 Split etcdctl into etcdctl (public API access) & etcdutl (direct surgery on files)
Motivation is as follows:

  - etcdctl we only depend on clientv3 APIs, no dependencies of bolt, backend, mvcc, file-layout
  - etcdctl can be officially supported across wide range of versions, while etcdutl is pretty specific to file format at particular version.
it's step towards desired modules layout, documented in: https://etcd.io/docs/next/dev-internal/modules/
2021-05-17 11:54:03 +02:00
1675101293 Merge pull request #12981 from ptabor/20210516-fix-release-script
Fix release script: add `go mod tidy` after go.mod changes
2021-05-17 11:35:21 +02:00
2712c787ab Fix release script: add go mod tidy
Seems that additinal refresh of go.sum files is needed during the
release process after editing the versions of modules.

Discovered the problem while I was testing whether etcdutl is
properly included in the target binaries using:

```
DRY_RUN=true REPOSITORY=\`pwd\` BRANCH='branch-with-etcdutl' ./scripts/release 3.5.0-foobar.2
```
2021-05-16 20:43:12 +02:00
f82b5cb776 Bring back original NewZapCoreLoggerBuilder api. (#12973)
The funcion signature has been changed in:
eafbc8c57e .
Instead we should have added new method `NewZapLoggerBuilder()`.
2021-05-16 10:26:10 -07:00
9501e8e874 Merge pull request #12980 from aaronjheng/typo
Fix typo in CHANGELOG
2021-05-16 16:18:46 +02:00
549a0f656f docs: Fix typo in CHANGELOG 2021-05-16 21:44:57 +08:00
adcf580137 Merge pull request #12976 from ptabor/20210516-fix-coverage
Fix coverage tests
2021-05-16 15:27:38 +02:00
099fd65821 Fix coverage test failure: e2e TestIssue6361.
Tested with:
```
(cd tests && COVERDIR='../../c' 'env' 'go' 'test' '-tags=cov' '-timeout' '30m' 'go.etcd.io/etcd/tests/v3/e2e' -run TestIssue6361 -v 2>&1 | tee log.log)
```
2021-05-16 10:58:41 +02:00
c7a76470d5 Fix path to the coverage folder for e2e tests. 2021-05-16 09:49:50 +02:00
13ef6fc343 Fix coverage tests
2 problems:
  - spawnCmdWithLogger was not implemented (when built with 'cov' tag)
  - the logic was depending on relative paths. We change it to absolute
to be able to run in the test-specific temporary directories.
2021-05-16 09:49:50 +02:00
bca0717f28 Rename master to main in README and other *.md files (#12977) 2021-05-15 23:46:05 -07:00
3ed0cb1dfc Update modules to more stable versions. (#12975) 2021-05-15 23:32:27 -07:00
a6be38306a Merge pull request #12974 from ptabor/20210515-fix-to-testing-env
Fixes to CI configs
2021-05-15 17:24:35 +02:00
27c74398cd Fixes to CI configs.
- Moves grpcproxy & functional tests to a separate workflows such thay can get restarted independently.
- Configures travis to run 1.16.3 go version (as travis cannot resolve 1.16 to the default).
2021-05-15 16:50:28 +02:00
85341e08f2 Merge pull request #12968 from serathius/logger-simplify
server: Simplify passing logger setup by passing only logger
2021-05-15 15:58:00 +02:00
ddc4f473c9 Merge pull request #12965 from ptabor/20210513-flake-in-e2e-debugging
Fix flakes due to 'shared dir' in grpcproxy e2e tests
2021-05-15 13:21:12 +02:00
d8550deb7f Fix pkg/proxy tests such that they don't leek goroutines and do close transports. 2021-05-14 22:45:59 +02:00
8981afb6f5 Fix unit tests logging config. 2021-05-14 22:45:57 +02:00
c18010cf42 etcdproxy e2e tests should run in dedicated directories.
So far all proxies were sharing the same (current) directory,
leading to tests flakes, e.g. due to certificates being overriden
in autoTLS mode.
2021-05-14 22:42:31 +02:00
582d02e7f5 E2E tests should log commandlines used to spawn etcd or etcd proxy binaries. 2021-05-14 22:42:31 +02:00
f5c26814ab Loggers to catch the e2e flake. 2021-05-14 22:42:31 +02:00
f2bc5eee91 Merge pull request #12969 from ptabor/20210514-etcdctl-step-by-step
Refactor common code from etcdctl (v2,v3) to pkg/corbautl.
2021-05-14 12:14:37 -07:00
00c6090110 Refactor common code from etcdctl (v2,v3) to pkg/corbautl.
Preparation for etcdutl split.
2021-05-14 14:16:53 +02:00
41ed74824e server: Simplify passing logger setup by passing only logger 2021-05-14 13:14:48 +02:00
eae7a845a7 Merge pull request #12964 from ptabor/main
Persists Term in the (bbolt) Backend
2021-05-14 06:35:21 +02:00
ab586cd463 Persists Term in the (bbolt) Backend.
Additional layer of protection, that allows to validate whether we
start replaying log not only from the proper 'index', but also of the
right 'term'.
2021-05-13 21:29:01 +02:00
e44fb40be5 Merge pull request #12962 from ptabor/20210513-write-conf-state
Save raftpb.ConfState in the backend.
2021-05-13 19:22:28 +02:00
6ce7f7409e Update changelog for storage format changes. 2021-05-13 19:21:25 +02:00
e2d67f2e3b Merge pull request #12956 from gyuho/rename-to-main
*: rename "master" branch references to "main" in source code
2021-05-13 08:26:33 -07:00
865df75714 Save raftpb.ConfState in the backend.
This makes (bbolt) backend a full feature snapshot in term of WAL/raft,
i.e. carries:
  - commit : (applied_index)
  - confState

Benefits:
  - Backend will be a sufficient point in time definition sufficient to
start replaying WAL. We have applied_index & confState in consistent
state.
  - In case of emergency a backend state can be used for recovery
2021-05-13 14:29:36 +02:00
3cb1ba4b2b Merge pull request #12954 from serathius/logger-new-ctx-client
client: Add logger argument to NewCtxClient
2021-05-13 09:03:38 +02:00
178fb876af Merge pull request #12943 from ptabor/20210430-v2-deprecation-flags
--v2-deprecation flag:  opt-in mode to validate that store-v2 has no user-content
2021-05-13 09:03:12 +02:00
fbbf284493 Merge pull request #12957 from spzala/writeoutformat
doc: fix output flag format
2021-05-12 11:50:53 -07:00
5f76adfc3e doc: fix output flag format
Add missing dash in the flag.
2021-05-12 14:13:08 -04:00
cd6d730dc5 raft: rename "master" branch references to "main"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2021-05-12 10:41:39 -07:00
b6562a24b6 .github: rename "master" branch references to "main"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2021-05-12 10:41:24 -07:00
5a0a1a4b45 markdowns: rename "master" branch references to "main"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2021-05-12 10:41:02 -07:00
3d4629c1fb hack,scripts: rename "master" branch references to "main"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2021-05-12 10:40:28 -07:00
6bab63e96b tools: rename "master" branch references to "main"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2021-05-12 10:39:53 -07:00
a8e1cf0433 client: rename "master" branch references to "main"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2021-05-12 10:38:50 -07:00
19fcefae70 tests: rename "master" branch references to "main"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2021-05-12 10:38:12 -07:00
77c8033739 server: rename "master" branch references
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2021-05-12 10:37:35 -07:00
79e3d7bd3e Add e2e tests for --v2-deprecation flag. 2021-05-12 19:20:49 +02:00
57d9666974 Merge pull request #12950 from gyuho/badge
README: add badges for all github action workflows
2021-05-12 09:18:28 -07:00
6fdd82f50e README: add badges for all github action workflows
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2021-05-12 09:16:31 -07:00
ead81df948 Disallow -v2-deprecation>'not-yet' combined with --enable-v2 2021-05-12 18:09:34 +02:00
7c508741b3 Adding --v2-deprecation flag. 2021-05-12 18:09:34 +02:00
f3b4a3e578 Detecting whether v2store is "empty" (metadata only). 2021-05-12 18:09:34 +02:00
1189ee3f3d client: Add logger argument to NewCtxClient 2021-05-12 16:40:55 +02:00
d982fe7176 Merge pull request #12952 from serathius/go1.16.4
Swtich CI to use newest available 1.16 Go version
2021-05-12 16:11:50 +02:00
c868bb97a9 github actions: Switch CI to use newest available 1.16 version 2021-05-12 15:25:16 +02:00
7ba53c71a9 Merge pull request #12953 from serathius/e2e-split
github actions: Move e2e to separate workflow and remove semaphoreci
2021-05-12 14:55:28 +02:00
f908e423bc github actions: Move e2e to separate workflow and remove semaphoreci 2021-05-12 14:17:17 +02:00
1929aa0a36 Merge pull request #12948 from serathius/logger
client: Allow setting zap logger in config
2021-05-12 13:49:48 +02:00
06afe87b34 client: Allow setting zap logger in config 2021-05-12 12:15:20 +02:00
e0a8484c8f Merge pull request #12941 from serathius/defrag
etcdserver: Implement running defrag if freeable space will exceed provided threshold (on boot)
2021-05-12 09:26:56 +02:00
980d70d050 Merge pull request #12947 from serathius/e2e
github actions: Run e2e tests
2021-05-12 09:23:06 +02:00
3b24496c2a Merge pull request #12925 from yangxuanjia/yxjetcd_check_resuming
check resuming len to avoid panic
2021-05-12 09:18:40 +02:00
270b60e536 CHANGELOG: update
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2021-05-11 19:32:31 -07:00
68b1e9f728 check resuming len to avoid panic 2021-05-12 09:51:59 +08:00
70f7e0d70f Merge pull request #12929 from gyuho/github-worker-arm64-support 2021-05-11 10:29:53 -07:00
450fd9a0b1 Merge pull request #12946 from serathius/badge
readme: Switch Travis CI test results badge to GitHub actions
2021-05-11 14:24:47 +02:00
f48609ae52 github actions: Run e2e tests 2021-05-11 14:20:46 +02:00
efc8505739 etcdserver: Implement running defrag if freeable space will exceed privided threshold 2021-05-11 14:00:29 +02:00
4bc1aa93e7 readme: Switch Travis CI test results badge to GitHub actions 2021-05-11 13:22:49 +02:00
7ae55cf981 Merge pull request #12942 from ptabor/20210510-expect_debug_true-for-e2e
Run e2e tests with: EXPECT_DEBUG='true'
2021-05-10 19:47:57 +02:00
04c9e8b531 Run e2e tests with: EXPECT_DEBUG='true'
The motivation is need to diagnose flakes like:
https://semaphoreci.com/etcd-io/etcd/branches/pull-request-12940/builds/2.

Now - when the logs are streamed through testing.T logger, the verbosity
is not that significant concern.
2021-05-10 17:46:31 +02:00
74d7d33b7c Merge pull request #12938 from serathius/test-go1.16.3
github actions: Make github actions go1.16.3 tests blocking and remove them from travis
2021-05-10 17:44:15 +02:00
e892d6de46 Merge pull request #12940 from ptabor/20210510-v2-warnings
Deprecate V2 API: --enable-v2 and --experimental-enable-v2v3 issue a warning
2021-05-10 16:43:46 +02:00
269f22c837 Deprecate V2 API: --enable-v2 and v2v3
Flags `--experimental-enable-v2v3` and '-enable-v2' will raise a warning in 3.5,
in 3.6 they are schedule for decomissioning, such that v2store can stop be written in 3.7.

Deprecation plan in: https://github.com/etcd-io/etcd/issues/12913
2021-05-10 16:19:52 +02:00
5bad818c70 Merge pull request #12919 from lilic/add-opentel-tracing 2021-05-10 07:09:33 -07:00
da33b4034f github actions: Make github actions go1.16.3 tests blocking and remove them from travis
* Leave Go tip tests and coverage in travis as one is not yet supported
2021-05-10 15:19:09 +02:00
6bc125c8d9 Merge pull request #12936 from serathius/pull_request
Trigger unit test workflow on pull_requests
2021-05-10 12:05:24 +02:00
3cdd24221b CHANGELOG-3.5.md: Add Tracing entry 2021-05-10 10:44:40 +02:00
1a718a958e Add initial Tracing with OpenTelemetry 2021-05-10 10:44:40 +02:00
f1082eec86 Trigger unit test workflow on pull_requests 2021-05-10 09:46:42 +02:00
b9c000fb8f server/etcdmain: officially supports "arm64"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2021-05-10 00:34:10 -07:00
a8f38ebd6f Merge pull request #12928 from gyuho/github-worker-arm64
github action: add ARM64 test
2021-05-10 00:32:59 -07:00
3a04b2b61f github action: add ARM64 test with README
README for self-hosted-linux-arm64-graviton2-tests.yml

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2021-05-10 00:28:41 -07:00
5f6f69c3cc Merge pull request #12932 from vvdvortsova/12821-fix-req-maybe-nil
embed: Added a check for a nil value of the request in ServeHTTP method
2021-05-10 08:35:14 +02:00
f5717016cf Merge pull request #12797 from lzhfromustc/3_23
server/etcdmain and tests: Fix goroutine leaks
2021-05-10 08:29:17 +02:00
c3303d94a4 embed: Added a check for an nil value of the request in ServeHTTP method. Fixed #12821 2021-05-09 20:45:43 +03:00
aeb9b5fc73 Merge pull request #12855 from ptabor/20210409-backend-hooks
(no)StoreV2 (Part 4): Backend hooks:  precommit updates consistency_index
2021-05-08 09:34:31 +02:00
6decbe15db Merge pull request #12774 from hexfusion/add-log-rotate
server: add support for log rotation
2021-05-07 12:18:10 -04:00
f178677765 CHANGELOG: server: add support for log rotation #12774
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2021-05-07 08:39:51 -04:00
82b2d5c67d server: add support for log rotation
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2021-05-07 08:39:51 -04:00
4f87333230 Merge pull request #12922 from serathius/actions
Migrate PR testing from travis to GitHub actions
2021-05-07 09:31:23 +02:00
e818f21790 Migrate PR testing from travis to GitHub actions 2021-05-06 17:06:57 +02:00
344c9f3930 Merge pull request #12896 from wilsonwang371/profiling-txn2
server: make applier use ReadTx() in Txn() instead of ConcurrentReadTx()
2021-05-06 01:59:14 -07:00
8af8f6af27 Merge pull request #12918 from iflamed/fix-doc-demo-bug
fix doc demo bug
2021-05-05 17:01:43 -04:00
a8a3eea56d fix doc demo bug
the service parameter not used.
2021-05-05 13:57:10 +08:00
7296a0708c Set ETCD_UNSUPPORTED_ARCH to ARM64 (#12557)
Signed-off-by: odidev <odidev@puresoftware.com>
2021-05-04 13:29:47 -07:00
b32bc914ff learner support snapshot RPC (#12890)
* learner support snapshot RPC

* CHANGELOG: update for 12890
2021-05-04 13:26:33 -07:00
98083ea914 server: add experimental flag for using shared buffer in transacton write 2021-05-04 11:59:08 -07:00
f1123d696c fixup! Unify shared code (and constants) with cindex package. 2021-05-04 18:21:24 +02:00
a78d072b9a Simplify KVstore dependency on cindex. 2021-05-04 18:21:24 +02:00
2fb6f0a74b Simplify lease management after cindex update is moved to 'hooks'. 2021-05-04 18:21:23 +02:00
2dbecea5b2 Simplify KVStore interaction with cindex thanks to hooks. 2021-05-04 18:21:23 +02:00
fe3254aee3 Remove explicit authStore->ConsistencyIndex updates, as they are taken care by hook. 2021-05-04 15:38:23 +02:00
50051675f9 Integrate backend::hooks with consistent_index.
Every transaction committed to backend is writing most recent consistent_index.
Makes sure that even automatically trigger commits of batch-transactions
stays "really" consistent a.d. the most recent WAL log index applied.
2021-05-04 15:38:23 +02:00
d53d2db1e2 Tests: Backend hooks support. 2021-05-04 15:38:22 +02:00
9f11b16b2d backend: Hooks interface & implementation. 2021-05-04 15:38:22 +02:00
a3fc535a5a Merge pull request #12914 from ptabor/20210430-read-membership
No-storeV2: Read membership information from the backend (Part5)
2021-05-04 10:15:01 +02:00
56154216b7 update variable declaration location 2021-05-03 10:30:15 -07:00
eb128d2d8c Merge pull request #12916 from wpedrak/pass-mlock-during-defrag
server: reapply `Mlock` flag after defrag
2021-05-03 09:01:50 -07:00
6623c008ee server: reapply Mlock flag after defrag 2021-05-03 11:01:02 +02:00
c46e96d519 Merge pull request #12910 from ptabor/20210430-zap-polish
Finish migration zap.NewExample -> zaptest.NewLogger(t) in integration tests
2021-04-29 23:12:56 +02:00
3acf6e35b2 Finish migration zap.NewExample -> zaptest.NewLogger(t) in integration tests 2021-04-29 22:32:26 +02:00
451f65d661 Merge pull request #12908 from ptabor/20210429-client-retry-logging
Clientv3 (retry interceptor) logs should use the configured logger
2021-04-29 19:25:04 +02:00
cedbea6c81 Merge pull request #12904 from wpedrak/limit_mlocked_memory
server: replace mlockall with `Mlock` in `--experimental-memory-mlock`
2021-04-29 18:21:24 +02:00
ffea1537d4 ClientV3 tests use integration.NewClient that configures proper logger. 2021-04-29 18:18:34 +02:00
835643e6e2 Merge pull request #12906 from ptabor/20210429-etcdctl-v2-backup-cindex-fix
20210429 etcdctl v2 backup cindex fix
2021-04-29 18:01:45 +02:00
e908ef3da9 Merge pull request #12903 from lilic/exit-on-signal-int
etcdctl/ctlv3: Cleanup keys on signal interrupt.
2021-04-29 16:22:41 +02:00
205a1a442a Read membership information from the backend. 2021-04-29 13:45:45 +02:00
bc8d3f6639 Clientv3 (retry) logs should use the configured logger.
clientv3 logs (especially tests) were poluted with unattributed to testing.T log lines:

```
{"level":"warn","ts":"2021-04-29T12:42:11.055+0200","logger":"etcd-client","caller":"v3/retry_interceptor.go:64","msg":"retrying of unary invoker failed","target":"etcd-endpoints://0xc0000fafc0/#initially=[unix://localhost:m10]","attempt":0,"error":"rpc error: code = ResourceExhausted desc = etcdserver: mvcc: database space exceeded"}
```

The reasons were 2 fold:
  - Interceptors were copying logger before "WithLogger" could modify it.
  - We were not propagating the loggers in a few testing contexts.
2021-04-29 12:57:09 +02:00
586b2383f4 etcdctl/ctlv3: Cleanup keys on signal interrupt of check perf
If ctc+c is pressed during the run of etcdctl check perf,
this deletes all the previously created keys that perf check created.
2021-04-29 12:55:36 +02:00
1145c57601 server: replace mlockall with Mlock in --experimental-memory-mlock
Implementation of `--experimental-memory-mlock` backed by `mlockall` syscall is replaced by `Mlock` flag (backed by mlock syscall) of bboltDB.
2021-04-29 12:08:52 +02:00
927b3a3152 server: replace mlockall with Mlock in --experimental-memory-mlock
Implementation of `--experimental-memory-mlock` backed by `mlockall` syscall is replaced by `Mlock` flag (backed by mlock syscall) of bboltDB.
2021-04-29 12:08:20 +02:00
e90504fe62 Unify shared code (and constants) with cindex package. 2021-04-29 11:51:25 +02:00
f53b70facb Embed: In case KVStoreHash verification fails, close the backend.
In case of failed verification, the server used to keep opened backend
(so the file was locked on OS level).
2021-04-29 11:51:25 +02:00
2ad893b110 Integrate verification into e2e tests. 2021-04-29 11:51:24 +02:00
911204cd76 Fix ETCDCTL_API=2 etcdctl backup --with-v3 consistent index consistency
Prior to this CL, `ETCDCTL_API=2 etcdctl backup --with-v3` was readacting WAL log
(by removal of some entries), but was NOT updating consistent_index in the backend.
Also the WAL editing logic was buggy, as it didn't took in consideration the fact
that when TERM changes, there can be entries with duplicated indexes in
the log. So its NOT sufficient to subtract number of removed entries to
get accurate log indexes.

The PR replaces removing and shifting of WAL entries with replacing them with an no-op entries.
Thanks to this consistent-index references are staying up to date.

The PR also:
  - updates 'verification' logic to check whether consistent_index does not lag befor last snapshot
  - env-gated execution of verification framework in `etcdctl backup`.

Tested with:
```
(./build.sh && cd tests && EXPECT_DEBUG=TRUE 'env' 'go' 'test' '-timeout=300m' 'go.etcd.io/etcd/tests/v3/e2e' -run=TestCtlV2Backup --count=1000 2>&1 | tee TestCtlV2BackupV3.log)
```
2021-04-29 11:51:24 +02:00
adc365e14f etcdctl2: backup command logging cleanup (zap) 2021-04-28 23:26:17 +02:00
8d8d0377a2 server: applier uses ReadTx instead of ConcurrentTx 2021-04-28 11:06:24 -07:00
ed4a87d541 Merge pull request #12901 from ptabor/20210427-verification
Verification of persisted data
2021-04-28 08:45:15 +02:00
7107cb9f86 fixup! Create 'datadir' package responsible for paths. 2021-04-28 08:44:06 +02:00
c4b13a5c83 Integrate verification framework
Verification framework is integrated with:
  - integration tests (by default)
  - `ETCD_VERIFY=all etcdctl snapshot restore` command
  - etcd shutdown when running with `ETCD_VERIFY=all` env.
2021-04-28 07:56:16 +02:00
47b28b600a Verification package: Verified given data-dir.
For now verifies whete Backend.cindex is consistent with WAL log,
but should get expanded to cover memberships & revisions.
2021-04-28 07:56:15 +02:00
6f8f506cf4 Create 'datadir' package responsible for paths. 2021-04-28 07:56:13 +02:00
d2722ff955 Merge pull request #12820 from ptabor/20210326-membership-from-be
(no)StoreV2 (Part 2): Prepare to read membership information from backend
2021-04-28 07:53:42 +02:00
067521981e v2 etcdctl backup: producing consistent state of membership 2021-04-27 19:34:34 +02:00
a70386a1a4 Simplify membership interface: Does not pass the 'unused' token. 2021-04-27 17:17:31 +02:00
4725567d5e e2e tests: More logging and expect adopted to 3.4. 2021-04-27 17:17:31 +02:00
7ae3d25f91 Membership: Add additional methods to trim/manage membership data in backend. 2021-04-27 17:17:31 +02:00
aa6597384b etcd-dump-logs: Print full confState as json for debugging purposes. 2021-04-27 17:17:31 +02:00
768da490ed sever: v2store deprecation: Fix etcdctl snapshot restore to restore
correct 'backend' (bbolt) context in aspect of membership.

Prior to this change the 'restored' backend used to still contain:
  - old memberid (mvcc deletion used, why the membership is in bolt
bucket, but not mvcc part):
    ```
	mvs := mvcc.NewStore(s.lg, be, lessor, ci, mvcc.StoreConfig{CompactionBatchLimit: math.MaxInt32})
	defer mvs.Close()
	txn := mvs.Write(traceutil.TODO())
	btx := be.BatchTx()
	del := func(k, v []byte) error {
		txn.DeleteRange(k, nil)
		return nil
	}

	// delete stored members from old cluster since using new members
	btx.UnsafeForEach([]byte("members"), del)
    ```
  - didn't get new members added.
2021-04-27 17:17:30 +02:00
06d6f09a8a Merge pull request #12894 from MakDon/patch-1
etcdserver/mvcc: update tw.trace.Step condition
2021-04-27 00:19:10 -07:00
c4f7d578d8 Merge pull request #12898 from tangcong/add-disk-io-failure-case
functional: add disk io failure case
2021-04-26 14:37:53 -07:00
4fb22093a6 functional: add SHORT_TTL_LEASE_EXPIRE checker 2021-04-26 20:00:45 +08:00
16e38e49a9 functional: add FAILPOINTS_WITH_DISK_IO_LATENCY case 2021-04-26 12:07:05 +08:00
370f9cf3b9 fix: failed to get failpoints from member 2021-04-26 11:44:53 +08:00
ddcb463822 etcdserver/mvcc: update trace.Step condition 2021-04-25 23:07:45 +08:00
9a3aff6d8f Merge pull request #12889 from ptabor/20210423-deflake-TestFirstCommitNotification
Deflake: TestFirstCommitNotification
2021-04-23 14:55:44 +02:00
9f559775b8 Deflake: TestFirstCommitNotification
Infrequently the test flaked. Reproducable with:

```
  go test go.etcd.io/etcd/tests/v3/integration --run TestFirstCommitNotification --count=500
```

The moveLeader finishes when configchange is commited by quorum.
It doesn't guarantee that the 'empty' record was committed by the new leader.
From time to time happened that appliedLeaderIndex was returning 9
(without empty entry) and the test flaked. In healthy case the
appliedIndex returned 10.

Fixed by putting kv pair after leader change. The pair is guaranteed
to be stored on index when put finishes (so the empty entry as well).
2021-04-23 13:22:15 +02:00
bd4f8e2b6c Merge pull request #12885 from ptabor/20210422-error-codes-context
Errors: `context cancelled` or `context deadline exceeded` are exposed as codes.Canceled, codes.DeadlineExceeded instead of 'codes.Unknown'
2021-04-23 00:45:59 +02:00
9a4b2bdccc Errors: context cancelled or context deadline exceeded are exposed as codes.Canceled, codes.DeadlineExceeded instead of 'codes.Unknown' 2021-04-22 14:35:24 +02:00
cc52d994b7 Merge pull request #12883 from ptabor/20210421-backend-refactor-testing
mvcc/backend tests: Refactor: Do not mix testing&prod code.
2021-04-21 12:29:01 +02:00
d7d110b5a8 mvcc/backend tests: Refactor: Do not mix testing&prod code. 2021-04-21 09:43:13 +02:00
ea287dd9f8 Merge pull request #12854 from ptabor/20210410-shouldApplyV3
(no)StoreV2 (Part 3): Applying consistency fix: ClusterVersionSet (and co) might get not applied on v2store
2021-04-21 09:31:38 +02:00
ce3dae6f83 Merge pull request #12873 from ptabor/20210417-test-docker-gcloud
Makefile: Use `gcloud auth configure-docker` instead of `gcloud docker ...` for test-images
2021-04-21 09:30:02 +02:00
0f2c940f64 Merge pull request #12880 from chaochn47/exclude_alarms_from_health_check
etcdhttp/metrics.go: exclude alarms from health check conditionally with `?exclude=NOSPACE`
2021-04-20 21:18:15 -04:00
b321c48b2d Update CHANGELOG-3.5.md 2021-04-20 13:17:26 -07:00
140ea4fa29 etcdhttp/metrics.go: exclude alarms from health check conditionally with ?exclude=NOSPACE 2021-04-20 13:17:09 -07:00
8162d9cbdf Merge pull request #12876 from qsyqian/branch_management_link
doc: fix branch management link
2021-04-19 23:08:42 +02:00
334e696f21 Merge pull request #12878 from lilic/fix-docker-release
Makefile, build.sh: Fix build process
2021-04-19 10:12:42 -07:00
51c28fc475 build.sh: Adjust building etcdctl to be same as etcd binary
This fixes so that the ENV vars are taken in the same way as for etcd
binary.
2021-04-19 17:51:46 +02:00
81652d16ef Makefile: Fix build-docker-release-master
Since the Dockerfile files are now per arch, this adjusts to detect ARCH
and builds docker release from the Dockerfile.<ARCH> file.
2021-04-19 17:47:03 +02:00
11249fdee9 Merge pull request #12874 from ptabor/20210417-go1.16.3
Update go for 3.5: 1.15.x -> 1.16.3
2021-04-19 16:51:49 +02:00
3423a949c0 Update go for 3.5: 1.15 -> 1.16.(3).
https://github.com/etcd-io/etcd/issues/12732
2021-04-19 16:50:54 +02:00
2cbd86b102 doc: fix branch management link
Fixes #12875
2021-04-19 15:25:19 +08:00
2f77a1ac67 Merge pull request #12864 from ssbostan/master
client: fix check datascale command for https endpoints
2021-04-18 17:44:07 +02:00
06ba0fc5a2 Merge pull request #12846 from pyiyun/fix-snaptmpfile-bug
etcdserver: remove temp files in snap dir when etcdserver starting
2021-04-17 12:58:46 +02:00
5ad8880d77 Makefile: Use gcloud auth configure-docker instead of gcloud docker. 2021-04-17 10:11:09 +00:00
97a8affdd3 fix util.go file 2021-04-17 14:24:56 +04:30
80586c5b47 etcdserver/util.go: reduce memory when logging range requests (#12871)
* etcdserver/util.go: reduce memory when logging range requests

Fixes #12835

* Update CHANGELOG-3.5.md
2021-04-16 16:39:34 -07:00
5744cdf199 Merge pull request #12870 from ptabor/20210416-fix-flake-TestSnapshotV3RestoreMultiMemberAdd-master
Fix TestSnapshotV3RestoreMultiMemberAdd flakes (leaks)
2021-04-16 21:49:46 +02:00
17b982382e Fix TestSnapshotV3RestoreMultiMemberAdd flakes (leaks)
- most important: unix's socket transport should not keep idle
connections. For top-level Transport we close them using:
    f3c518025e/server/etcdserver/api/rafthttp/transport.go (L226)
    but currently we don't have access to close them witing the nest (unix) transport. Short idle deadline is good enough.

  - Use dialContext (instead of dial) to make sure context is passed down the stack
  - Make sure Context is cancelled as soon as the operation is done in pipeline
  - nit: use dedicated method to yeld goroutines.

Tested with:
```
d=$(date +"%Y%m%d_%H%M")
(cd tests && go test --timeout=60m ./integration/snapshot -run TestSnapshotV3RestoreMultiMemberAdd -v --count=180 2>&1 | tee log_${d}.log)
```

There were transports & cmux leaked:

```
   leak.go:118: Test appears to have leaked a Transport:
        internal/poll.runtime_pollWait(0x7f6c5c3784c8, 0x72, 0xffffffffffffffff)
        	/usr/lib/google-golang/src/runtime/netpoll.go:222 +0x55
        internal/poll.(*pollDesc).wait(0xc003296298, 0x72, 0x0, 0x18, 0xffffffffffffffff)
        	/usr/lib/google-golang/src/internal/poll/fd_poll_runtime.go:87 +0x45
        internal/poll.(*pollDesc).waitRead(...)
        	/usr/lib/google-golang/src/internal/poll/fd_poll_runtime.go:92
        internal/poll.(*FD).Read(0xc003296280, 0xc0031f60a8, 0x18, 0x18, 0x0, 0x0, 0x0)
        	/usr/lib/google-golang/src/internal/poll/fd_unix.go:166 +0x1d5
        net.(*netFD).Read(0xc003296280, 0xc0031f60a8, 0x18, 0x18, 0x18, 0xc0009056e2, 0x203000)
        	/usr/lib/google-golang/src/net/fd_posix.go:55 +0x4f
        net.(*conn).Read(0xc000010258, 0xc0031f60a8, 0x18, 0x18, 0x0, 0x0, 0x0)
        	/usr/lib/google-golang/src/net/net.go:183 +0x91
        github.com/soheilhy/cmux.(*bufferedReader).Read(0xc0003d24e0, 0xc0031f60a8, 0x18, 0x18, 0xc0003d24d0, 0xc0009056e2, 0xc000278400)
        	/home/ptab/private/golang/pkg/mod/github.com/soheilhy/cmux@v0.1.5/buffer.go:53 +0x12d
        github.com/soheilhy/cmux.hasHTTP2Preface(0x1367e20, 0xc0003d24e0, 0x7f6c5c699f40)
        	/home/ptab/private/golang/pkg/mod/github.com/soheilhy/cmux@v0.1.5/matchers.go:195 +0x8a
        github.com/soheilhy/cmux.matchersToMatchWriters.func1(0x7f6c5c699f40, 0xc000010258, 0x1367e20, 0xc0003d24e0, 0xc000010258)
        	/home/ptab/private/golang/pkg/mod/github.com/soheilhy/cmux@v0.1.5/cmux.go:128 +0x39
        github.com/soheilhy/cmux.(*cMux).serve(0xc003228690, 0x138c410, 0xc000010258, 0xc00327f740, 0xc0059ba860)
        	/home/ptab/private/golang/pkg/mod/github.com/soheilhy/cmux@v0.1.5/cmux.go:192 +0x1e7
        created by github.com/soheilhy/cmux.(*cMux).Serve
        	/home/ptab/private/golang/pkg/mod/github.com/soheilhy/cmux@v0.1.5/cmux.go:179 +0x191

        internal/poll.runtime_pollWait(0x7f6c5c60f3f0, 0x72, 0xffffffffffffffff)
        	/usr/lib/google-golang/src/runtime/netpoll.go:222 +0x55
        internal/poll.(*pollDesc).wait(0xc000d53018, 0x72, 0x1000, 0x1000, 0xffffffffffffffff)
        	/usr/lib/google-golang/src/internal/poll/fd_poll_runtime.go:87 +0x45
        internal/poll.(*pollDesc).waitRead(...)
        	/usr/lib/google-golang/src/internal/poll/fd_poll_runtime.go:92
        internal/poll.(*FD).Read(0xc000d53000, 0xc000cfd000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
        	/usr/lib/google-golang/src/internal/poll/fd_unix.go:166 +0x1d5
        net.(*netFD).Read(0xc000d53000, 0xc000cfd000, 0x1000, 0x1000, 0x3, 0x3, 0x1000000000001)
        	/usr/lib/google-golang/src/net/fd_posix.go:55 +0x4f
        net.(*conn).Read(0xc00031a570, 0xc000cfd000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
        	/usr/lib/google-golang/src/net/net.go:183 +0x91
        net/http.(*persistConn).Read(0xc00093b320, 0xc000cfd000, 0x1000, 0x1000, 0x577750, 0x60, 0x0)
        	/usr/lib/google-golang/src/net/http/transport.go:1933 +0x77
        bufio.(*Reader).fill(0xc005702fc0)
        	/usr/lib/google-golang/src/bufio/bufio.go:101 +0x108
        bufio.(*Reader).Peek(0xc005702fc0, 0x1, 0xc00077c660, 0xc003b082a0, 0xc000d08de0, 0x5ae586, 0x11dd6c0)
        	/usr/lib/google-golang/src/bufio/bufio.go:139 +0x4f
        net/http.(*persistConn).readLoop(0xc00093b320)
        	/usr/lib/google-golang/src/net/http/transport.go:2094 +0x1a8
        created by net/http.(*Transport).dialConn
        	/usr/lib/google-golang/src/net/http/transport.go:1754 +0xdaa

        net/http.(*persistConn).writeLoop(0xc00093b320)
        	/usr/lib/google-golang/src/net/http/transport.go:2393 +0xf7
        created by net/http.(*Transport).dialConn
        	/usr/lib/google-golang/src/net/http/transport.go:1755 +0xdcf

        sync.runtime_Semacquire(0xc0059ba868)
        	/usr/lib/google-golang/src/runtime/sema.go:56 +0x45
        sync.(*WaitGroup).Wait(0xc0059ba860)
        	/usr/lib/google-golang/src/sync/waitgroup.go:130 +0x65
        github.com/soheilhy/cmux.(*cMux).Serve.func1(0xc003228690, 0xc0059ba860)
        	/home/ptab/private/golang/pkg/mod/github.com/soheilhy/cmux@v0.1.5/cmux.go:158 +0x56
        github.com/soheilhy/cmux.(*cMux).Serve(0xc003228690, 0x13698c0, 0xc00377a0f0)
        	/home/ptab/private/golang/pkg/mod/github.com/soheilhy/cmux@v0.1.5/cmux.go:173 +0x115
        go.etcd.io/etcd/server/v3/embed.(*Etcd).servePeers.func1(0xc0007cc360, 0x122b75f)
        	/home/ptab/corp/etcd/server/embed/etcd.go:518 +0x2b9
        go.etcd.io/etcd/server/v3/embed.(*Etcd).servePeers.func3(0xc00036d080, 0xc0059330a0)
        	/home/ptab/corp/etcd/server/embed/etcd.go:549 +0x182
        created by go.etcd.io/etcd/server/v3/embed.(*Etcd).servePeers
        	/home/ptab/corp/etcd/server/embed/etcd.go:543 +0x73a
--- FAIL: TestSnapshotV3RestoreMultiMemberAdd (17.74s)
```
2021-04-16 20:17:28 +02:00
28a490b09c etcdserver: remove temp files in snap dir when etcdServer starting
When etcd exits abnormally, tmp files will remain in snap dir, so clean up tmp files in snap dir when etcdserver starting.

Fixes #12837
2021-04-16 20:30:04 +08:00
a9c4301c1e fix check datascale command for https endpoints 2021-04-16 03:51:04 +04:30
f3c518025e Merge pull request #12861 from ptabor/20210413-test-logging-fixes
Embedded server should not mess global loggers (by default)
2021-04-16 00:07:35 +02:00
b47c5fcc12 Address review comments a.d. logging. 2021-04-15 17:54:37 +02:00
c73da740fa Merge pull request #12862 from lilic/enable-race
.travis.yaml: Enables race in the tests
2021-04-15 17:37:03 +02:00
2843fded06 .travis.yaml: Enables race in the tests
As the TestV3WatchRestoreSnapshotUnsync flakiness was fixed, this
removes the TODO and enables the race again.
2021-04-15 14:32:52 +02:00
fad6391745 Configure proper logging for grpc integration tests. 2021-04-14 12:47:38 +02:00
d72f7ef5cc Give control to Embedded servers whether they override global loggers
So far each instance of embed server was overriding the grpc loggers and zap.global loggers.
It's counter intutitive that last created Embedded server was 'wining' and more-over it was breaking grpc expectation to change it "only" before the grpc stack is being used.

This PR introduces explicit call: `embed.Config::SetupGlobalLoggers()`, that changes the loggers where requested. The call is used by etcd main binary.

The immediate benefit from this change is reduction of  test flakiness, as there were flakes due to not a proper logger being used across tests.
2021-04-14 12:47:38 +02:00
eafbc8c57e Update zap logging dependency.
In particular bring up zapgrpc V2 code:
89e382035d
https://pkg.go.dev/google.golang.org/grpc/grpclog#LoggerV2
2021-04-14 12:15:48 +02:00
57a092b45d Merge pull request #12859 from tomwilkie/fix-mixin
Fix the mixin.
2021-04-13 23:05:52 +02:00
d69e46ea47 Make ShouldApplyV3 an enum - not bool 2021-04-13 23:01:03 +02:00
562d645ac9 Fix the mixin.
Signed-off-by: Tom Wilkie <tom@grafana.com>
2021-04-13 19:38:55 +01:00
4388bfc925 Merge pull request #12858 from hnlq715/patch-1
client: fix doc typo
2021-04-13 17:33:43 +02:00
5db0070150 Update doc.go 2021-04-13 22:22:42 +08:00
d7e971e8d8 client: fix doc typo 2021-04-13 16:33:24 +08:00
b1c04ce043 Applying consistency fix: ClusterVersionSet (and co) might get no applied on v2store
ClusterVersionSet, ClusterMemberAttrSet, DowngradeInfoSet functions are
writing both to V2store and backend. Prior this CL there were
in a branch not executed if shouldApplyV3 was false,
e.g. during restore when Backend is up-to-date (has high
consistency-index) while v2store requires replay from WAL log.

The most serious consequence of this bug was that v2store after restore
could have different index (revision) than the same exact store before restore,
so potentially different content between replicas.

Also this change is supressing double-applying of Membership
(ClusterConfig) changes on Backend (store v3) - that lackilly are not
part of MVCC/KeyValue store, so they didn't caused Revisions to be
bumped.

Inspired by jingyih@ comment:
https://github.com/etcd-io/etcd/pull/12820#issuecomment-815299406
2021-04-12 09:43:48 +02:00
7f97dfd45a Merge pull request #12795 from wpedrak/resend-read-index-on-first-commit-in-term
etcdserver: resend ReadIndex request on empty apply request
2021-04-09 16:41:54 +02:00
08ea9cb756 etcdserver: integration test covering first commit in current term notification 2021-04-09 16:05:02 +02:00
3991a8c9fa etcdserver: replace forceVersionC with FirstCommitInTermNotify 2021-04-09 11:30:42 +02:00
3d485faac5 etcdserver: resend ReadIndex request on empty apply request
Empty apply indicates first commit in current term. It is first time when follower is sure, that it's ReadIndex request can be processed.
2021-04-09 11:30:42 +02:00
bad0b4d513 Merge pull request #12823 from mtulio/chore/dash-var-refresh
chore/dash-var-refresh: change default refresh to 2(time range)
2021-04-08 15:14:53 +02:00
aeeecc06cf fix/dash-var-refresh: add const and description 2021-04-08 10:12:41 -03:00
63c25bf378 Merge pull request #12804 from ptabor/20210326-v3-publish
server: v2store deprecation: Prepare to use publishV3 instead of publish V2.
2021-04-08 09:22:22 +02:00
e776efbb2a Merge pull request #12828 from ptabor/20210404-embed-etcd
embed: etcd.Close() is closing Errc() channel as well.
2021-04-08 01:20:07 +02:00
5da9cac193 embed: etcd.Close() is closing Errc() channel as well.
Inspired by https://github.com/etcd-io/etcd/pull/9612 by purpleidea@.
2021-04-08 01:19:13 +02:00
cc0f812f51 server_test.go: Use context.Background() instead of TODO in tests.
Suggected in: https://golang.org/pkg/context/#Background
2021-04-08 01:15:16 +02:00
d4a8093ea5 Switch release-test (upgrade test) to use etcd 3.4 (instead of 3.3) as upgrade-base. 2021-04-08 01:15:16 +02:00
931af493cf Merge pull request #12830 from ptabor/20210405-split-pkg
Split client/pkg as dedicated low-dependencies module for client
2021-04-08 01:12:17 +02:00
816d332d81 Merge pull request #12830 from ptabor/20210405-split-pkg
Split client/pkg as dedicated low-dependencies module for client
2021-04-08 00:48:41 +02:00
24d2a9da70 test.sh: Turn off enforcement for minimal go.sum.
It seems that generated go.sum differs between different go versions.
This was introducing noise in the tests.
2021-04-07 20:26:10 +02:00
e24e72c5c8 Merge pull request #12836 from chalin/chalin-contrib-lock-2021-04-06
Contrib lock example
2021-04-07 20:23:08 +02:00
3bb7acc8cf Migrate dependencies pkg/foo -> client/pkg/foo 2021-04-07 00:38:47 +02:00
7168409e6b Merge pull request #12829 from garenchan/dev/etcdctl-lock
etcdctl: lock return exit code of exec-command
2021-04-06 23:46:20 +02:00
2ba69de281 Contrib lock example 2021-04-06 15:21:01 -04:00
c047ed593c etcdctl: lock return exit code of exec-command
Sometimes we expect to get the exit code of the command being
executed.
2021-04-06 14:34:31 +08:00
0b81fdf418 Move pkg/* used by client to client/pkg. 2021-04-05 23:47:27 +02:00
dfb03aba0b Merge pull request #12826 from allenporter/reporting-bugs
Fix "reporting bugs" link in documentation, which currently 404s
2021-04-02 11:04:38 +02:00
1906cfdc48 etcdserver: Fix "reporting bugs" link in documentation, which currently 404s
Update the "reporting bugs" link to be the current correct url from the documentation, replacing a dash with an
underscore in the URL.
2021-04-01 19:24:15 -07:00
d2bc5343fb chore/dash-var-refresh: change default refresh to 2(time range) 2021-04-01 00:06:57 -03:00
d18ac20080 Merge pull request #12766 from mrajashree/master
Update cert generation Makefile to include configurable cert file names
2021-03-30 12:59:41 +02:00
a49c7ec4fd Merge pull request #12817 from cwedgwood/3.4-changelog
CHANGELOG-3.4 updates
2021-03-30 12:53:02 +02:00
5d05be31aa CHANGELOG-3.4 updates 2021-03-29 11:38:25 -07:00
7899f76dce Merge pull request #12812 from hexfusion/bump-cl-3.2
CHANGELOG: release 3.2
2021-03-29 14:30:21 -04:00
b04477a580 CHANGELOG: release 3.2
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2021-03-28 22:19:47 -04:00
a40a6e9ad8 Merge pull request #12805 from ptabor/20210326-minor-test-fixes
tests: logging & temp-dir fixes
2021-03-28 19:14:13 -04:00
52b81bb975 Merge pull request #12807 from ptabor/20210327-update-cmux-stable
Update dependencies -> in particular cmux to stable 1.15.0
2021-03-28 19:12:43 -04:00
578ffd5783 Merge pull request #12790 from nvanbenschoten/reduce-raft-proto-size
raft: disable XXX_NoUnkeyedLiteral, XXX_unrecognized, and XXX_sizecache fields in protos
2021-03-27 21:08:50 +01:00
f290ab2e60 Update dependecies:
github.com/grpc-ecosystem/grpc-gateway v1.14.6 -> grpc-gateway v1.16.0
  golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e->v0.0.0-20210220033141-f8bda1e9f3ba
2021-03-27 20:48:33 +01:00
c49807f59e Update cmux to 1.5.0.
Executed using:
```
./scripts/update_dep.sh github.com/soheilhy/cmux v0.1.5
```
2021-03-27 11:18:13 +01:00
7665bd764e scripts/update_dep.sh: Script to update selected versions of dependencies. 2021-03-27 11:17:56 +01:00
55ccbe62a2 membership/cluster_test: Use zaptest logger. 2021-03-26 13:54:59 +01:00
03f55eeb2c Make NewTmpBackend use testing tmp location (so cleanup). 2021-03-26 13:54:55 +01:00
8ee1dd9e23 Merge pull request #12735 from ptabor/20210227-reduce-store-v2-clean
no-store_v2:  Store ConfState as part of WAL log snapshot
2021-03-25 08:23:00 +01:00
4d4c84e014 server: Written Snapshot's to WAL contains populated ConfState.
This will (among others) allow etcd-3.6 to not depend on store_v2 .snap files at all,
as WAL + db file will be self-sufficient.
2021-03-25 00:31:44 +01:00
fce0c192eb Regenerate protos. 2021-03-25 00:31:44 +01:00
9180e8e56e wal: Update WAL Snapshot format to contain ConfState. 2021-03-25 00:31:44 +01:00
65d6a1f4bf Merge pull request #12801 from ptabor/20210323-try-upgrade-proto
Update dep: github.com/golang/protobuf v1.3.5 ->  v1.5.1, grpc: 1.32->1.36
2021-03-24 23:57:56 +01:00
d0962f10ae Adopt grpc_testing to grpc-1.36. 2021-03-24 23:31:03 +01:00
a60676686b Update dep: grpc: 1.32.0 -> 1.36.0. 2021-03-24 22:27:55 +01:00
45fb7b41d6 Update dep: github.com/golang/protobuf v1.3.5 ->  v1.5.1
Thanks to https://go-review.googlesource.com/c/protobuf/+/300869/ its
feasible now.
2021-03-24 22:27:12 +01:00
7d7a9c6f23 codec.go: should use google runtime
golang-proto runtime can deal with both: gogo & golang generated
protobufs. It does not work vice-versa with protobuf-1.5.1.
2021-03-24 22:06:47 +01:00
62d3eded87 test.sh: Temporarilly disable the "eeshew you" fmt check. 2021-03-24 20:40:13 +01:00
1b300cd9e2 Merge pull request #12796 from joelsmith/master
*: Update gogo/protobuf to v1.3.2, rerun ./scripts/genproto.sh
2021-03-24 10:46:39 +01:00
21188b5e0d Merge pull request #12798 from gyuho/security
security: add private distributor list, and its application template
2021-03-23 11:34:50 -07:00
f18f609bcd security: add private distributor list, and its application template
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2021-03-23 11:34:15 -07:00
19f7c6ef3e *: Update gogo/protobuf to v1.3.2, rerun ./scripts/genproto.sh
While it appears that etcd is not vulnerable to CVE-2021-3121,
it is a good idea to update to the new generator so that new
vulnerable code isn't generated in any future APIs. Also, this
lays the issue to rest of whether there is any issue with
etcd and CVE-2021-3121.
2021-03-23 11:48:06 -06:00
3de6b382df server&tests: Fix goroutine leaks 2021-03-23 12:52:59 -04:00
4f34f14830 Merge pull request #12762 from wpedrak/postpone-read-index
raft: postpone MsgReadIndex until first commit in the term
2021-03-23 15:57:31 +01:00
30ce6067da Merge pull request #12780 from wpedrak/read_index_retry
Read index retry
2021-03-23 13:47:41 +01:00
758ff0163c raft: postpone MsgReadIndex until first commit in the term
Fixes #12680
2021-03-23 12:28:42 +01:00
456e129422 Merge pull request #12793 from gliptak/patch-1
Correct ineffassign
2021-03-23 09:19:26 +01:00
49d19efd82 Correct ineffassign 2021-03-22 14:11:30 -04:00
e51c697ec6 raft: disable XXX_NoUnkeyedLiteral, XXX_unrecognized, and XXX_sizecache fields in protos
This commit removes the `XXX_NoUnkeyedLiteral`, `XXX_unrecognized`, and
`XXX_sizecache` auto-generated fields from generated protobuf structs in
the raft package. This was done for all of the same reasons CockroachDB
removed the generation of these fields in https://github.com/cockroachdb/cockroach/pull/38404.
They come with very limited advantages but moderate disadvantages.

`XXX_NoUnkeyedLiteral` and `XXX_sizecache` were only enabled recently in
cc7b4fa, and this appears to have been unintentional. Meanwhile,
`XXX_unrecognized` has been around for longer and has arguably more
reason to stay because it can assist with forwards compatibility.
However, any real mixed-version upgrade story for this package is mostly
untold at this point, and keeping this field seems just as likely to
cause unexpected bugs (e.g. a field was propagated but not updated
correctly when passed through an old version) as it seems to fix real
issues, so it also doesn't warrant its cost.

This reduces the in-memory representation size of all Raft protos.
Notably, it reduces the memory size of an `Entry` proto from *80 bytes*
to *48 bytes* and the memory size of a `Message` proto from *392 bytes*
to *264 bytes*. Both of these structs are used frequently, and often in
slices, where this wasted space really starts to add up.

This was motivated by a regression in microbenchmarks in CockroachDB due
to cc7b4fa, which was caught in https://github.com/cockroachdb/cockroach/issues/62212.
2021-03-20 03:24:18 -04:00
ebc01743df raft: Add TestProtoMemorySizes test
This test checks the in-memory size of each proto struct to detect
unexpected changes to their memory representation.
2021-03-20 03:23:57 -04:00
8469108548 Merge pull request #12782 from ptabor/20210316-fixes
Integration: Test flakiness fixes
2021-03-19 20:10:11 +01:00
18321a0c85 Merge pull request #12786 from ptabor/20210318-debug-env
client: Bring back ETCD_CLIENT_DEBUG variable interpretation.
2021-03-18 21:55:51 +01:00
e2b5835e64 Fix go-tip: (1.17) fmt error:
```
gofmt' started at Thu Mar 18 18:06:00 UTC 2021
transport/sockopt_unix.go
diff -u transport/sockopt_unix.go.orig transport/sockopt_unix.go
--- transport/sockopt_unix.go.orig	2021-03-18 18:06:01.667483834 +0000
+++ transport/sockopt_unix.go	2021-03-18 18:06:01.667483834 +0000
@@ -1,3 +1,4 @@
+//go:build !windows
 // +build !windows

 package transport
transport/sockopt_windows.go
diff -u transport/sockopt_windows.go.orig transport/sockopt_windows.go
--- transport/sockopt_windows.go.orig	2021-03-18 18:06:01.667483834 +0000
+++ transport/sockopt_windows.go	2021-03-18 18:06:01.667483834 +0000
@@ -1,3 +1,4 @@
+//go:build windows
 // +build windows
```
2021-03-18 19:44:28 +01:00
9312d1b077 clientv3: Bring back ETCD_CLIENT_DEBUG variable interpretation.
env ETCD_CLIENT_DEBUG supports log levels (debug, info, warn, error, dpanic, panic, fatal).
Only when set, overrides application-wide grpc logging settings.
2021-03-18 18:43:07 +01:00
0a02a107ea Merge pull request #12787 from wpedrak/staticcheck_fixes
*: over 20 staticcheck fixes
2021-03-18 09:52:21 -07:00
dac6e37ea1 *: over 20 staticcheck fixes 2021-03-18 15:06:17 +01:00
2932969b91 Merge pull request #12781 from ptabor/20210315-flaki-balancer
Integration tests: Use testing.T logger through zap for grpc
2021-03-18 08:30:54 +01:00
63c51709b4 Merge pull request #12784 from ptabor/20210317-readme-go-version
README: Update required go version.
2021-03-17 15:41:21 +01:00
7d53a06957 README: Update required go version. 2021-03-17 15:37:07 +01:00
725a8c5e02 Enable configuring delegated zap-logging for embed server. 2021-03-17 08:17:36 +01:00
6657d5907c Make sure all integration tests have BeforeTest.
The CL disallows to create NewCluster in tests without BeforeTest.
2021-03-16 23:50:01 +01:00
809e7629ed Add integration.BeforeTest to all missing tests. 2021-03-16 23:50:01 +01:00
a84bd093b0 Integration with grpc-settable logger. 2021-03-16 22:50:41 +01:00
18382aa234 Fix 2 sources of leaked memory: embed server HTTP & v3_snapshot.leasser. 2021-03-16 22:20:00 +01:00
e9779231ec server: add 500ms retries to ReadIndex requests for l-reads
It is second approach (with first being #12762) to solve #12680
2021-03-16 16:34:15 +01:00
a57e967d84 Integration test flakes fixes. 2021-03-16 16:08:18 +01:00
4b21e38381 refactored l-read loop in v3_server.go 2021-03-16 11:03:45 +01:00
e599f4a482 Merge pull request #12775 from ptabor/20210314-zip
etcd-raft-zap logger fixes.
2021-03-14 11:37:11 -07:00
1e7c1805d8 Unify logic of building raft-loggers for etcd.
1. We had the same code copied 3 times.
2. For no good reason the code was not reusing existing logger if this one is given.
2021-03-14 16:02:50 +01:00
44bd22307e Merge get_logger() & Logger() method. 2021-03-14 14:05:17 +01:00
527c765ece Merge pull request #12773 from ptabor/20210310-test-fixes
Minor test fixes
2021-03-14 13:36:19 +01:00
de67806175 mend 2021-03-14 13:35:47 +01:00
67491a00ea e2e/expect: In case of sut process failure, print last 40lines of logs. 2021-03-13 23:41:29 +01:00
a47c18d30a Fix 2 remaining 'defer AfterTest' calls. 2021-03-13 23:41:29 +01:00
0c1e6d05e7 Merge pull request #12772 from ptabor/20210312-3.5-todos
Fix/remove broken: TestMetricDbSizeDefragDebugging
2021-03-12 23:11:25 +01:00
b406647dd7 Fix/remove broken: TestMetricDbSizeDefragDebugging 2021-03-12 23:05:53 +01:00
efce58d1ec Merge pull request #12770 from ptabor/20210312-3.5-todos
TODO's 3.5: Decommission metrics, PreVote=true.
2021-03-12 08:51:21 -08:00
948e32ae15 Delete etcd_debug metrics scheduled for deletion in 3.5. 2021-03-12 16:30:47 +01:00
54189f2f60 Enable --pre-vote=true by default in 3.5. 2021-03-12 16:23:23 +01:00
4eba403ccc Merge pull request #12765 from ptabor/20210312-move-config
Move config (ServerConfig) out of etcdserver package.
2021-03-11 15:05:29 -08:00
8a971eb5cd Update cert generation Makefile to include configurable IP addresses 2021-03-11 11:59:03 -08:00
fd7fed1511 Move config (ServerConfig) out of etcdserver package.
Motivation:
  - ServerConfig is part of 'embed' public API, while etcdserver is more 'internal'
  - EtcdServer is already too big and config is pretty wide-spread leaf
if we were to split etcdserver (e.g. into pre & post-apply part).
2021-03-11 20:56:22 +01:00
6dcd0de075 Merge pull request #12764 from ptabor/20210311-update-gogo
Fix gogo to 1.3.2 in api/go.mod.
2021-03-11 20:21:29 +01:00
783e26fcdf Fix gogo to 1.3.2 in api/go.mod. 2021-03-11 19:34:34 +01:00
b9226d03f4 Merge pull request #12763 from hexfusion/bump-proto
vendor: bump gogo/proto to v1.3.2
2021-03-11 17:59:07 +01:00
8ff0ff836a *: regen proto
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2021-03-11 11:27:52 -05:00
d3aa3fb486 vendor: bump gogo/proto to v1.3.2
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2021-03-11 11:27:25 -05:00
3ead91ca3e Merge pull request #12739 from LeoYang90/optimization_watch_prevkv
create event do not need prevkv range
2021-03-10 09:48:42 -08:00
633e9273db Merge pull request #12759 from wpedrak/staticcheck_partial_fixes
*: partial staticcheck fix
2021-03-10 09:47:52 -08:00
2c2456bf3d *: partial staticcheck fix 2021-03-10 14:13:38 +00:00
cb0e58942f Merge pull request #12753 from ptabor/20210306-integration-zap
Integration tests: Multiple improvements
2021-03-09 19:52:48 -08:00
f46c924f10 Merge pull request #12756 from hexfusion/bump-cl-03-09-3.5
CHANGELOG: add socket option flags #12702
2021-03-09 19:52:05 -08:00
7ac1367783 CHANGELOG: add socket option flags #12702
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2021-03-09 12:47:10 -05:00
c8243a9927 Tests: Functional - in case of failure, log the exception. 2021-03-09 18:19:52 +01:00
b6c2e87a74 Testing: Integration tests does not check whether t==nil 2021-03-09 18:19:52 +01:00
5ddabfdb24 tests: Make tests operate in /tmp director instead of src.
Thanks to this, unix sockets should be not longer
created by integration tests in the the source code directory,
so potentially trigger IDE reloads and unnecessery load (and mess).
2021-03-09 18:19:52 +01:00
bfe02c0526 tests: Cluster creation that failed shouldn't leak goroutines. 2021-03-09 18:19:52 +01:00
9ba1287334 travis script. Turning off verbose for grpcproxy.
+ Upgrade to '*.sh' variant of the scripts.
2021-03-09 18:19:51 +01:00
41f6cc7234 Tests: Better isolation between store_v2v3 integration tests. 2021-03-09 18:19:51 +01:00
fb1d48e98e Integration tests: Use BeforeTest(t) instead of defer AfterTest().
Thanks to this change, a single method BeforeTest(t) can handle
before-test logic as well as registration of cleanup code
(t.Cleanup(func)).
2021-03-09 18:19:51 +01:00
87258efd90 Integration tests: Use zaptest.Logger based testing.TB
Thanks to this the logs:
  - are automatically printed if the test fails.
  - are in pretty consistent format.
  - are annotated by 'member' information of the cluster emitting them.

Side changes:
  - Set propert default got DefaultWarningApplyDuration (used to be '0')
  - Name the members based on their 'place' on the list (as opposed to
'random')
2021-03-09 18:19:51 +01:00
efb584cc9b leak.go: Make the per-test AfterTest strictly wait for none of the unwanted rountines. 2021-03-09 18:19:51 +01:00
94a371acd7 Merge pull request #12750 from ptabor/20210306-mlock
--experimental-memory-mlock support
2021-03-09 09:13:40 -08:00
6fd85af641 Merge pull request #12702 from hexfusion/add-so
*: add support for socket options
2021-03-09 09:02:24 -08:00
5b49fb41c8 fixup: add ListenerOptions
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2021-03-08 11:27:03 -05:00
a46a358577 --experimental-memory-mlock support
The flag protects etcd memory from being swapped out to disk.
This can happen in memory constrained systems where mmaped bbolt
area is natural condidate for swapping out.

This flag should provide better tail latency on the cost of higher RSS
ram usage. If the experiment is successful, the logic should get moved
into bbolt layer, where we can protect specific bbolt instances
(e.g. avoid protecting both during defragmentation).
2021-03-07 12:32:57 +01:00
792b7f57d3 Merge pull request #12747 from wilsonwang371/master
pkg/wait: change list from single element to an array.
2021-03-07 11:53:30 +01:00
7556b9a011 Merge pull request #12752 from cwedgwood/master-nofsyncdowrite
[RFC (against master branch)] etcdserver: when using --unsafe-no-fsync write data
2021-03-07 11:51:57 +01:00
b63d31e89b etcdserver: when using --unsafe-no-fsync write data
There are situations where we don't wish to fsync but we do want to
write the data.

Typically this occurs in clusters where fsync latency (often the
result of firmware) transiently spikes.  For Kubernetes clusters this
causes (many) elections which have knock-on effects such that the API
server will transiently fail causing other components fail in turn.

By writing the data (buffered and asynchronously flushed, so in most
situations the write is fast) and avoiding the fsync we no longer
trigger this situation and opportunistically write out the data.

Anecdotally:
  Because the fsync is missing there is the argument that certain
  types of failure events will cause data corruption or loss, in
  testing this wasn't seen.  If this was to occur the expectation is
  the member can be readded to a cluster or worst-case restored from a
  robust persisted snapshot.

  The etcd members are deployed across isolated racks with different
  power feeds.  An instantaneous failure of all of them simultaneously
  is unlikely.

  Testing was usually of the form:
   * create (Kubernetes) etcd write-churn by creating replicasets of
     some 1000s of pods
   * break/fail the leader

  Failure testing included:
   * hard node power-off events
   * disk removal
   * orderly reboots/shutdown

  In all cases when the node recovered it was able to rejoin the
  cluster and synchronize.
2021-03-05 10:58:04 -08:00
f4001630d9 Merge pull request #12748 from ptabor/20210305-deflake
Test flakes: 1 fix + 1 diagnostic
2021-03-04 23:38:16 +01:00
66cef61444 Detect leaked go-routines bases on pre-normalization syntax. 2021-03-04 22:28:44 +01:00
339f8fa4bd test.sh: Run integration tests with -v and shorter deadline.
The purpose of this change is to learn more about flake cases like:
  https://travis-ci.com/github/etcd-io/etcd/jobs/488324449

```
% (cd tests && 'env' 'go' 'test' '-timeout=30m' '--race=false' '--cpu=2' './integration/...')
stderr: go: downloading github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e
ok  	go.etcd.io/etcd/tests/v3/integration	197.295s
ok  	go.etcd.io/etcd/tests/v3/integration/client	0.089s
ok  	go.etcd.io/etcd/tests/v3/integration/client/examples	0.038s
ok  	go.etcd.io/etcd/tests/v3/integration/clientv3	70.365s
ok  	go.etcd.io/etcd/tests/v3/integration/clientv3/concurrency	3.169s
ok  	go.etcd.io/etcd/tests/v3/integration/clientv3/connectivity	100.535s
ok  	go.etcd.io/etcd/tests/v3/integration/clientv3/examples	1.341s
ok  	go.etcd.io/etcd/tests/v3/integration/clientv3/experimental/recipes	3.277s

No output has been received in the last 10m0s,
```
2021-03-04 22:23:05 +01:00
432fde88a9 pkg/wait: change list from single element to an array.
We found wait lock contention when a large amount of write operations. Converting wait from single element to an array helps to improve the performance.

Fixes #12731

Signed-off-by: Wilson Wang <wilsonny371@gmail.com>
2021-03-04 12:16:41 -08:00
aefbd226b8 Merge pull request #12745 from ptabor/20210304-fix-wtfpl
Update version of certifi/gocertifi to get rid of WTF Public license
2021-03-04 12:47:06 +01:00
ba1eebe2ea Merge pull request #12744 from emilyselwood/patch-1
Metrics example 404s - fix url
2021-03-04 09:59:56 +01:00
f7a2389992 Update version of certifi/gocertifi to get rid of WTF Public license
Seems old versions of https://github.com/certifi/gocertifi where
categorized as "Do What The F*ck You Want To Public License".

Update to newer version that is explicit `Mozilla Public License` 2.0 (MPL 2.0).
2021-03-04 09:48:34 +01:00
9ebbf5f38b Metrics example 404s - fix url
The metrics example link points to a file that appears to have moved. This change points it to what I think is the right place.
2021-03-04 08:17:48 +00:00
61fef348f8 Merge pull request #12742 from wilsonwang371/master
debugutil: Remove extra space in trace handler route
2021-03-04 08:55:44 +01:00
7fc447fb5c debugutil: Remove extra space in trace handler route
debugutil: Remove extra space in trace handler route. To use trace, user needed to escape the extra space and the extra space needs to be removed.
2021-03-03 16:01:04 -08:00
f02525c75d Merge pull request #12741 from hexfusion/bump-cl-03-03
CHANGELOG: update to include experimental-apply-warning-duration
2021-03-03 13:38:22 -05:00
e9947bc018 CHANGELOG: update to include experimental-apply-warning-duration
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2021-03-03 12:08:58 -05:00
d70f35f8d1 create event do not need prevkv range 2021-03-02 17:43:24 +08:00
102c198444 Merge pull request #12705 from astromechza/bm_etcd_peer_server_cert
etcdmain: added peer-client-{client,key}-file parameters for supporting separate client and server certs when communicating between peers
2021-03-02 09:03:35 +01:00
102096ade2 Merge pull request #12737 from davidlanouette/12718
client v2: check for empty request from the context
2021-03-01 23:57:58 -08:00
6ace85b624 Merge pull request #12736 from ptabor/20210301-fix-flakes
tests: Fixes a few recently spotted test-flakes
2021-03-01 14:22:29 -08:00
6998c5641c client v2: rename error var for revive
The revive tool complained durring the build.  Error variable has been
renamed.

Fixes #12718

Signed-off-by: David Lanouette <David.Lanouette@GMail.com>
2021-03-01 17:09:16 -05:00
7d02ce2073 client v2: check for empty request from the context
If the simpleHTTPClient.Do is called and the context has a nil request, return an error early.

Fixes #12718

Signed-off-by: David Lanouette <David.Lanouette@GMail.com>
2021-03-01 16:46:30 -05:00
5e10d12996 tests: Fixes a few recently spotted test-flakes
```
Unexpected goroutines running after all test(s).
1 instances of:
syscall.Syscall(...)
	/usr/local/go/src/syscall/asm_linux_386.s:19 +0x5
syscall.Close(...)
	/usr/local/go/src/syscall/zsyscall_linux_386.go:285 +0x3d
internal/poll.(*FD).destroy(...)
	/usr/local/go/src/internal/poll/fd_unix.go:77 +0x30
internal/poll.(*FD).decref(...)
	/usr/local/go/src/internal/poll/fd_mutex.go:213 +0x38
internal/poll.(*FD).Close(...)
	/usr/local/go/src/internal/poll/fd_unix.go:99 +0x43
net.(*netFD).Close(...)
	/usr/local/go/src/net/fd_posix.go:37 +0x49
FAIL	go.etcd.io/etcd/tests/v3/integration/client	0.039s
```

```
--- FAIL: TestServer_TCP_Secure_DelayTx (0.20s)
    server_test.go:110: took 128.026085ms with no latency
    server_test.go:125: took 62.980988ms with latency 50ms��5ms
    server_test.go:133: expected took1 128.026085ms < took2 62.980988ms (with latency)
```

https://github.com/etcd-io/etcd/issues/12372
2021-03-01 18:07:38 +01:00
3d44f5bf80 *: added client-{client,key}-file parameters for supporting separate client and server certs when communicating between peers
In some environments, the CA is not able to sign certificates with both
'client auth' and 'server auth' extended usage parameters and so an operator
needs to be able to set a seperate client certificate to use when making
requests which is different to the certificate used for accepting requests.
This applies to both proxy and etcd member mode and is available as both a CLI
 flag and config file field for peer TLS.

Signed-off-by: Ben Meier <ben.meier@oracle.com>
2021-02-28 14:37:56 +00:00
d06d93d5b1 CHANGELOG: add go 1.16 for etcd 3.5, add release links
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2021-02-26 23:10:25 +00:00
d4d303d908 CHANGELOG: add v3.4.15
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2021-02-26 23:04:36 +00:00
cb040801f9 Merge pull request #12730 from ptabor/20200208-client-no-logger
clientv3: Cleaning up dead logger code
2021-02-26 10:44:42 -08:00
a7f340216d Reformat code according to 'gotip' rules.
In practices adds annotations in the new syntax:
```
+//go:build !linux
 // +build !linux
```

Fixes failing gotip PASSES='fmt' check:
https://travis-ci.com/github/etcd-io/etcd/jobs/486453806
2021-02-26 10:14:46 +01:00
54b87505a3 Remove dead legacy logger code. 2021-02-26 09:13:09 +01:00
a769916ea2 Merge pull request #12729 from ptabor/20210225-raftexample
raftExample: Allow closing raftexample node when snapshotting.
2021-02-26 08:58:30 +01:00
3976d68ed3 raftExample: Allow closing raftexample node when snapshotting.
Fix race that made the raftExample test fail.
2021-02-26 08:56:12 +01:00
9563698f64 Merge pull request #12727 from ptabor/20210225-fix-resolver-ordering
ClientV3: Ordering: Fix TestEndpointSwitchResolvesViolation test
2021-02-26 08:48:20 +01:00
39726116c5 Merge pull request #12728 from nate-double-u/12700-update-links
Updating links in .md files after removing Documentation.
2021-02-25 19:43:19 -05:00
45b1e6b470 ClientV3: Ordering: Fix the ordering test such it does not fail.
The test depended on very subtle timing semantic and on properties of
'copied' clients.

https://travis-ci.com/github/etcd-io/etcd/jobs/486191449

Examplar failure:
```
{"level":"warn","ts":"2021-02-25T12:34:47.894Z","caller":"v3/retry_interceptor.go:62","msg":"retrying of unary invoker failed","target":"etcd-endpoints://0xc0000d6fc0/#initially=[unix://localhost:86269902489114839060]","attempt":1,"error":"rpc error: code = Unavailable desc = etcdserver: rpc not supported for learner"}
{"level":"warn","ts":"2021-02-25T12:34:48.163Z","caller":"v3/retry_interceptor.go:62","msg":"retrying of unary invoker failed","target":"etcd-endpoints://0xc00035a000/#initially=[unix://localhost:78285857058450835940]","attempt":0,"error":"rpc error: code = FailedPrecondition desc = etcdserver: not leader"}
{"level":"info","ts":"2021-02-25T12:34:48.255Z","caller":"v3/maintenance.go:211","msg":"opened snapshot stream; downloading"}
{"level":"warn","ts":"2021-02-25T12:34:48.255Z","caller":"v3/maintenance.go:221","msg":"failed to receive from snapshot stream; closing","error":"rpc error: code = Canceled desc = context canceled"}
{"level":"info","ts":"2021-02-25T12:34:48.255Z","caller":"v3/maintenance.go:211","msg":"opened snapshot stream; downloading"}
{"level":"info","ts":"2021-02-25T12:34:50.255Z","caller":"v3/maintenance.go:219","msg":"completed snapshot read; closing"}
{"level":"info","ts":"2021-02-25T12:34:51.717Z","caller":"v3/maintenance.go:211","msg":"opened snapshot stream; downloading"}
{"level":"warn","ts":"2021-02-25T12:34:52.017Z","caller":"v3/maintenance.go:221","msg":"failed to receive from snapshot stream; closing","error":"rpc error: code = Canceled desc = context canceled"}
{"level":"info","ts":"2021-02-25T12:34:52.018Z","caller":"v3/maintenance.go:211","msg":"opened snapshot stream; downloading"}
{"level":"warn","ts":"2021-02-25T12:34:53.018Z","caller":"v3/maintenance.go:221","msg":"failed to receive from snapshot stream; closing","error":"rpc error: code = DeadlineExceeded desc = context deadline exceeded"}
--- FAIL: TestEndpointSwitchResolvesViolation (10.12s)
    ordering_util_test.go:81: failed to resolve order violation etcdclient: no cluster members have a revision higher than the previously received revision
```
2021-02-25 22:15:13 +01:00
d41e18817a Updating links in .md files after removing Documentation.
Signed-off-by: Nate W <4453979+nate-double-u@users.noreply.github.com>
2021-02-25 12:59:57 -08:00
fa82d11a95 Merge pull request #12725 from ptabor/20210225-release-scripts-fix-2
Improve release scripts: Lessons learned from 3.5.0-alpha.0
2021-02-25 11:46:12 -08:00
60a669762f Improve release scripts:
- Fix script that creates manifest-list based multi-arch-images.
    The images need to be pushed first.
  - Use docker instead of gcloud docker helper
  - Make sure docker pushes are properly 'dry run'
  - Added preparation instruction to the release script.
2021-02-25 12:28:52 +00:00
ae36379800 Merge pull request #12722 from ptabor/20210225-reporting-bugs
Github: Shorten the reporting-bugs link.
2021-02-25 09:06:04 +01:00
4af3bb3b01 Github: Shorten the reporting-bugs link. 2021-02-25 09:00:00 +01:00
926663f8d8 Merge pull request #12720 from FogDong/master
Docs: fix the report bug link in issue template
2021-02-25 08:53:49 +01:00
b0949cb49f Docs: fix the report bug link in issue template 2021-02-25 10:58:11 +08:00
60d5159091 version: bump up to 3.5.0-alpha.0 2021-02-24 19:55:45 +00:00
d4d2b80608 Merge pull request #12719 from ptabor/20210224-release-scripts-fix
Release scripts: Minor fixes discovered during attempt for release 3.5.0-alpha.0
2021-02-24 20:19:19 +01:00
c640957e2d Release scripts: Minor fixes discovered during attempt for 3.5.0-alpha.0 2021-02-24 19:16:27 +00:00
fe277f48ad Merge pull request #12716 from iAziz786/dial-journal-typo
systemd: Fix typo in DialJournal documentation
2021-02-24 12:24:30 -05:00
252dcc9bdb Fix typo in DialJournal 2021-02-24 22:23:27 +05:30
db8c8c4246 Merge pull request #12711 from spzala/updatesampleconfig
Update debugging flag in the sample config file
2021-02-24 16:44:57 +01:00
6b6579c767 Merge pull request #12714 from mrkm4ntr/example-apply-done-c
raftexample: Return an appropriate applyDoneC
2021-02-24 16:43:45 +01:00
5ae3f879c9 raftexample: Return an appropriate applyDoneC 2021-02-24 21:28:18 +09:00
8d9daec3ca Update debugging flag in the sample config file
Replace the deprecated debug flag.
2021-02-24 00:04:56 -05:00
fa14a0af89 Merge pull request #12709 from ptabor/20210222-grpc1.32
Update grpc dependency to 1.32.
2021-02-23 12:19:28 +01:00
1a9c81abda Update grpc dependency to 1.32.
Simplify grpc testing infrastructure to align with upstream changes.
2021-02-23 11:31:50 +01:00
57dcb037c0 Merge pull request #12706 from ptabor/20210218
clientv3: PS: Replace balancer with upstream grpc solution
2021-02-23 10:56:20 +01:00
4a1c24556c clientv3: PS: Replace balancer with upstream grpc solution
Addresses comments from: https://github.com/etcd-io/etcd/pull/12671#pullrequestreview-593942302
2021-02-23 10:03:15 +01:00
1cf66ab7df Merge pull request #12696 from mrkm4ntr/example-fix-join
raftexample: New joined node have to start with RestartNode
2021-02-22 19:58:10 +01:00
e8da3c3e74 Merge pull request #12707 from viviyww/new
mvcc: optimize watch logic of watchableStore
2021-02-22 19:45:55 +01:00
7ef6ebd5eb mvcc: optimize watch logic of watchableStore
Optimize watchableStore.watch func
2021-02-22 14:10:25 +08:00
cb0d256a18 raftexample: Add test for adding new node to existing cluster 2021-02-22 13:44:33 +09:00
1b1be43d65 raftexample: New joined node have to start with RestartNode 2021-02-22 09:45:44 +09:00
8d1a8ce044 Merge pull request #12701 from mrkm4ntr/example-notify-all-aplied
raftexample: Explicitly notify all committed entries are applied
2021-02-20 22:34:42 +01:00
3d7aac948b Merge pull request #12196 from ironcladlou/metrics-watch-error-fix
etcdserver: fix incorrect metrics generated when clients cancel watches
2021-02-19 12:46:49 -08:00
49078c683b *: add support for socket options
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2021-02-19 13:31:23 -05:00
cc2b039817 raftexample: Explicitly notify all committed entries are applied 2021-02-19 19:26:36 +09:00
70ac39fd98 Merge pull request #12699 from spzala/removemixinfromdoc
Remove mixin from doc
2021-02-19 00:04:14 -08:00
7fca120587 Remove mixin from doc
The kube-prometheus team has made necessary changes and not
using the mixin from doc any more.
2021-02-18 18:44:19 -05:00
b67ed4e4aa Merge pull request #12671 from ptabor/20210207-grpc-del-balancer
clientv3: Replace balancer with upstream grpc solution
2021-02-17 22:45:13 +01:00
cc99c3631f Merge pull request #12695 from mrkm4ntr/example-report
raftexample: Implement ReportUnreachable and ReportSnapshot
2021-02-17 09:16:36 +01:00
2d25f7f3da raftexample: Implement ReportUnreachable and ReportSnapshot 2021-02-17 11:59:32 +09:00
73c50b869a Merge pull request #12637 from BusyJay/check-outgoingvoters-when-restoring
raft: check `VotersOutgoing` for snapshot
2021-02-16 09:43:08 +01:00
47b2506fcb Merge pull request #12670 from postgrespro/customizable_raft_connection_timeouts
raft: makes 'ConnReadTimeout/ConnWriteTimeout' customizable
2021-02-16 09:07:41 +01:00
24d02586c1 Merge pull request #12691 from mrkm4ntr/example-save-snap-before-wal
raftexample: Save snapshot file before writing to wal
2021-02-16 08:55:33 +01:00
1302e1edb2 raftexample: Save snapshot file before writing to wal 2021-02-16 13:30:15 +09:00
719f6ce06f Merge pull request #11964 from hicqu/fast-log-rejection
raft: implement fast log rejection
2021-02-15 13:47:03 +01:00
c1e8d3a63f Clarify documentation of probing
- Add a large detailed comment about the use and necessity of
  both the follower and leader probing optimization
- fix the log message in stepLeader that previously mixed up the
  log term for the rejection and the index of the append
- improve the test via subtests
- add some verbiage in findConflictByTerm around first index
2021-02-15 09:47:18 +01:00
3ef8a2d30a Merge pull request #12688 from etcd-io/revert-12687-removemixindoc
Revert "Remove mixin from Doc"
2021-02-11 20:12:45 +01:00
9fed697435 Revert "Remove mixin from Doc" 2021-02-11 13:59:26 -05:00
080453d416 Merge pull request #12687 from spzala/removemixindoc
Remove mixin from Doc
2021-02-11 15:52:35 +01:00
6ff00fd202 Remove mixin from Doc
Mixin is moved under contrib and kube-prometheus team is now using
it from new location.
2021-02-11 09:09:38 -05:00
63cb3c97b7 Merge pull request #12686 from ptabor/20210211-prometheous-mixin
Migrate back mixin to contrib/
2021-02-11 13:07:34 +01:00
77e6df28cf Merge pull request #12675 from ptabor/20210209-grpc-remove-legacy-resolver
Cleanup grpc client/v3/naming API
2021-02-11 09:31:48 +01:00
1395a1a795 Migrate back mixin to contrib/
The mixin was moved out together with documentation.
This broke kube-prometheous: https://github.com/etcd-io/etcd/issues/12685#issuecomment-777264143
2021-02-11 09:28:30 +01:00
023aec9151 Merge pull request #12683 from nate-double-u/97-restore-etcd-mixin
Restoring etcd-mixin folder
2021-02-10 21:01:30 -05:00
433e7a0e95 Restoring etcd-mixin
Restoring Documentation/etcd-mixin folder for kube-prometheus use as per conversations in issue https://github.com/etcd-io/website/issues/97

Signed-off-by: Nate W <4453979+nate-double-u@users.noreply.github.com>
2021-02-10 15:38:49 -08:00
d33a1c91f0 Merge pull request #12660 from nate-double-u/97-remove-docs-from-etcd
Migrate documentation: Remove docs from etcd-io/etcd
2021-02-10 16:39:18 -05:00
6828517965 raft: implement fast log rejection
Signed-off-by: qupeng <qupeng@pingcap.com>
2021-02-10 15:48:32 -05:00
b757e1bc87 raft: create new probe_and_replicate.txt interactive test
This commit creates a new probe_and_replicate.txt interactive test. The
test creates a complete Raft log configuration and demonstrates how a
leader probes and replicates to each of its followers. The log
configuration constructed is identical to the one present in Figure 7 of
the raft paper (https://raft.github.io/raft.pdf), which looks like:

```
     1  2  3  4  5  6  7  8  9  10 11 12
n1: [1][1][1][4][4][5][5][6][6][6]
n2: [1][1][1][4][4][5][5][6][6]
n3: [1][1][1][4]
n4: [1][1][1][4][4][5][5][6][6][6][6]
n5: [1][1][1][4][4][5][5][6][7][7][7][7]
n6: [1][1][1][4][4][4][4]
n7: [1][1][1][2][2][2][3][3][3][3][3]
```

Once in this state, we then elect node 1 as the leader and stabilize the
entire raft group. This demonstrates how a newly elected leader probes
for matching indexes, overwrites conflicting entries, and catches up all
followers.

This will be useful to demonstrate the impact of more efficient probing
behavior.
2021-02-10 15:02:36 -05:00
2afa5ff45f removing Documentation from etcd-io/etcd
Leaving docs, files, etc that are required for generated documentation

fixes https://github.com/etcd-io/website/issues/97

Signed-off-by: Nate W <4453979+nate-double-u@users.noreply.github.com>
2021-02-10 11:14:40 -08:00
e8ba375032 Merge pull request #11889 from mrkm4ntr/example-recover-from-snap
raftexample: Fix recovery from snapshot
2021-02-10 12:18:30 +01:00
7e38cfcc8d raft: makes 'ConnReadTimeout/ConnWriteTimeout' customizable 2021-02-10 10:36:50 +07:00
a836a8045b Get rid of legacy client/v3/naming API.
Update grpcproxy to use the new abstractions.
2021-02-09 11:56:28 +01:00
44c889a8ce Merge pull request #12677 from chaochn47/reduce_verbosity_of_etcd_server_side_success_health_check_logs
etcdserver/api/etcdhttp: log successful etcd server side health check in debug level
2021-02-08 21:15:25 -08:00
028d351a46 CHANGELOG-3.5.md: update 2021-02-08 19:46:43 -08:00
2ae3e82f07 etcdserver/api/etcdhttp: log successful etcd server side health check in debug level
When we have an external component that checks /health periodically, the
etcd server logs can be quite verbose (e.g., DDOS-ing against insure
etcd health check can lead to disk space full due to large log files).

This change was introduced in #11704.

While we keep the warning logs for etcd health check failures, the
success (or OK) log level should be set to DEBUG.

Fixes #12676
2021-02-08 17:15:43 -08:00
96a9860b60 Merge pull request #12674 from ptabor/20210208-skip-386-tls-test
Fix pkg/tlsutil (test) to not fail on 386.
2021-02-08 16:46:47 -08:00
60e44286fa Fix pkg/tlsutil (test) to not fail on 386.
In fact this commit rewrites the functionality to use upstream list of
ciphers instead of checking whether the lists are in sync using ast
analysis.
2021-02-08 23:03:43 +01:00
0b75fede64 Replace client/v3/balancer with standard components: resolver + round_robin LB
This commit significantly reduces volume of custom code
in etcd client v3, while preserving full existing functionality.
2021-02-08 18:50:31 +01:00
3fddea9669 Merge pull request #12669 from lemonlinger/implement-endpoint-manager-and-resolver
Implement endpoint watch and resolver
2021-02-08 14:31:48 +01:00
8feb55f65c *: implement Endpoint Watch and new Resolver 2021-02-08 20:05:45 +08:00
be2167ebab Wait until all committed entries are applied
To take a snapshot
2021-02-05 19:05:41 +09:00
cb14cdd774 raftexample: Fix recovery from snapshot
* If there is a snapshot, HTTP server won't start.
* Resotring form snapshot occurs after replaying WAL.
* When taking a snapshot, the last change is not applied to the state machine yet.
2021-02-05 09:34:34 +09:00
dae29bb719 Merge pull request #12667 from lemonlinger/implement-endpoint-manager-and-resolver
Implement Update method for EndpointManager
2021-02-04 17:25:51 +01:00
571ed502d4 endpoints: implement Update method for EndpointManager.
- Add integration test for endpoints and resolver.
2021-02-04 23:30:22 +08:00
4d9f1a96da Merge pull request #12664 from spzala/rpctypeserrors
Doc: fix inconsistency and broken path
2021-02-03 15:06:54 -05:00
66777cf1e8 Doc: fix inconsistency and broken path
1) Fix the path for rpc errors
2) The README says 2 types of client errors vs doc mentioning 3
types of client errors. grpc erros should be considered single time
as covered in the README.
2021-02-03 12:02:49 -05:00
4accc34c98 Merge pull request #11776 from brandond/fix_srv_11321
Fix cluster peer HTTP SRV discovery when no HTTPS records exist
2021-02-03 13:17:55 +01:00
603d975599 Fix cluster peer HTTP SRV discovery
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-02-03 03:08:13 -08:00
6881ea828e Merge pull request #12658 from dhermes/pr-12636-balancer
Prepare `balancer` interfaces for `>=google.golang.org/grpc@1.30.0` upgrade.
2021-02-02 23:03:56 +01:00
ea34f8dbc6 Prepare balancer interfaces for >=google.golang.org/grpc@1.30.0 upgrade. 2021-02-02 15:54:33 -06:00
50ca440c49 Merge pull request #12410 from Yanhao/master
etcdserver: export method EtcdServer.leaderChangedNotify (#12378)
2021-02-02 12:23:11 +01:00
6d82778a4e etcdserver: export method EtcdServer.leaderChangedNotify (#12378) 2021-02-02 18:13:32 +08:00
e897daaebc Merge pull request #12659 from spzala/genprotodoc
Clarify the root directory comment
2021-02-01 17:32:03 -05:00
6bbef10721 Clarify the root directory comment
A contributor had an issue when ran script changing the directory
name after clone. This was discussed on the etcd slack channel.
2021-02-01 15:41:36 -05:00
d6d03beaea Merge pull request #12538 from lzhfromustc/12_9_GoroutineLeak
test: change channel operations to avoid potential goroutine leaks
2021-02-01 21:16:43 +01:00
b5d11723d1 Merge pull request #12393 from viviyww/contrib-doc
contrib: del systemd/etcd2-backup-coreos in docs
2021-02-01 15:33:44 +01:00
855eeb75c5 Merge pull request #12654 from mengjiao-liu/debian-1.4.0
update etcd base image to debian-base 1.4.0 which is now a sane multi-architecture image
2021-02-01 08:08:03 +01:00
b5d4ea13ff update etcd base image to debian-base 1.4.0 2021-02-01 13:53:58 +08:00
4af159a30a Merge pull request #12259 from alvistack/master-aio_graceful_reboot
`etcd.service`: Define explicit dependencies of systemd etcd service
2021-01-31 23:58:12 +01:00
a18cf56d8d Merge pull request #12507 from etcd-io/add-codeql
Add CodeQL Security Scanning
2021-01-31 23:53:05 +01:00
4d0a35a0fb Merge pull request #11518 from nlamirault/patch-1
Add tag "etcd-mixin" into the Grafana dashboard
2021-01-31 23:27:11 +01:00
958f6f9878 Merge pull request #12481 from kalexmills/fix-defer-log
fix: pass argument url in defer to avoid loopclosure
2021-01-31 23:20:32 +01:00
2c8de24afc Merge pull request #12495 from VertexC/fix/testErrorMsg
raft/raft_test: minor fix on inconsistent format of test case's error message
2021-01-31 22:25:23 +01:00
6bb26ef008 Merge pull request #12533 from lucab/ups/contrib-sysusers
contrib/systemd: add a sysusers entry
2021-01-31 11:40:25 +01:00
6db49d403c Merge pull request #12600 from ravitri/remove_v2_alerts
Documentation: Removing etcd v2 specific alerts
2021-01-31 11:19:22 +01:00
2fd6787506 Merge pull request #12653 from etcd-io/20201111-fix-flakes-go15
Tests:Use temp-directory that is covered by framework level cleanup
2021-01-31 11:05:13 +01:00
0d7a671c75 Tests: Fix vet warnings about Fatal in sub-goroutines.
% (cd tests && go vet ./...)
stderr: # go.etcd.io/etcd/tests/v3/integration/clientv3/concurrency_test
stderr: integration/clientv3/concurrency/election_test.go:74:6: call to (*T).Fatal from a non-test goroutine
stderr: integration/clientv3/concurrency/mutex_test.go:57:4: call to (*T).Fatal from a non-test goroutine
2021-01-31 00:00:26 +01:00
73ef0cde01 Update travis to use 1.15.7 go version. 2021-01-30 23:47:54 +01:00
f0ecad00e3 Use temp-directory that is covered by framework level cleanup
Prior to this PR, the e2e tests where creating dirs like:
```
/tmp/testname1.etcd030299846
/tmp/testname0.etcd039445123
/tmp/testname0.etcd206372065
```
and not cleaning them, that led to disk-space-exceeded flakes.

After the PR, the testing.TB tempdir mechanism is used and the names are
being cleaned and are more miningful:

```
../../bin/etcd --name test-TestCtlV3EndpointHashKV-2 --listen-client-urls http://localhost:20010 --advertise-client-urls http://localhost:20010 --listen-peer-urls https://localhost:20011 --initial-advertise-peer-urls https://localhost:20011 --initial-cluster-token new --data-dir /tmp/TestCtlV3EndpointHashKV429176179/003 --snapshot-count 100000 --experimental-initial-corrupt-check --peer-auto-tls --initial-cluster test-TestCtlV3EndpointHashKV-0=https://localhost:20001,test-TestCtlV3EndpointHashKV-1=https://localhost:20006,test-TestCtlV3EndpointHashKV-2=https://localhost:20011
```
2021-01-30 13:25:55 +01:00
cf2153d44b Merge pull request #12614 from ptabor/prepare-to-remove-grpc-naming-package
Replacement API for client/v3/naming package to be compatible with new GRPC1.30+ resolver API.
2021-01-30 12:51:03 +01:00
5d7c1db3a9 Introduce grpc-1.30+ compatible client/v3/naming API.
This is not yet implementation, just API and tests to be filled
with implementation in next CLs,
tracked by: https://github.com/etcd-io/etcd/issues/12652

We propose here 3 packages:
 - clientv3/naming/endpoints ->
    That is abstraction layer over etcd that allows to write, read &
    watch Endpoints information. It's independent from GRPC API. It hides
    the storage details.

 - clientv3/naming/endpoints/internal ->
    That contains the grpc's compatible Update class to preserve the
    internal JSON mashalling format.

 - clientv3/naming/resolver ->
   That implements the GRPC resolver API, such that etcd can be
   used for connection.Dial in grpc.

Please see the grpc_naming.md document changes & grpcproxy/cluster.go
new integration, to see how the new abstractions work.
2021-01-30 12:32:19 +01:00
90d1b838ad Fix shellcheck warnings: Escaping.
```
build:3:65: note: Backslash is literal in "\n". Prefer explicit escaping: "\\n". [SC1117]
test:3:64: note: Backslash is literal in "\n". Prefer explicit escaping: "\\n". [SC1117]
scripts/fix.sh:23:17: note: Backslash is literal in "\n". Prefer explicit escaping: "\\n". [SC1117]
scripts/fix.sh:23:46: note: Backslash is literal in "\n". Prefer explicit escaping: "\\n". [SC1117]
scripts/fix.sh:30:17: note: Backslash is literal in "\n". Prefer explicit escaping: "\\n". [SC1117]
scripts/genproto.sh:38:17: note: Backslash is literal in "\n". Prefer explicit escaping: "\\n". [SC1117]
scripts/genproto.sh:53:17: note: Backslash is literal in "\n". Prefer explicit escaping: "\\n". [SC1117]
scripts/genproto.sh:73:23: note: Backslash is literal in "\(". Prefer explicit escaping: "\\(". [SC1117]
scripts/genproto.sh:73:33: note: Backslash is literal in "\(". Prefer explicit escaping: "\\(". [SC1117]
scripts/genproto.sh:74:69: note: Backslash is literal in "\1". Prefer explicit escaping: "\\1". [SC1117]
scripts/genproto.sh:74:78: note: Backslash is literal in "\2". Prefer explicit escaping: "\\2". [SC1117]
scripts/genproto.sh:75:40: note: Backslash is literal in "\(". Prefer explicit escaping: "\\(". [SC1117]
scripts/genproto.sh:75:52: note: Backslash is literal in "\1". Prefer explicit escaping: "\\1". [SC1117]
scripts/genproto.sh:91:17: note: Backslash is literal in "\n". Prefer explicit escaping: "\\n". [SC1117]
scripts/genproto.sh:115:17: note: Backslash is literal in "\n". Prefer explicit escaping: "\\n". [SC1117]
./test.sh:71:29: warning: Quote to prevent word splitting, or split robustly with mapfile or read -a. [SC2206]
./test.sh:400:28: note: Backslash is literal in "\t". Prefer explicit escaping: "\\t". [SC1117]
./test.sh:406:33: note: Backslash is literal in "\t". Prefer explicit escaping: "\\t". [SC1117]
./test.sh:415:36: note: Backslash is literal in "\*". Prefer explicit escaping: "\\*". [SC1117]
./test.sh:415:176: note: Backslash is literal in "\'". Prefer explicit escaping: "\\'". [SC1117]
./test.sh:493:56: note: Backslash is literal in "\.". Prefer explicit escaping: "\\.". [SC1117]
./test.sh:601:57: note: Backslash is literal in "\(". Prefer explicit escaping: "\\(". [SC1117]
./test.sh:601:64: note: Backslash is literal in "\)". Prefer explicit escaping: "\\)". [SC1117]
./test.sh:601:67: note: Backslash is literal in "\(". Prefer explicit escaping: "\\(". [SC1117]
./test.sh:601:74: note: Backslash is literal in "\)". Prefer explicit escaping: "\\)". [SC1117]
./test.sh:601:77: note: Backslash is literal in "\(". Prefer explicit escaping: "\\(". [SC1117]
./test.sh:601:84: note: Backslash is literal in "\)". Prefer explicit escaping: "\\)". [SC1117]
./test.sh:601:91: note: Backslash is literal in "\1". Prefer explicit escaping: "\\1". [SC1117]
./test.sh:601:94: note: Backslash is literal in "\2". Prefer explicit escaping: "\\2". [SC1117]
./test.sh:601:103: note: Backslash is literal in "\3". Prefer explicit escaping: "\\3". [SC1117]
```
2021-01-29 22:32:43 +00:00
9600bbd5fe Update root image for docker-test-image to ubuntu:20.10 2021-01-29 22:16:51 +00:00
73bfa8cfb1 wqMakefile: Docker generation should not override the src file
Also fix /tmp directory during: 'make docker-test' to make it executable.
2021-01-29 22:08:58 +00:00
a8c935eab0 test.sh: Stop requiring/defaulting CPU flag to 4 2021-01-28 19:15:04 +00:00
a4fac14353 Merge pull request #12648 from pacoxu/debian-1.3.0
update etcd base image to debian-base 1.3.0 for CVEs
2021-01-27 09:15:12 +01:00
b9358dd18b Dockerfile: update etcd base image to debian-base 1.3.0 for CVEs
Signed-off-by: pacoxu <paco.xu@daocloud.io>
2021-01-26 15:42:53 +08:00
92458228e1 Merge pull request #12423 from Murphylu1993/master
client: replace dial with dialContext
2021-01-25 20:28:40 +01:00
e268b92a44 Merge pull request #12633 from ptabor/20210119-cov2
Fix codecov collection (Part 2/2)
2021-01-26 00:45:43 +08:00
351bdb33c5 Split intengration/clientv3 tests into multiple packages
They used to take >10min with coverage, so were causing interrupted
Travis runs.

Know thay fit in 100-150s (together), thanks also to parallel
execution.
2021-01-23 11:12:44 +01:00
88ee005a0f Reduce verbosity of coverage collection. 2021-01-23 08:59:19 +01:00
330b157dbb Merge pull request #12641 from retroflexer/update-CHANGELOG-3.2
CHANGELOG: Update for cherry picks for CVE
2021-01-21 16:18:58 -05:00
3d2bb0797b CHANGELOG: Update for cherry picks for CVE 2021-01-21 15:26:40 -05:00
7d444ee327 Merge pull request #12629 from ptabor/20210118-release-attempt
Modernize release script
2021-01-21 20:33:30 +01:00
598ca6caab Modernize release script:
- making sure the DRY_RUN mode can finish e2e, so e.g. commits to
local copy of repository are OK in dry-run (while git pushes are NOT).
  - better interaction with ./test_lib.sh script.
  - more consistent logging
  - bringing back s390x architecture that on go 1.14.3 seems to work as
expected.
2021-01-21 17:47:36 +01:00
f61ccb7d66 fix doc
Signed-off-by: Jay Lee <BusyJayLee@gmail.com>
2021-01-21 16:12:50 +08:00
f947c815d0 raft: check VotersOutgoing for snapshot
Close #12631.

Signed-off-by: Jay Lee <BusyJayLee@gmail.com>
2021-01-21 16:09:37 +08:00
f85b08c735 add test case
Signed-off-by: Jay Lee <BusyJayLee@gmail.com>
2021-01-21 16:02:46 +08:00
5dcd459ae9 Merge pull request #12564 from dhermes/patch-1
Adding `clientv3` import alias to match usage in `register_test.go`.
2021-01-19 23:00:19 +01:00
1d73d2e85e Merge pull request #12632 from ptabor/20210119-fix-coverage-report
Fix code coverage measurement
2021-01-19 10:19:39 -08:00
50352affd4 Merge pull request #12630 from anguslees/manifestlist
Generate and push multi-arch docker manifest list
2021-01-19 10:18:48 -08:00
5472b3336b Merge pull request #12525 from sakateka/remove_raft.peers
raft tests: Remove Config.peers and Config.learners
2021-01-19 16:00:54 +01:00
486687843b Fix code coverage measurement. 2021-01-19 15:41:36 +01:00
2529fee958 Use /build instead of deprecated /build.sh 2021-01-19 12:46:56 +11:00
7f79ffb409 Generate and push multi-arch docker manifest list
Change amd64 docker image to use a `-amd64` suffix, consistent with
other architectures.  Introduce a multiarch docker manifest list with
the original (no-arch) docker tag.

Fixes #10380
2021-01-19 12:46:56 +11:00
bb71f706a6 Merge pull request #12580 from dlorenc/update
Switch from dgrijalva/jwt-go to form3tech-oss/jwt-go.
2021-01-16 22:15:09 +01:00
1a890a4659 Merge branch 'master' into update 2021-01-16 09:35:05 +01:00
ccfd00f687 raft: specify voters and learners via snapshot 2021-01-16 13:03:47 +07:00
c0ab7cd6a1 Merge pull request #12624 from gyuho/maintainers
MAINTAINERS: add wenjiaswe@ and ptabor@
2021-01-15 12:34:05 -08:00
84f270f88d Merge pull request #12588 from ptabor/20201230-raft-docs
Raft: Expand raft documentation, in particular point on the godocs
2021-01-15 22:49:40 +08:00
daa5bd11c0 Merge pull request #12497 from ptabor/20201127-release
Modularized release script integration
2021-01-15 22:46:41 +08:00
bf6f173d5e Document Raft.send method.
The change makes it explicit that sending messages does not happen
immidietely and is subject to proper persist & then send protocol
on the application side. See:

https://github.com/etcd-io/etcd/issues/12589#issuecomment-752867024

for more context.
2021-01-15 12:35:58 +01:00
58f78df1de Raft: Expand raft documentation, in particular point on godocs. 2021-01-15 12:34:02 +01:00
577c898fee scripts: Integrate ./scripts/release with new code for tagging modules.
Changes:
  - signing tags.
  - allows to override BRANCH and REPOSITORY using env variables.

Tested by a release in my private fork:
  BRANCH="20201126-ptabor-release" REPOSITORY="git@github.com:ptabor/etcd.git" ./scripts/release 3.5.0-alpha.20
2021-01-15 12:31:44 +01:00
c4c7d5d848 MAINTAINERS: add wenjiaswe@ and ptabor@
Both have shown great initiatives and dedication to the project's long-term health and community engagement.

I strongly support for their recognition and continued work on the project.

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2021-01-14 15:16:38 -08:00
69e99e80fa Merge pull request #12465 from spacewander/fdoc
chore: update the documentation link in the comment
2021-01-14 00:39:25 -05:00
e9e0cb1077 Merge pull request #12545 from sid597/dev_guide-api_concurrency-path-update
Documentation (dev_guide--api_concurrency_reference_v3) : Path to v3lock and v3election updated
2021-01-14 00:07:24 -05:00
2c11bd5e19 Merge pull request #12586 from viviyww/clientconfigerror
transport: catch new cert error
2021-01-13 23:47:36 -05:00
c95d9434f1 Merge pull request #12602 from ptabor/20210107-scripts-on-osx
Make ./script/fix.sh & test.sh OSX/BSD compatible
2021-01-13 00:30:58 +08:00
84b5b87fb2 Make test.sh scripts OSX/BSD compatible:
- build & test scripts deprecated. Call *.sh variants.
  This will avoid delete the symlinks and get rid of
  subtle dependency on 'sed --follow-symlinks' on OsX/BSD sed.

- Fix parameters to mktemp
2021-01-12 16:29:00 +01:00
bfc6e2ff30 Merge pull request #12611 from ptabor/20210111-fix-flakes
e2e tests flakes & leaks fixes: In particular TestIssue6361
2021-01-12 21:26:54 +08:00
b760bb60e5 Merge pull request #12604 from ptabor/20210107-proto-post-modules
Refresh proto generation script after moving modules files.
2021-01-12 21:08:51 +08:00
0d9cfc11c8 Fix usage of reflect.SliceHeader: reported by vet on tip golang
Example:
https://travis-ci.com/github/etcd-io/etcd/jobs/470404938

```
% (cd server && go vet ./...)
stderr: # go.etcd.io/etcd/server/v3/etcdserver/api/v2store
stderr: etcdserver/api/v2store/node_extern_test.go:107:9: possible misuse of reflect.SliceHeader
stderr: etcdserver/api/v2store/node_extern_test.go:107:16: possible misuse of reflect.SliceHeader
```
2021-01-12 00:14:51 +01:00
70b5ef1d3a Fix tests flakiness: in particular TestIssue6361.
The root reason of flakes, was that server was considered as ready to
early.
In particular:
```
../../bin/etcd-2456648: {"level":"info","ts":"2021-01-11T09:56:44.474+0100","caller":"rafthttp/stream.go:274","msg":"established TCP streaming connection with remote peer","stream-writer-type":"stream Message","local-member-id":"ed5f620d34a8e61b","remote-peer-id":"ca50e9357181d758"}
../../bin/etcd-2456648: {"level":"warn","ts":"2021-01-11T09:56:49.040+0100","caller":"etcdserver/server.go:1942","msg":"failed to publish local member to cluster through raft","local-member-id":"ed5f620d34a8e61b","local-member-attributes":"{Name:infra2 ClientURLs:[http://localhost:20030]}","request-path":"/0/members/ed5f620d34a8e61b/attributes","publish-timeout":"7s","error":"etcdserver: request timed out, possibly due to connection lost"}
../../bin/etcd-2456648: {"level":"info","ts":"2021-01-11T09:56:49.049+0100","caller":"etcdserver/server.go:1921","msg":"published local member to cluster through raft","local-member-id":"ed5f620d34a8e61b","local-member-attributes":"{Name:infra2 ClientURLs:[http://localhost:20030]}","request-path":"/0/members/ed5f620d34a8e61b/attributes","cluster-id":"34f27e83b3bc2ff","publish-timeout":"7s"}
```
was taking 5s.   If this was happening concurrently with etcdctl, the
etcdctl could timeout.

The fix, requires servers to report 'ready to serve client requests' to consider them up.

Fixed also some whitelisted 'goroutines'.
2021-01-12 00:14:51 +01:00
74274f4417 e2e: Adding better diagnostic and location for temporary files to Snapshot tests. 2021-01-12 00:14:51 +01:00
26f9b4be8f e2e tests were leaking 'defunc' etcdctl processes.
The commit ensures that spawned etcdctl processes are "closed",
so they perform proper os wait processing.
This might have contributed to file-descriptor/open-files limit being
exceeded.
2021-01-11 11:55:30 +01:00
e2a65bee6e Avoid 'interactive prompt' for root password in etcd tests.
Before:
```
{"level":"info","ts":1610273495.3791487,"caller":"agent/handler.go:668","msg":"cleaning up page cache"}
{"level":"info","ts":1610273495.3793094,"caller":"agent/handler.go:94","msg":"created etcd log file","path":"/tmp/etcd-functional-2/etcd.log"}
{"level":"info","ts":1610273495.379328,"caller":"agent/handler.go:668","msg":"cleaning up page cache"}
[sudo] password for ptab:
pam_glogin: invalid password
Sorry, try again.
[sudo] password for ptab:
```

Now the caches are dropped if the current users is in sudoers, bot not
in the other cases.
To be honest I don't see the purpose for dropping the caches at all in
the test.
2021-01-11 10:06:31 +01:00
8ccd4e1146 Fix flaky tests reported due to data race on grpc logging registration.
Example:
```
    ==================
    WARNING: DATA RACE
    Write at 0x000002178320 by goroutine 575:
      google.golang.org/grpc/grpclog.SetLoggerV2()
          /home/ptab/private/golang/pkg/mod/google.golang.org/grpc@v1.29.1/grpclog/loggerv2.go:70 +0x444
      go.etcd.io/etcd/server/v3/embed.(*Config).setupLogging.func1.1()
          /home/ptab/corp/etcd/server/embed/config_logging.go:119 +0x345
      sync.(*Once).doSlow()
          /usr/lib/google-golang/src/sync/once.go:66 +0x109
      sync.(*Once).Do()
          /usr/lib/google-golang/src/sync/once.go:57 +0x68
      go.etcd.io/etcd/server/v3/embed.(*Config).setupLogging.func1()
          /home/ptab/corp/etcd/server/embed/config_logging.go:109 +0x3b1
      go.etcd.io/etcd/server/v3/embed.(*Config).setupLogging()
          /home/ptab/corp/etcd/server/embed/config_logging.go:174 +0x6af
      go.etcd.io/etcd/server/v3/embed.(*Config).Validate()
          /home/ptab/corp/etcd/server/embed/config.go:553 +0x55
      go.etcd.io/etcd/server/v3/embed.StartEtcd()
          /home/ptab/corp/etcd/server/embed/etcd.go:93 +0x84
      go.etcd.io/etcd/tests/v3/integration.TestKVWithEmptyValue()
          /home/ptab/corp/etcd/tests/integration/v3_kv_test.go:33 +0x18c
      testing.tRunner()
          /usr/lib/google-golang/src/testing/testing.go:1123 +0x202

    Previous read at 0x000002178320 by goroutine 956:
      [failed to restore the stack]

    Goroutine 575 (running) created at:
      testing.(*T).Run()
          /usr/lib/google-golang/src/testing/testing.go:1168 +0x5bb
      testing.runTests.func1()
          /usr/lib/google-golang/src/testing/testing.go:1441 +0xa6
      testing.tRunner()
          /usr/lib/google-golang/src/testing/testing.go:1123 +0x202
      testing.runTests()
          /usr/lib/google-golang/src/testing/testing.go:1439 +0x612
      testing.(*M).Run()
          /usr/lib/google-golang/src/testing/testing.go:1347 +0x3c4
      go.etcd.io/etcd/pkg/v3/testutil.MustTestMainWithLeakDetection()
          /home/ptab/corp/etcd/pkg/testutil/leak.go:150 +0x38
      go.etcd.io/etcd/tests/v3/integration.TestMain()
          /home/ptab/corp/etcd/tests/integration/main_test.go:14 +0x272
      main.main()
          _testmain.go:349 +0x269

    Goroutine 956 (finished) created at:
      google.golang.org/grpc/internal/transport.newHTTP2Server()
          /home/ptab/private/golang/pkg/mod/google.golang.org/grpc@v1.29.1/internal/transport/http2_server.go:288 +0x18a4
      google.golang.org/grpc/internal/transport.NewServerTransport()
          /home/ptab/private/golang/pkg/mod/google.golang.org/grpc@v1.29.1/internal/transport/transport.go:534 +0x2f5
      google.golang.org/grpc.(*Server).newHTTP2Transport()
          /home/ptab/private/golang/pkg/mod/google.golang.org/grpc@v1.29.1/server.go:726 +0x2ca
      google.golang.org/grpc.(*Server).handleRawConn()
          /home/ptab/private/golang/pkg/mod/google.golang.org/grpc@v1.29.1/server.go:693 +0x60f
      google.golang.org/grpc.(*Server).Serve.func3()
          /home/ptab/private/golang/pkg/mod/google.golang.org/grpc@v1.29.1/server.go:663 +0x4c
    ==================
    ...
    {"level":"info","ts":"2021-01-09T22:21:04.550+0100","caller":"embed/etcd.go:330","msg":"closed etcd server","name":"default","data-dir":"/tmp/etcd-017337431","advertise-peer-urls":["http://localhost:2380"],"advertise-client-urls":["http://localhost:2379"]}
    --- FAIL: TestKVWithEmptyValue (1.08s)
        v3_kv_test.go:62: my-namespace/foobar = data
        v3_kv_test.go:62: my-namespace/foobar1 = data
        v3_kv_test.go:62: namespace/foobar1 = data
        v3_kv_test.go:72: foobar = data
        v3_kv_test.go:72: foobar1 = data
        v3_kv_test.go:87: delete keys:2
        testing.go:1038: race detected during execution of test
```
2021-01-11 10:06:31 +01:00
5b90402082 Switch from dgrijalva/jwt-go to form3tech-oss/jwt-go.
dgrijalva/jwt-go has been abandoned and contains several serious
security issues. Most projects are now switching to the form3tech fork.

See https://snyk.io/vuln/SNYK-GOLANG-GITHUBCOMDGRIJALVAJWTGO-596515 for
info on the issues.

Signed-off-by: Dan Lorenc <dlorenc@google.com>
2021-01-10 08:04:20 -06:00
23340bb62a Refresh proto generation script after moving modules files.
With modulatiozation server protos get moved into ./server directory,
but it was not reflected in scripts/genproto.sh.
2021-01-08 16:33:12 +01:00
c632042bb9 Merge pull request #12489 from zhijianli88/cleanup-tmpfiles
Cleanup tmpfiles
2021-01-07 12:26:04 -05:00
91bdc7eb49 Putting etcd/v3 as a FORBIDDEN_DEPENDENCY for etcdctl. 2021-01-07 08:45:24 -06:00
0abc7515b9 Documentation: Removing etcd v2 specific etcd_http* alerts 2021-01-05 22:28:30 +05:30
ebf461a7de backend: fix buffer range bug 2020-12-30 16:05:42 +08:00
a4570a60e7 Merge pull request #12549 from bbiao/bugfix/refresh_token
client/v3: clear auth token when encounter ErrInvalidAuthToken
2020-12-29 22:08:14 -05:00
826573586f transport: catch new cert error
in pkg/transport, we should catch NewCert error.
2020-12-30 09:33:42 +08:00
af4ef4ec04 client/v3: clear auth token when encounter ErrInvalidAuthToken
Old etcdserver which have not apply pr of #12165 will check auth token
even if the request is an Authenticate request.
If the client has a invalid auth token, it will not able to update it's
token, since the Authenticate has a invalid auth token.
This fix clear the auth token when encounter an ErrInvalidAuthToken to
talk with old version etcd servers.

Fix #12385 with #12165 and #12264
2020-12-27 11:08:22 +08:00
a1ff0d5373 Merge pull request #12328 from viviyww/tests-e2e-panic-case
tests: fix test case panic error
2020-12-24 14:54:33 -05:00
a88877ec7b Merge pull request #12579 from ianwoolf/fix-clientv3-readme
docs: update client v3's godoc link in readme
2020-12-23 14:08:30 -08:00
ad5b30297a Merge pull request #12575 from nate-double-u/81-docs-toc-compilation
Documentation Content: TOC — Compilation PR (weights & descriptions)
2020-12-23 15:27:49 -05:00
6c08437ec3 Adding weights and descriptions to Documentation files' frontmatter.
Updating for new TOC as per issue https://github.com/etcd-io/website/issues/81

Signed-off-by: Nate W <4453979+nate-double-u@users.noreply.github.com>
2020-12-23 11:13:04 -08:00
fc5b5fa31e fix godoc link in clientv3 readme 2020-12-23 10:59:13 +08:00
4726911ea5 Merge pull request #12570 from juzhiyuan/patch-1
docs: update client v3's README
2020-12-21 12:03:50 -05:00
bd97953de3 Update README.md 2020-12-21 17:40:40 +08:00
0539bcb81f Merge pull request #12509 from nate-double-u/81-docs-toc-sections
Documentation Content: TOC — Sections Order
2020-12-19 18:17:35 -05:00
549bff5980 docs: update client v3's README 2020-12-20 00:06:10 +08:00
47dbeeb65a Removing errant commented out replace line 2020-12-15 12:05:26 -06:00
c899316fe8 Adding clientv3 import alias to match usage in register_test.go. 2020-12-15 11:54:03 -06:00
a3174d0f8e Merge pull request #12544 from sid597/learning-authDesign-link-update
[3.4.0] Documentation (learning-design_auth_v3) : Path to client.go updated
2020-12-13 20:12:46 -05:00
cb6951c9f0 Merge pull request #12540 from sid597/learning-why-links-update
[3.4.0] Documentation (Learning-why) : Broken links updated
2020-12-12 21:49:30 -05:00
67da5e9722 Documentation (dev_guide--api_concurrency_reference_v3) : Path to v3lock
and v3election updated

Current path for v3lock and v3election are set to :
etcdserver/api/v3lock/v3lockpb... and etcdserver/api/v3election/v3electionpb... respectively
changed them to server/etcdserver...
2020-12-11 18:21:17 +05:30
07fbd24f3d [3.4.0] Documentation (learning-design_auth_v3) : Path to client.go
outdated
2020-12-11 18:11:26 +05:30
fe4833730d recipes link updated 2020-12-10 23:20:14 +05:30
2e873e6a9f Documentation (Learning-why) : Broken links updated 2020-12-10 22:42:38 +05:30
f2a912a4e6 test: change channel operations to avoid potential goroutine leaks
In these unit tests, goroutines may leak if certain branches are chosen. This commit edits channel operations and buffer sizes, so no matter what branch is chosen, the test will end correctly. This commit doesn't change the semantics of unit tests.
2020-12-09 22:23:21 -05:00
b0e2c70c71 contrib/systemd: add a sysusers entry
This adds a sysusers.d file, in order to create a system user/group
which matches the one used by the service unit.

Ref: https://www.freedesktop.org/software/systemd/man/sysusers.d.html
2020-12-09 13:59:46 +00:00
bedad020eb Adding weights to main section files
Updating for new TOC as per issue https://github.com/etcd-io/website/issues/81

Signed-off-by: Nate W <4453979+nate-double-u@users.noreply.github.com>
2020-12-08 16:22:29 -08:00
ca866c0242 Merge pull request #12511 from randomizedcoder/failures.md
failures.md explicit cluster members note
2020-12-03 20:02:09 -05:00
0c6357469d failures.md explicit cluster members note 2020-12-03 15:47:07 -08:00
bfc97c1123 Merge pull request #12499 from ptabor/20201127-modules-docs
Documentation: Developer's docs about etcd-3.5.x modules
2020-12-02 17:20:44 -05:00
c0d44ec4b7 Add CodeQL Security Scanning
Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
2020-12-02 10:37:09 -08:00
4d173231d1 Documentation: Developer's docs about etcd-3.5.x modules 2020-12-02 10:00:09 +01:00
082b9a815d minor fix on inconsistent format of test case's error message 2020-11-30 12:18:12 +08:00
28d1af294e CHANGELOG-3.4: update release dates
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-11-25 12:21:32 -08:00
64c409e124 Merge pull request #12491 from gyuho/better-exec
*: validate exec command args, remove unused "iptables" wrapper
2020-11-25 11:26:58 -08:00
b40b46f473 CHANGELOG: updates
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-11-25 10:40:42 -08:00
85b61c0f4d pkg/netutil: remove unused "iptables" wrapper
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-11-25 10:38:42 -08:00
3eea37cf31 tools/etcd-dump-metrics: validate exec cmd args
To prevent arbitrary command invocations.

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-11-25 10:37:52 -08:00
fb3f91c141 test: cleanup temporary file for TestConfigFromFile
Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
2020-11-25 17:40:43 +08:00
63c284211d test: cleanup temporary files for TestZeroToEnd
Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
2020-11-25 17:33:43 +08:00
3f6e0ec94b fix: pass argument url in defer to avoid loopclosure
Because of the well-known range loop closure issue, the value of u may
have changed by the time the anonymous function mentioned in the defer
is run. To address this, the simplest fix is to pass the url used in the
loop as an argument to the function run in defer.
2020-11-19 15:29:26 -06:00
b5cefb5b3d Merge pull request #12392 from ironcladlou/fixture-mutations
tests: prevent cross-test contamination via shared state
2020-11-19 10:05:42 -08:00
9571325fe8 etcdserver: fix incorrect metrics generated when clients cancel watches
Before this patch, a client which cancels the context for a watch results in the
server generating a `rpctypes.ErrGRPCNoLeader` error that leads the recording of
a gRPC `Unavailable` metric in association with the client watch cancellation.
The metric looks like this:

    grpc_server_handled_total{grpc_code="Unavailable",grpc_method="Watch",grpc_service="etcdserverpb.Watch",grpc_type="bidi_stream"}

So, the watch server has misidentified the error as a server error and then
propagates the mistake to metrics, leading to a false indicator that the leader
has been lost. This false signal then leads to false alerting.

The commit 9c103dd0de introduced an interceptor which wraps
watch streams requiring a leader, causing those streams to be actively canceled
when leader loss is detected.

However, the error handling code assumes all stream context cancellations are
from the interceptor. This assumption is broken when the context was canceled
because of a client stream cancelation.

The core challenge is lack of information conveyed via `context.Context` which
is shared by both the send and receive sides of the stream handling and is
subject to cancellation by all paths (including the gRPC library itself). If any
piece of the system cancels the shared context, there's no way for a context
consumer to understand who cancelled the context or why.

To solve the ambiguity of the stream interceptor code specifically, this patch
introduces a custom context struct which the interceptor uses to expose a custom
error through the context when the interceptor decides to actively cancel a
stream. Now the consuming side can more safely assume a generic context
cancellation can be propagated as a cancellation, and the server generated
leader error is preserved and propagated normally without any special inference.

When a client cancels the stream, there remains a race in the error handling
code between the send and receive goroutines whereby the underlying gRPC error
is lost in the case where the send path returns and is handled first, but this
issue can be taken separately as no matter which paths wins, we can detect a
generic cancellation.

This is a replacement of https://github.com/etcd-io/etcd/pull/11375.

Fixes #10289, #9725, #9576, #9166
2020-11-18 17:02:09 -05:00
c11ddc65ce Merge pull request #12448 from agargi/introduce_config_parameter
server: Added config parameter experimental-apply-warning-duration
2020-11-19 02:29:08 +08:00
c1c681adc3 server: Added config parameter experimental-warning-apply-duration 2020-11-17 17:33:19 -05:00
06e48f0486 Merge pull request #12476 from hexfusion/mixin-typo
Documentation/etcd-mixin: fix typo
2020-11-15 19:19:35 -05:00
07c15890ab Documentation/etcd-mixin: fix typo
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2020-11-15 12:26:18 -05:00
1b8d2b1a47 Merge pull request #12452 from ptabor/20201104-release-mod-scripts
Release scripts for modules
2020-11-14 03:42:42 -08:00
dc586a5ad2 Merge pull request #12459 from jingyih/proper_request_cancellation
server: proper cancellation for range request
2020-11-13 12:20:41 -08:00
67f040f921 Update other Documentation/v2 links 2020-11-11 09:57:01 +08:00
f2eb15a81b chore: update the documentation link in the comment
Close #12462.
2020-11-11 09:53:18 +08:00
01844fd285 Merge pull request #12455 from mborsz/metrics
Add etcd_server_apply_duration_seconds
2020-11-10 00:47:11 +08:00
718e1a7d89 Merge pull request #12451 from jingyih/update_metrics_doc
Documentation: add generated metrics docs
2020-11-09 23:23:23 +08:00
0bea7df7c1 Add metric tracking apply method duration:
* etcd_server_apply_duration_seconds

It can be used to understand which operations are slow,
in addition to the warning log message.
2020-11-06 11:11:16 +01:00
0558e379c3 server: proper request cancellation for range 2020-11-05 21:30:02 -08:00
eeafcef0d2 Use "v3.5.0-pre" to reference within-etcd modules
instead of v3.0.0-000101010000000-00000000000,
that might be misleading as we don't develop etcd v3.0.0 any longer.

This version is a virtual version and is not supposed to be tagged
within the repository. We should tag real versions like: 3.5.0-alpha.0.

Please notice that go.etcd.io/etcd/client/v2 will be versioned as `v2.305.0-pre`.
The reason is that client v2 must have v2 version. I propose a
convention to envode the major version as 100x in minor version to make
the association to the underlying repository clear, staying within v2
version family.

The change was generated using:
```
DRY_RUN=false TARGET_VERSION="v3.5.0-pre" ./scripts/release_mod.sh update_versions
```
2020-11-04 18:28:43 +01:00
b33c6c088e Documentation: add metrics docs 2020-11-04 22:20:37 +08:00
fd2f34fd13 Release: Scripts to change versions in all go.mod files and push tags upstream.
Examplar invocations:

Edit go.mod files such that all etcd modules are pointing on given version:

```
% DRY_RUN=false TARGET_VERSION="v3.5.13" ./scripts/release_mod.sh update_versions
```

Tag latest commit with current version number for all the modules and push upstream:
```
% DRY_RUN=true REMOTE_REPO="origin" ./scripts/release_mod.sh push_mod_tags
```
2020-11-04 15:16:36 +01:00
6e800b9b01 20201103 no commit title check (#12447)
* Turn off checking of format of commit message.

* scripts/fix.sh: Fix fixing whitespaces in *.sh scripts

Aparently there is a difference between:
  find ./ -print0 -name *.sh and
  find ./ -name *.sh -print0

* etcdserver unit tests: Do not call .Fatalf(...) from not test's goroutine.

Fixes following test failures:
https://travis-ci.com/github/etcd-io/etcd/jobs/425920416
```
% (cd server && go vet ./...)
stderr: # go.etcd.io/etcd/server/v3/etcdserver
stderr: etcdserver/server_test.go:1002:4: call to (*T).Fatalf from a non-test goroutine
stderr: etcdserver/server_test.go:1166:4: call to (*T).Fatalf from a non-test goroutine
FAIL: (code:2):
  % (cd server && go vet ./...)
FAIL: 'run go vet ./...' checking failed (!=0 return code)
FAIL: 'govet' failed at Tue Nov  3 04:07:47 UTC 2020
```
2020-11-03 07:59:42 -08:00
64e048bea9 Merge pull request #12444 from kolyshkin/fix-lock
pkg/fileutil: fix F_OFD_ constants
2020-11-03 23:31:22 +08:00
8c3c398676 Merge pull request #12437 from cfc4n/down_gobin_noexist
scripts: install github.com/myitcv/gobin while gobin doesn't exist.
2020-11-03 23:23:14 +08:00
cd09726ae0 Merge pull request #12430 from meadlai/master
Fix go get cmd
2020-11-03 22:52:24 +08:00
f224fa4e42 Merge pull request #12425 from viviyww/cluster-set-version
etcdserver: updated cluster version
2020-11-03 22:41:24 +08:00
4eb4250e6d pkg/fileutil: fix F_OFD_ constants
Use golang.org/x/sys/unix for F_OFD_* constants.

This fixes the issue that F_OFD_GETLK was defined incorrectly,
resulting in bugs such as https://github.com/moby/moby/issues/31182

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2020-11-02 19:37:25 -08:00
86185ba20f Merge pull request #12443 from cfc4n/makefile_xargs_r
Makefile: -r is only necessary on GNU xargs.
2020-11-02 10:51:09 -08:00
72ebd50d8a Makefile: -r is only necessary on GNU xargs. 2020-11-02 16:48:48 +08:00
170af891d6 Merge pull request #12429 from tangcong/fix-cert-exp
*: add self-signed-cert-validity flag to fix cert expire issue
2020-10-30 11:41:23 -07:00
2e55875cc7 scripts: install github.com/myitcv/gobin while gobin doesn't exist. 2020-10-30 20:58:00 +08:00
0b4b5d84c6 CHANGELOG: update for 12429 2020-10-30 10:10:30 +08:00
8fd24f51c3 documentation: add certificates expired note 2020-10-30 10:10:30 +08:00
a960d6b1c7 *: add self-signed-cert-validity flag 2020-10-30 10:10:26 +08:00
ec37e15caf Update README.md 2020-10-28 14:34:03 +08:00
aa1024a16e etcdserver: updated cluster version
during cluster version update in etcd cluster, the log should info from
XX to XX.
2020-10-27 16:32:40 +08:00
ed81d2e2db client: replace dial with dialContext 2020-10-27 12:43:14 +08:00
7da5182f1d Merge pull request #12422 from tangcong/fix-realpath
scripts: fix realpath command not found in mac os
2020-10-26 10:42:26 -07:00
ae7862e8bc Merge pull request #12417 from ptabor/20201020-server-module
Modularization: Make ./etcd server a module
2020-10-27 01:27:08 +08:00
8277395e1b scripts: use manual scripts to replace realpath 2020-10-27 00:36:28 +08:00
aaf423e962 server: Update imports.
find -name '*.go' | xargs sed -i --follow-symlinks 's|etcd/v3/|etcd/server/v3/|g'
2020-10-26 13:02:32 +01:00
6c1efd6ba5 server: Update go.mod 2020-10-26 13:02:32 +01:00
4a5e9d1261 server: Move server files to 'server' directory.
26  git mv mvcc wal auth etcdserver etcdmain proxy embed/ lease/ server
   36  git mv go.mod go.sum server
2020-10-26 12:57:19 +01:00
eee8dec0c3 Merge pull request #12421 from ptabor/20201026-fix-ws-shell
Unify tabs vs. spaces in the shell scripts
2020-10-26 04:42:59 -07:00
bc3a77d298 Merge pull request #12099 from YoyinZyc/downgrade-httphandler
[Etcd downgrade] Add http handler to enable downgrade info communication between each member
2020-10-26 04:42:24 -07:00
0ba16d8ee1 *: Convert tabulators to whitespaces in bash scripts.
Execution of `./scripts/fix.sh` that executed:
```
find ./ -name '*.sh' | xargs sed --follow-symlinks -i 's|\t|  |g'
```
2020-10-26 10:59:40 +01:00
c035df5317 test: Detect indention done using tab (\t) in *.sh 2020-10-26 10:59:40 +01:00
8fc5ef4a03 Merge pull request #12418 from ptabor/20201023-fix-flaky
./pkg/testutil: wait for: (*watchGrpcStream).sendCloseSubstream(...) goroutines.
2020-10-24 11:53:10 -07:00
8866d55b9b command: Enhance health command to check if there are any active alarms (#12150) 2020-10-22 15:55:15 -07:00
f2ee15a1e1 ./pkg/testutil: wait for: (*watchGrpcStream).sendCloseSubstream(...) goroutines.
Should solve the problem of flakes documented here:
https://github.com/etcd-io/etcd/issues/12372#issuecomment-706337969

```
% (cd tests && env go test -short -timeout=3m -cpu=4 --race=true ./... -p=2)

Unexpected goroutines running after all test(s).
1 instances of:
go.etcd.io/etcd/v3/clientv3.(*watchGrpcStream).sendCloseSubstream(...)
	/go/src/go.etcd.io/etcd/clientv3/watch.go:464 +0x204
created by go.etcd.io/etcd/v3/clientv3.(*watchGrpcStream).closeSubstream
	/go/src/go.etcd.io/etcd/clientv3/watch.go:480 +0x21f
FAIL	go.etcd.io/etcd/tests/v3/integration/clientv3/examples	2.111s
```

The goroutine finishes automatically with timeout of 250ms.The change
makes the test wait for it - if it still exists.

Examples:
  https://travis-ci.com/github/etcd-io/etcd/jobs/397449189
  https://travis-ci.com/github/etcd-io/etcd/jobs/397532784
  https://travis-ci.com/github/etcd-io/etcd/jobs/397696506
  https://travis-ci.com/github/etcd-io/etcd/jobs/403603526
2020-10-22 14:23:08 +02:00
97354af44b Merge pull request #12411 from ptabor/20201021-move-contrib-recipies
Modularization: Move contrib/recipies to clientv3/experimental/recipies/...
2020-10-22 17:40:05 +08:00
45b007b8b4 contrib,clientv3: Move contrib/recipies to clientv3/experimental/recipies/...
Recipies is set of patterns / primitives implementation on top of clientv3.
It's used by integration tests. It shouldn't be considered "server" code.
2020-10-22 11:10:07 +02:00
41557d9330 Merge pull request #12404 from ptabor/20201020-etcdctl-module
Modularization: etcdctl as a module
2020-10-21 21:48:38 +08:00
09679d29ad etcdctl: Rename of imports after making etcdctl a module.
```
find -name '*.go' | xargs sed -i --follow-symlinks 's|etcd/v3/etcdctl|etcd/etcdctl/v3|g'
```
2020-10-21 11:15:35 +02:00
ae962f7cda Merge pull request #12406 from tangcong/silence-stream-log
embed: only log stream error with debug level
2020-10-20 11:03:37 -07:00
d5363e3560 Merge pull request #12407 from tangcong/fix-networkpartition-flaky-test
clientv3test: fix network partition flaky test
2020-10-20 10:18:56 -07:00
0a830c871e clientv3test: fix network partition flaky test 2020-10-20 23:13:23 +08:00
27d308e173 embed: only log stream error with debug level 2020-10-20 21:56:06 +08:00
df48e499ea etcdctl: Make etcdctl a module (go.mod, LICENSE) 2020-10-20 12:07:27 +02:00
7c6c2c142b Merge pull request #12400 from ptabor/20201015-clientv2
Modularization: Migrate clientv3 to go.etcd.io/etcd/client/v3
2020-10-20 18:03:04 +08:00
e33c6dd9df client/v3: Rename of imports 2020-10-20 10:13:06 +02:00
cf795c0ae6 client/v3: Create and update go.mod 2020-10-20 10:09:12 +02:00
8a7f15511c clientv3: Move to client/v3 (just file move)
Mechanical:
% git mv clientv3 client/v3
% git mv client/mock client/v3/
2020-10-20 10:08:35 +02:00
5d930e5dc1 Merge pull request #12395 from ptabor/20201007-raft
Modularization: Make /raft a module
2020-10-20 16:00:08 +08:00
15f507f6b5 etcdserver: Fix 64 KB websocket notification message limit (#12403)
This fixes etcd being unable to send any message longer than 64 KB as
a notification over the websocket. This was because the older version
of grpc-websocket-proxy was used and WithMaxRespBodyBufferSize option
wasn't set.

Co-authored-by: Vitaliy Filippov <vitalif@yourcmc.ru>
2020-10-19 14:36:06 -07:00
e62417297d *: Rename of imports of raft (as its now a module)
% find -name '*.go' -o -name '*.md' -o -name '*.sh' | xargs sed -i --follow-symlinks 's|etcd/v3/raft|etcd/raft/v3|g'
2020-10-16 13:58:18 +02:00
bea5f379bc raft: Make raft a module
Establishing a module: Creating a go.mod files
2020-10-16 09:15:48 +02:00
b7f0f52a16 *: Refresh of dependencies (#12399)
This PR focuses on dependencies that have new stable versions.
2020-10-15 15:32:00 -07:00
e42127658c Merge pull request #12391 from ptabor/20201013-module-client
Modularization: Move /client/ -> /client/v2 and make it a module
2020-10-15 10:26:44 -07:00
45e4306508 client: Move client to client/v2 as a module.
We make v2 client code a module go.etcd.io/etcd/client/v2.

Pretty mechanical change that can be summarized as:

  mkdir client/v2
  cd client/v2 && git mod init go.etcd.io/etcd/client/v2

  git mv client/*.go client/v2/
  find -name '*.go' | xargs sed -i --follow-symlinks 's|/v3/client["]|/client/v2\"|g'

  + fixing changelog, bom, go.mod etc.
2020-10-15 14:39:43 +02:00
37c95c9fd4 tests: prevent cross-test contamination via shared state
The e2e tests can be flaky due to various tests mutating shared mutable
fixtures, causing non-deterministic behavior depending on the test set, order,
etc.

For example, `configTLS` is mutated in at least two tests in such a way that the
config is potentially invalidated for any subsequent test running in the same
process (e.g. by setting the `enableV2` field). This particular example caused
a substantial amount of confusion diagnosing the new test introduced for
https://github.com/etcd-io/etcd/pull/12370.

Independent tests should not share mutable state unless deliberately. This patch
refactors the e2e test config fixtures to safeguard against these problems by
replacing the package variables (which cannot easily be made immutable) with
functions that return new instances.
2020-10-14 13:58:00 -04:00
d0d927f0db Merge pull request #12397 from ptabor/20201015-update-protos2
tools: Update tools & go.mod for protos (gogo/protobuf 1.3.1, grpc 1.29.1, grpc-gateway 1.14.6)
2020-10-14 10:31:00 -07:00
371ddf0b69 tests: Update diagnostic update in tests after change of proto version. 2020-10-14 18:46:38 +02:00
cc7b4fab9f *: Execution of ./scripts/genproto.sh after versions change 2020-10-14 18:46:38 +02:00
da5ca2c0d5 tools: Update of go.mod for protos (gogo/protobuf 1.3.1, grpc 1.29.1, grpc-gateway 1.14.6)
This brings consistency between proto-generation code and actual versions of libraries being used in runtime:

github.com/gogo/protobuf                        v1.2.1,v1.0.0 -> v1.3.1
github.com/golang/protobuf                             v1.3.2 -> v1.3.5
github.com/grpc-ecosystem/grpc-gateway  v1.9.5,v1.4.1,v1.15.2 -> v1.14.6
google.golang.org/grpc                                v1.26.0 -> v1.29.1

Moved as far as possible, without bumping on grpc 1.30.0 "naming" decomissioning.
Please also notice that gogo/protobuf is likely to reach EOL: https://github.com/gogo/protobuf/issues/691
2020-10-14 18:46:38 +02:00
b08a46d37d Merge pull request #12396 from ptabor/20201014-deps
test: Adding dependencies consistency check
2020-10-14 20:44:29 +08:00
f7f17dd6a1 test: Adding dependencies consistency check
Examplar output for artificially inconsistent dependencies:

```
% PASSES="dep" ./test
% 'env' 'GO111MODULE=off' 'go' 'get' 'github.com/myitcv/gobin'
% 'env' 'GO111MODULE=off' 'go' 'get' 'github.com/myitcv/gobin'
% 'gofail' 'disable' 'etcdserver/' 'mvcc/backend/'
Running with -cpu=4 --race

'dep' started at Wed 14 Oct 2020 09:56:34 AM CEST
% (cd api && 'go' 'list' '-m')
% (cd api && 'go' 'list' '-f' '{{if not .Indirect}}{{if .Version}}{{.Path}},{{.Version}},go.etcd.io/etcd/api/v3{{end}}{{end}}' '-m' 'all')
% (cd pkg && 'go' 'list' '-m')
% (cd pkg && 'go' 'list' '-f' '{{if not .Indirect}}{{if .Version}}{{.Path}},{{.Version}},go.etcd.io/etcd/pkg/v3{{end}}{{end}}' '-m' 'all')
% 'go' 'list' '-m'
% 'go' 'list' '-f' '{{if not .Indirect}}{{if .Version}}{{.Path}},{{.Version}},go.etcd.io/etcd/v3{{end}}{{end}}' '-m' 'all'
% (cd tests && 'go' 'list' '-m')
% (cd tests && 'go' 'list' '-f' '{{if not .Indirect}}{{if .Version}}{{.Path}},{{.Version}},go.etcd.io/etcd/tests/v3{{end}}{{end}}' '-m' 'all')
FAIL: inconsistent versions for depencency: github.com/coreos/go-semver
github.com/coreos/go-semver:
  - v0.2.0 from: go.etcd.io/etcd/api/v3
  - v0.3.0 from: go.etcd.io/etcd/v3
FAIL: inconsistent dependencies
FAIL: 'dep' failed at Wed 14 Oct 2020 09:56:35 AM CEST
```
2020-10-14 09:57:27 +02:00
1b4f20f3df tests: fix test case panic error
Fix test case in tests/e2e/etcd_config_test.go:311, here should
check if it is nil. As the following errors:

--- FAIL: TestGrpcproxyAndCommonName (0.00s)
    etcd_config_test.go:304: Unexpected error: fork/exec ../../bin/etcd: no such file or directory
    etcd_config_test.go:309: Unexpected error: fork/exec ../../bin/etcd: no such file or directory
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
        panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x56bd96]
2020-10-14 11:30:23 +08:00
5d3609e3cf contrib: del systemd/etcd2-backup-coreos in docs
del systemd/etcd2-back-coreos in docs
2020-10-14 09:49:56 +08:00
afc5a717c9 Merge pull request #12390 from ptabor/20201013-scripts-fixes
tools: Migrate remaining tools to gobin
2020-10-13 13:58:51 -04:00
bc9e433ca2 tools: Migrate remaining tools to gobin
Replace ./scripts/install_tool.sh with `gobin`, such that we have
consistent handling for all tools needed for build and consistent
versioning within ./tools/mod/go.mod.

Side changes:
  - Expose /scripts/fix.sh that fixes formatting and bom across modules
  - Expose *.sh variants of scripts like build and ./test (first step
towards replacement).
  - Make stderr output of commands explicit and make commands use
different color than callouts.
2020-10-13 19:33:01 +02:00
061d8e8ead Merge pull request #12354 from ptabor/202009027-module-pkgs
Modularization: Make pkg a module (and distribute not pkg code)
2020-10-13 12:56:21 -04:00
667ed96957 wal: remove redundant war tmp dirs if create wal failed (#12388)
If we create 000000000-0000000.war failed in war tmp dir(XXX.tmp) and we should
remove the tmp dirs. If create war successfully in tmp dir and it will
be renamed to common dir and remove tmp dir(XXX.tmp) will also be ok.

Co-authored-by: yangweiwei <yangweiwei@cmss.chinamobile.com>
2020-10-13 08:11:52 -07:00
f408939aa1 bom: Update bill-of-materials generation logic (and refresh bom). 2020-10-13 07:50:08 +02:00
04f63b6571 go.mod,tests: Update go.mod for tests and . to reflect new dependencies. 2020-10-13 00:09:27 +02:00
de55bb6331 pkg: Rename imports after making 'pkg' a module
find -name '*.go' | xargs sed --follow-symlinks -i 's|go.etcd.io/etcd/v3/pkg/|go.etcd.io/etcd/pkg/v3/|g'
go fmt ./...
2020-10-13 00:09:27 +02:00
bfa91d48af pkg: Estabilish pkg as a module 2020-10-12 23:58:09 +02:00
1983c89e27 pkg/logutil, etcdserver: Move zap-raft logger to etcdserver.
This package depends on raft and is solelly used by etcdserver/raft.go.
So it does not fullfills conditions of:
```
pkg/ is a collection of utility packages used by etcd without being specific to etcd itself. A package belongs here
only if it could possibly be moved out into its own repository in the future.
```
2020-10-12 23:58:09 +02:00
5ba46f625f pkg/mock: Update imports to point on new files locations.
find ./ -name '*.go' | xargs sed -i 's|go.etcd.io/etcd/v3/pkg/mock/mockserver|go.etcd.io/etcd/v3/client/mock/mockserver|g'
find ./ -name '*.go' | xargs sed -i 's|go.etcd.io/etcd/v3/pkg/mock|go.etcd.io/etcd/v3/server/mock|g'
go fmt ./...
2020-10-12 23:58:09 +02:00
28036db6f0 Mechanical: Move mock packages out of ./pkg
Mechanical execution of:

```
git mv ./pkg/mock/mockserver ./client/pkg/mock
git mv ./pkg/mock/{mockstorage,mockstore,mockwait} ./server/pkg/mock
```

The packages depend on etcd API / protos - so they are NOT etcd-dependencies.
In such situation thay should be placed in 'pkg' folder.
2020-10-12 23:58:09 +02:00
0b95e8cef1 Merge pull request #12374 from ptabor/20201009-new-genproto
script/genproto.sh: Refactor to be explicit about versions.
2020-10-12 14:25:43 -07:00
fa83da446b Merge pull request #12369 from ptabor/20201007-snapshot-out
Modularization: clientv3/snapshot -> etcdctl/snapshot
2020-10-12 14:24:45 -07:00
891c69a5cf Merge pull request #12386 from 2hamed/patch-1
README: Fixed the link to `functional` test dir
2020-10-12 14:55:48 -04:00
f67b25102c e2e: increase the dialTimeout to fix the flaky test TestIssue6361 2020-10-12 11:13:46 -07:00
3e8ffc7cda etcdserver: add getDowngradeEnabled http handler; attach downgrade monitor to server to monitor downgrade status. 2020-10-12 10:50:35 -07:00
386bf316a4 README: Fixed the link to test dir 2020-10-11 20:40:34 +02:00
30811a06aa etcdctl, clientv3/snapshot: snapshot (Restore,Status) code out of client
"snapshot" Restore/Status code was the only remaining dependency of client on 'server'
code. The code is solelly used by etcdctl. Long-term the snapshot code
should be migrated to 'etcdadm' style of tool such that we can
distinguish tool solelly depending on networking API vs. tools that
operation on etcd files directly.

We left snapshot.Save() code in clientv3.snapshot package, such that
clients can benefits from automated download&safe to file snapshot
functionality over the wire.
2020-10-10 14:14:57 +02:00
00e49d0c10 build: Fix updating 'go.etcd.io/etcd/api/v3/version.GitSHA' + test (#12382)
During move of code to 'api' (0aab02e7b5),
I overlooked that the ./build script is setting the version on the 'symbol'.

I added a code to ./build script that checks whether the symbol's are in sync.
2020-10-09 17:32:15 -07:00
e1bf097928 Merge pull request #12266 from chaitanyaenr/etcd_fsync_alert
Add alerts for etcd fsync duration
2020-10-09 14:42:12 -04:00
bc0d8dad1e Merge pull request #12380 from ptabor/20201009-move-single-integration
[important] tests/integration: Move misplaced integration test integration/v3_kv_test.go
2020-10-09 13:14:15 -04:00
485030052a tests/integration: Move misplaces integration tests.
There was undetected 'conflict' between
  11ba1a6109
and 2c66612e0e.

Moving the file to proper location.
2020-10-09 09:39:55 +02:00
24724af7f1 etcdserver: prevent crash using expvars when server is not running (#12376)
The raft.status expvar is added at init time.
This change ensures that evaluating that expvar variable
doesn't panic during evaluation, even when there is
no server running.
2020-10-08 17:37:25 -07:00
11ba1a6109 namespace: check IsWithFromKey if keyLen equal 0. (#12307)
* namespace: check IsWithFromKey if keyLen equal 0.

Rename function isWithFromKey/isWithPrefix to IsOptsWithFromKey/IsOptsWithPrefix.

fixes: #12282

* integration: add test while WithFromKey/WithPrefix called in opts.
2020-10-08 17:34:09 -07:00
dfdda47bd8 script/genproto.sh: Refactor to be explicit about versions.
Refactoring script/genproto.sh around state-of-the-art techniques of
managing tooling in go:
  - https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module
  - uses https://github.com/myitcv/gobin instead of customly created gopath.proto dir
  - caches tools between executions
  - guaratees hermetics runs (it was not guaranteed for protoc_grpc_gateway that used latest)

The change is no-op for the generated code.

The commit reveals a few 'worring things':
  1  We depend on : github.com/grpc-ecosystem/grpc-gateway/@v/v1.4.1/protoc-gen-grpc-gateway
  2. And also     : github.com/grpc-ecosystem/grpc-gateway/@v/v1.15.0/protoc-gen-swagger/protoc-gen-swagger
  3. And on extremely old: github.com/gogo/protobuf@v1.0.0 protoc-gen-gofast that is out of sync with the library linked to binaries: github.com/gogo/protobuf@v1.2.1
2020-10-08 19:52:27 +02:00
2c66612e0e Merge pull request #12339 from ptabor/202009027-module-tests
Modularization: Establish 'testing' module (integration, functional, e2e)
2020-10-08 09:25:57 -07:00
f67956cb7a clientv3: Expose clientv3/examples close to the code.
Many of the tests had missing '// Output:' comment, so were not
runnable. They required fining.
2020-10-08 14:27:32 +02:00
dd45d04b2d clientv3/concurrency: Expose examples close to the source-code. 2020-10-07 15:46:56 +02:00
c5ccebf792 tests/integration: Simplify the testMain for examples.
We introduce a LazyCluster abstraction (instead of copy-pasted logic)
that makes clusters to be created only if there are runnable tests
in need for the infrastructure.
2020-10-07 15:42:35 +02:00
73b92fe688 tests: Make examples (for not client) to be both: documentation and integration-runnable
This CL tries to connect 2 objectives:
  - Examples should be close (the same package) to the original code,
    such that they can participate in documentation.
  - Examples should be runnable - such that they are not getting out of
    sync with underlying API/implementation.

In case of etcd-client, the examples are assuming running 'integration'
style, i.e. thay do connect to fully functional etcd-server.
That would lead to a cyclic dependencies between modules:
  - server depends on client (as client need to be lightweight)
  - client (for test purposes) depend on server.
Go modules does not allow to distingush testing dependency from
prod-code dependency.

Thus to meet the objective:
  - The examples are getting executed within testing/integration packages against real etcd
  - The examples are symlinked to 'unit' tests, such that they included in documentation.
  - Long-term the unit examples should get rewritten to use 'mocks' instead of real integration tests.
2020-10-07 15:38:40 +02:00
313087f8c5 ./test,./scripts: Update go.sum and bill-of-materials generation logic (and refresh bom). 2020-10-07 15:38:39 +02:00
9866c7e8ff .words: Expanded and resorted .words dictionary file.
Should fail following goword complains:
```
clientv3/config.go.48: // ("--max-request-bytes" flag to etcd or "embed.Config.MaxRequestBytes"). (spell: MaxRequestBytes -> ?)
clientv3/config.go.55: // ("--max-request-bytes" flag to etcd or "embed.Config.MaxRequestBytes"). (spell: MaxRequestBytes -> ?)
clientv3/leasing/doc.go.15: // Package leasing serves linearizable reads from a local cache by acquiring (spell: linearizable -> infeasible?)
clientv3/op.go.413: // it's linearizable. Serializable requests are better for lower latency (spell: linearizable -> infeasible?)
clientv3/retry.go.49: // an obvious server-side error (e.g. rpctypes.ErrRequestTooLarge). (spell: ErrRequestTooLarge -> Erectile?)
```
2020-10-07 15:38:39 +02:00
7886ec8574 test: Modules: PASSES="integration" ./test understand new file locations 2020-10-07 15:38:39 +02:00
be4e8b7013 integration/fixtures: Move the 'tests/integration/fixtures' directory up and update references.
I moved the files up as they are shared between e2e & integrational tests.
2020-10-07 15:38:28 +02:00
bb9703820c tests/integration: Move of naming/snapshot clientv3 tests (and yaml reference)
path change in clientv3/yaml/config_test

git mv clientv3/naming/grpc_test.go         tests/integration/clientv3/grpc_test.go
git mv clientv3/snapshot/*_test.go          tests/integration/snapshot
git mv clientv3/{main_test.go,example_*.go} tests/integration/clientv3/examples/
2020-10-07 15:37:24 +02:00
ffd4d5173c tests/mod.go: Update of go.mod after move of integration tests. 2020-10-07 15:37:24 +02:00
b27b17b44c tests/functional: Mechanical rename of imports etcd/v3/integration/ -> etcd/tests/v3/integration/... 2020-10-07 15:37:21 +02:00
3153038ffb tests/integration: Moving integration tests to tests/integration directory
git mv integration ./tests

git mv client/integration/* ./tests/integration/client
git mv clientv3/integration/* ./tests/integration/clientv3
git mv client/example_keys_test.go client/main_test.go tests/integration/client/examples
git mv clientv3/concurrency/*_test.go tests/integration/clientv3/concurrency

git mv etcdserver/api/v2store/store_v2v3_test.go etcdserver/api/v2v3/*_test.go tests/integration/v2store
git mv tests/integration/v2store/store_v2v3_test.go tests/integration/v2store/store_v2v3.go
git mv tests/integration/v2store/store_test.go tests/integration/v2store/store_v2v3_test.go
git mv etcdserver/api/v2store/store_test.go tests/integration/v2store
git mv etcdserver/api/v2store/store_v2_test.go tests/integration/v2store

git mv proxy/grpcproxy/*_test.go tests/integration/proxy/grpcproxy

git mv ./clientv3/snapshot/testdata ./clientv3/snapshot/*_test.go ./tests/integration/snapshot
2020-10-07 15:36:21 +02:00
b382429d01 tests: Move functional tests to 'tests' module.
Tested with:

PASSES="fmt functional unit" ./test
make build-docker-functional
2020-10-07 15:09:26 +02:00
8907b146d4 tests/functional: Mechanical rename of imports etcd/v3/functional/ -> etcd/tests/v3/functional/...
% find ./ -name "*.go" | xargs sed -i "s|go.etcd.io/etcd/v3/functional/agent|go.etcd.io/etcd/tests/v3/functional/agent|g"
% find ./ -name "*.go" | xargs sed -i "s|go.etcd.io/etcd/v3/functional/runner|go.etcd.io/etcd/tests/v3/functional/runner|g"
% find ./ -name "*.go" | xargs sed -i "s|go.etcd.io/etcd/v3/functional/tester|go.etcd.io/etcd/tests/v3/functional/tester|g"
% find ./ -name "*.go" | xargs sed -i "s|go.etcd.io/etcd/v3/functional/rpcpb|go.etcd.io/etcd/tests/v3/functional/rpcpb|g"
2020-10-07 15:09:12 +02:00
69254d8cf8 functional,tests: git mv functional tests/
Modularization: Mechanical move of "functional" directory into tests module using:

% git mv functional tests/
2020-10-07 15:03:51 +02:00
4fb48b7c14 tests: Estabilishing module for tests
For now it contains only e2e tests, but integration & functional will follow.
2020-10-07 15:03:51 +02:00
0aab02e7b5 Merge pull request #12367 from ptabor/20201005-api2client
Modularization: Move dependencies of client (protos, version) to api/ module
2020-10-07 05:56:11 -07:00
997961ebfd bom: Update bill of materials to reflect the new module. 2020-10-06 12:28:40 +02:00
ec3026fdc9 *: Run ./scripts/genproto.sh (protoc 3.12.3) after proto file moves.
The changed blobs are consequences of proto-descriptors changing as a
result of file moves.
2020-10-06 11:57:19 +02:00
28f2b07623 *: Update references to code moved to the api/ dir.
Follow up to file-moves done in the previous commit.

The commit contains purely mechanical consequences of execution (apart
of scripts/genproto.sh):

  % find ./ -name '*.go'  | xargs sed --follow-symlinks -i 's|v3/etcdserver/api/v3rpc/rpctypes|v3/api/v3rpc/rpctypes|g'
  % find ./ -name '*.go'  | xargs sed --follow-symlinks -i 's|v3/version|v3/api/version|g'
  % find ./ -name '*.go'  | xargs sed --follow-symlinks -i 's|v3/mvcc/mvccpb|v3/api/mvccpb|g'
  % find ./ -name '*.go'  | xargs sed --follow-symlinks -i 's|v3/etcdserver/etcdserverpb|v3/api/etcdserverpb|g'
  % find ./ -name '*.go'  | xargs sed --follow-symlinks -i 's|v3/etcdserver/api/membership/membershippb|v3/api/membershippb|g'
  % find ./ -name '*.go'  | xargs sed --follow-symlinks -i 's|v3/auth/authpb|v3/api/authpb|g'

  % find ./ -name '*.proto' -o -name '*.md'  | xargs -L 1 sed --follow-symlinks -i 's|/mvcc/mvccpb/kv.proto|/api/mvccpb/kv.proto|g'
  % find ./ -name '*.proto' -o -name '*.md'  | xargs -L 1 sed --follow-symlinks -i 's|/auth/authpb/auth.proto|/api/authpb/auth.proto|g'
  % find ./ -name '*.proto' -o -name '*.md'  | xargs -L 1 sed --follow-symlinks -i 's|/etcdserver/api/membership/membershippb/membership.proto|/api/membershippb/membership.proto|g'

  I also modified manually paths in scripts/genproto.sh.

  % go fmt ./...
2020-10-06 11:56:16 +02:00
2edb08642c api: Make api/ a module that will contain proto-definitions.
The module is supposed to contain minimal set of files that establish
public etcd server API. In particular client libraries for etcd built in
different languages might want to depend on this file.
2020-10-06 11:54:50 +02:00
389642dd16 client: Move client specific code (protos, version) to api/
client: Move client specific code (protos, version) to the api/
directory. Thanks to this change /client directory will not need to depend on
the server code. In next commits we make "/api" a module on its own.

Mechanical consequences of execution:

% git mv version/version.go api/version
% git mv etcdserver/api/v3rpc/rpctypes api/v3rpc
% git mv mvcc/mvccpb api/
% git mv etcdserver/etcdserverpb api/
% git mv auth/authpb api/
% git mv etcdserver/api/membership/membershippb api/
2020-10-06 11:53:36 +02:00
7bd956fa2b Merge pull request #12366 from guusvw/fix-yaml-indention-doc
the example alert file had a wrong indentation
2020-10-05 14:08:12 -04:00
985d4cffc4 Documentation: the example alert file had a wrong indentation
Signed-off-by: Guus van Weelden <guus.vanweelden@moia.io>
2020-10-05 18:11:21 +02:00
0693e2b4df Merge pull request #12355 from cfc4n/changelog_gettoken
CHANGELOG: update for #12165 , #12264 .
2020-10-05 11:14:09 -04:00
fdb3f89730 Merge pull request #12362 from ptabor/20201001-deflake-unit-race
Fix "race" - auth unit tests leaking goroutines
2020-10-04 20:47:52 -07:00
97820f1c6e integration: Fix flakes of TestV3WatchRestoreSnapshotUnsync
```
```

The flakes manifested as:
```
--- FAIL: TestV3WatchRestoreSnapshotUnsync (3.59s)
    v3_watch_restore_test.go:82: inflight snapshot sends expected 0 or 1, got ""
FAIL
coverage: 55.2% of statements
FAIL	go.etcd.io/etcd/v3/integration	3.646s
FAIL
```

The root reason is that all the SnapMsg processing happends on both ends
(leader, follower) assynchronously in goroutines, e.g. on Fifo schedule
within EtcdServer.run, so when we observe through metrics, we don't
know whether it finised (or even got started).

Idally we should have EtcdServer.Drain() call that exits when the server
processed or internal 'queues' and is idle.
2020-10-03 19:39:08 +02:00
98b123f034 mvcc: Fix races between metrics gathering and mvcc.Restore
The races was manifesting as following flakes:

```
```
See:
  https://github.com/etcd-io/etcd/issues/12336

I'm taking the locks for short-duration of time (instead of the whole
duriation of Restore) to allow metrics being gather when the server
restoration is in progress.

```
{"level":"warn","ts":"2020-09-26T13:33:13.010Z","caller":"clientv3/retry_interceptor.go:62","msg":"retrying of unary invoker failed","target":"endpoint://client-c9c21e47-2013-4776-8e83-e331b2caa9ae/localhost:14422410081761184170","attempt":0,"error":"rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = \"transport: Error while dialing dial unix localhost:14422410081761184170: connect: no such file or directory\""}
{"level":"warn","ts":"2020-09-26T13:33:13.011Z","caller":"clientv3/retry_interceptor.go:62","msg":"retrying of unary invoker failed","target":"endpoint://client-c9c21e47-2013-4776-8e83-e331b2caa9ae/localhost:14422410081761184170","attempt":0,"error":"rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = \"transport: Error while dialing dial unix localhost:14422410081761184170: connect: no such file or directory\""}
{"level":"warn","ts":"2020-09-26T13:33:16.285Z","caller":"clientv3/retry_interceptor.go:62","msg":"retrying of unary invoker failed","target":"endpoint://client-b504e954-e000-42a4-aa4f-70ded8dbef39/localhost:55672762955698614610","attempt":0,"error":"rpc error: code = NotFound desc = etcdserver: requested lease not found"}
{"level":"warn","ts":"2020-09-26T13:33:21.434Z","caller":"clientv3/retry_interceptor.go:62","msg":"retrying of unary invoker failed","target":"endpoint://client-7945004b-f67e-42aa-af11-a7b40fbbe6fc/localhost:49623072144007561240","attempt":0,"error":"rpc error: code = Canceled desc = context canceled"}
==================
WARNING: DATA RACE
Write at 0x00c000905f78 by goroutine 764:
  go.etcd.io/etcd/v3/mvcc.(*store).restore()
      /go/src/go.etcd.io/etcd/mvcc/kvstore.go:397 +0x773
  go.etcd.io/etcd/v3/mvcc.(*store).Restore()
      /go/src/go.etcd.io/etcd/mvcc/kvstore.go:343 +0x5f1
  go.etcd.io/etcd/v3/mvcc.(*watchableStore).Restore()
      /go/src/go.etcd.io/etcd/mvcc/watchable_store.go:199 +0xe2
  go.etcd.io/etcd/v3/etcdserver.(*EtcdServer).applySnapshot()
      /go/src/go.etcd.io/etcd/etcdserver/server.go:1107 +0xa49
  go.etcd.io/etcd/v3/etcdserver.(*EtcdServer).applyAll()
      /go/src/go.etcd.io/etcd/etcdserver/server.go:1031 +0x6d
  go.etcd.io/etcd/v3/etcdserver.(*EtcdServer).run.func8()
      /go/src/go.etcd.io/etcd/etcdserver/server.go:986 +0x53
  go.etcd.io/etcd/v3/pkg/schedule.(*fifo).run()
      /go/src/go.etcd.io/etcd/pkg/schedule/schedule.go:157 +0x11e
Previous read at 0x00c000905f78 by goroutine 180:
  [failed to restore the stack]
Goroutine 764 (running) created at:
  go.etcd.io/etcd/v3/pkg/schedule.NewFIFOScheduler()
      /go/src/go.etcd.io/etcd/pkg/schedule/schedule.go:70 +0x2b1
  go.etcd.io/etcd/v3/etcdserver.(*EtcdServer).run()
      /go/src/go.etcd.io/etcd/etcdserver/server.go:871 +0x32c
Goroutine 180 (running) created at:
  net/http.(*Server).Serve()
      /usr/local/go/src/net/http/server.go:2933 +0x5b6
  net/http/httptest.(*Server).goServe.func1()
      /usr/local/go/src/net/http/httptest/server.go:308 +0xd3
==================
--- FAIL: TestV3WatchRestoreSnapshotUnsync (6.74s)
    testing.go:906: race detected during execution of test
FAIL
coverage: 83.5% of statements
FAIL	go.etcd.io/etcd/v3/integration	231.272s
FAIL
Command 'go test -timeout=30m -cpu=1 --race --cover=true go.etcd.io/etcd/v3/integration' failed.
```
2020-10-03 19:39:08 +02:00
220f711a2a clientv3/integration: Fix leaked goroutine in case of skipped test. 2020-10-03 19:38:54 +02:00
528f5315d6 auth: Fix "race" - auth unit tests leaking goroutines
- We were leaking goroutines in auth-test
  - The go-routines were depending / modifying global test environment
variables (simpleTokenTTLDefault) leading to races

Removed the leaked go-routines, and expanded 'auth' package to
be covered we leaked go-routines detection.
2020-10-03 19:38:30 +02:00
0e5d81704f .travis.yml, scripts: Fix minor bugs in the test script.
1. setting environment variable cannot be in quote
2. "--race" testing for unit tests is supposed to be part of linux-amd64-unit-4-cpu-race config.
3. 'run' function in test script should log_error in case of failed
command (wrong operator for ints comparison in bash).
2020-10-01 14:34:58 +02:00
b0e8ec951c CHANGELOG: update for #12165 , #12264 . 2020-09-30 16:57:15 +08:00
ab4cc3caef raft/log: remove redundant code logic (#12346)
Remove redundant code logic

Co-authored-by: yangweiwei <yangweiwei@cmss.chinamobile.com>
2020-09-29 19:48:32 -07:00
a6b0375b7b Travis: Reduce footprint of unit tests - so hopefully flakiness (#12350)
* ./tests: Remove legacy coverage collection code

The legacy tests/cover.test.bash script was not ./test script
compatible for a long time.

The following method of coverage collection works (also across
packages) and does not make all the test execution slower.

```
COVERDIR=coverage PASSES="build build_cov cov" ./test
go tool cover -html ./coverage/cover.out
```

* CI: Reduce duplicated coverage between different variants on Travis

We used to execute unit tests in 3 different jobs,
every time with --race detection and every time in 3 variants:1,2,4
CPUS.

The proposed change makes each of the jobs use different variant of
CPUS, and only 4-cpu variant is running with --race detection
(as the more-parallel variant is more likely to experience races),
2020-09-29 19:47:05 -07:00
b47cd2f470 Merge pull request #12322 from ptabor/20200920-test-script
./test: Refactoring of test script for modularization
2020-09-29 11:09:24 -04:00
3022bd73ce Documentation/etcd-mixin/mixin.libsonnet: Add alerts for etcd fsync duration
This commit adds support to check the 99th percentile of the etcd
members fsync duration and fires a critical alert when it is greater
than 1 sec. The recommended fsync for etcd is 20 ms but there might
be scenarios where a user might be using bad disks for reasons. This
will make sure to let the user/admin know that it is critical for
etcd performance.
2020-09-28 08:08:20 -04:00
b3bbe10465 go.sum: Update & make sure PASSES="mod_tidy" ./test detects such problems.
Commit inspired by this failure:
  https://travis-ci.com/github/etcd-io/etcd/jobs/391164537

This is not happanning locally - but can be forced by removal of go.sum
file. Let's watch how frequently we will need to refresh go.sum.
2020-09-28 12:00:25 +02:00
f1d4593241 ./test: Refactoring of test script for modularization
This refactoring offers following benefits:

  - Unified way how go test commands are being called (in terms of flags intepretation)
  - Uses standard go mechanisms (like go lists) to find files/packages that are subject for test. The mechanism are module aware.
  - Added instruction how to install tools needed for the tests/checkers.
  - Added colors to the output to make it easier to spot any failure.

Confirmed to work using:
- COVERDIR="./coverage" CPU="4" RACE=false COVER=false PASSES="build build_cov cov" ./test
- CPU="4" RACE=false COVER=false PASSES="e2e functional integration" ./test
- COVERDIR="./coverage" COVER="false" CPU="4" RACE="false" PASSES="fmt build unit build_cov integration e2e integration_e2e grpcproxy cov" ./test
- PASSES=unit PKG=./wal TIMEOUT=1m ./test
- PASSES=integration PKG=./clientv3 TIMEOUT=1m ./test
- PASSES=unit PKG=./wal TESTCASE=TestNew TIMEOUT=1m ./test
- PASSES=unit PKG=./wal TESTCASE="\bTestNew\b" TIMEOUT=1m ./test
- PASSES=integration PKG=./client/integration TESTCASE="\bTestV2NoRetryEOF\b" TIMEOUT=1m ./test
- COVERDIR=coverage PASSES="build_cov cov" ./test
2020-09-28 11:07:50 +02:00
cc2b4cd05e etcdserver: add more detailed traces on linearized reading (#12335)
To improve debuggability of `agreement among raft nodes before
linearized reading`, we added some tracing inside
`linearizableReadLoop`.

This will allow us to know the timing of `s.r.ReadIndex` vs
`s.applyWait.Wait(rs.Index)`.
2020-09-26 19:08:36 -07:00
31426b0041 clientv3/ordering: Split mocked part of the test from integration-level test. 2020-09-26 08:44:58 +02:00
d65b5d6791 Makefile: Improve the 'make clean' to remove all the tmp artifacts 2020-09-25 22:20:52 +02:00
16eeedffaa pkg/testutil: Fixing flakes due to >>leak" text/template/parse goroutines.
Examplar flake: https://travis-ci.com/github/etcd-io/etcd/jobs/388806782
```
go test -timeout=5m -cpu=1 --run=Example ./client/...

ok  	go.etcd.io/etcd/v3/client	0.085s
testing: warning: no tests to run
PASS
Unexpected goroutines running after all test(s).
1 instances of:
text/template/parse.(*lexer).emit(...)
	/usr/local/go/src/text/template/parse/lex.go:157
text/template/parse.lexText(...)
	/usr/local/go/src/text/template/parse/lex.go:269 +0x4f0
text/template/parse.(*lexer).run(...)
	/usr/local/go/src/text/template/parse/lex.go:230 +0x37
created by text/template/parse.lex
	/usr/local/go/src/text/template/parse/lex.go:223 +0x190
FAIL	go.etcd.io/etcd/v3/client/integration	0.013s
```
2020-09-25 22:10:43 +02:00
73e5714bc5 integration: 'go test -tags cluster_proxy -v ./integration/... ./clientv3/...' passes now. (#12319)
The grpc-proxy test logic was assuming that the context associated to client is closed,
while in practice all tests called client.Close() without explicit context close.

The current testing strategy is complicated 2 fold:
  - grpc proxy works like man-in-the middle of each Connection issues
from integration tests and its lifetime is bound to the connection.
  - both connections (client -> proxy, and proxy -> etcd-server) are
represented by the same ClientV3 object instance (with substituted
implementations of KV or watcher).

The fix splits context representing proxy from context representing proxy -> etcd-server connection,
thus allowing cancelation of the proxy context.
2020-09-25 12:18:58 -07:00
3f36143790 pkg/traceutil: skip subTraceStart/subTraceEnd steps when logging steps (#12262)
SubTraceStart and SubTraceEnd steps are only placeholders, not really
steps, we should skip them when logging the long duration steps,
otherwise these steps will lead to incorrect start time and duration
 of subsequent steps.
2020-09-25 11:46:06 -07:00
7bf75824bf CHANGELOG: Update changelog about modules instead of ./vendor (#12313)
Follow up to PR: https://github.com/etcd-io/etcd/pull/12279
2020-09-25 11:29:51 -07:00
ed82418799 Documentation: Add etcd database quota alerts (#12249)
This commit:
- Fires a critical alert when the etcd database quota is 95% full
  at any given point of time to alert the user to defrag or increase
  the quota in order to avoid the alarm getting triggered which blocks
  all the writes to etcd meaning there can't be any new objects created.
  This is needed to make sure the cluster supports running large number
  of nodes and objects.
- Fires a warning when there is a sudden surge in etcd writes leading to
  increase in the etcd database quota size at an alarming rate as it
  is disruptive. It might be because of a rougue process and it's
  important to alert the admin.
2020-09-25 11:03:04 -07:00
8050881aaf clientv3:get AuthToken gracefully without extra connection. (#12165)
* etcdserver: check authinfo if it is not InternalAuthenticateRequest.

* credentials: let GetRequestMetadata() return nil when authToken isn't initialized.

* clientv3: get AuthToken gracefully without extra connection.
2020-09-25 11:01:54 -07:00
74fea11ddc Documentation/etcd-mixin: Adhere to monitoring mixins annotation guidelines (#12224)
* replaced `message` annotation field with `description`
* added simple `summary` field

Signed-off-by: paulfantom <pawel@krupa.net.pl>
2020-09-25 10:56:52 -07:00
add86bbd1a pkg/fileutil: use fcntl syscall wrappers from golang.org/x/sys/unix (#12316)
Direct syscalls using syscall.Syscall(SYS_*, ...) should no longer be
used on darwin, see [1]. Instead, use the fcntl libSystem wrappers
provided by the golang.org/x/sys/unix package which implement the same
functionality.

[1] https://golang.org/doc/go1.12#darwin
2020-09-24 23:02:32 -07:00
4136df7933 lease: fix lease expiry bases on wall clock (#12292)
fix https://github.com/etcd-io/etcd/issues/12291
2020-09-24 22:59:25 -07:00
8c192d99df clientv3: get AuthToken automatically when clientConn is ready. (#12264)
fixes: #11954
2020-09-24 22:43:21 -07:00
205a656cc5 Merge pull request #11853 from viviyww/dev1
tools: fix test case errors in etcd-dump-logs
2020-09-21 09:13:31 -07:00
353fcf0924 Merge pull request #12314 from viviyww/incorrect-log
etcdserver: fix log info error
2020-09-21 03:17:59 -07:00
de1550d7c8 Merge pull request #12318 from ptabor/20200920-leak-detection-flake-fix
pkg/testutil: Ignore flakes due to "leaked" testing.runTests goroutine
2020-09-21 01:22:06 -07:00
ff516e3a36 etcdserver: fix log info error
etcdserver#util.go#warnOfExpensiveReadOnlyTxnRequest logs with wrong prefix "read-only range ".
It has to be "read-only txn ".

fixes #12295
2020-09-21 16:00:01 +08:00
c88d1497ee tools: fix test case errors in etcd-dump-logs
Fix test case errors in etcd-dump-logs and the error is the time zone.
When the GOST time zone is CST or PST and the test case will be failed.
So we should set UTC as the standard time zone.
2020-09-21 15:54:47 +08:00
14566556f3 Merge pull request #12283 from teddylear/feature/FixPortOnTest
embed: TestStartEtcdWrongToken now uses dynamic ports instead of default
2020-09-20 08:30:48 -07:00
132098b028 Merge pull request #12311 from ptabor/20200917-proxy-watcher-progress-panic
integration,proxy: Skip WatchRequestProgress test in grpc-proxy mode.
2020-09-20 08:07:20 -07:00
3b92b9f884 embed: TestStartEtcdWrongToken now uses dynamic ports instead of default
To avoid issues with a test failing due to port conflict when etcd is
already running, this test now uses dynamic ports instead.

Fixes #11956
2020-09-19 11:29:22 -04:00
5f9a1394db integration,proxy: Skip WatchRequestProgress test in grpc-proxy mode.
Fixes:
  go test -tags cluster_proxy ./clientv3/integration -v -run TestWatchRequestProgress

Does not fail the grpc-server (completely) by a not implemented RPC.
Failing whole server by remote request is anti-pattern and security
risk.

Prior to the fix, the command line above was failing with:

```
=== RUN   TestWatchRequestProgress/0-watcher
panic: not implemented

goroutine 602 [running]:
go.etcd.io/etcd/v3/proxy/grpcproxy.(*watchProxyStream).recvLoop(0xc0004779d0, 0x0, 0x0)
	/home/ptab/corp/etcd/proxy/grpcproxy/watch.go:275 +0xac5
go.etcd.io/etcd/v3/proxy/grpcproxy.(*watchProxy).Watch.func1(0xc0034f94a0, 0xc0004779d0)
	/home/ptab/corp/etcd/proxy/grpcproxy/watch.go:129 +0x53
created by go.etcd.io/etcd/v3/proxy/grpcproxy.(*watchProxy).Watch
	/home/ptab/corp/etcd/proxy/grpcproxy/watch.go:127 +0x3c8
FAIL	go.etcd.io/etcd/v3/clientv3/integration	0.215s
FAIL
```
2020-09-19 17:27:07 +02:00
04b91945f4 pkg/testutil: Ignore flakes due to "leaked" testing.runTests goroutine.
The flake happened e.g. in:
https://travis-ci.com/github/etcd-io/etcd/jobs/386607570

```
--- PASS: TestWatchClose (0.37s)
PASS
Unexpected goroutines running after all test(s).
1 instances of:
testing.runTests.func1.1(...)
	/usr/local/go/src/testing/testing.go:1289 +0x60
created by testing.runTests.func1
	/usr/local/go/src/testing/testing.go:1289 +0xdb
FAIL	go.etcd.io/etcd/v3/clientv3/integration	344.389s
FAIL
```

This is implementation detail of Go testing.lib and we should not worry.
2020-09-19 17:16:21 +02:00
6d5b77b91b Merge pull request #12315 from BinacsLee/binacs-mvcc-fix-typo
mvcc: fix typo
2020-09-18 09:17:59 -07:00
6968c45f58 mvcc: fix typo 2020-09-18 06:50:56 +00:00
588c021ddb Merge pull request #12308 from zcchew1202/readme-fix
Doc: Add that grpc-proxy is optional in readme
2020-09-17 16:29:18 -04:00
be348f0ea6 Doc: Add that grpc-proxy is optional in readme
The script allows optionally enabling `grpc-proxy` so reflecting it in the doc…
2020-09-17 12:13:18 -04:00
528b01c327 Merge pull request #12303 from ptabor/20200915-v3compactor-metric-reporting
etcdserver: v3compactor should use proper clock for latency (took) reporting
2020-09-17 02:26:56 -07:00
2fee6bd5f3 Merge pull request #12279 from ptabor/20200908-no-vendor
vendor: Get rid of ./vendor
2020-09-17 02:21:56 -07:00
17ceed9b47 etcd.service: Support Graceful Reboot for AIO Node
Currently our sample systemd service file `contrib/systemd/etcd.service`
have startup/shutdown dependency as below:

    [Unit]
    After=network.target

For some rare condition, e.g. bare matel deployment with slow network
startup, IP could not be assigned e arly enough before etcd default
`ETCD_HEARTBEAT_INTERVAL="100"` and `ETCD_ELECTION_TIMEOUT="1000"` get
timeouted, after graceful system reboot.

This cause etcd false negative classify itself use unhealthy, therefore
stop rejoining the remaining online cluster members.

This PR introduce:

  - `etcd.service`: Ensure startup after `network-online.target` and
    `time-sync.target`, so effective network connectivity and synced
    time is available.

The logic is concept proof by
<https://github.com/alvistack/ansible-role-etcd/tree/develop>; also
works as expected with Ceph + Kubernetes deployment by
<https://github.com/alvistack/ansible-collection-kubernetes/tree/develop>.
No more deadlock happened during graceful system reboot, both AIO
single/multiple node with loopback mount.

Also see:

  - <https://github.com/ceph/ceph/pull/36776>
  - <https://github.com/etcd-io/etcd/pull/12259>
  - <https://github.com/cri-o/cri-o/pull/4128>
  - <https://github.com/kubernetes/release/pull/1504>

Signed-off-by: Wong Hoi Sing Edison <hswong3i@gmail.com>
2020-09-17 16:59:12 +08:00
3e1a64913a Merge pull request #12286 from ptabor/20200911-short-test-separated
*: 'go test --short ./...' runs all UNIT tests in <25s
2020-09-16 05:16:18 -07:00
3f449a8548 *: 'go test --short ./...' runs all UNIT tests.
Marked all 'integrational, e2e' as skipped in the --short mode.

Thanks to this we will be able to significantly simplify ./test script.

The run currently takes ~23s.
With (follow up) move of ~clientv3/snapshot to integration tests (as
part of modularization), we can expect this to fall to 5-10s.

```
% time go test --short ./... --count=1
ok  	go.etcd.io/etcd/v3	0.098s
?   	go.etcd.io/etcd/v3/Documentation/learning/lock/client	[no test files]
?   	go.etcd.io/etcd/v3/Documentation/learning/lock/storage	[no test files]
ok  	go.etcd.io/etcd/v3/auth	0.724s
?   	go.etcd.io/etcd/v3/auth/authpb	[no test files]
ok  	go.etcd.io/etcd/v3/client	0.166s
ok  	go.etcd.io/etcd/v3/client/integration	0.166s
ok  	go.etcd.io/etcd/v3/clientv3	3.219s
ok  	go.etcd.io/etcd/v3/clientv3/balancer	1.102s
?   	go.etcd.io/etcd/v3/clientv3/balancer/connectivity	[no test files]
?   	go.etcd.io/etcd/v3/clientv3/balancer/picker	[no test files]
?   	go.etcd.io/etcd/v3/clientv3/balancer/resolver/endpoint	[no test files]
ok  	go.etcd.io/etcd/v3/clientv3/clientv3util	0.096s [no tests to run]
ok  	go.etcd.io/etcd/v3/clientv3/concurrency	3.323s
?   	go.etcd.io/etcd/v3/clientv3/credentials	[no test files]
ok  	go.etcd.io/etcd/v3/clientv3/integration	0.131s
?   	go.etcd.io/etcd/v3/clientv3/leasing	[no test files]
?   	go.etcd.io/etcd/v3/clientv3/mirror	[no test files]
ok  	go.etcd.io/etcd/v3/clientv3/namespace	0.041s
ok  	go.etcd.io/etcd/v3/clientv3/naming	0.115s
ok  	go.etcd.io/etcd/v3/clientv3/ordering	0.121s
ok  	go.etcd.io/etcd/v3/clientv3/snapshot	19.325s
ok  	go.etcd.io/etcd/v3/clientv3/yaml	0.090s
ok  	go.etcd.io/etcd/v3/contrib/raftexample	7.572s
?   	go.etcd.io/etcd/v3/contrib/recipes	[no test files]
ok  	go.etcd.io/etcd/v3/embed	0.282s
ok  	go.etcd.io/etcd/v3/etcdctl	0.054s
?   	go.etcd.io/etcd/v3/etcdctl/ctlv2	[no test files]
ok  	go.etcd.io/etcd/v3/etcdctl/ctlv2/command	0.117s
?   	go.etcd.io/etcd/v3/etcdctl/ctlv3	[no test files]
ok  	go.etcd.io/etcd/v3/etcdctl/ctlv3/command	0.070s
ok  	go.etcd.io/etcd/v3/etcdmain	0.172s
ok  	go.etcd.io/etcd/v3/etcdserver	1.698s
?   	go.etcd.io/etcd/v3/etcdserver/api	[no test files]
ok  	go.etcd.io/etcd/v3/etcdserver/api/etcdhttp	0.075s
ok  	go.etcd.io/etcd/v3/etcdserver/api/membership	0.104s
?   	go.etcd.io/etcd/v3/etcdserver/api/membership/membershippb	[no test files]
ok  	go.etcd.io/etcd/v3/etcdserver/api/rafthttp	0.181s
ok  	go.etcd.io/etcd/v3/etcdserver/api/snap	0.078s
?   	go.etcd.io/etcd/v3/etcdserver/api/snap/snappb	[no test files]
ok  	go.etcd.io/etcd/v3/etcdserver/api/v2auth	0.142s
ok  	go.etcd.io/etcd/v3/etcdserver/api/v2discovery	0.035s
ok  	go.etcd.io/etcd/v3/etcdserver/api/v2error	0.043s
ok  	go.etcd.io/etcd/v3/etcdserver/api/v2http	0.070s
ok  	go.etcd.io/etcd/v3/etcdserver/api/v2http/httptypes	0.031s
?   	go.etcd.io/etcd/v3/etcdserver/api/v2stats	[no test files]
ok  	go.etcd.io/etcd/v3/etcdserver/api/v2store	0.645s
ok  	go.etcd.io/etcd/v3/etcdserver/api/v2v3	0.218s
?   	go.etcd.io/etcd/v3/etcdserver/api/v3alarm	[no test files]
?   	go.etcd.io/etcd/v3/etcdserver/api/v3client	[no test files]
ok  	go.etcd.io/etcd/v3/etcdserver/api/v3compactor	1.765s
?   	go.etcd.io/etcd/v3/etcdserver/api/v3election	[no test files]
?   	go.etcd.io/etcd/v3/etcdserver/api/v3election/v3electionpb	[no test files]
?   	go.etcd.io/etcd/v3/etcdserver/api/v3election/v3electionpb/gw	[no test files]
?   	go.etcd.io/etcd/v3/etcdserver/api/v3lock	[no test files]
?   	go.etcd.io/etcd/v3/etcdserver/api/v3lock/v3lockpb	[no test files]
?   	go.etcd.io/etcd/v3/etcdserver/api/v3lock/v3lockpb/gw	[no test files]
ok  	go.etcd.io/etcd/v3/etcdserver/api/v3rpc	0.091s
ok  	go.etcd.io/etcd/v3/etcdserver/api/v3rpc/rpctypes	0.012s
ok  	go.etcd.io/etcd/v3/etcdserver/cindex	0.054s
ok  	go.etcd.io/etcd/v3/etcdserver/etcdserverpb	0.039s
?   	go.etcd.io/etcd/v3/etcdserver/etcdserverpb/gw	[no test files]
ok  	go.etcd.io/etcd/v3/functional/agent	0.094s
?   	go.etcd.io/etcd/v3/functional/cmd/etcd-agent	[no test files]
?   	go.etcd.io/etcd/v3/functional/cmd/etcd-proxy	[no test files]
?   	go.etcd.io/etcd/v3/functional/cmd/etcd-runner	[no test files]
?   	go.etcd.io/etcd/v3/functional/cmd/etcd-tester	[no test files]
ok  	go.etcd.io/etcd/v3/functional/rpcpb	0.060s
?   	go.etcd.io/etcd/v3/functional/runner	[no test files]
ok  	go.etcd.io/etcd/v3/functional/tester	0.079s
ok  	go.etcd.io/etcd/v3/integration	0.684s
ok  	go.etcd.io/etcd/v3/integration/embed	0.101s
ok  	go.etcd.io/etcd/v3/lease	3.455s
ok  	go.etcd.io/etcd/v3/lease/leasehttp	2.185s
?   	go.etcd.io/etcd/v3/lease/leasepb	[no test files]
ok  	go.etcd.io/etcd/v3/mvcc	7.246s
ok  	go.etcd.io/etcd/v3/mvcc/backend	0.354s
?   	go.etcd.io/etcd/v3/mvcc/mvccpb	[no test files]
ok  	go.etcd.io/etcd/v3/pkg/adt	0.025s
?   	go.etcd.io/etcd/v3/pkg/contention	[no test files]
?   	go.etcd.io/etcd/v3/pkg/cpuutil	[no test files]
ok  	go.etcd.io/etcd/v3/pkg/crc	0.008s
?   	go.etcd.io/etcd/v3/pkg/debugutil	[no test files]
ok  	go.etcd.io/etcd/v3/pkg/expect	0.015s
ok  	go.etcd.io/etcd/v3/pkg/fileutil	0.268s
ok  	go.etcd.io/etcd/v3/pkg/flags	0.021s
ok  	go.etcd.io/etcd/v3/pkg/httputil	0.020s
ok  	go.etcd.io/etcd/v3/pkg/idutil	0.008s
ok  	go.etcd.io/etcd/v3/pkg/ioutil	0.025s
ok  	go.etcd.io/etcd/v3/pkg/logutil	0.047s
?   	go.etcd.io/etcd/v3/pkg/mock/mockserver	[no test files]
?   	go.etcd.io/etcd/v3/pkg/mock/mockstorage	[no test files]
?   	go.etcd.io/etcd/v3/pkg/mock/mockstore	[no test files]
?   	go.etcd.io/etcd/v3/pkg/mock/mockwait	[no test files]
ok  	go.etcd.io/etcd/v3/pkg/netutil	1.024s
ok  	go.etcd.io/etcd/v3/pkg/osutil	0.021s
ok  	go.etcd.io/etcd/v3/pkg/pathutil	0.008s
ok  	go.etcd.io/etcd/v3/pkg/pbutil	0.008s
ok  	go.etcd.io/etcd/v3/pkg/proxy	4.081s
ok  	go.etcd.io/etcd/v3/pkg/report	0.008s
?   	go.etcd.io/etcd/v3/pkg/runtime	[no test files]
ok  	go.etcd.io/etcd/v3/pkg/schedule	0.009s
ok  	go.etcd.io/etcd/v3/pkg/srv	0.019s
ok  	go.etcd.io/etcd/v3/pkg/stringutil	0.008s
?   	go.etcd.io/etcd/v3/pkg/systemd	[no test files]
ok  	go.etcd.io/etcd/v3/pkg/testutil	0.023s
ok  	go.etcd.io/etcd/v3/pkg/tlsutil	3.965s
ok  	go.etcd.io/etcd/v3/pkg/traceutil	0.034s
ok  	go.etcd.io/etcd/v3/pkg/transport	0.532s
ok  	go.etcd.io/etcd/v3/pkg/types	0.028s
ok  	go.etcd.io/etcd/v3/pkg/wait	0.023s
ok  	go.etcd.io/etcd/v3/proxy/grpcproxy	0.101s
?   	go.etcd.io/etcd/v3/proxy/grpcproxy/adapter	[no test files]
?   	go.etcd.io/etcd/v3/proxy/grpcproxy/cache	[no test files]
ok  	go.etcd.io/etcd/v3/proxy/httpproxy	0.044s
ok  	go.etcd.io/etcd/v3/proxy/tcpproxy	0.047s
ok  	go.etcd.io/etcd/v3/raft	0.312s
ok  	go.etcd.io/etcd/v3/raft/confchange	0.183s
ok  	go.etcd.io/etcd/v3/raft/quorum	0.316s
ok  	go.etcd.io/etcd/v3/raft/raftpb	0.024s
ok  	go.etcd.io/etcd/v3/raft/rafttest	0.640s
ok  	go.etcd.io/etcd/v3/raft/tracker	0.026s
ok  	go.etcd.io/etcd/v3/tests/e2e	0.077s
?   	go.etcd.io/etcd/v3/tools/benchmark	[no test files]
?   	go.etcd.io/etcd/v3/tools/benchmark/cmd	[no test files]
?   	go.etcd.io/etcd/v3/tools/etcd-dump-db	[no test files]
ok  	go.etcd.io/etcd/v3/tools/etcd-dump-logs	0.088s
?   	go.etcd.io/etcd/v3/tools/etcd-dump-metrics	[no test files]
?   	go.etcd.io/etcd/v3/tools/local-tester/bridge	[no test files]
?   	go.etcd.io/etcd/v3/version	[no test files]
ok  	go.etcd.io/etcd/v3/wal	1.517s
?   	go.etcd.io/etcd/v3/wal/walpb	[no test files]
go test --short ./... --count=1  76.12s user 12.57s system 375% cpu 23.635 total
```
2020-09-16 13:21:46 +02:00
138a312643 scripts: Removed updatedep.sh.
As we get rid of ./vendor there is no need to update the dependencies.

If anyone needs up-to-date vendor directory locally, getting it is as
simple as:

```go mod vendor```
2020-09-16 13:04:58 +02:00
2aaf4f3d7a Merge pull request #12278 from ptabor/20200907-fix-cov-integration
integration: Fix 'go test --tags cluster_proxy --timeout=30m -v ./integration/...'
2020-09-16 01:55:09 -07:00
6d07caee50 Merge pull request #12304 from jingyih/update_changelog_12288
CHANGELOG: update from #12288 and #12299
2020-09-15 22:31:01 -04:00
37fe4b9afa CHANGELOG: update from 12288 and 12299 2020-09-15 13:25:25 -07:00
872e5a78a3 clientv3/integration: Fix TestLeasingTxtOwnerGet test getting stuck in 'cluster_proxy' mode:
Fixes:
  go test --tags cluster_proxy --timeout=30m -run TestLeasingTxnOwnerGet -v ./clientv3/integration/...

The explicit code to close client is needed due to:
  76e769ce95/clientv3/watch.go (L72)
as just ctx close by LeasingKeyValue store does not interrupts opened Watches.
The only way to interrupt open Watch is to close the 'whole' Watcher / Client.
2020-09-15 18:06:58 +02:00
3752333162 Merge pull request #12288 from galal-hussein/fix_learner_panic_master
etcdserver: add ConfChangeAddLearnerNode to the list of config changes
2020-09-15 08:59:36 -07:00
2048c80760 etcdserver: v3compactor should use proper clock for latency (took) reporting.
The code used to:
  - report time since previous compaction success as a 'duration' of compaction process itself.
  - mix real clock with 'injected' clock. This led to strange log-lines
in tests in order of 234543543h of duration.
2020-09-15 16:43:05 +02:00
aa10b1ee7f ./test: Add PASSES="mod_tidy" check
Added check that ensures that go.mod & go.sum files are up-to-date.
The check verifies whether 'go mod tidy' does not generate any mutations
in these files.
The check can be run on its own:
  PASSES="mod_tidy" ./test
Or as part of "fmt" pass:
  PASSES="fmt" ./test

Examplar outputs:

```
% PASSES="fmt" ./test

Running with TEST_CPUS: 1,2,4
Starting 'fmt' pass at Fri 11 Sep 2020 11:07:54 PM CEST
'shellcheck' started at Fri 11 Sep 2020 11:07:54 PM CEST
'shellcheck' completed at Fri 11 Sep 2020 11:07:54 PM CEST
'markdown_you' started at Fri 11 Sep 2020 11:07:54 PM CEST
'markdown_you' completed at Fri 11 Sep 2020 11:07:54 PM CEST
'goword' started at Fri 11 Sep 2020 11:07:54 PM CEST
'goword' completed at Fri 11 Sep 2020 11:07:54 PM CEST
'gofmt' started at Fri 11 Sep 2020 11:07:54 PM CEST
'gofmt' completed at Fri 11 Sep 2020 11:07:55 PM CEST
'govet' started at Fri 11 Sep 2020 11:07:55 PM CEST
'govet' completed at Fri 11 Sep 2020 11:07:57 PM CEST
'revive' started at Fri 11 Sep 2020 11:07:57 PM CEST
Skipping revive...
'revive' completed at Fri 11 Sep 2020 11:07:57 PM CEST
'license_header' started at Fri 11 Sep 2020 11:07:57 PM CEST
'license_header' completed at Fri 11 Sep 2020 11:07:58 PM CEST
'receiver_name' started at Fri 11 Sep 2020 11:07:58 PM CEST
'receiver_name' completed at Fri 11 Sep 2020 11:07:58 PM CEST
'commit_title' started at Fri 11 Sep 2020 11:07:58 PM CEST
'commit_title' completed at Fri 11 Sep 2020 11:07:58 PM CEST
'mod_tidy' started at Fri 11 Sep 2020 11:07:58 PM CEST
*** /tmp/fileiALKRA_go.mod	2020-09-11 23:07:58.838010716 +0200
--- ./go.mod	2020-09-11 23:07:58.974010922 +0200
***************
*** 29,39 ****
  	github.com/mattn/go-runewidth v0.0.2 // indirect
  	github.com/modern-go/reflect2 v1.0.1
  	github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5
  	github.com/prometheus/client_golang v1.0.0
  	github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4
- 	github.com/prometheus/common v0.4.1
  	github.com/sirupsen/logrus v1.4.2 // indirect
  	github.com/soheilhy/cmux v0.1.4
  	github.com/spf13/cobra v0.0.3
  	github.com/spf13/pflag v1.0.1
  	github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8
--- 29,38 ----
./go.mod is not in sync with 'go mod tidy'
```

```
% PASSES="mod_tidy" ./test

Running with TEST_CPUS: 1,2,4
Starting 'mod_tidy' pass at Fri 11 Sep 2020 11:09:21 PM CEST
*** /tmp/file9gy4so_go.mod	2020-09-11 23:09:21.166133290 +0200
--- ./go.mod	2020-09-11 23:09:21.286133466 +0200
***************
*** 29,39 ****
  	github.com/mattn/go-runewidth v0.0.2 // indirect
  	github.com/modern-go/reflect2 v1.0.1
  	github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5
  	github.com/prometheus/client_golang v1.0.0
  	github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4
- 	github.com/prometheus/common v0.4.1
  	github.com/sirupsen/logrus v1.4.2 // indirect
  	github.com/soheilhy/cmux v0.1.4
  	github.com/spf13/cobra v0.0.3
  	github.com/spf13/pflag v1.0.1
  	github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8
--- 29,38 ----
./go.mod is not in sync with 'go mod tidy'
```
2020-09-15 14:38:54 +02:00
0f195baca1 ./test: CI (./test) should never edit go.mod nor go.sum files
Tested and received as expected:
```
...
go: updates to go.mod needed, disabled by -mod=readonly
```
2020-09-15 14:38:54 +02:00
d19758b501 go.sum: Regenerate go.sum to keep it fully in sync. 2020-09-15 14:38:54 +02:00
fb2e96e651 vendor: Get rid of ./vendor cleanup
Updated scripts and documentation to not recommend vendoring.
Implemented best practices for tools installation.

Performed multiple tests to confirm its not breaking any workflows and
has no negative performance impact. Rather see 3x speedup.

1. PASSES="fmt unit integration e2e functional" ./test
2. ./scripts/updatebom.sh
3. ./scripts/updatedep.sh
4. ./scripts/genproto.sh - works - ca be simplified - in follow up PR
5. Installation without explicit GOPATH:

```
% unset GOPATH
% [sudo] rm -rf ~/go
% git clone https://github.com/etcd-io/etcd.git
% time ./build
go: downloading google.golang.org/grpc v1.26.0
go: downloading github.com/jonboulle/clockwork v0.1.0
go: downloading github.com/prometheus/client_golang v1.0.0
go: downloading github.com/soheilhy/cmux v0.1.4
go: downloading github.com/gogo/protobuf v1.2.1
go: downloading sigs.k8s.io/yaml v1.1.0
go: downloading golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2
go: downloading github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903
go: downloading go.etcd.io/bbolt v1.3.5
go: downloading go.uber.org/zap v1.15.0
go: downloading golang.org/x/crypto v0.0.0-20191002192127-34f69633bfdc
go: downloading github.com/golang/protobuf v1.3.2
go: downloading github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8
go: downloading github.com/beorn7/perks v1.0.0
go: downloading github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4
go: downloading github.com/coreos/go-systemd/v22 v22.0.0
go: downloading gopkg.in/yaml.v2 v2.2.2
go: downloading github.com/coreos/go-semver v0.2.0
go: downloading github.com/sirupsen/logrus v1.4.2
go: downloading golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7
go: downloading github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
go: downloading github.com/google/uuid v1.0.0
go: downloading github.com/modern-go/reflect2 v1.0.1
go: downloading github.com/prometheus/common v0.4.1
go: downloading github.com/spf13/cobra v0.0.3
go: downloading github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2
go: downloading github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c
go: downloading github.com/spf13/pflag v1.0.1
go: downloading github.com/json-iterator/go v1.1.7
go: downloading github.com/dgrijalva/jwt-go v3.2.0+incompatible
go: downloading github.com/google/btree v1.0.0
go: downloading go.uber.org/atomic v1.6.0
go: downloading github.com/prometheus/procfs v0.0.2
go: downloading go.uber.org/multierr v1.5.0
go: downloading github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
go: downloading golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5
go: downloading github.com/grpc-ecosystem/grpc-gateway v1.9.5
go: downloading github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4
go: downloading github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4
go: downloading google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55
go: downloading github.com/matttproud/golang_protobuf_extensions v1.0.1
go: downloading golang.org/x/text v0.3.3
go: downloading github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5
go: downloading github.com/bgentry/speakeasy v0.1.0
go: downloading gopkg.in/cheggaaa/pb.v1 v1.0.25
go: downloading github.com/urfave/cli v1.20.0
go: downloading github.com/mattn/go-runewidth v0.0.2
./build  8.22s user 2.31s system 117% cpu 8.961 total
```

Before:
```
% git clone https://github.com/etcd-io/etcd.git && cd etcd && time ./build
Cloning into 'etcd'...
remote: Enumerating objects: 97872, done.
remote: Total 97872 (delta 0), reused 0 (delta 0), pack-reused 97872
Receiving objects: 100% (97872/97872), 58.97 MiB | 19.85 MiB/s, done.
Resolving deltas: 100% (63091/63091), done.

./build  34.97s user 4.15s system 236% cpu 16.555 total
```

6. Rebuild without changes:

```
% time ./build
./build  1.43s user 0.83s system 168% cpu 1.336 total
```

7. Instantation of vendor directory (assuming ./build loaded them to
$GOPATH/pkg):

```
time go mod vendor
go: downloading github.com/inconshreveable/mousetrap v1.0.0
go: downloading github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa
go: downloading github.com/creack/pty v1.1.11
go: downloading github.com/etcd-io/gofail v0.0.0-20190801230047-ad7f989257ca
go: downloading github.com/konsorten/go-windows-terminal-sequences v1.0.1
go mod vendor  0.51s user 0.44s system 110% cpu 0.861 total
```

8. Fresh instantation of vendor:

```
% rm -rf vendor
% [sudo] rm -rf ~/go

% time go mod vendor
go: downloading github.com/coreos/go-systemd/v22 v22.0.0
go: downloading github.com/spf13/cobra v0.0.3
go: downloading github.com/prometheus/client_golang v1.0.0
go: downloading golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7
go: downloading github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4
go: downloading github.com/gogo/protobuf v1.2.1
go: downloading sigs.k8s.io/yaml v1.1.0
go: downloading google.golang.org/grpc v1.26.0
go: downloading github.com/urfave/cli v1.20.0
go: downloading go.uber.org/zap v1.15.0
go: downloading github.com/spf13/pflag v1.0.1
go: downloading github.com/soheilhy/cmux v0.1.4
go: downloading github.com/json-iterator/go v1.1.7
go: downloading github.com/coreos/go-semver v0.2.0
go: downloading github.com/prometheus/common v0.4.1
go: downloading github.com/prometheus/procfs v0.0.2
go: downloading go.uber.org/atomic v1.6.0
go: downloading github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5
go: downloading github.com/golang/protobuf v1.3.2
go: downloading github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa
go: downloading github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4
go: downloading github.com/modern-go/reflect2 v1.0.1
go: downloading github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
go: downloading go.uber.org/multierr v1.5.0
go: downloading github.com/creack/pty v1.1.11
go: downloading github.com/mattn/go-runewidth v0.0.2
go: downloading github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
go: downloading golang.org/x/crypto v0.0.0-20191002192127-34f69633bfdc
go: downloading golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5
go: downloading github.com/jonboulle/clockwork v0.1.0
go: downloading gopkg.in/yaml.v2 v2.2.2
go: downloading github.com/etcd-io/gofail v0.0.0-20190801230047-ad7f989257ca
go: downloading github.com/grpc-ecosystem/grpc-gateway v1.9.5
go: downloading github.com/google/btree v1.0.0
go: downloading google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55
go: downloading github.com/beorn7/perks v1.0.0
go: downloading github.com/dgrijalva/jwt-go v3.2.0+incompatible
go: downloading github.com/google/uuid v1.0.0
go: downloading golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2
go: downloading github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8
go: downloading go.etcd.io/bbolt v1.3.5
go: downloading golang.org/x/text v0.3.3
go: downloading gopkg.in/cheggaaa/pb.v1 v1.0.25
go: downloading github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2
go: downloading github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4
go: downloading github.com/inconshreveable/mousetrap v1.0.0
go: downloading github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c
go: downloading github.com/matttproud/golang_protobuf_extensions v1.0.1
go: downloading github.com/bgentry/speakeasy v0.1.0
go: downloading github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903
go: downloading github.com/sirupsen/logrus v1.4.2
go: downloading github.com/konsorten/go-windows-terminal-sequences v1.0.1
go mod vendor  3.62s user 1.30s system 127% cpu 3.854 total
```

9. Size of the repository - before: 39M, after: 18M

Before:

```
% time git clone https://github.com/etcd-io/etcd.git
Cloning into 'etcd'...
remote: Enumerating objects: 97872, done.
remote: Total 97872 (delta 0), reused 0 (delta 0), pack-reused 97872
Receiving objects: 100% (97872/97872), 58.97 MiB | 20.53 MiB/s, done.
Resolving deltas: 100% (63091/63091), done.
git clone https://github.com/etcd-io/etcd.git  4.66s user 1.02s system 93% cpu 6.068 total

% du -h --exclude .git -d 1
944K	./clientv3
108K	./etcdmain
5.4M	./Documentation
384K	./security
384K	./mvcc
28K	./.github
8.0K	./version
144K	./contrib
240K	./proxy
2.5M	./etcdserver
112K	./embed
536K	./integration
332K	./tools
116K	./lease
108K	./logos
896K	./tests
960K	./raft
216K	./client
52K	./scripts
100K	./hack
464K	./etcdctl
3.0M	./pkg
620K	./functional
136K	./wal
152K	./auth
21M	./vendor
39M
```

After:
```
% time git clone https://github.com/ptabor/etcd.git -b 20200908-no-vendor
Cloning into 'etcd'...
remote: Enumerating objects: 38, done.
remote: Counting objects: 100% (38/38), done.
remote: Compressing objects: 100% (37/37), done.
remote: Total 98489 (delta 10), reused 8 (delta 1), pack-reused 98451
Receiving objects: 100% (98489/98489), 59.23 MiB | 21.26 MiB/s, done.
Resolving deltas: 100% (63572/63572), done.
git clone https://github.com/ptabor/etcd.git -b 20200908-no-vendor  5.56s user 1.05s system 105% cpu 6.260 total

% du -h --exclude .git -d 1
944K	./clientv3
108K	./etcdmain
5.4M	./Documentation
384K	./security
384K	./mvcc
28K	./.github
8.0K	./version
144K	./contrib
240K	./proxy
2.5M	./etcdserver
112K	./embed
536K	./integration
332K	./tools
116K	./lease
108K	./logos
896K	./tests
960K	./raft
216K	./client
56K	./scripts
100K	./hack
464K	./etcdctl
3.0M	./pkg
620K	./functional
136K	./wal
152K	./auth
19M	.
```
2020-09-15 14:38:54 +02:00
2d76f9d17d vendor: Remove /vendor and add to .gitignore 2020-09-15 14:38:47 +02:00
0a106754d3 etcdserver: Speed-up v3compactor unit tests.
The tests were taking ~15s because of 5s wait time in Recorder !?
2020-09-15 12:00:46 +02:00
7af8241764 etcdserver: add ConfChangeAddLearnerNode to the list of config changes
To fix a panic that happens when trying to get ids of etcd members in
force new cluster mode, the issue happen if the cluster previously had
etcd learner nodes added to the cluster

Fixes #12285
2020-09-14 17:49:57 +02:00
01bd0d468d Merge pull request #12297 from spzala/issue12093
config: grpc gateway
2020-09-14 08:19:45 -07:00
c7458015d3 config: grpc gateway
Currently, the grpc gateway is enabled by default when run the etcd server
using command line configuration. However, when provide config through
config file, the grpc gateway is disabled by default. We should either use
the same approach or at least document this.

related #https://github.com/etcd-io/etcd/issues/12093
2020-09-14 09:49:53 -04:00
2d43a3157e integration: Fix 'go test --tags cluster_proxy --timeout=30m -v ./integration/...'
grpc proxy opens additional 2 watching channels. The metric is shared
between etcd-server & grpc_proxy, so all assertions on number of open
watch channels need to take in consideration the additional "2"
channels.
2020-09-10 14:54:09 +02:00
32bad8e9a8 integration/cluster_proxy.go: Fix broken build with tags=cov.
Prior to the fix:
```
go test -mod=mod -timeout 30m -tags cluster_proxy "./integration/..."
```

Was failing with:
```
integration/cluster_proxy.go:58:37: not enough arguments in call to grpcproxy.NewWatchProxy
   have (*clientv3.Client)
   want (*zap.Logger, *clientv3.Client)
FAIL    go.etcd.io/etcd/v3/integration [build failed]
```
2020-09-10 14:54:09 +02:00
76e769ce95 Merge pull request #12273 from ptabor/2020-09-07-fix-grpc-proxy-tests
testing/e2e,grpcproxy: Fix: go test --tags "cluster_proxy" -v ./tests/e2e/...
2020-09-09 12:03:09 -07:00
e81cae77a3 Merge pull request #12274 from ptabor/20200907-fix-cov-e2e-tests
tests/e2e,etcdctl,etcdmain: Fix go test --tags cov -v ./tests/e2e
2020-09-09 11:14:18 -07:00
9d5a840942 etcdmain/grpc_proxy: Remove superflous logging line. 2020-09-09 20:04:25 +02:00
7c880e5263 etcdctl: Rename Start / StartWithErrors to MustStart 2020-09-09 19:32:50 +02:00
10fa9614e1 Merge pull request #12271 from jingyih/add_watch_notify_interval_flag_in_testing
integration: add WatchProgressNotifyInterval in integration test
2020-09-09 08:56:48 -07:00
c32180d772 tests/e2e,etcdctl,etcdmain: Fix go test --tags cov -v ./tests/e2e
This CL fixes:
  COVERDIR=./coverage PASSES="build_cov" && go test --tags cov -v ./tests/e2e
and is part of the effort to make:
  COVERDIR=coverage PASSES="build_cov cov" ./test
fully pass.

The args passed to ./bin/etcd_test and ./bin/etcdctl_test binaries were
mismatched. The protocol of passing the arguments using
environment variables has been replaces with proper passing of flags.

How the measurement of coverage by e2e tests works:
  1. COVERDIR=./coverage PASSES="build_cov" are generating
./bin/etcd_test and ./bin/etcdctl_test binaries.

  2. These binaries are tests (as coverage can be computed only for
tests) [see ./main_test.go ./etcdctl/main_test.go], but this tests are
running the main logic of the server and uppon termination (or SIGTERM
signal) are writting proper .coverprofile files in the $COVERDIR folder.
The binaries used to take arguments using env variables, but its not
needed any longer. The binaries can consume any command line arguments
that either test (so --test.fooo) or the original binary can consume.

 3.  The tests/e2e (when compiled with the --tags cov) are starting the
_test binaries instead of the original binaries, such that the coverage
is being collected.
2020-09-09 12:56:15 +02:00
73817b53fd integration: add flag WatchProgressNotifyInterval in integration test 2020-09-07 08:32:54 -07:00
093282f5ea tests/e2e: cluster_proxy tests use CN-less cert for etcd-server auth.
Change tests/e2e to use proper (client-nocn.crt) certificate when
running in tags="cluster_proxy" mode.

Thanks to this (and previous in this PR) changes, the following test run
finally succeeds:
  ./build && go test --tags "cluster_proxy" -v ./tests/e2e/...
2020-09-07 12:55:01 +02:00
2d0ce9de3d etcdmain: grpc-proxy should only require CN-less certificates for --cert flags.
We have following communication schema:
client --- 1 ---> grpc-proxy --- 2 --- > etcd-server

There are 2 sets of flags/certs in grpc proxy [ https://github.com/etcd-io/etcd/blob/master/etcdmain/grpc_proxy.go#L140 ]:
 A. (cert-file, key-file, trusted-ca-file, auto-tls) this are controlling [1] so client to proxy connection and in particular they are describing proxy public identity.
 B. (cert,key, cacert ) - these are controlling [2] so what's the identity that proxy uses to make connections to the etcd-server.

If 2 (B.) contains certificate with CN and etcd-server is running with --client-cert-auth=true, the CN can be used as identity of 'client' from service perspective. This is permission escalation, that we should forbid.

If 1 (A.) contains certificate with CN - it should be considered perfectly valid. The server can (should) have full identity.

So only --cert flag (and not --cert-file flag) should be validated for empty CN.
2020-09-07 11:59:28 +02:00
2c93127c7b integration: Regenerate certificates, add client-nocn.crt
Executed:
(cd ./integration/fixtures && ./gencerts.sh)

This in particular cereated a new client-nocn.crt (and key) that can be
used for testing grpc-proxy -> etcd-server connections.
2020-09-07 11:48:38 +02:00
966e8cecf0 integration: gencerts.sh cleanup and supports no-CN certs
integration/fixtures/gencerts.sh:
  - refactored common logic to a helper function
  - added definition for client-nocn certificate
    (used for grpc-proxy -> etcd-server) communication.
2020-09-07 11:47:24 +02:00
c20cc05fc5 mvcc: Export a "Last DB compaction" timestamp metric (#12176)
This is to aid with debugging the effectiveness of systems that
manually take care of cluster compaction, and have greater visibity
into recent compactions.

It can be handy to alert on the exactly how long it was since a
compaction (and also to put on dashboards) had happened.

---

Tested using a test cluster, the final result looks like this:

```
	root@etcd-1:~# ETCDCTL_API=3 /tmp/test-etcd/etcdctl --endpoints=192.168.232.10:2379 compact 1012
	compacted revision 1012

	root@etcd-1:~# curl -s 192.168.232.10:2379/metrics | grep last
	# HELP etcd_debugging_mvcc_db_compaction_last The unix time since the last db compaction.  Resets to 0 on start.
	# TYPE etcd_debugging_mvcc_db_compaction_last gauge
	etcd_debugging_mvcc_db_compaction_last 1.595873939e+09
```
2020-08-26 16:27:10 -07:00
facd0c9460 Merge pull request #12252 from spzala/changelogfileperm34and33
CHANGELOG: file perm updates in 3.4 and 3.3
2020-08-24 12:30:21 -07:00
1c0d73d248 CHANGELOG: file perm updates in 3.4 and 3.3
Updates for https://github.com/etcd-io/etcd/pull/12250 and
https://github.com/etcd-io/etcd/pull/12251
2020-08-24 11:58:19 -04:00
ae66916226 pkg: file stat warning (#12242)
Provide warning and doc instead of enforcing file permission.
2020-08-23 17:20:16 -07:00
c199d3d8c3 server: use buffered channel to avoid goroutine leak (#11941)
Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
2020-08-21 18:46:28 -07:00
261aa31dc5 Merge pull request #12243 from hexfusion/bump-x/text
vendor: bump golang.org/x/text
2020-08-21 10:03:01 -04:00
100c443a10 vendor: bump golang.org/x/text
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2020-08-21 09:14:40 -04:00
76993f1fc6 Merge pull request #12240 from avorima/fdusage_readdirnames
etcdserver: Use Readdirnames to count fds for FDUsage
2020-08-20 21:58:18 -07:00
ab9c14f477 Merge pull request #12241 from philips/add-asset-transparency-github-action
github: workflows: add asset-transparency release action
2020-08-20 14:03:19 -07:00
142358c13d github: workflows: add asset-transparency release action
From etcd-dev discussion:
https://groups.google.com/u/2/g/etcd-dev/c/oMGSBqs_7sc

I have been working on this system called Asset Transparency[1] which
helps users verify they have received the correct contents from a URL.
If you are familiar with the "download a file, download a SHA256SUM
file, run `sha256sum -c`, etc" process? This tool helps to automate
that for users into something like this[2]:

$ tl get https://github.com/etcd-io/etcd/releases/download/v3.4.12/etcd-v3.4.12-darwin-amd64.zip

And a best practice for this Asset Transparency system is that URLs
are registered with the log as soon as possible. Why? Well, the sooner
a URL is entered the longer it can protect people consuming a URL from
unexpected content modification from say a GitHub credential
compromise.

To that end I have written a GitHub Action[3] that will automatically
do that on every release. It is easy to activate and should be hands
free after installation. So, before I enable it I want to see if there
are any concerns from maintainers. The only change to our repo will be
a new file in .github/workflows.

[1] https://www.transparencylog.com
[2] https://github.com/transparencylog/tl
[3] https://github.com/transparencylog/publish-releases-asset-transparency-action
2020-08-20 11:32:36 -07:00
be70400fb5 etcdserver: Use Readdirnames to count fds for FDUsage
Readdir already calls Readdirnames, but continues to allocate
os.FileInfo with Lstat for each result.
2020-08-20 16:51:29 +02:00
4b6a0eea49 CHANGELOG: update with server panic fix
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-08-19 20:02:52 -07:00
44dea5df03 Merge pull request #12238 from liggitt/slow-v2-panic
etcdserver: Avoid panics logging slow v2 requests in integration tests
2020-08-19 09:20:47 -07:00
ad57fea4c5 etcdserver: Avoid panics logging slow v2 requests in integration tests 2020-08-19 11:30:15 -04:00
cfdc296a3c CHANGELOG: update release-3.2 dates
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-08-18 09:43:45 -07:00
edaac6e2a9 CHANGELOG: add v3.3.24 release dates
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-08-18 09:30:27 -07:00
e37b28bd28 CHANGELOG: add v3.4.11
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-08-18 09:23:24 -07:00
OG
0526f461e1 Doc: Update curl command to fix 400 Bad Request (#11911) 2020-08-16 16:12:39 -07:00
0e4ba37b6c Merge pull request #12193 from mitake/integration_test
test: avoid non existing package for integration test
2020-08-15 23:26:34 -07:00
d35933c351 Merge pull request #12221 from wenjiaswe/changelog_12215
CHANGELOG: update from 12215
2020-08-14 13:29:40 -07:00
32982ef469 CHANGELOG: update from 12215
Change-Id: I17e076554a56c95fabd95af111eccd8d7409966b
2020-08-14 13:18:02 -07:00
92f9e6eba2 Merge pull request #12216 from jingyih/experimental_flag_for_watch_notify_interval
*: add experimental flag for watch notify interval
2020-08-14 12:47:43 -07:00
799b16c2d1 CHANGELOG: update for PR12216 2020-08-14 12:06:38 -07:00
9a698476bf *: add experimental flag for watch notify interval 2020-08-14 12:01:00 -07:00
06f89cc4f8 Merge pull request #12212 from gyuho/logger
*: upgrade zap logger to 1.15, replace global logger
2020-08-13 09:46:44 -07:00
93cf449205 Merge pull request #12214 from gyuho/fd
*: optimize runtime.FDUsage + add OS level FD metrics
2020-08-12 18:37:05 -07:00
5678779665 CHANGELOG: update
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-08-12 10:32:27 -07:00
421df2ecbb etcdserver: add OS level FD metrics
Similar counts are exposed via Prometheus.
This adds the one that are perceived by etcd server.

e.g.

os_fd_limit 120000
os_fd_used 14
process_cpu_seconds_total 0.31
process_max_fds 120000
process_open_fds 17

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-08-12 10:32:27 -07:00
53fdcdc5a2 pkg/runtime: optimize FDUsage by removing sort
No need sort when we just want the counts.

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-08-12 10:32:24 -07:00
d8ed233791 CHANGELOG: update
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-08-12 09:50:00 -07:00
7eac6bd497 *: upgrade zap logger to 1.15, replace global logger
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-08-12 09:50:00 -07:00
ed27d9d2de Merge pull request #12198 from ptabor/20200803-int-to-string-test-fix
etcdserver, wal: Fix tests unintended CASTing of int->String.
2020-08-11 21:35:20 -07:00
8c44d25f2a Merge pull request #12211 from tangcong/ignore-errcompacted
etcdserver: ignore ErrCompacted error
2020-08-11 21:34:38 -07:00
fe36be2251 Merge pull request #12195 from tangcong/optimize-healthcheck
*: check health by using v3 range request and its corresponding timeout
2020-08-11 21:32:44 -07:00
8a4c7751d8 CHANGELOG: update for 12195 2020-08-12 08:10:13 +08:00
18adf55c92 Merge pull request #12199 from ptabor/20200803-expect-replace-fix
tests/e2e: Update github.com/creack/pty v1.1.7 -> v1.1.11
2020-08-11 11:59:12 -07:00
844091dda3 Merge pull request #12206 from ptabor/20200807-setLoggingDataRace
integration: Fix flakes due to .setupLogging race.
2020-08-11 11:58:47 -07:00
afa0e8196c etcdserver: ignore mvcc.ErrCompacted error 2020-08-11 23:45:20 +08:00
cd25d6c06e Merge pull request #12130 from ptabor/master
functional/tester: Update cluster_test.go to reflect functional.yaml
2020-08-09 02:14:31 +08:00
9d182c2a70 clientv3/integration: Fix flaky TestGetTokenWithoutAuth (#12200)
The test is vary flaky on Travis.

Seems that since (https://github.com/etcd-io/etcd/issues/7724) the
client is expected to simply ignore whether server is in AuthDisabled
mode even if the user supplies credentials.

The tests used to:
  * use very large cluster (10 nodes)
  * set very low timeout (1 sec)

Such setup led to frequent deadlineExceed errors or following failures:

    === RUN   TestGetTokenWithoutAuth
    {"level":"warn","ts":"2020-08-04T16:50:48.686+0200","caller":"clientv3/retry_interceptor.go:62","msg":"retrying of unary invoker failed","target":"endpoint://client-35573307-1ee5-441b-acc7-d073f0bd7de5/localhost:69820396562031027440","attempt":0,"error":"rpc error: code = Unavailable desc = etcdserver: leader changed"}
        user_test.go:151: other errors:etcdserver: leader changed
    --- FAIL: TestGetTokenWithoutAuth (10.91s)
2020-08-07 13:32:32 -07:00
830618e44d ./integration: Fix flakes due to .setupLogging race.
The source of problem was the fact that multiple tests were creating
their clusters (and some of them were setting global grpclog).
If the test was running after some other test that created HttpServer
(so accessed grpclog), this was reported as race.

Tested with:
  go test ./clientv3/. -v "--run=(Example).*" --count=2
  go test ./clientv3/. -v "--run=(Test).*" --count=2
  go test ./integration/embed/. -v "--run=(Test).*" --count=2
2020-08-07 13:54:41 +02:00
f395f82a75 Merge pull request #12202 from spzala/auditchangelog
CHANGELOG: update with added audit report
2020-08-05 08:56:16 -07:00
eafd374309 CHANGELOG: update with added audit report
Update the changelog for recently added audit report. Also mention the
report in the security readme.
2020-08-04 22:44:48 -04:00
d29af0f22b Merge pull request #12201 from spzala/audit
Add audit report
2020-08-04 20:25:24 -04:00
4edd2679f0 doc: add audit report
Adding audit report.
2020-08-04 19:07:18 -04:00
00de56a4a4 etcdserver, wal: Fix tests that were performing unintended casting of int to String.
Fixes following problems during "./etcd# go test ./..."

> go.etcd.io/etcd/v3/etcdserver/api/v2store_test
etcdserver/api/v2store/store_test.go:847:24: conversion from int to string yields a string of one rune, not a string of digits (did you mean fmt.Sprint(x)?)

> go.etcd.io/etcd/v3/wal
wal/wal_test.go:242:68: conversion from int to string yields a string of one rune, not a string of digits (did you mean fmt.Sprint(x)?)
2020-08-04 20:28:41 +02:00
b151a47d1b tests/e2e: Update github.com/creack/pty v1.1.7 -> v1.1.11
The fix is needed to mitigate consequences of
https://github.com/golang/go/issues/29458 "golang breaking change" that
causes following test failures on etcd end:

--- FAIL: TestCtlV2Set (0.00s)
    ctl_v2_test.go:552: could not start etcd process cluster (fork/exec ../../bin/etcd: Setctty set but Ctty not valid in child)
--- FAIL: TestCtlV2SetQuorum (0.00s)
    ctl_v2_test.go:552: could not start etcd process cluster (fork/exec ../../bin/etcd: Setctty set but Ctty not valid in child)
--- FAIL: TestCtlV2SetClientTLS (0.00s)
    ctl_v2_test.go:552: could not start etcd process cluster (fork/exec ../../bin/etcd: Setctty set but Ctty not valid in child)
2020-08-04 16:12:12 +02:00
36f07cb591 functional/tester: Update cluster_test.go to reflect current content of functional.yaml.
Before the change:

.../etcd/functional% go test -v ./...
...
?   	go.etcd.io/etcd/v3/functional/runner	[no test files]
=== RUN   Test_read
{"level":"info","ts":1596018672.2852418,"caller":"tester/cluster_read_config.go:36","msg":"opened configuration file","path":"../../functional.yaml"}
    Test_read: cluster_test.go:269: expected &{lg:<nil> agentConns:[] agentClients:[] agentStreams:[] agentRequests:[] testerHTTPServer:<nil> Members:[EtcdExec:"./bin/etcd" AgentAddr:"127.0.0.1:19027" FailpointHTTPAddr:"http://127.0.0.1:7381" BaseDir:"/tmp/etcd-functional-1" EtcdPeerProxy:true EtcdClientEndpoint:"127.0.0.1:1379" Etcd:<Name:"s1" DataDir:"/tmp/etcd-functional-1/etcd.data" WALDir:"/tmp/etcd-functional-1/etcd.data/member/wal" HeartbeatIntervalMs:100 ElectionTimeoutMs:1000 ListenClientURLs:"https://127.0.0.1:1379" AdvertiseClientURLs:"https://127.0.0.1:1379" ClientAutoTLS:true ListenPeerURLs:"https://127.0.0.1:1380" AdvertisePeerURLs:"https://127.0.0.1:1381" PeerAutoTLS:true InitialCluster:"s1=https://127.0.0.1:1381,s2=https://127.0.0.1:2381,s3=https://127.0.0.1:3381" InitialClusterState:"new" InitialClusterToken:"tkn" SnapshotCount:10000 QuotaBackendBytes:10740000000 PreVote:true InitialCorruptCheck:true Logger:"zap" LogOutputs:"/tmp/etcd-functional-1/etcd.log" > SnapshotPath:"/tmp/etcd-functional-1.snapshot.db"  EtcdExec:"./bin/etcd" AgentAddr:"127.0.0.1:29027" FailpointHTTPAddr:"http://127.0.0.1:7382" BaseDir:"/tmp/etcd-functional-2" EtcdPeerProxy:true EtcdClientEndpoint:"127.0.0.1:2379" Etcd:<Name:"s2" DataDir:"/tmp/etcd-functional-2/etcd.data" WALDir:"/tmp/etcd-functional-2/etcd.data/member/wal" HeartbeatIntervalMs:100 ElectionTimeoutMs:1000 ListenClientURLs:"https://127.0.0.1:2379" AdvertiseClientURLs:"https://127.0.0.1:2379" ClientAutoTLS:true ListenPeerURLs:"https://127.0.0.1:2380" AdvertisePeerURLs:"https://127.0.0.1:2381" PeerAutoTLS:true InitialCluster:"s1=https://127.0.0.1:1381,s2=https://127.0.0.1:2381,s3=https://127.0.0.1:3381" InitialClusterState:"new" InitialClusterToken:"tkn" SnapshotCount:10000 QuotaBackendBytes:10740000000 PreVote:true InitialCorruptCheck:true Logger:"zap" LogOutputs:"/tmp/etcd-functional-2/etcd.log" > SnapshotPath:"/tmp/etcd-functional-2.snapshot.db"  EtcdExec:"./bin/etcd" AgentAddr:"127.0.0.1:39027" FailpointHTTPAddr:"http://127.0.0.1:7383" BaseDir:"/tmp/etcd-functional-3" EtcdPeerProxy:true EtcdClientEndpoint:"127.0.0.1:3379" Etcd:<Name:"s3" DataDir:"/tmp/etcd-functional-3/etcd.data" WALDir:"/tmp/etcd-functional-3/etcd.data/member/wal" HeartbeatIntervalMs:100 ElectionTimeoutMs:1000 ListenClientURLs:"https://127.0.0.1:3379" AdvertiseClientURLs:"https://127.0.0.1:3379" ClientAutoTLS:true ListenPeerURLs:"https://127.0.0.1:3380" AdvertisePeerURLs:"https://127.0.0.1:3381" PeerAutoTLS:true InitialCluster:"s1=https://127.0.0.1:1381,s2=https://127.0.0.1:2381,s3=https://127.0.0.1:3381" InitialClusterState:"new" InitialClusterToken:"tkn" SnapshotCount:10000 QuotaBackendBytes:10740000000 PreVote:true InitialCorruptCheck:true Logger:"zap" LogOutputs:"/tmp/etcd-functional-3/etcd.log" > SnapshotPath:"/tmp/etcd-functional-3.snapshot.db" ] Tester:DataDir:"/tmp/etcd-tester-data" Network:"tcp" Addr:"127.0.0.1:9028" DelayLatencyMs:5000 DelayLatencyMsRv:500 UpdatedDelayLatencyMs:5000 RoundLimit:1 ExitOnCaseFail:true EnablePprof:true CaseDelayMs:7000 CaseShuffle:true Cases:"SIGTERM_ONE_FOLLOWER" Cases:"SIGTERM_ONE_FOLLOWER_UNTIL_TRIGGER_SNAPSHOT" Cases:"SIGTERM_LEADER" Cases:"SIGTERM_LEADER_UNTIL_TRIGGER_SNAPSHOT" Cases:"SIGTERM_QUORUM" Cases:"SIGTERM_ALL" Cases:"SIGQUIT_AND_REMOVE_ONE_FOLLOWER" Cases:"SIGQUIT_AND_REMOVE_ONE_FOLLOWER_UNTIL_TRIGGER_SNAPSHOT" Cases:"BLACKHOLE_PEER_PORT_TX_RX_LEADER" Cases:"BLACKHOLE_PEER_PORT_TX_RX_LEADER_UNTIL_TRIGGER_SNAPSHOT" Cases:"BLACKHOLE_PEER_PORT_TX_RX_QUORUM" Cases:"BLACKHOLE_PEER_PORT_TX_RX_ALL" Cases:"DELAY_PEER_PORT_TX_RX_LEADER" Cases:"RANDOM_DELAY_PEER_PORT_TX_RX_LEADER" Cases:"DELAY_PEER_PORT_TX_RX_LEADER_UNTIL_TRIGGER_SNAPSHOT" Cases:"RANDOM_DELAY_PEER_PORT_TX_RX_LEADER_UNTIL_TRIGGER_SNAPSHOT" Cases:"DELAY_PEER_PORT_TX_RX_QUORUM" Cases:"RANDOM_DELAY_PEER_PORT_TX_RX_QUORUM" Cases:"DELAY_PEER_PORT_TX_RX_ALL" Cases:"RANDOM_DELAY_PEER_PORT_TX_RX_ALL" Cases:"NO_FAIL_WITH_STRESS" Cases:"NO_FAIL_WITH_NO_STRESS_FOR_LIVENESS" FailpointCommands:"panic(\"etcd-tester\")" RunnerExecPath:"./bin/etcd-runner" Stressers:<Type:"KV_WRITE_SMALL" Weight:0.35 > Stressers:<Type:"KV_WRITE_LARGE" Weight:0.002 > Stressers:<Type:"KV_READ_ONE_KEY" Weight:0.07 > Stressers:<Type:"KV_READ_RANGE" Weight:0.07 > Stressers:<Type:"KV_DELETE_ONE_KEY" Weight:0.07 > Stressers:<Type:"KV_DELETE_RANGE" Weight:0.07 > Stressers:<Type:"KV_TXN_WRITE_DELETE" Weight:0.35 > Stressers:<Type:"LEASE" > Checkers:"KV_HASH" Checkers:"LEASE_EXPIRE" StressKeySize:100 StressKeySizeLarge:32769 StressKeySuffixRange:250000 StressKeySuffixRangeTxn:100 StressKeyTxnOps:10 StressClients:100 StressQPS:2000  cases:[] rateLimiter:<nil> stresser:<nil> checkers:[] currentRevision:0 rd:0 cs:0}, got &{lg:<nil> agentConns:[] agentClients:[] agentStreams:[] agentRequests:[] testerHTTPServer:<nil> Members:[EtcdExec:"./bin/etcd" AgentAddr:"127.0.0.1:19027" FailpointHTTPAddr:"http://127.0.0.1:7381" BaseDir:"/tmp/etcd-functional-1" EtcdPeerProxy:true EtcdClientEndpoint:"127.0.0.1:1379" Etcd:<Name:"s1" DataDir:"/tmp/etcd-functional-1/etcd.data" WALDir:"/tmp/etcd-functional-1/etcd.data/member/wal" HeartbeatIntervalMs:100 ElectionTimeoutMs:1000 ListenClientURLs:"https://127.0.0.1:1379" AdvertiseClientURLs:"https://127.0.0.1:1379" ClientAutoTLS:true ListenPeerURLs:"https://127.0.0.1:1380" AdvertisePeerURLs:"https://127.0.0.1:1381" PeerAutoTLS:true InitialCluster:"s1=https://127.0.0.1:1381,s2=https://127.0.0.1:2381,s3=https://127.0.0.1:3381" InitialClusterState:"new" InitialClusterToken:"tkn" SnapshotCount:2000 QuotaBackendBytes:10740000000 PreVote:true InitialCorruptCheck:true Logger:"zap" LogOutputs:"/tmp/etcd-functional-1/etcd.log" LogLevel:"info" > SnapshotPath:"/tmp/etcd-functional-1.snapshot.db"  EtcdExec:"./bin/etcd" AgentAddr:"127.0.0.1:29027" FailpointHTTPAddr:"http://127.0.0.1:7382" BaseDir:"/tmp/etcd-functional-2" EtcdPeerProxy:true EtcdClientEndpoint:"127.0.0.1:2379" Etcd:<Name:"s2" DataDir:"/tmp/etcd-functional-2/etcd.data" WALDir:"/tmp/etcd-functional-2/etcd.data/member/wal" HeartbeatIntervalMs:100 ElectionTimeoutMs:1000 ListenClientURLs:"https://127.0.0.1:2379" AdvertiseClientURLs:"https://127.0.0.1:2379" ClientAutoTLS:true ListenPeerURLs:"https://127.0.0.1:2380" AdvertisePeerURLs:"https://127.0.0.1:2381" PeerAutoTLS:true InitialCluster:"s1=https://127.0.0.1:1381,s2=https://127.0.0.1:2381,s3=https://127.0.0.1:3381" InitialClusterState:"new" InitialClusterToken:"tkn" SnapshotCount:2000 QuotaBackendBytes:10740000000 PreVote:true InitialCorruptCheck:true Logger:"zap" LogOutputs:"/tmp/etcd-functional-2/etcd.log" LogLevel:"info" > SnapshotPath:"/tmp/etcd-functional-2.snapshot.db"  EtcdExec:"./bin/etcd" AgentAddr:"127.0.0.1:39027" FailpointHTTPAddr:"http://127.0.0.1:7383" BaseDir:"/tmp/etcd-functional-3" EtcdPeerProxy:true EtcdClientEndpoint:"127.0.0.1:3379" Etcd:<Name:"s3" DataDir:"/tmp/etcd-functional-3/etcd.data" WALDir:"/tmp/etcd-functional-3/etcd.data/member/wal" HeartbeatIntervalMs:100 ElectionTimeoutMs:1000 ListenClientURLs:"https://127.0.0.1:3379" AdvertiseClientURLs:"https://127.0.0.1:3379" ClientAutoTLS:true ListenPeerURLs:"https://127.0.0.1:3380" AdvertisePeerURLs:"https://127.0.0.1:3381" PeerAutoTLS:true InitialCluster:"s1=https://127.0.0.1:1381,s2=https://127.0.0.1:2381,s3=https://127.0.0.1:3381" InitialClusterState:"new" InitialClusterToken:"tkn" SnapshotCount:2000 QuotaBackendBytes:10740000000 PreVote:true InitialCorruptCheck:true Logger:"zap" LogOutputs:"/tmp/etcd-functional-3/etcd.log" LogLevel:"info" > SnapshotPath:"/tmp/etcd-functional-3.snapshot.db" ] Tester:DataDir:"/tmp/etcd-tester-data" Network:"tcp" Addr:"127.0.0.1:9028" DelayLatencyMs:5000 DelayLatencyMsRv:500 UpdatedDelayLatencyMs:5000 RoundLimit:1 ExitOnCaseFail:true EnablePprof:true CaseDelayMs:7000 CaseShuffle:true Cases:"SIGTERM_ONE_FOLLOWER" Cases:"SIGTERM_ONE_FOLLOWER_UNTIL_TRIGGER_SNAPSHOT" Cases:"SIGTERM_LEADER" Cases:"SIGTERM_LEADER_UNTIL_TRIGGER_SNAPSHOT" Cases:"SIGTERM_QUORUM" Cases:"SIGTERM_ALL" Cases:"SIGQUIT_AND_REMOVE_ONE_FOLLOWER" Cases:"SIGQUIT_AND_REMOVE_ONE_FOLLOWER_UNTIL_TRIGGER_SNAPSHOT" Cases:"BLACKHOLE_PEER_PORT_TX_RX_LEADER" Cases:"BLACKHOLE_PEER_PORT_TX_RX_LEADER_UNTIL_TRIGGER_SNAPSHOT" Cases:"BLACKHOLE_PEER_PORT_TX_RX_QUORUM" Cases:"BLACKHOLE_PEER_PORT_TX_RX_ALL" Cases:"DELAY_PEER_PORT_TX_RX_LEADER" Cases:"RANDOM_DELAY_PEER_PORT_TX_RX_LEADER" Cases:"DELAY_PEER_PORT_TX_RX_LEADER_UNTIL_TRIGGER_SNAPSHOT" Cases:"RANDOM_DELAY_PEER_PORT_TX_RX_LEADER_UNTIL_TRIGGER_SNAPSHOT" Cases:"DELAY_PEER_PORT_TX_RX_QUORUM" Cases:"RANDOM_DELAY_PEER_PORT_TX_RX_QUORUM" Cases:"DELAY_PEER_PORT_TX_RX_ALL" Cases:"RANDOM_DELAY_PEER_PORT_TX_RX_ALL" Cases:"NO_FAIL_WITH_STRESS" Cases:"NO_FAIL_WITH_NO_STRESS_FOR_LIVENESS" FailpointCommands:"panic(\"etcd-tester\")" RunnerExecPath:"./bin/etcd-runner" Stressers:<Type:"KV_WRITE_SMALL" Weight:0.35 > Stressers:<Type:"KV_WRITE_LARGE" Weight:0.002 > Stressers:<Type:"KV_READ_ONE_KEY" Weight:0.07 > Stressers:<Type:"KV_READ_RANGE" Weight:0.07 > Stressers:<Type:"KV_DELETE_ONE_KEY" Weight:0.07 > Stressers:<Type:"KV_DELETE_RANGE" Weight:0.07 > Stressers:<Type:"KV_TXN_WRITE_DELETE" Weight:0.35 > Stressers:<Type:"LEASE" > Checkers:"KV_HASH" Checkers:"LEASE_EXPIRE" StressKeySize:100 StressKeySizeLarge:32769 StressKeySuffixRange:250000 StressKeySuffixRangeTxn:100 StressKeyTxnOps:10 StressClients:100 StressQPS:2000  cases:[] rateLimiter:<nil> stresser:<nil> checkers:[] currentRevision:0 rd:0 cs:0}
--- FAIL: Test_read (0.00s)
FAIL
FAIL	go.etcd.io/etcd/v3/functional/tester	0.050s
...

After:
go test -v ../...

...
=== RUN   Test_read
{"level":"info","ts":1596018561.408186,"caller":"tester/cluster_read_config.go:36","msg":"opened configuration file","path":"../../functional.yaml"}
{"level":"info","ts":1596018561.408739,"caller":"tester/cluster_shuffle.go:35","msg":"shuffled test failure cases","total":22}
{"level":"info","ts":1596018561.4087567,"caller":"tester/cluster_shuffle.go:35","msg":"shuffled test failure cases","total":22}
--- PASS: Test_read (0.00s)
PASS

...
2020-08-04 15:47:41 +02:00
25220a0287 *: check health by using v3 range request and its corresponding timeout 2020-08-04 00:34:18 +08:00
76539cee57 test: avoid non existing package for integration test 2020-08-03 00:13:47 +09:00
1af6d61a1c Merge pull request #12177 from ironcladlou/etcdmembersdown-tweak
Documentation: Further improve etcdMembersDown alert
2020-07-31 15:06:52 -04:00
cd3df73944 Documentation: Further improve etcdMembersDown alert
Before this change, the default window for the etcdMembersDown network failure
rate function was recently changed to 1 minute. While this helps detect a etcd
recovery more quickly, it depends on scrape intervals of <= 15s to collect
sufficient data points for the rate function. In practice, an interval of >= 30s
is more typical, which causes the rate function to be less accurate.

This patch increases the window to 2m, which is a compromise between the
original value of 3m and the 1m change introuced with 2aa5684, and should
accomodate more typical scrape intervals.

To offset the window change and to further improve the chance that the alert
will only fire when etcd is truly dead, this patch changes the `for` clause from
3m to 10m. The rationale is as follows:

1. There can be significant variance in durations following a reboot before etcd
is scraped and detected as available.

2. A conservative trigger like 10m seems less likely to produce a false alarm in
the face of such variance.

3. In this alerting situation, if the outage is real, it seems unlikely that an
additional 7 minutes of delay before (for example) paging somebody will make a
significant impact on the overall response.
2020-07-31 09:26:46 -04:00
cc564110bd clientv3: remove excessive watch cancel logging (#12187) 2020-07-29 14:58:53 -07:00
6c81b20ec8 rafthttp: fix streamHandle outgoingConn peerID (#12179) 2020-07-28 14:41:10 -07:00
bc67babee8 package adt: rename the filename to be consistent with the package name (#12170) 2020-07-28 14:40:34 -07:00
9006d8d4f9 Documentation/learning/lock/client: Add defer Unlock (#11802) 2020-07-26 11:22:19 -07:00
51de68ddac 12126: snapshot: corrupted in Embedded server (#12129) 2020-07-26 11:14:46 -07:00
Jay
26b89fd418 raft: don't campaign with pending snapshot (#12163)
Signed-off-by: Jay Lee <BusyJayLee@gmail.com>
2020-07-26 00:04:46 -07:00
c9a5889915 Documentation/etcd-mixin: Reformulate alerting rules to use without rather than by (#12122)
* etcd-mixin: Reformulate alerting rules to use `without` rather than `by`

With aggregations using `by`, all additional target labels that a user
might have configured, are aggregated away. However, those target
labels are useful for e.g. alert routing. With this commit, nothing
should change for vanilla job/instance target labels, but whoever has
more target labels can now still make use of them.

Signed-off-by: beorn7 <beorn@grafana.com>

* etcd-mixin: Parametrize instance labels to aggregate away

Signed-off-by: beorn7 <beorn@grafana.com>
2020-07-23 16:02:26 -07:00
Jay
d0e4fe56a5 raft: check pending conf change before campaign (#12134)
* raft: check conf change before campaign

Signed-off-by: Jay Lee <BusyJayLee@gmail.com>

* raft: extract hup function

Signed-off-by: Jay Lee <BusyJayLee@gmail.com>

* raft: check pending conf change for transferleader

Signed-off-by: Jay Lee <BusyJayLee@gmail.com>
2020-07-22 17:04:48 -07:00
772dfbfe35 wal: Fix format error avoid using reflect.DeepEqual with errors (#12118) 2020-07-20 19:49:57 -07:00
e9d16c2b62 etcdserverpb: add TestInvalidGoTypeIntPanic test (#12116)
Tested conditions that cause
panic: invalid Go type int for field k8s_io.kubernetes.vendor.go_etcd_io.etcd.etcdserver.etcdserverpb.loggablePutRequest.value_size

Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
2020-07-20 19:18:52 -07:00
7f27697df9 v3client: implement clientv3.Auth interface (#12140) 2020-07-20 16:53:25 -07:00
Jay
cc656718fa raft: correct pendingConfIndex check for AutoLeave (#12137)
Close #12136

Signed-off-by: Jay Lee <BusyJayLee@gmail.com>
2020-07-20 16:49:22 -07:00
93637b1779 raft: bug fix (#12123)
we need to test the case when configuration set is changed, but there is typo.

None

Signed-off-by: accelsao <bebe8277@gmail.com>
2020-07-20 16:30:17 -07:00
ef866a6d8b Merge pull request #11943 from mitake/bcrypt-in-api
auth, etcdserver: hash password in the API layer
2020-07-20 10:52:24 -04:00
89da79188f raft: simplify the code in progress.go (#12119) 2020-07-20 00:13:05 -07:00
da78fb5544 Merge pull request #12145 from tangcong/add_breaking_changes
CHANGELOG: add breaking changes doc for v3.4.10/v3.3.23
2020-07-17 10:00:09 -04:00
1a548c355a CHANGELOG: add breaking changes doc 2020-07-17 16:04:20 +08:00
26db9e1498 CHANGELOG: add release dates
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-07-16 15:14:39 -07:00
69f7e163c6 Merge pull request #12141 from jingyih/update_changelog_12000
CHANGELOG: update from 12000
2020-07-15 13:06:07 -04:00
08c0a9d4b3 CHANGELOG: update from 12000 2020-07-15 09:59:59 -07:00
92774e83c7 Merge pull request #12121 from ironcladlou/improve-etcdmembersdown-accuracy
Documentation: Tweak etcdMembersDown to reduce false negatives
2020-07-15 08:14:59 -04:00
4c6881ffe4 Merge pull request #12131 from dissoupov/client
12125: panic: zap.Logger is nil in Embed client
2020-07-13 15:08:19 -07:00
701f02f90a 12125: panic: zap.Logger is nil in Embed client 2020-07-13 09:08:20 -07:00
2c41d9960b Documentation: describe the change of WAL entries related to auth 2020-07-14 00:15:19 +09:00
5a3da48cdf auth, etcdserver: hash password in the API layer 2020-07-14 00:15:19 +09:00
2aa5684ada Documentation: Tweak etcdMembersDown to reduce false negatives
Before this change, during a reboot in which etcd recovers quickly (e.g. 1 min),
the etcdMembersDown alert tends to fire even when etcd is fully healthy because
the averaging function can take more than 3 minutes to average back down below
the 0.01 threshold.

This change tries to reduce the possibility of a false negative by considering a
shorter (1 min) failure rate window which tends to average down below the
threshold far more quickly (within 1 min). The `for` clause of the alert should
ensure that the alert still fires if the poor conditions are sustained for an
unreasonable overall time (3 min).
2020-07-13 08:58:21 -04:00
07461ecc8c Merge pull request #12114 from tangcong/grpcproxy-healthcheck
*: add health handler for grpcproxy self
2020-07-10 10:44:59 -07:00
eb4f8dcb56 CHANGELOG: update for 12107,12114 2020-07-10 20:17:49 +08:00
0898c5b978 *: add health check for grpcproxy self 2020-07-10 20:17:44 +08:00
2f25f536f7 Merge pull request #12117 from wking/drop-alerting-syntax-rules
Documentation/op-guide: Drop old alert_rules
2020-07-08 16:56:03 -04:00
4160b8396d Documentation/op-guide: Drop old alert_rules
Frederic says [1]:

> Side note, we can probably remove the old alerting syntax rules,
> Prometheus has removed this syntax >2.5 years ago.

[1]: https://github.com/etcd-io/etcd/pull/12080#issuecomment-649982787
2020-07-08 09:37:34 -07:00
429826b467 Merge pull request #12080 from wking/raise-etcd-leader-changes-to-four
Documentation/etcd-mixin: Raise etcdHighNumberOfLeaderChanges threshold to 4
2020-07-08 08:37:50 -04:00
58bb8ae09f Merge pull request #12018 from spzala/umaskconsideration
pkg: consider umask when use MkdirAll
2020-07-06 17:33:33 -07:00
27ddb84268 Merge pull request #12107 from tangcong/register-grpcproxy-metrics
*: register metrics handler for grpcproxy self
2020-07-06 13:00:35 -07:00
fff5d3cc03 *: register metrics handler for grpcproxy self 2020-07-02 22:55:18 +08:00
15884e9085 Merge pull request #12086 from tangcong/print-expensive-request-v3rpc
v3rpc: Log expensive request in UnaryInterceptor
2020-07-01 23:53:50 +08:00
5c6d7b4d2c CHANGELOG: update for 12086 2020-07-01 00:54:31 +08:00
644d09edb5 v3rpc: print expensive request info in UnaryInterceptor 2020-07-01 00:54:23 +08:00
7f726db202 Merge pull request #12092 from mitake/warn
etcdmain: let grpc proxy warn about insecure-skip-tls-verify
2020-06-29 11:59:53 -04:00
01f1109f6d Merge pull request #12091 from mitake/password-strength-2
Documentation: refine the description about password strength
2020-06-29 11:53:15 -04:00
e582d7dc80 Documentation: refine the description about password strength 2020-06-29 23:40:44 +09:00
db2165dfb1 etcdmain: let grpc proxy warn about insecure-skip-tls-verify 2020-06-29 23:37:04 +09:00
e94dc39edc Merge pull request #12079 from cfc4n/changelog_3.3-3.4
CHANGELOG-3.3-3.4: update for #12069
2020-06-26 11:28:40 -07:00
0c5cffc60b Documentation/etcd-mixin: Raise etcdHighNumberOfLeaderChanges threshold to 4
A cluster with three members could see three leader changes during a
healthy rolling reboot, and we don't want to alert on that.  Growing
to 4 reduces false-alarms for clusters with three or fewer members,
and that's probably most clusters.  It will also slightly increase the
risk of false-negatives, but if the cluster is struggling with high
latency, it seems likely that it would quickly pass the new threshold
too.

The hard-coded threshold means that we are still likely to get
false-positives during rolling reboots of clusters with four or more
members.  Ideally we'd scale this with the cluster size, or something,
but I'm not sure how to do that.  Three members is the minimum size
for high availability, so reducing false positives for that case seems
worth addressing even if we leave larger clusters largely unchanges.

Also manually catch etcd3_alert.rules up to speed, since it seems to
have been passed over by 16fc8a2b4b (Documentation/op-guide:
Re-generate alert rules and dashboard from mixin, 2020-04-07, #11768).
2020-06-25 15:38:15 -07:00
2b79442d8e backend: Create base type for readTx and concurrentReadTx (#11976)
backend: Create base type for readTx and concurrentReadTx

backend: Implemented review comments to rename rTx to baseReadTx and remove TODO

backend: Resolved comments around baseReadTx

backend: Implemented a review comment
2020-06-25 10:26:17 -07:00
3ced62a6c7 CHANGELOG-3.3-3.4: update for https://github.com/etcd-io/etcd/pull/12069 ,and other cherry pick PRs. 2020-06-25 20:54:46 +08:00
94bd71adac Merge pull request #12066 from tangcong/fix-fmt-shadow-err
etcdmain: fix shadow error
2020-06-24 20:40:24 -07:00
ae59425235 Merge pull request #11919 from YoyinZyc/downgrade-policy
[Etcd downgrade] Apply downgrade policy to server
2020-06-24 11:33:32 -07:00
2541b0bba9 etcdserver: apply downgrade policy to server. 2020-06-24 11:06:29 -07:00
a08c52945f etcdmain: fix shadow error 2020-06-24 17:47:18 +08:00
beb5614aad doc: add TLS related warnings (#12060) 2020-06-23 21:07:36 -07:00
8f19fecb82 Merge pull request #12030 from tangcong/fix-grpc-proxy-hang
proxy/grpcproxy: fix grpc proxy hang when broadcast failed to cancel a watcher
2020-06-22 10:53:13 -07:00
9380327e70 Merge pull request #12047 from jingyih/update_bbolt_1p3p5
vendor: update bbolt to v1.3.5
2020-06-22 10:52:43 -07:00
238ea9bf93 vendor: update bbolt to v1.3.5 2020-06-22 04:29:06 -07:00
854c327179 CHANGELOG: update for 12030 2020-06-22 14:57:02 +08:00
34e3dbe3d4 proxy/grpcproxy: add zap logger 2020-06-22 14:56:58 +08:00
ebdccedbde Merge pull request #11980 from cfc4n/simple-token-ttl
auth: Customize the settings of simpleTokenTTL.
2020-06-21 23:23:45 -07:00
6ec5d5f60f Merge pull request #12001 from cfc4n/master
CHANGELOG: update for PR #11980 ,  #11986 ,  # 11987 ,
2020-06-21 23:20:50 -07:00
a71fa242d8 Merge branch 'master' into master 2020-06-21 23:20:34 -07:00
f1057001c3 Merge pull request #12033 from jingyih/update_changelog_PR11946
CHANGELOG: update for #11946
2020-06-21 19:18:11 -07:00
fac83fbecd CHANGELOG: update for PR11946
Also update helper message to include the new flag.
2020-06-20 12:26:36 -07:00
f5a85e9987 pkg: consider umask when use MkdirAll
os.MkdirAll creates directory before umask so make sure that a desired
permission is set after creating a directory with MkdirAll. Use the
existing TouchDirAll function which checks for permission if dir is already
exist and when create a new dir.
2020-06-20 13:10:11 -04:00
10cdabe721 CHANGELOG: update for https://github.com/etcd-io/etcd/pull/11980 , https://github.com/etcd-io/etcd/pull/11986 , https://github.com/etcd-io/etcd/pull/11987 . 2020-06-21 00:00:41 +08:00
b5a07728d0 proxy/grpcproxy: make sure watchproxy do not block forever when failed to cancel a watcher 2020-06-20 11:20:31 +08:00
d8c8f903ee Merge pull request #11983 from tangcong/add_reason_field_for_health
etcdserver/api/etcdhttp: add reason field for /health response
2020-06-15 23:17:00 -07:00
8720f980ac Merge pull request #11986 from cfc4n/fdusage-limit
etcdserver:set FDUsage ticker to 10 minute from 5 seconds.
2020-06-15 22:12:58 -07:00
144beba3f8 etcdserver:FDUsage set ticker to 10 minute from 5 seconds.
This ticker will check File Descriptor Requirements ,and count all fds in used.
And recorded some logs when in used >= limit/5*4. Just recorded message.
If fds was more than 10K,It's low performance due to FDUsage() works.
So need to increase it.

see https://github.com/etcd-io/etcd/issues/11969 for more detail.
2020-06-16 12:44:33 +08:00
af7128ccd0 Merge pull request #11997 from tangcong/optimize-file-stats-error
pkg/fileutil: optimize file stats error
2020-06-15 11:19:58 -04:00
2f6ceb7aca Merge pull request #12012 from mitake/doc-disk-data
Documentation: note on data encryption
2020-06-15 23:25:23 +09:00
4f16d0698f Merge pull request #12010 from WuShaoQiang/master
raft: fix typo
2020-06-14 16:35:58 -07:00
c13415c581 Documentation: note on data encryption 2020-06-15 00:29:32 +09:00
8f72368070 raft: fix typo 2020-06-14 13:26:37 +08:00
c9dd080afb Merge pull request #11998 from hwdef/master
Documentation: fix broken links
2020-06-13 00:30:55 -04:00
ed04d0d98a etcdserver: change protobuf field type from int to int64 (#12000) 2020-06-12 16:10:56 -07:00
b6d1987ccd auth: return incorrect result 'ErrUserNotFound' when client request without username or username was empty. (#12005)
Fiexs https://github.com/etcd-io/etcd/issues/12004 .
2020-06-12 16:10:19 -07:00
e3014072ba Documentation: fix broken links 2020-06-12 09:51:33 +08:00
d507ab4aad auth: Customize simpleTokenTTL settings.
see https://github.com/etcd-io/etcd/issues/11978 for more detail.
2020-06-11 17:15:42 +08:00
9b444c6355 CHANGELOG: add data dir permission breaking changes doc 2020-06-11 10:10:32 +08:00
b0d2edfc68 Documentation: Added Recover cluster from minority failure (#11988) 2020-06-10 14:36:44 -07:00
26f6aee395 mvcc: chanLen 1024 is to biger,and it used more memory. (#11987)
128 seems to be enough.
Sometimes the consumption speed is more than the production speed.

See https://github.com/etcd-io/etcd/issues/11906 for more detail.
2020-06-10 14:35:48 -07:00
50d7a10a3f pkg/fileutil: print desired file permission in error log 2020-06-10 22:45:36 +08:00
330424142c tests/e2e: fix failed /health test case 2020-06-10 11:16:25 +08:00
f77b21ce05 CHANGELOG: update for 11983 2020-06-10 11:15:00 +08:00
4acaa5a2a0 etcdserver/api/etcdhttp: add reason field for /health response 2020-06-10 11:14:56 +08:00
3082a7d521 etcdserver/api/v2store: fix race in TestIssue2746WithThree (#11982) 2020-06-09 19:11:08 -07:00
133b0c2b04 Use http constant instead of a number (#11975)
* embed: Use http constant instead of a number

* embed: Use http constant instead of a number

* embed: Replaced a number with Go http constant
2020-06-09 19:08:38 -07:00
84a5ff2d97 Merge pull request #11962 from spzala/incorrectflag
logging: create logger to prevent nil pointer
2020-06-09 14:34:22 -04:00
1647889253 Merge pull request #11936 from wswcfan/update-3.2-changelog-for-11691
CHANGELOG: update 3.2 changelog and 3.3 upgrade document for #11691
2020-06-09 11:38:13 -04:00
1c1029ecba Merge pull request #11990 from tangcong/add-limit-for-revisions
mvcc: push down RangeOptions.limit argv into index tree to reduce memory overhead
2020-06-08 21:31:51 -07:00
f3deba09b4 CHANGELOG: update 3.2 changelog and 3.3 upgrade document for #11691 2020-06-09 11:39:46 +08:00
1677fd80a5 CHANGELOG: update for 11990 2020-06-09 01:11:11 +08:00
26c930f27d mvcc: push down RangeOptions.limit argv into index tree 2020-06-09 01:11:06 +08:00
6e6f22db43 vendor: add missing failpoint
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-06-07 22:25:55 -07:00
49f91d629a Merge pull request #11945 from polyrabbit/fix-permission-on-Windows
pkg: Fix dir permission check on Windows
2020-06-04 18:16:48 -04:00
570e55db65 functional/agent: fmt
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-06-03 17:41:34 -07:00
237c8b528b Merge pull request #11913 from jpbetz/gofail-startup
Persist failpoints across member restart
2020-06-03 17:41:17 -07:00
62f1fefe4a Merge pull request #11959 from tedyu/store-clone-rd-lock
etcdserver: take read lock when cloning store
2020-06-03 14:13:53 -07:00
a09533d63d Merge pull request #11960 from tedyu/internal-create-err-chk
etcdserver: check error return for store#internalCreate
2020-06-03 14:13:19 -07:00
be0639090d Merge pull request #11939 from tedyu/chk-ret-from-write
etcdserver: check the error return from Write()
2020-06-03 14:12:50 -07:00
659fb01a6c logging: create logger to prevent nil pointer
Create a new logger if one not found.
2020-06-02 09:53:35 -04:00
5c95114190 etcdserver: check the error return from Write()
Signed-off-by: Ted Yu <yuzhihong@gmail.com>
2020-05-31 09:27:01 -07:00
17483944fc etcdserver: check error return for store#internalCreate
Signed-off-by: Ted Yu <yuzhihong@gmail.com>
2020-05-31 09:20:05 -07:00
59ec251812 etcdserver: take read lock when cloning store
Signed-off-by: Ted Yu <yuzhihong@gmail.com>
2020-05-31 09:08:26 -07:00
09fcf55ca4 Merge pull request #11845 from xiang90/tcp_proxy
etcdmain: best effort detection of self pointing in tcp proxy
2020-05-31 00:57:49 -07:00
b2d228641a Merge pull request #11905 from tedyu/node-tick-read
raft: avoid data race by not reading raft.lead
2020-05-31 00:57:01 -07:00
8af52dc0e7 Merge pull request #11935 from tangcong/save-cindex-for-lease
lease: ensure grant/revoke won't be applied repeatedly after restarting etcd
2020-05-31 00:56:12 -07:00
29a0c5f221 Merge pull request #11957 from gyuho/build-scripts
*: remove old gitignore and build functions
2020-05-31 00:53:40 -07:00
ab65285418 vendor: regenerate
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-05-30 14:36:18 -07:00
72a26d0797 vendor/modules.txt: regenerate
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-05-30 14:36:09 -07:00
a48706ecfb *: remove old gitignore and build functions
Not needed since we are now using go module.

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-05-30 14:35:34 -07:00
9b6c3e3378 Merge pull request #11946 from crawshaw/crawshaw/nofsync
etcdserver, et al: add --unsafe-no-fsync flag
2020-05-27 09:00:31 -07:00
e06006ea28 pkg: Fix dir permission check on Windows 2020-05-26 11:15:25 +08:00
66cb045d47 etcdserver, et al: add --unsafe-no-fsync flag
This makes it possible to run an etcd node for testing and development
without placing lots of load on the file system.

Fixes #11930.

Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
2020-05-26 09:21:49 +10:00
747ff75c96 Merge pull request #11942 from tedyu/client-3-cancel
clientv3: cancel the client if there is no endpoint
2020-05-24 15:55:53 -04:00
dafd474677 clientv3: cancel the client if there is no endpoint
Signed-off-by: Ted Yu <yuzhihong@gmail.com>
2020-05-23 13:35:17 -07:00
e007d4f58d Merge pull request #11938 from tedyu/mk-v2-evt-nil
Check events against nil
2020-05-22 13:38:53 -07:00
df57a68b47 Check events against nil
Signed-off-by: Ted Yu <yuzhihong@gmail.com>
2020-05-22 13:35:25 -07:00
4c9571d909 Merge pull request #11933 from needkane/PR
etcdserver: Missing the cfg.Logger causes panic
2020-05-22 09:23:27 -07:00
426dba8628 CHANGELOG: update for 11935 2020-05-22 21:47:37 +08:00
e9ae8eb5a1 *: ensure grant/revoke won't be applied repeatedly after restarting etcd 2020-05-22 21:47:24 +08:00
c8ae694dea etcdserver: Missing the cfg.Logger causes panic 2020-05-22 03:42:44 -04:00
a4ada8cb1f Merge pull request #11922 from tedyu/non-recursive-watch
clientv3: non-recursive Watch()
2020-05-20 20:36:09 -07:00
f976138186 clientv3: non-recursive watch
Signed-off-by: Ted Yu <yuzhihong@gmail.com>
2020-05-20 15:44:41 -07:00
f8ee908330 Merge pull request #11921 from tedyu/client-watch-lock
clientv3: use Mutex for watcher lock
2020-05-20 14:56:23 -07:00
5f9bb45e39 CHANGELOG: highlight WAL fix with github issue, add 3.3/3.4 patch release
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-05-20 11:49:14 -07:00
cac53867ac rafthttp: log snapshot download
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-05-20 10:55:43 -07:00
188c66ada8 Merge pull request #11924 from tangcong/fix-crc-mismatch
wal: fix crc mismatch crash bug
2020-05-20 10:30:40 -07:00
02b9ad3939 wal: add TestValidSnapshotEntriesAfterPurgeWal testcase 2020-05-21 00:51:53 +08:00
8450b16e1c CHANGELOG: update for 11924 2020-05-21 00:51:49 +08:00
1836cbb15e wal: fix crc mismatch crash bug 2020-05-20 13:21:07 +08:00
35d026246c clientv3: use Mutex for watcher lock
Signed-off-by: Ted Yu <yuzhihong@gmail.com>
2020-05-19 19:20:44 -07:00
4869b6c9aa Persist failpoints across member restart 2020-05-18 14:14:02 -07:00
732df43cf8 CHANGELOG: update dates
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-05-18 10:57:53 -07:00
1fd1318409 etcdserver/api/rafthttp: improve snapshot send logging
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-05-18 02:29:20 -07:00
5e2815e9cd Merge pull request #11801 from YoyinZyc/downgrade-server
[Etcd downgrade] Implement downgrade validate, enable and cancel
2020-05-17 22:47:16 -07:00
52edb7d38c Merge pull request #11900 from tedyu/omit-orphaned-files
etcdserver: snapNames() should exclude orphaned defragmentation file
2020-05-17 15:37:10 -07:00
f35015abc5 etcdserver: snapNames() should exclude orphaned defragmentation file
Signed-off-by: Ted Yu <yuzhihong@gmail.com>
2020-05-17 14:19:33 -07:00
8b50f4e11d Merge pull request #11899 from tedyu/rel-snap-db
etcdserver: continue releasing snap db in case of error
2020-05-17 14:01:33 -07:00
9d20ba4822 raft: avoid data race by not reading raft.lead
Signed-off-by: Ted Yu <yuzhihong@gmail.com>
2020-05-16 20:40:25 -07:00
b84d257b92 etcdserver: continue releasing snap db in case of error
Signed-off-by: Ted Yu <yuzhihong@gmail.com>
2020-05-16 04:43:55 -07:00
52456659bd Merge pull request #11903 from jchauncey/fix-dockerfile-release
fix(Dockerfile-release): from image was missing image name
2020-05-15 20:19:05 -07:00
71c062e3d8 fix(Dockerfile-release): from image was missing image name 2020-05-15 22:48:11 -04:00
31b6e5a087 Merge pull request #11896 from gyuho/snapshot
*: make sure snapshot save downloads SHA256 checksum
2020-05-15 19:41:50 -07:00
d230e6ba8c etcdserver: handle and apply downgrade validate, enable and cancel requests 2020-05-15 14:45:00 -07:00
37e598a20b etcdserver: define error string and link with grpc error code. 2020-05-15 11:51:39 -07:00
d4ae7baea1 words: add SHA
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-05-14 22:57:52 -07:00
39c43cfb3c clientv3: make sure snapshot has integrity check hash
I've seen some cases SHA blobs are missing (still investigating).
Adding a check to make sure snapshot save always downloads
hash digests for integrity checks.

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-05-14 22:57:52 -07:00
4ddcc36057 etcdserver/api/v3rpc: document, clean up snapshot sends
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-05-14 22:57:52 -07:00
f1179fd70d etcdserver/api/snap: update format string in "ReleaseSnapDBs"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-05-14 22:57:20 -07:00
3d3ed29d64 CHANGELOG: update
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-05-14 20:12:44 -07:00
e821ac8b35 functional: bump up Go versions to 1.14.3
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-05-14 20:01:27 -07:00
93de72537e Makefile: bump up default Go version to 1.14.3
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-05-14 20:01:12 -07:00
2c7670f9c6 travis: bump up to Go 1.14.3
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-05-14 20:00:57 -07:00
3488e25a75 Merge pull request #11888 from jpbetz/out-of-range-fix
Fix state.commit is out of range on restart
2020-05-14 17:55:20 -07:00
743e6e92cb etcdserver/*, wal/*: Remove orphaned .snap.db files during Release 2020-05-14 15:16:51 -07:00
dd7055be51 Merge pull request #11874 from jackkleeman/patch-1
Update CHANGELOG for 11850
2020-05-14 17:38:54 -04:00
b68eea236e etcdserver/*, wal/*:Add comments, clean up error messages and tests 2020-05-14 13:34:55 -07:00
3b6d222627 CHANGELOG: update for 11850
https://github.com/etcd-io/etcd/pull/11850
2020-05-14 19:30:13 +01:00
bd16071846 etcdserver/*, wal/*: find valid snapshots by cross checking snap files and wal snap entries 2020-05-14 09:22:45 -07:00
50517039ae etcdserver/*, wal/*: add Sync method 2020-05-13 08:47:47 -07:00
91efa67cb1 etcdserver/*: rollback default settings 2020-05-13 08:47:47 -07:00
5435e7686a etcdserver/*: fix tests 2020-05-13 08:47:41 -07:00
3d2b565f98 etcdserver/*: changes to snapshots and wal logic to fix #10219 2020-05-13 08:46:15 -07:00
9162cd613d etcdserver/*, wal/*: changes to snapshots and wal logic to fix #10219 2020-05-13 08:42:03 -07:00
7cc2f8a411 raft: break out of nested loop when id is found (#11870)
Signed-off-by: Ted Yu <yuzhihong@gmail.com>
2020-05-12 16:59:22 -07:00
6fb3b9e591 chore(Dockerfile-release): Update base image to use new debian-base:v2.1.0 (#11885)
Updates the base image for all arch releases to the new location (us.gcr.io/k8s-artifacts-prod/build-image) as well as to the latest version (v2.1.0). This should fix a number of vulnerabilities that are in the 1.0.0 base image release.
2020-05-12 16:58:38 -07:00
ec13797407 mvcc: avoid negative watcher count metrics (#11882)
The watch count metrics are not robust to duplicate cancellations. These
cause the count to be decremented twice, leading eventually to negative
counts. We are seeing this in production. The duplicate cancellations
themselves are not themselves a big problem (except performance), but
they are caused by the new proactive cancellation logic (#11850) which
cancels proactively even immediately before initiating a Close, thus
nearly guaranteeing a Close-cancel race, as discussed in
watchable_store.go. We can avoid this in most cases by not sending a
cancellation when we are going to Close.
2020-05-12 16:50:53 -07:00
ab494956bf Merge pull request #11862 from gyuho/const
etcdserver: compute max request bytes humanized string once
2020-05-11 19:36:37 -07:00
5f07d46f70 Merge pull request #11863 from gyuho/gofmt
*: run "gofmt -s" on genproto complete
2020-05-11 18:08:22 -07:00
2ecf268367 Merge pull request #11864 from gyuho/go1.14
*: use Go 1.14 for CI
2020-05-11 18:08:07 -07:00
11569821db CHANGELOG-3.5: update
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-05-11 18:07:39 -07:00
60ce7bc2fa functional/scripts: update default Go version
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-05-11 18:05:03 -07:00
c667c14d8d fix memberList inconsistent output (#11812)
* etcdctl/ctlv3: support to print memberlist in hex format json

* e2e: add memberListWithHexTest

* CHANGELOG: update for #11812
2020-05-11 00:11:40 -07:00
0a0c27a4df functional: add "-mod=mod" flags
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-05-10 18:36:38 -07:00
b79abb6f76 travis: set "-mod=mod"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-05-10 18:36:38 -07:00
6874b9a76b test: add "mod" to build tests
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-05-10 18:36:38 -07:00
b34c0c55a5 pkg/tlsutil: add "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256" to support cipher suite
pkg/tlsutil: support TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-05-10 18:36:28 -07:00
e94201c9fd test: set mod flags for bom test
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-05-10 13:37:18 -07:00
027c26a0fd test: test '-mod=mod'
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-05-10 12:39:11 -07:00
b6ea32ee0f test: ignore vendor directory in govet test
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-05-10 12:35:15 -07:00
628bd294e1 *: use Go 1.14 for CI
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-05-09 23:34:20 -07:00
d93c36bbb9 *: run "gofmt -s" on genproto complete
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-05-09 23:14:32 -07:00
89a3a24d5a etcdserver: compute max request bytes humanized string once
No need to compute the request size limit everytime in runtime

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-05-09 23:11:45 -07:00
b95f135e10 Merge pull request #11861 from tedyu/node-run-found
raft: break out of nested loop when raft id is found
2020-05-09 23:05:26 -07:00
485e1409ac Merge pull request #11860 from tedyu/range-tx-lock
mvcc: Obtain tx Lock once in readTx#UnsafeRange
2020-05-09 22:23:02 -07:00
43794efb1f raft: break out of nested loop when raft id is found
Signed-off-by: Ted Yu <yuzhihong@gmail.com>
2020-05-09 17:56:44 -07:00
2dbbe6ce85 mvcc: Obtain txLock once in readTx#UnsafeRange
Signed-off-by: Ted Yu <yuzhihong@gmail.com>
2020-05-09 16:28:47 -07:00
c9377195d5 Merge pull request #11857 from tangcong/update-3.4-3.3-changelog-for-11817
CHANGELOG: update 3.4/3.3 changelog for 11817
2020-05-07 19:59:59 -07:00
e495c9220d CHANGELOG: update 3.4/3.3 changelog for 11817 2020-05-08 10:18:46 +08:00
d472f67c77 Merge pull request #11817 from tangcong/fix-mvcc-deadlock-bug
mvcc: fix a deadlock bug in mvcc
2020-05-07 16:03:45 -07:00
6d067997e9 Merge pull request #11850 from jackkleeman/cancel-watch
clientv3: cancel watches proactively on client context cancellation
2020-05-07 11:06:49 -07:00
87aa5a9e60 clientv3: cancel watches proactively on client context cancellation
Currently, watch cancel requests are only sent to the server after a
message comes through on a watch where the client has cancelled. This
means that cancelled watches that don't receive any new messages are
never cancelled; they persist for the lifetime of the client stream.
This has negative connotations for locking applications where a watch
may observe a key which might never change again after cancellation,
leading to many accumulating watches on the server.

By cancelling proactively, in most cases we simply move the cancel
request to happen earlier, and additionally we solve the case where the
cancel request would never be sent.

Fixes #9416
Heavy inspiration drawn from the solutions proposed there.
2020-05-07 16:50:26 +01:00
feb56298dd etcdserver: don't let InternalAuthenticateRequest have password (#11818) 2020-05-06 16:46:41 -07:00
035e1db0a2 Merge pull request #11830 from mitake/insecure-default
Documentation: note on the policy of insecure by default
2020-05-06 23:54:22 +09:00
356f647866 Documentation: note on the policy of insecure by default 2020-05-05 22:44:24 +09:00
d9d850c885 rafthttp: add snapshot limit const (#11846) 2020-05-04 23:26:22 -07:00
17ed0c6638 clientv3: Check the error return from Write in v3Manager#Status (#11837)
Signed-off-by: Ted Yu <yuzhihong@gmail.com>
2020-05-04 17:43:08 -07:00
df1d2ca78e clientv3: v3Manager#saveDB should always close db file (#11838)
Signed-off-by: Ted Yu <yuzhihong@gmail.com>
2020-05-04 15:46:36 -07:00
16810cd211 etcdmain: best effort detection of self pointing in tcp proxy 2020-05-04 15:42:01 -07:00
4a64198a9f Merge pull request #11844 from spzala/securityrelprocess
doc: remove Product Security Committee individual emails
2020-05-04 13:37:55 -04:00
658fd15b61 doc: remove Product Security Committee individual emails
emails here can be an unnecessary maintainance. The provided
GitHub IDs have the latest emails and also the process has
security@etcd.io mentioned in this doc as a contact email.
2020-05-04 12:40:34 -04:00
71170dd1d8 Merge pull request #11841 from mitake/warn-insecure-skip-tls-verify
etcdctl, etcdmain: warn about --insecure-skip-tls-verify options
2020-05-03 23:32:25 +09:00
c92691dc47 etcdctl, etcdmain: warn about --insecure-skip-tls-verify options 2020-05-03 17:17:30 +09:00
dfb0a40509 Merge pull request #11832 from krukkrz/issue_template_broken_link
.github/ISSUE_TEMPLATE: fix of a broken link
2020-04-30 11:08:33 -04:00
fc64b56058 .github/ISSUE_TEMPLATE: fix of a broken link
to make redirection possible. Changed undercore to dash.
2020-04-30 13:59:17 +02:00
1044a8b07c Merge pull request #11768 from brancz/uid
Use UID instead of ID in Grafana dashboard
2020-04-29 05:35:06 -07:00
fb77f9b1d5 Merge pull request #11814 from tedyu/dir-closer
wal: close the directory when Fsync() encounters error
2020-04-28 23:27:08 -07:00
3b79ed8506 Merge pull request #11821 from tedyu/wal-close-all
closeAll should attempt to close all ReadCloser's
2020-04-28 20:54:13 -07:00
62755f484e wal: closeAll should attempt to close all ReadCloser's
Signed-off-by: Ted Yu <yuzhihong@gmail.com>
2020-04-28 20:33:40 -07:00
d8bbf7f58d Merge pull request #11816 from gaurav1086/fix_race_condition_kv_test
mvcc: fix race in TestKVTxnBlockWriteOperations
2020-04-28 16:11:26 -07:00
b28a6272b7 Merge pull request #11823 from philips/v3-mod-attempt2
go.mod: name packages with go.etcd.io/etcd/v3
2020-04-28 15:24:29 -07:00
eddca8dce2 Merge pull request #11819 from gaurav1086/fix_race_cond_client_test
clientv3: fix DialTimeout race condition
2020-04-28 15:12:50 -07:00
d88d765ba4 Documentation, CHANGELOG: use new go.etcd.io/etcd/v3 pkg
Use the new package path in the docs and announce it in the CHANGELOG
2020-04-28 22:02:19 +00:00
86a97533bb clientv3: fix DialTimeout race condition 2020-04-28 10:56:28 -04:00
e5ddc91228 mvcc: fix race in TestKVTxnBlockWriteOperations 2020-04-28 10:53:25 -04:00
c9cdefaeac *: run gofmt and make fmt make test pass
gofmt tests were failing, fix.
2020-04-28 00:57:52 +00:00
03248a9045 bill-of-materials: updates for /etcd/v3 packaging
bill-of-materials:
- update to new package names

test/updatebom.sh scripts:
- Update to the right package names
- Don't add bom tool to go.mod
2020-04-28 00:57:52 +00:00
dd21e710e1 testutil: leak: fix path for go routine filter
add go.etcd.io/etcd/v3 to existing filters
2020-04-28 00:57:52 +00:00
c066230bad go.sum: cleanup after all the changes 2020-04-28 00:57:52 +00:00
2ea4d88299 *: use go.etcd.io/etcd/v3 where needed
Found potential locations via

```
git grep 'go.etcd.io/etcd$'
```
2020-04-28 00:57:52 +00:00
7a5fefedcd *: fix imports missed by gomove 2020-04-28 00:57:52 +00:00
96cce208c2 go.mod: use go.etcd.io/etcd/v3 versioning
This change makes the etcd package compatible with the existing Go
ecosystem for module versioning.

Used this tool to update package imports:
  https://github.com/KSubedi/gomove
2020-04-28 00:57:35 +00:00
a7423f2b7b CHANGELOG: update for 11817 2020-04-27 06:42:10 +08:00
8fa7783875 mvcc: fix deadlock bug 2020-04-27 06:42:06 +08:00
99eb5cdfdb wal: close the directory when Fsync() encounters error
Signed-off-by: Ted Yu <yuzhihong@gmail.com>
2020-04-25 11:08:39 -07:00
262c939805 Merge pull request #11810 from tedyu/dir-after-rename
Use known dir-path in log message
2020-04-25 12:54:23 -04:00
9d0ecc3ba3 wal: Use known dir-path in log message
Signed-off-by: Ted Yu <yuzhihong@gmail.com>
2020-04-25 09:14:30 -07:00
69b70e8c43 Merge pull request #11807 from spzala/walread
wal: fix panic when decoder not set
2020-04-23 14:55:11 -07:00
0d5c692eb6 wal: fix panic when decoder not set
Handle the related panic and clarify doc.
2020-04-23 15:53:05 -04:00
7a69d72a68 Merge pull request #11806 from philips/brandon-leaving-red-hat
MAINTAINERS: update @philips email
2020-04-23 11:02:27 -07:00
e2e8fe63df MAINTAINERS: update @philips email
Brandon is no longer at Red Hat. Use a different email.
2020-04-23 10:47:02 -07:00
f4b650b51d Merge pull request #11793 from gyuho/fix
wal: check out of range slice in "ReadAll", entry limits in "decodeRecord"
2020-04-23 11:24:42 -04:00
c716d764d0 wal: check out of range slice in "ReadAll", "decoder"
wal: add slice bound checks in decoder

CHANGELOG-3.5: add wal slice bound check
CHANGELOG-3.5: add "decodeRecord"

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-04-22 19:07:40 -07:00
2369cb3678 Documentation: note on password strength (#11796) 2020-04-22 15:50:29 -07:00
6aea6edc34 Merge pull request #11791 from linux-on-ibm-z/s390x-changelog
CHANGELOG-3.5: update from #11548 and #11358
2020-04-22 11:38:58 -04:00
43e8ffafd8 Merge pull request #11795 from mitake/cn-auth-log
auth: a new error code for the case of password auth against no passw…
2020-04-22 11:26:07 -04:00
b6032eb7d2 auth: a new error code for the case of password auth against no password user 2020-04-22 23:25:24 +09:00
b40f18b506 pkg: check file stats (#11798)
modify file util.
2020-04-21 19:58:48 -07:00
c1e7f73a02 CHANGELOG-3.4: remove invalid gRPC-go dependency bump
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2020-04-20 13:53:59 -04:00
8d52be5c85 Merge pull request #11790 from mlmhl/changelog-3.5
CHANGELOG: update from #11711
2020-04-20 11:31:17 -04:00
16570bbf98 CHANGELOG: update from #11711 2020-04-20 16:27:20 +08:00
0461b3fa51 grpcproxy: make grpc keep alive related options configurable (#11711)
Currently grpc-proxy doesn't config keep alive related options, so it
will use the default values provided by the underlay gprc library. If
clients uses a keep alive ping interval smaller than server's default
minTime, connections between server and clients will be closed and
reopened frequently.
2020-04-17 21:20:03 -07:00
0908a8bd10 Merge pull request #11725 from YoyinZyc/downgrade-api
[Etcd Downgrade] Store downgrade info to backend
2020-04-17 15:29:10 -07:00
b368be577b Merge pull request #11779 from tangcong/optimize-etcd-startup-time
etcdserver: significantly reduces start-up time
2020-04-16 19:34:51 -07:00
6c41190bc5 etcdserver: make recoverSnapshotBackend more robust 2020-04-17 09:30:22 +08:00
3e6426198f CHANGELOG: update for 11779 2020-04-17 06:43:24 +08:00
3c85b67f7b etcdserver: remove redundant storage restore operation 2020-04-17 06:43:24 +08:00
f2c5dd4aa2 membership: add downgradeInfo to cluster; add getter and setter of downgradeInfo 2020-04-16 12:01:33 -07:00
1166b1f195 embed: fix compaction runtime err (#11787)
Handle negative value input which currently gives a runtime error.
2020-04-15 16:13:19 -07:00
3faa06e2e7 Merge pull request #11782 from andreimatei/confchange.comment
raft: minor comment fix in confchange
2020-04-15 18:16:36 -04:00
38ef3dad1f CHANGELOG-3.5: update from #11548 and #11358
Signed-off-by: Nirman Narang <narang@us.ibm.com>
2020-04-13 14:53:18 +00:00
0db04a38a5 raft: minor comment fix in confchange 2020-04-12 22:44:37 -04:00
59f5fb25a5 Merge pull request #11771 from tangcong/optimize-range-count-only-performance
mvcc: reduce count-only range overhead
2020-04-10 10:14:15 -07:00
b62cec9e40 Merge branch 'master' into optimize-range-count-only-performance 2020-04-10 23:38:36 +08:00
c8d3e99db0 Merge pull request #11750 from tangcong/changelog
CHANGELOG: update for #11699,#11670,#11652,#11735,#11659
2020-04-10 23:24:46 +08:00
2ecbcb8f9d CHANGELOG: update for 11771 2020-04-10 19:30:32 +08:00
3594ab94cf e2e: add getCountOnlyTest testcase 2020-04-10 19:24:54 +08:00
730f3f1d78 mvcc: reduce count-only range overhead 2020-04-10 19:23:38 +08:00
16fc8a2b4b Documentation/op-guide: Re-generate alert rules and dashboard from mixin 2020-04-07 18:15:02 +02:00
2c4877064e Documentation/etcd-mixin: Use etcd_mvcc_db_total_size_in_bytes metric 2020-04-07 18:14:23 +02:00
68c5f6066f Documentation/etcd-mixin: Set unique UID for Grafana dashboard 2020-04-07 18:13:41 +02:00
7eae024ead raft: only redirect msg produced by own node (#11466)
Signed-off-by: Fullstop000 <fullstop1005@gmail.com>
2020-04-06 20:27:46 -07:00
5404b44b15 github: add stale issue close time (#11763)
Adding the numbers of days in the info.
2020-04-06 13:56:45 -07:00
b41711276e clientv3/concurrency: do not swallow error (#11458) 2020-04-06 12:07:59 -07:00
be103ea558 github: stale.yml initial commit (#11760)
There are open issues and pull requests that are years old on the etcd
repo and hundreds of issues that remain open.

Unfortunately it is just far outside the ability of the maintainer team
to take care of all of these issues manually.

So, follow the lead of Kubernetes and introduce a bot that closes PRs
and issues if they are stale.

See more information here: https://github.com/probot/stale#probot-stale
2020-04-06 10:49:49 -07:00
a18cbc8a22 Documentation: add note for #11689 (#11759) 2020-04-06 10:16:47 -07:00
22e1baddcb Merge pull request #11754 from polyrabbit/unpermitted-watch
etcdserver: watch stream got closed if one watch request is not permitted
2020-04-06 21:56:05 +08:00
03fec33fa0 Merge pull request #11756 from mlmhl/changelog-11743
CHANGELOG: update from #11743
2020-04-06 22:46:14 +09:00
5eacb4b374 Merge pull request #11743 from mlmhl/kubectl
etcdctl: support query count only of specified prefix
2020-04-06 22:45:55 +09:00
12030cfda3 CHANGELOG: update from #11743 2020-04-06 16:55:55 +08:00
73b936b50a etcdserver: watch stream got closed once one request is not permitted (#11708) 2020-04-06 13:43:37 +08:00
b2ebf6ee35 CHANGELOG: update for #11699,#11670,#11652,#11735,#11659 2020-04-06 11:17:12 +08:00
c623f798cb etcdserver: add trace for txn request (#11491)
* etcdserver: add trace for txn request

* pkg/traceutil: added StopSubTrace as a sign of the end of subtrace. Added test case for logging out subtrace.
2020-04-04 14:46:03 -07:00
2092b5b1a9 pkg, clientv3: etcdctl snaprestore when data-dir empty (#11648) 2020-04-04 14:41:19 -07:00
dbcf540c88 raft/rafttest: Prune Unused Functions (#11625)
* raft/rafttest: prune unused network interface

* raft/rafttest: prune unused raftNetwork.heal()

* raft/rafttest: prune unused logLevels.strToLev()

* raft/rafttest: prune unused InteractionEnv.writeErr()
2020-04-04 14:38:14 -07:00
51bdeb39e6 Merge pull request #11742 from zhangbitao/master
etcdmain: fix typo
2020-04-02 21:42:48 +08:00
aa7b056a77 etcdctl: support query count only of specified prefix 2020-04-02 11:04:26 +08:00
209102655b etcdmain: fix typo 2020-04-02 10:04:35 +08:00
0941cfc11d CHANGELOG: add compaction updates
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-04-01 12:05:00 -07:00
0f1694c96f CHANGELOG*: add new patch release
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-04-01 10:55:48 -07:00
5ceb7019f8 Merge pull request #11738 from gyuho/wal-metrics
wal: add "etcd_wal_writes_bytes_total"
2020-04-01 09:08:10 -07:00
054b0e5d93 Merge pull request #11735 from wswcfan/optimize-auth-lock-performance
auth: dramatically improve checkPassword performance
2020-04-01 23:24:35 +08:00
381e77c667 CHANGELOG-3.5: update
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-03-31 20:34:16 -07:00
af261f1a1b wal: add "etcd_wal_writes_bytes_total"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-03-31 20:31:32 -07:00
4051e3e36a pkg/ioutil: add "FlushN"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-03-31 20:31:24 -07:00
9cf3162d11 auth: optimize lock scope for CheckPassword
to improve authentication performance in concurrent scenarios when enable auth and using authentication based password
2020-04-01 02:21:26 +08:00
dd816f0735 CHANGELOG-3.4: update release date
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-03-29 12:44:05 -07:00
587e08822d CHANGELOG: add lease fix
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-03-29 12:38:04 -07:00
2ffbde8376 Merge pull request #11731 from tangcong/fix-lease-memory-leak
lease: fix memory leak in LeaseGrant
2020-03-29 12:30:49 -07:00
b1da829844 lease: fix memory leak in LeaseGrant when node is follower 2020-03-29 10:13:56 +08:00
a04b74d4b4 Merge pull request #11639 from jingyih/linearizable_memberlist
*: serve member list API with linearizable guarantee
2020-03-27 11:13:58 -04:00
0344b70906 *: make MemberList linearizable
- Add linearizable field to etcdserverpb.MemberListRequest.
- Change behavior of clienv3 MemberList API. Now it is served with
linearizable guarantee.
2020-03-25 20:16:20 -07:00
3ac7a11515 Merge pull request #11699 from tangcong/refactor-consistentindex
*: refactor consistentindex
2020-03-25 18:07:44 -07:00
3cea310b61 Merge pull request #11637 from eddycjy/update-changelog
CHANGELOG-3.5: update from #11564
2020-03-25 15:19:02 -07:00
6325754d96 Merge pull request #11710 from tangcong/revert-rolegrantpermission
auth: ensure RoleGrantPermission is compatible with older versions
2020-03-25 23:17:34 +08:00
ef57a615ad Merge branch 'master' into update-changelog 2020-03-25 15:02:24 +08:00
71a241e876 Merge pull request #11715 from YoyinZyc/downgrade-api
[Etcd downgrade] Add downgrade related api in server side
2020-03-24 21:31:51 -07:00
631c23d198 etcdserver/cindex: add unit test 2020-03-25 10:59:19 +08:00
804070ce87 clientv3/snapshot: clean up initIndex 2020-03-25 10:59:19 +08:00
7b2018683a *: refactor consistent index 2020-03-25 10:59:15 +08:00
d70600feca auth: ensure RoleGrantPermission is compatible with older versions 2020-03-25 09:50:07 +08:00
bbb0fcfae9 Merge pull request #11719 from fengpf/master
*: fix goroutines typos
2020-03-24 13:50:56 -07:00
86e607a2cd Merge pull request #11723 from gyuho/init
etcdmain: log "SdNotify" error/success
2020-03-24 13:50:34 -07:00
2329acf05b etcdmain: log "SdNotify" error/success
I am seeing some silent failures around systemd service.
This will help find out bugs in "go-systemd"

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-03-24 12:20:20 -07:00
1f70c0b075 *: fix goroutines typos 2020-03-24 15:33:47 +08:00
073bc22d35 etcdserver: add downgrade api in maintenance server. 2020-03-22 22:35:08 -07:00
d8b9b54348 etcdserver: add downgrade rpc proto api. 2020-03-20 17:37:26 -07:00
0eee733220 mvcc: no need to hold tx lock when converting kvs to watch events (#11701)
Method `kvsToEvents` can take a long time if a large number of events need to be synchronized. However, this method does not access any shared resources, so it no need to hold the tx lock when executing. So we can move it outside to reduce lock holding time.
2020-03-19 21:01:36 -07:00
72526cef00 Merge pull request #11709 from gyuho/bbolt
vendor: update bbolt v1.3.4, zap v1.14.1
2020-03-19 20:28:00 -07:00
3ffb3aed3a vendor: update bbolt v1.3.4, zap v1.14.1
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-03-19 13:36:43 -07:00
45a45d3c0a Merge pull request #11706 from gyuho/fix-race
clientv3: fix racy writes to context key
2020-03-19 10:34:08 -04:00
b6d98719f6 words: whitelist "racey"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-03-18 17:32:42 -07:00
eeb371b7c1 clientv3: fix racy writes to context key
=== RUN   TestWatchOverlapContextCancel

==================

WARNING: DATA RACE

Write at 0x00c42110dd40 by goroutine 99:

  runtime.mapassign()

      /usr/local/go/src/runtime/hashmap.go:485 +0x0

  github.com/coreos/etcd/clientv3.metadataSet()

      /go/src/github.com/coreos/etcd/gopath/src/github.com/coreos/etcd/clientv3/ctx.go:61 +0x8c

  github.com/coreos/etcd/clientv3.withVersion()

      /go/src/github.com/coreos/etcd/gopath/src/github.com/coreos/etcd/clientv3/ctx.go:47 +0x137

  github.com/coreos/etcd/clientv3.newStreamClientInterceptor.func1()

      /go/src/github.com/coreos/etcd/gopath/src/github.com/coreos/etcd/clientv3/client.go:309 +0x81

  google.golang.org/grpc.NewClientStream()

      /go/src/github.com/coreos/etcd/gopath/src/google.golang.org/grpc/stream.go:101 +0x10e

  github.com/coreos/etcd/etcdserver/etcdserverpb.(*watchClient).Watch()

      /go/src/github.com/coreos/etcd/gopath/src/github.com/coreos/etcd/etcdserver/etcdserverpb/rpc.pb.go:3193 +0xe9

  github.com/coreos/etcd/clientv3.(*watchGrpcStream).openWatchClient()

      /go/src/github.com/coreos/etcd/gopath/src/github.com/coreos/etcd/clientv3/watch.go:788 +0x143

  github.com/coreos/etcd/clientv3.(*watchGrpcStream).newWatchClient()

      /go/src/github.com/coreos/etcd/gopath/src/github.com/coreos/etcd/clientv3/watch.go:700 +0x5c3

  github.com/coreos/etcd/clientv3.(*watchGrpcStream).run()

      /go/src/github.com/coreos/etcd/gopath/src/github.com/coreos/etcd/clientv3/watch.go:431 +0x12b

Previous read at 0x00c42110dd40 by goroutine 130:

  reflect.maplen()

      /usr/local/go/src/runtime/hashmap.go:1165 +0x0

  reflect.Value.MapKeys()

      /usr/local/go/src/reflect/value.go:1090 +0x43b

  fmt.(*pp).printValue()

      /usr/local/go/src/fmt/print.go:741 +0x1885

  fmt.(*pp).printArg()

      /usr/local/go/src/fmt/print.go:682 +0x1b1

  fmt.(*pp).doPrintf()

      /usr/local/go/src/fmt/print.go:998 +0x1cad

  fmt.Sprintf()

      /usr/local/go/src/fmt/print.go:196 +0x77

  github.com/coreos/etcd/clientv3.streamKeyFromCtx()

      /go/src/github.com/coreos/etcd/gopath/src/github.com/coreos/etcd/clientv3/watch.go:825 +0xc8

  github.com/coreos/etcd/clientv3.(*watcher).Watch()

      /go/src/github.com/coreos/etcd/gopath/src/github.com/coreos/etcd/clientv3/watch.go:265 +0x426

  github.com/coreos/etcd/clientv3/integration.testWatchOverlapContextCancel.func1()

      /go/src/github.com/coreos/etcd/gopath/src/github.com/coreos/etcd/clientv3/integration/watch_test.go:959 +0x23e

Goroutine 99 (running) created at:

  github.com/coreos/etcd/clientv3.(*watcher).newWatcherGrpcStream()

      /go/src/github.com/coreos/etcd/gopath/src/github.com/coreos/etcd/clientv3/watch.go:236 +0x59d

  github.com/coreos/etcd/clientv3.(*watcher).Watch()

      /go/src/github.com/coreos/etcd/gopath/src/github.com/coreos/etcd/clientv3/watch.go:278 +0xbb6

  github.com/coreos/etcd/clientv3/integration.testWatchOverlapContextCancel.func1()

      /go/src/github.com/coreos/etcd/gopath/src/github.com/coreos/etcd/clientv3/integration/watch_test.go:959 +0x23e

Goroutine 130 (running) created at:

  github.com/coreos/etcd/clientv3/integration.testWatchOverlapContextCancel()

      /go/src/github.com/coreos/etcd/gopath/src/github.com/coreos/etcd/clientv3/integration/watch_test.go:979 +0x76d

  github.com/coreos/etcd/clientv3/integration.TestWatchOverlapContextCancel()

      /go/src/github.com/coreos/etcd/gopath/src/github.com/coreos/etcd/clientv3/integration/watch_test.go:922 +0x44

  testing.tRunner()

      /usr/local/go/src/testing/testing.go:657 +0x107

==================

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-03-18 17:05:05 -07:00
bf883bd15b CHANGELOG*: add new patch releases
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-03-18 15:28:05 -07:00
b50c92cb73 Merge pull request #11704 from gyuho/log-health
*: log server-side /health checks
2020-03-18 12:33:13 -07:00
92f180c574 *: log server-side /health checks
To make it easier to root-cause when /health check fails.
For example, we are using load balancer to health check
each etcd instance, and when one etcd node gets terminated,
it's hard to tell whether etcd "server" was really failing
or client (or load balancer") failed to reach the etcd cluster
which is also failure in load balancer health check.

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-03-18 11:14:05 -07:00
1c16c242db Merge pull request #11687 from gyuho/embed-client-version
clientv3: fix "hasleader" metadata key, embed client version
2020-03-18 09:16:34 -07:00
33907477dd *: add "etcd_server_client_requests_total", tests
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-03-17 12:16:11 -07:00
58ba322bb4 clientv3: embed API version
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-03-17 12:16:11 -07:00
5cb1e0b342 clientv3: fix metadata overwrites in "WithRequireLeader"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-03-17 12:16:11 -07:00
07a74d61cb Merge pull request #11675 from GSokol/master
etcdserver/api/etcdhttp: checkHealth refactoring
2020-03-17 22:43:27 +08:00
a33e1b5fae etcdserver/api/etcdhttp: checkHealth refactoring
Small refactoring of
`go.etcd.io/etcd/etcdserver/api/etcdhttp/metrics.go.checkHealth`
function just to avoid anoying repeatings of `if h.Health == "true" {`
2020-03-17 15:37:11 +02:00
c4d8bdc881 Merge pull request #11698 from hexfusion/cl-bump-11694
CHANGELOG: bump to include #11694
2020-03-17 14:07:06 +08:00
31e7b34f71 Merge pull request #11700 from jingyih/correct_changelog_3p4
CHANGELOG-3.4: correction
2020-03-17 04:03:02 +08:00
33fb62098b CHANGELOG: correction 2020-03-16 12:18:28 -07:00
193e60ebd9 Merge pull request #11670 from tangcong/optimize-auth-store-log
*: optimize auth/etcdserver logs to facilitate troubleshooting data inconsistency
2020-03-16 00:15:14 +08:00
8e35c0b867 CHANGELOG: bump to include #11694
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2020-03-15 07:41:41 -04:00
7444d3ad53 proxy/grpcproxy: add return on error for metrics handler
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2020-03-14 16:34:16 -04:00
23c2380105 Merge pull request #11666 from jingyih/update_changelog_from_11638
CHANGELOG: update from #11638
2020-03-11 19:23:59 -04:00
5a17367923 etcdserver: print warn log when failed to apply request 2020-03-10 23:13:53 +08:00
0d084d3a08 auth: cleanup saveConsistentIndex in NewAuthStore 2020-03-10 10:04:58 +08:00
6d1982efe8 Merge pull request #11659 from wswcfan/add-auth-revision-status
etcdserver: add auth revision to AuthStatus to improve observability and testability
2020-03-09 23:08:55 +09:00
221f0cc107 Merge pull request #11564 from eddycjy/balancer-error
clientv3: Fix grpc-go(v1.27.0) incompatible changes to balancer/resolver.
2020-03-06 10:35:22 -08:00
e0ff5ca318 RFC Documentation: enhance description of lock and lease (#11490)
* Documentation: enhance description of lock and lease

* Documentation: an executable implementation of fencing

* docs: api guarantees

cleanup lease grammar slightly

* docs: learning/lock/README.md improve grammar

Co-Authored-By: Steven E. Harris <seh@panix.com>

* docs: learning: improve locks and leases grammar

Co-authored-by: Brandon Philips <brandon@ifup.org>
Co-authored-by: Steven E. Harris <seh@panix.com>
2020-03-05 10:31:47 -08:00
15eeb2c4ae etcdserver: add auth revision to AuthStatus to improve observability and testability 2020-03-04 22:37:24 +08:00
c6fce8c320 Documentation: generate *.swagger.json using latest protoc-gen-swagger 2020-03-04 22:36:13 +08:00
6f850a65a1 raft: cleanup read index code (#11528)
Signed-off-by: qupeng <qupeng@pingcap.com>
2020-03-03 09:20:25 -08:00
ebe256d61c auth: print warning log when error is ErrAuthOldRevision 2020-03-03 23:21:25 +08:00
3f4f7c5a6c Merge pull request #11669 from jingyih/update_changelog_11621
CHANGELOG: update from #11621
2020-03-02 15:53:56 -05:00
cec9807a85 changelog: update from 11621
Also moving an previous update in changelog 3.4 to the right spot.
2020-03-02 10:11:13 -08:00
cb633418a2 Merge pull request #11652 from tangcong/fix-auth-store-corruption-bug
auth/store: save consistentIndex to fix a data corruption bug
2020-03-01 18:40:11 +08:00
e2ff769244 CHANGELOG: update from 11638 2020-02-29 07:33:55 -08:00
d774916f6d Merge pull request #11638 from jingyih/fix_etcdctl_member_list
etcdctl: fix member add (again...)
2020-02-29 23:08:33 +08:00
f14d2a087f auth: add new metric 'etcd_debugging_auth_revision' 2020-02-29 13:31:44 +08:00
08a8b80e32 tools/etcd-dump-db: add auth decoder, optimize print format 2020-02-29 13:31:44 +08:00
06ad53321e *: fix auth revision corruption bug 2020-02-29 13:31:37 +08:00
52fba431b6 Merge pull request #11046 from tbg/joint-auto-leave
raft: fix auto-transitioning out of joint config
2020-02-25 13:18:29 +01:00
0544f33248 raft: clarify ApplyConfChange contract for rejected conf changes
Apps typically maintain the raft configuration as part of the state
machine. As a result, they want to be able to reject configuration change
entries at apply time based on the state on which the entry is supposed
to be applied. When this happens, the app should not call
ApplyConfChange, but the comments did not make this clear.

As a result, it was tempting to pass an empty pb.ConfChange or it's V2
version instead of not calling ApplyConfChange.

However, an empty V1 or V2 proto aren't noops when the configuration is
joint: an empty V1 change is treated internally as a single
configuration change for NodeID zero and will cause a panic when applied
in a joint state. An empty V2 proto is treated as a signal to leave a
joint state, which means that the app's config and raft's would diverge.

The comments updated in this commit now ask users to not call
ApplyConfState when they reject a conf change. Apps that never use joint
consensus can keep their old behavior since the distinction only matters
when in a joint state, but we don't want to encourage that.
2020-02-25 12:45:45 +01:00
37c7e4d1d8 raft: fix auto-transitioning out of joint config
The code doing so was undertested and buggy: it would launch multiple
attempts to transition out when the conf change was not the last element
in the log.

This commit fixes the problem and adds a regression test. It also
reworks the code to handle a former untested edge case, in which the
auto-transition append is refused. This can't happen any more with the
current version of the code because this proposal has size zero and is
special cased in increaseUncommittedSize. Last but not least, the
auto-leave proposal now also bumps pendingConfIndex, which was not done
previously due to an oversight.
2020-02-25 12:35:51 +01:00
2332705f10 raft: remove bogus tail end of membership change interaction test
The test was supposed to end earlier, but some old copy pasta
survived.
2020-02-25 12:35:51 +01:00
5d7d8c09af CHANGELOG-3.4: update
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-02-24 13:42:21 -08:00
085b19b5ea Merge pull request #11645 from jingyih/update_changelog_11640
CHANGELOG: update from #11640 and #11644
2020-02-23 14:42:50 +08:00
d911a2b4d1 CHANGELOG: update from 11640 and 11644 2020-02-21 23:24:11 -08:00
8c1a820a10 Merge pull request #11640 from ereslibre/fix-learner-promotion
Fix quorum calculation when promoting a learner member
2020-02-21 12:32:32 -05:00
8756286fe8 Merge pull request #11568 from lzhfromustc/GL_test_7_bugs
transport: simple fix in test functions to prevent goroutine leak
2020-02-20 16:54:42 +01:00
6991f619f2 etcdserver: fix quorum calculation when promoting a learner member
When promoting a learner member we should not count already a voting
member, but take only into account the number of existing voting
members and their current status (started, unstarted) when taking the
decision whether a learner member can be promoted.

Before this change, it was impossible to grow from a quorum N to a N+1
through promoting a learning member.

Fixes: #11633
2020-02-20 12:06:35 +01:00
d94f4cacf2 CHANGELOG-3.5: update from 11564 2020-02-19 17:19:17 +08:00
1cb959698a Merge branch 'master' into update-changelog 2020-02-19 16:31:55 +08:00
b3b75c8f56 CHANGELOG-3.5: update from 11564 2020-02-19 16:29:59 +08:00
8f5ce68adb etcdctl: fix member add command
Use members information from member add response, which is
guaranteed to be up to date.
2020-02-19 00:12:15 -08:00
d6a3c995cf Merge pull request #11621 from jingyih/corruption_check_tls
etcdserver: make corruption check work under peer mTLS
2020-02-18 18:55:13 +08:00
4258cdd2ef clientv3: fix grpc-go(v1.27.0) incompatible changes to balancer/resolver. 2020-02-18 18:27:53 +08:00
f0faa5501d Merge pull request #11630 from jingyih/check_nil_before_use_boltOpenOptions
mvcc/backend: check for nil boltOpenOptions
2020-02-15 15:25:44 +08:00
b6ee807e93 mvcc/backend: check for nil boltOpenOptions
Check if boltOpenOptions is nil before use it.
2020-02-14 21:26:52 -08:00
74cfe52809 Merge pull request #11628 from tedyu/rm-db-tmp
mvcc/backend: remove db.tmp without checking logger presence
2020-02-15 04:42:32 +08:00
7e0e6bf497 mvcc/backend: remove db.tmp regardless of logger presence 2020-02-14 12:10:24 -08:00
c031b27491 etcdserver: corruption check via http
During corruption check, get peer's hashKV via http call.
2020-02-14 06:03:15 -08:00
84ace97ad7 Merge pull request #11572 from lzhfromustc/API_Fatal_4
integration/clientv3: fix 4 API misusage in test functions
2020-02-14 00:27:41 -08:00
bdf69dff90 Merge pull request #11626 from jpbetz/changelog-11613-backport
changelog: Add #11613 backport to 3.2, 3.3 and 3.4 changelogs
2020-02-13 14:53:30 -08:00
605f30f328 changelog: Add 11613 backport to 3.2, 3.3 and 3.4 changelogs 2020-02-13 13:03:46 -08:00
8bf7b2b1b4 Merge pull request #11613 from jpbetz/fix-defrag-orphan-file
mvcc/backend: Fix corruption bug in defrag
2020-02-13 12:02:05 -08:00
f00394e384 integration/clientv3: fix 4 API misusage in test functions 2020-02-13 13:13:18 -05:00
213f7f7877 mvcc/backend: Delete orphaned db.tmp files before defrag 2020-02-12 22:40:28 -08:00
b340dfdcbb transport: simple fix in test functions to prevent goroutine leak 2020-02-12 18:32:03 -05:00
ca7a292790 Merge pull request #11617 from jingyih/remove_capnslog_etcd
vendor: remove capnslog
2020-02-12 13:06:57 -08:00
09304a4d82 vendor: remove capnslog
Clean up capnslog from etcd code base. Remove its dependency.
2020-02-12 12:33:16 -08:00
ae983523db pkg: remove capnslog (#11616)
* pkg: remove capnslog

* CHANGELOG: function signature change
2020-02-12 11:15:41 -08:00
bb29615359 proxy: remove capnslog (#11614)
* proxy: remove capnslog

* CHANGELOG: function signature change
2020-02-12 10:30:09 -08:00
71e3220d36 Merge pull request #11605 from spzala/indexcasting
etcdctl: use appropriate type conversion
2020-02-12 10:08:37 -05:00
61f279454e etcdserver/api: remove capnslog (#11606)
* etcdserver/api/rafthttp: remove capnslog

* etcdserver/api/membership: remove capnslog

* etcdserver/api/v2auth: remove capnslog

* etcdserver/api/v2discovery: remove capnslog

* etdserver/api/v2stats: remove capnslog

* etcdserver/api/v2http: remove capnslog

* etcdserver/api/v3rpc: remove capnslog

* etcdserver/api: remove capnslog

Remove capnslog from etcdserver/api. Note that capnslog was
already removed in some packages under etcdserver/api in
previous commits.
2020-02-11 13:51:25 -08:00
0a05f1a131 etcdmain: remove capnslog (#11612) 2020-02-11 13:45:44 -08:00
c94782cd55 etcdserver: remove capnslog (#11611)
remove capnslog from etcdserver pkg, except etcdserver/api.
2020-02-11 08:54:14 -08:00
a0bb739c4e Merge pull request #11610 from mitake/authstatus
etcdserver: mark AuthStatus as no side effect request
2020-02-11 11:07:29 -05:00
fda8d38bd4 etcdserver: mark AuthStatus as no side effect request 2020-02-11 23:26:50 +09:00
e5c90ebf90 embed: don't compare uint to any negative number (#11603) 2020-02-10 14:16:57 -08:00
4c25efc1f8 Discovery: do not allow passing negative cluster size (#11608)
When an etcd instance attempts to perform service discovery, if a
cluster size with negative value  is provided, the etcd instance
will panic without recovery because of
2020-02-10 10:43:41 -08:00
5852755250 Merge pull request #11604 from spzala/strconvuint
auth: parse to uint instead of int
2020-02-10 23:02:11 +09:00
384c0f1432 Merge pull request #11607 from eladb/patch-1
contributing: invalid link to "reporting-bugs"
2020-02-09 08:52:17 -05:00
819f5cf32f contributing: invalid link to "reporting-bugs"
Fix link to the reporting bugs document
2020-02-09 14:37:25 +02:00
bc4adb8b5c etcdserver: populate ResponseHeader in Alarm method (#11600)
When no Alarms are found, the response has no header. The header should always
be populated. Some components, like fields printer used by etcdctl, break when
the header is not populated.

Fixes #11581

Signed-off-by: Daniel Lipovetsky <dlipovetsky@d2iq.com>
2020-02-08 23:07:58 -08:00
acb33a5f3f etcdctl: use appropriate type conversion
index variable is being passed as uint64 so we shouldn't use Int.
Also the if loop is redundant so remove it.
2020-02-08 22:01:20 -05:00
cc5999db3a auth: parse to uint instead of int
The strconv.Atoi is equivalent to ParseInt. The index is later used as
uint so we should use strconv.ParseUint.
2020-02-08 20:28:44 -05:00
4e5314e9b5 doc: remove out-date introduction video link. (#11601)
It's easy to find etcd introduction video, and the introduction video
from the rfc doc is outdated, so removing this link.

Fixes 11591.
2020-02-07 20:49:05 -08:00
2f2354bca2 Merge pull request #11595 from jingyih/remove_capnslog_in_mvcc
mvcc: remove capnslog
2020-02-07 13:01:04 -05:00
6b389bf23c mvcc: remove capnslog 2020-02-07 07:44:44 -08:00
f6c7d5c46a Makefile: cleanup all data dirs. (#11583) 2020-02-06 13:55:02 -08:00
84fe23d530 auth: remove capnslog (#11596) 2020-02-06 12:28:14 -08:00
aea3354854 Merge pull request #11548 from linux-on-ibm-z/s390x-docker
scripts: Added s390x support for docker image release
2020-02-06 11:13:16 -08:00
6b17141ece Merge pull request #11598 from jingyih/remove_capnslog_in_wal
wal: remove capnslog
2020-02-06 13:16:48 -05:00
2fee0b153e wal: remove capnslog 2020-02-06 06:11:59 -08:00
071e70cdc4 *: add a new API and command for checking auth status (#11536)
This changes have started at etcdctl under auth.go, and make changes to stub out everything down into the internal raft.  Made changes to the .proto files and regenerated them so that the local version would build successfully.
2020-02-05 19:27:42 -08:00
74d5ba5777 embed: remove capnslog (#11592) 2020-02-05 10:22:32 -08:00
a924600700 Merge pull request #11590 from alrs/fix-dropped-test-error
etcdserver/api/v2v3: fix dropped test error
2020-02-05 08:41:07 -08:00
f2c3bcd086 etcdserver/api/v2v3: fix dropped test error
etcdserver/api/v2v3: use testing.T instead of log in tests
2020-02-05 07:20:12 -08:00
7395ed8e5d Merge pull request #11578 from jingyih/set_zap_as_default_logger
*: set zap as default logger, remove capnslog
2020-02-04 22:58:45 -08:00
5a807dedbc CHANGELOG: update from 11586 (#11589) 2020-02-04 08:12:43 -08:00
3ad2b679f0 Merge pull request #11582 from YoyinZyc/changelog-11574
CHANGELOG-3.5: add for #11574
2020-02-04 09:06:24 -05:00
725e09023a *: set zap as default logger, remove capnslog
Set zap as default logger. Remove capnslog and deprecated logging
flags.
2020-02-04 04:57:49 -08:00
1e726077c5 Merge pull request #11586 from jingyih/use_debug_level_for_token
auth: use correct logging level
2020-02-04 20:51:37 +09:00
081d5f5797 auth: correct logging level 2020-02-03 22:54:39 -08:00
05a0e361aa CHANGELOG-3.5: add for #11574 2020-02-03 13:21:35 -08:00
a698ad65f5 Merge pull request #11574 from YoyinZyc/simpligy-grpc
clientv3: simplify grpc dialer usage.
2020-02-03 12:41:41 -08:00
b9d00aae7c Documentation: add section headings to integrations doc (#11573)
Signed-off-by: lucperkins <lucperkins@gmail.com>
2020-01-31 17:02:08 -08:00
b90d801beb clientV3: simplify grpc dialer usage. Remove workaround #11184 after bumping grpc to 1.26.0. 2020-01-30 14:51:24 -08:00
467e08c32a in multiple packages: fixed goroutine leak bugs in tests (cont.d) (#11570) 2020-01-30 10:55:59 -08:00
cad92706cf in multiple packages: fixed goroutine leak bugs in tests (#11569) 2020-01-30 10:45:59 -08:00
53f15caf73 raft: Fixed missing package name in README.md (#11566) 2020-01-29 10:15:00 -08:00
3898452b54 Merge pull request #11412 from lucperkins/lperkins/docs-restructuring-v2
Restructure documentation source files
2020-01-27 18:15:56 -05:00
342c2464ae Documentation: specify starting revision (#11559) 2020-01-27 10:18:27 -08:00
6db3c8a370 vendor: add losing grpc files (#11557) 2020-01-27 10:18:12 -08:00
23810ea285 Documentation: unify the explanation of isolation level and consistency (#11474) 2020-01-27 10:17:38 -08:00
2f25061a16 Merge remote-tracking branch 'upstream/master' into lperkins/docs-restructuring-v2 2020-01-25 11:45:54 -08:00
798c073b89 proxy/tcpproxy: fix dup unweighted remotes (#11552) 2020-01-23 14:27:34 -08:00
f806c3aee4 Merge remote-tracking branch 'upstream/master' into lperkins/docs-restructuring-v2 2020-01-22 13:08:46 -08:00
c3497c84ed mvcc: use correct error variable in defragdb (#11527)
Co-authored-by: yutedz <54038175+yutedz@users.noreply.github.com>
2020-01-22 11:03:23 -08:00
1be2f4b8e2 Documentation: Restructure directory to accommodate new site generation system
Signed-off-by: lucperkins <lucperkins@gmail.com>
2020-01-21 14:29:54 -08:00
d17a607da2 Merge pull request #11411 from spzala/missingchangelog
CHANGELOG: add missing changelogs
2020-01-20 11:25:56 -08:00
17a220eaee scripts: Added s390x support for docker image release 2020-01-20 07:09:59 -08:00
c00e929d8f Merge pull request #11535 from spzala/goversion
doc: update required go version for master
2020-01-20 08:14:30 -05:00
f2ed13af05 Merge pull request #11546 from gyuho/fix-typo
clientv3/integration: fix a typo in "TestLeasingTxnRangeCmp"
2020-01-20 02:05:40 -08:00
993e82a85b clientv3/integration: fix a typo in "TestLeasingTxnRangeCmp"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-01-19 23:56:22 -08:00
4fc6fa4ce5 Merge pull request #11545 from gyuho/fix
clientv3/integration: fix typo in "TestLeasingRevGet"
2020-01-19 15:11:19 -05:00
2669b83c68 clientv3/integration: fix typo in "TestLeasingRevGet"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-01-19 10:20:23 -08:00
45156cf3ca Merge pull request #11540 from gyuho/tests
clientv3/integration: fix tests
2020-01-17 15:40:55 -08:00
a592b808c5 Merge pull request #11538 from andyxning/fix_typo
mvcc: fix error log typo
2020-01-17 13:10:11 -08:00
091b84f154 clientv3/integration: fix "TestLeaseKeepAliveNotFound"
with "default" select, the failure case will never be selected

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-01-17 12:04:10 -08:00
255944bf51 clientv3/integration: expect "ErrCompacted" in "TestKVCompact"
Making tests more strict

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2020-01-17 12:03:13 -08:00
f260df559d mvcc: fix error log typo 2020-01-17 17:27:04 +08:00
8aa7a3dc09 mvcc: log error if tmpdb is not removed (#11523)
Co-authored-by: yutedz <54038175+yutedz@users.noreply.github.com>
2020-01-16 17:34:45 -08:00
0cfadaaaeb doc: update required go version for master
changelog and readme are already updated.
2020-01-16 16:05:46 -05:00
e5a35c827c mvcc: incomplete fix in #11502 (#11533) 2020-01-16 12:05:10 -08:00
2e3b55eb7b Changelog-3.5: update changelog for grpc upgrade (#11526) 2020-01-15 17:45:52 -08:00
250b0acac4 mvcc: check the error return in defragdb (#11524)
Co-authored-by: yutedz <54038175+yutedz@users.noreply.github.com>
2020-01-15 16:57:12 -08:00
67bf39b2ec vendor: update gRPC Go to v1.26.0 (#11522) 2020-01-15 16:56:21 -08:00
574ee42ad7 mvcc: rollback tmptx in case of error (#11525)
Co-authored-by: yutedz <54038175+yutedz@users.noreply.github.com>
2020-01-15 13:54:52 -08:00
af131b58eb CHANGELOG: update recommended versions (#11520) 2020-01-15 10:05:54 -08:00
a96bc48268 mvcc: fix snapshot sendRateBytes unit (#11502) 2020-01-14 11:29:05 -08:00
908f45ebe4 Merge pull request #11462 from jingyih/etcdctl_support_watch_progress_notify
etcdctl: support progress notify option
2020-01-14 10:07:37 -05:00
e90c56020d CHANGELOG-3.5: update 2020-01-14 01:20:36 -08:00
21f68298a5 Add tag "etcd-mixin" into the Grafana dashboard 2020-01-14 09:12:19 +01:00
b95a465235 Auth: declare auth variable inside the loop (#11476)
Co-authored-by: yutedz <54038175+yutedz@users.noreply.github.com>
2020-01-13 19:23:00 -08:00
0c787e26bc Update README.md 2020-01-09 10:06:27 -08:00
6ffd9f659e tools/benchmark: exit when txn-ops is larger than key-space-size to avoid key duplicated error. (#11499) 2020-01-06 16:36:51 -08:00
e6980b1f9f Merge pull request #11482 from cuiyuan/fix-rbcolor-string
pkg/adt: rbcolor string fix
2019-12-30 11:26:07 -08:00
98f62d27be pkg/adt: rbcolor string fix 2019-12-30 19:52:34 +08:00
5adad5e224 Merge pull request #11452 from tedyu/watch-grpc-send-err
clientv3: log warning in case of error sending request
2019-12-20 15:31:02 -08:00
cb8bf089f8 clientv3: log warning in case of error sending request 2019-12-20 15:08:33 -08:00
eaa0612e02 raft: abort leader transferring if the target is demoted (#11417)
Signed-off-by: qupeng <qupeng@pingcap.com>
2019-12-20 12:07:52 +08:00
c0de070527 etcdctl: support progress notify option
Add support for progress notify option to etcdctl watch command.
2019-12-17 14:16:42 -08:00
5770a6d286 Merge pull request #11453 from mindw/missing_metrics_doc
Documentation: added v3.4 metrics docs
2019-12-17 11:27:42 -08:00
fb7703ab43 clientv3: remove ineffective nil check (#11451) 2019-12-15 21:38:25 -08:00
8223006a97 Documentation: added v3.4.x metrics docs 2019-12-15 14:13:36 +02:00
322c38e169 Documentation/etcd-mixin: Fix etcdHighNumberOfLeaderChanges (#11448)
The `etcdHighNumberOfLeaderChanges` alert had a copy and paste
error when it was converted from docs to mixin in 10244 - we moved
from "increase over 15m > 3" to "rate over 15m > 3" which is not
the same (rate is measured per second, so it should have been
"rate over 15m > (3 / 60 / 15)").  As part of fixing that, we
need to capture when prometheus starts or when new etcd clusters
are captured with a high leader change - i.e. if you start a new
etcd cluster and at the moment prometheus first scrapes you are
already at 5 leader changes, we should fire on that transition.

This alert is also now more responsive, so if you get a quick
burst of 3 leader changes we'll alert within 5m rather than 15m.
2019-12-13 16:00:11 -08:00
7f3dd59d22 mvcc: Log warning when compaction encounters error (#11447) 2019-12-13 15:59:49 -08:00
378b05b8dd Merge pull request #11443 from YoyinZyc/changelog-11418
CHANGELOG: Add #11418 to changelog-3.4, changelog-3.5
2019-12-11 18:16:30 -08:00
769d2f868e CHANGELOG: update for #11418 2019-12-11 16:09:20 -08:00
d70251835d integration: gracefully shut down gRPC server (#11437) 2019-12-11 13:07:16 -08:00
b7d9f45a43 Merge pull request #11432 from YoyinZyc/changelog-11427
CHANGELOG-3.5: update for #11427
2019-12-11 11:45:17 -08:00
69841bdb0b CHANGELOG-3.5: update for #11427 2019-12-11 11:43:04 -08:00
4f35794458 Merge pull request #11418 from YoyinZyc/fix-add-user-grpc
auth: fix NoPassWord check when add user
2019-12-10 12:47:35 -08:00
5127cfb45f e2e: test curl auth on onoption user 2019-12-10 11:25:16 -08:00
aea34c14ca auth: fix NoPassWord check when add user 2019-12-09 14:10:54 -08:00
9f81002a11 Merge pull request #11427 from YoyinZyc/migration-cluster-attr
Migrate cluster attributes to use v3 backend
2019-12-09 13:30:15 -08:00
7784ca8997 etcdserver: remove v2 version set; e2e: fix tests. 2019-12-09 13:08:00 -08:00
ed5a01a48d etcdserver: recover cluster version from backend 2019-12-05 16:25:13 -08:00
5cd2502ab1 etcdserver: use v3 to publish member attr 2019-12-05 16:25:13 -08:00
0c3401fa76 etcdserver: use V3 to update cluster version 2019-12-05 16:25:13 -08:00
dcd622b2c7 etcdserver: add v3 request type for cluster attr
Added ClusterVersionSetRequest for setting cluster version via v3 apply.

Added ClusterMemberAttrSetRequest for setting clsuter member attributes
via v3 apply.
2019-12-05 16:25:13 -08:00
1f8764be3b integration: prevent goroutines leaks in test (#11318)
Some goroutines in test functions will be leaked in certain cases.
This patch stops these leaks no matter what happens in test, by
putting the blocking channel in select together with a new stopc
channel, or adding 1 buffer to the blocking channel.
2019-12-05 15:40:10 -08:00
fd2dddb39f vendor: bump go-systemd to v22.0.0 to fix mod tidy error (#11387) 2019-12-04 18:47:14 -08:00
sun
c5887cdc49 mvcc: go style err check (#11419) 2019-12-04 18:46:17 -08:00
d4d7ad3908 mirror: make etcdctl make-mirror subcommand accept --dest-user and --dest-password (#11384) 2019-12-04 14:06:49 -08:00
e5356cca80 Merge pull request #11408 from xiang90/lock
concurrency: make lock more reliable
2019-12-04 12:10:47 -08:00
659f5a4086 Update CHANGELOG-3.3.md 2019-12-03 16:00:17 -08:00
18e9e45bda Merge pull request #11358 from linux-on-ibm-z/s390x-binary
scripts/build-binary: Added s390x support for binary release
2019-12-02 14:40:28 -08:00
ae2bc166db Merge pull request #11413 from YoyinZyc/fix-user-options-nil-pointer
auth: fix user.Options nil pointer
2019-12-02 14:39:38 -08:00
a45b99725f CHANGELOG: add missing changelogs
related #11184 #11211 #11354
2019-12-02 17:28:42 -05:00
c8ffd921d4 auth: fix user.Options nil pointer 2019-12-02 14:09:07 -08:00
b14c7cd448 concurrency: make lock more reliable 2019-12-02 10:54:30 -08:00
d1139d3a66 Merge pull request #11404 from jingyih/update_changelog
CHANGELOG: update from PR 11403
2019-11-27 13:28:41 -08:00
6be629cc14 CHANGELOG: update from PR 11403 2019-11-27 13:19:29 -08:00
ccc52bef1f Merge pull request #11400 from WIZARD-CXY/compactfix
mvcc/kvstore:fixcompactbug
2019-11-27 13:03:32 -08:00
3275e5f064 Merge pull request #11399 from johncming/remove-dup-code
etcdmain: remove duplicate codes.
2019-11-27 12:56:53 -08:00
655df65e93 mvcc/kvstore:fixcompactbug 2019-11-27 17:55:42 +08:00
6c0e2d31fb etcdmain: remove duplicate codes. 2019-11-27 17:04:43 +08:00
419ffb77ab Merge pull request #11287 from YoyinZyc/version-test-rolling-start
e2e: add cluster version test with rolling start servers
2019-11-26 15:12:54 -08:00
9c08316794 Merge pull request #11395 from jingyih/update_changelog
CHANGELOG: update from PR #11374
2019-11-26 15:03:22 -08:00
49c3f74314 CHANGELOG: update from PR 11374 2019-11-26 14:16:37 -08:00
44fc9e3d92 Merge pull request #11266 from YoyinZyc/upgrade-downgrade-test
e2e: only expect cluster's major version is > 3 in release upgrade test
2019-11-25 14:03:57 -08:00
cab4cace5e tests: change MANUAL_VER to 3.4.3 2019-11-25 10:57:47 -08:00
5a1102341e e2e: only expect cluster's major version is > 3 in release upgrade tests. 2019-11-25 10:57:27 -08:00
ec5221774c Merge pull request #11363 from yeasy/patch-1
docs: Update the raft usage by adding Hyperledger project
2019-11-20 16:18:32 -08:00
908ef19d86 Merge pull request #11374 from YoyinZyc/put_throughput_metrics
mvcc: add "etcd_mvcc_put_size_in_bytes" metrics
2019-11-19 23:38:30 -08:00
a5e747b2d4 mvcc: update to "etcd_debugging_mvcc_total_put_size_in_bytes" 2019-11-19 15:41:58 -08:00
28f40d7794 mvcc: add "etcd_mvcc_put_size_in_bytes" to monitor the throughput of put request. 2019-11-19 13:55:37 -08:00
b373cb9051 Merge pull request #11373 from gtamas/master
Documentation: changed ETCD manager URL
2019-11-19 13:28:29 -08:00
a0571166bc feat: changed ETCD manager URL
It now points to our domain instead of the Github page.
2019-11-19 22:17:29 +01:00
4b755e8935 docs: Update the raft usage by adding Hyperledger project 2019-11-19 09:54:16 -08:00
cabf5942b2 scripts/build-binary: Added s390x support for binary release 2019-11-13 22:57:23 -08:00
63dd73c186 Merge pull request #11354 from spzala/issue11353
CHANGELOG: Add v3.4.3
2019-11-13 16:21:43 -05:00
8adebf4a28 CHANGELOG: Add v3.4.3
Add v3.4.3 and fix v3.4.2 release date.

Fixes # 11353
2019-11-13 14:27:23 -05:00
d05459ed5b Merge pull request #11322 from jcalvert/etcdctl_healthoutput
etcdctl: Print healthy results to stdout, not stderr
2019-11-10 21:30:23 -05:00
7fe2719d6d Merge pull request #11341 from hexfusion/3.2.28_rl
CHANGELOG: update for #11308
2019-11-10 17:30:29 -08:00
5fa686f912 Merge pull request #11342 from hexfusion/bump_3.2.28
CHANGELOG: bump release 3.2.28
2019-11-10 17:29:53 -08:00
e9c30c570f CHANGELOG: update for #11308
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2019-11-10 19:37:02 -05:00
350626ba90 CHANGELOG: bump release 3.2.28
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2019-11-10 19:33:30 -05:00
b852e37895 Merge pull request #11333 from el10savio/Procfiles_Comments
Procfiles: Added Comments To Procfiles #11329
2019-11-06 11:14:39 -08:00
65a497dded Procfiles: Added Comments To Procfiles
To indicate to change the path of bin/etcd binary as it failes at times to
run using Goreman because of etcd located in another directory.

Fixes #11329
2019-11-06 08:44:04 +05:30
cbc1340af5 Merge pull request #11330 from shenjiangc/master
mvcc/kvstore: Optimize compaction, slove conflict for #11150
2019-11-04 20:56:01 -08:00
72cc5dcf39 mvcc/kvstore:when the number key-value is greater than one million, compact take too long and blocks other requests 2019-11-05 11:48:32 +08:00
edd011c6d1 Merge pull request #11325 from lijianwh/#11320_fix_bug
etcdserver: fix a bug which append object to a new allocated sized slice
2019-11-02 10:18:53 -07:00
cdc28507ef etcdserver: fix append object to a new allocated sized slice 2019-11-01 10:19:45 +08:00
fa972cf296 Merge pull request #11300 from lzhfromustc/MU_mvcc2
mvcc: Add Unlock before panic to prevent double lock
2019-10-31 10:14:34 -07:00
cb0ba4af59 Merge pull request #11301 from lzhfromustc/MU_benchmarkL
lease:Add Unlock before break in loop
2019-10-31 10:13:27 -07:00
9177098779 Merge pull request #11313 from gyuho/retry-log
clientv3: fix retry/streamer error message
2019-10-31 10:05:13 -07:00
e48ad568b9 etcdctl: Print healthy results to stdout, not stderr
Printing to stderr when there is no actual error is not intuitive
and makes tool integration more difficult
2019-10-31 10:01:03 -05:00
5dc98c50d7 clientv3: fix retry/streamer error message
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-10-30 21:29:44 -07:00
bbe1e78e62 Merge pull request #11308 from jingyih/wait_purgefile_loop
etcdserver: wait purge file loop to finish during shutdown
2019-10-30 15:54:49 -07:00
c447955d93 etcdserver: wait purge file loop during shutdown
To prevent the purge file loop from accidentally acquiring the file lock
and remove the files during server shutdowm.
2019-10-30 14:21:08 -07:00
ce61cd4324 lease:Add Unlock before break in loop 2019-10-28 22:52:24 -04:00
235d7c2e51 mvcc: Add Unlock before panic to prevent double lock 2019-10-28 22:38:34 -04:00
84e2788c2e Merge pull request #10468 from jingyih/remove_auth_loop
etcdserver: remove infinite loop for auth in raftRequest
2019-10-29 00:11:40 +09:00
41539df490 integration: disable TestV3AuthOldRevConcurrent
Disable TestV3AuthOldRevConcurrent for now. See
https://github.com/etcd-io/etcd/pull/10468#issuecomment-463253361
2019-10-25 18:39:07 -07:00
669cd6b5c6 Merge pull request #11288 from ZYunH/format-errors
fileutil, src: format errors
2019-10-25 14:43:33 -04:00
279fee668b fileutil, src: format errors 2019-10-25 22:31:49 +08:00
f17107eb23 Merge pull request #11289 from gyuho/rrr
scripts/release: list GPG key only when tagging is needed
2019-10-23 11:12:35 -07:00
fd5a25fcec scripts/release: list GPG key only when tagging is needed
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-10-23 10:33:39 -07:00
fac434b952 *: use Go 1.13.3
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-10-23 10:32:39 -07:00
4243ebd3ef e2e: add cluster version test for rolling start servers 2019-10-22 12:47:56 -07:00
b5afbdd8d0 Merge pull request #11285 from WIZARD-CXY/changelog
Update CHANGELOG-3.5
2019-10-22 11:52:51 -07:00
503ce2fdfd CHANGELOG: update Changelog-3.5 2019-10-22 17:39:21 +08:00
92f313811e Merge pull request #11257 from lzhfromustc/grpcproxy_mis_unlock
grpcproxy: Add an Unlock before continue to prevent double lock
2019-10-21 17:47:43 -07:00
342b58ba31 Merge pull request #11279 from YoyinZyc/stream-version-test
rafthttp: add test stream support for current version.
2019-10-21 17:33:43 -07:00
c57f8b3af8 nit: fix type s/custer/cluster 2019-10-21 13:00:19 -07:00
bd0a67a2d8 Merge pull request #11282 from YoyinZyc/cluster-version-test
e2e: add cluster version test
2019-10-21 11:54:41 -07:00
321e3ce1a6 e2e: add cluster version test 2019-10-21 11:14:18 -07:00
80a177292e rafthttp: add test stream support for current version. 2019-10-21 09:45:00 -07:00
5dc12f2725 Merge pull request #11274 from YoyinZyc/fix-upgrade-failure
rafthttp: add 3.4.0,3.5.0 stream type
2019-10-20 19:20:06 -07:00
9c48dfabff Merge pull request #11278 from spzala/pathref
doc: update file ref path
2019-10-17 20:58:30 -04:00
d185a54cb4 doc: update file ref path
Update the adopters file path.
2019-10-17 20:34:24 -04:00
de9cc79efe Merge pull request #11276 from spzala/adopters
doc: move production users to a standard ADOPTERS file
2019-10-17 17:12:39 -07:00
d73e04efd9 doc: move production users to a standard ADOPTERS file
The details of production users fits better in the standard
ADOPTERS file as used by many other CNCF projects like
CoreDNS, containerd etc.
2019-10-17 18:36:28 -04:00
a0e528e4b1 rafthttp: add 3.4.0,3.5.0 stream type 2019-10-17 14:25:56 -07:00
51b1677d99 Merge pull request #11272 from etcd-io/wenjiaswe-changelog11261-1
Update CHANGELOG-3.3 for 11261
2019-10-17 14:18:12 -07:00
7534e5c14b Merge pull request #11273 from etcd-io/wenjiaswe-patch-1
Update CHANGELOG-3.2 for #11271
2019-10-17 14:17:56 -07:00
8dc181dc5e Update CHANGELOG-3.2 for #11271
Add changelog for etcd_cluster_version metrics from ##11271
2019-10-17 13:10:46 -07:00
8bedf3dde8 Update CHANGELOG-3.3 for 11261
Add log for etcd_cluster_version metrics addition in #11261
2019-10-17 13:06:06 -07:00
a65e4d3357 Merge pull request #11262 from WIZARD-CXY/updateflag
*: promote the boltdb-freelistType from experimental to official
2019-10-17 10:56:45 -07:00
f62ea1ceca *: promote the boltdb-freelistType from experimental to official and set default type to hashmap 2019-10-17 15:40:38 +08:00
adb126afc4 Merge pull request #11267 from k-ye/fix
backend: fix comment for bucketBuffer.merge()
2019-10-16 20:57:28 -07:00
49f4a418f9 backend: fix comment for bucketBuffer.merge() 2019-10-17 08:48:12 +09:00
debf86c129 Merge pull request #11265 from jingyih/fix_cluster_version_metrics
etcdserver: strip patch version in metrics
2019-10-16 16:25:15 -07:00
57632d27ee Merge pull request #11260 from jingyih/update_changelog
CHANGELOG: update from PR 11254
2019-10-16 12:43:00 -07:00
444bfdff59 etcdserver: strip patch version in metrics
Strip patch version in cluster version metrics during node restart.
2019-10-16 12:39:17 -07:00
9ac0d65af8 CHANGELOG: update from PR 11254 2019-10-15 12:27:42 -07:00
e8a60d735f grpcproxy: Add an Unlock before continue to prevent double lock 2019-10-14 21:44:07 -04:00
bcc147127d Merge pull request #11254 from jingyih/strip_patch_version_in_cluster_version_metrics
etcdserver: strip patch version in cluster version metrics
2019-10-14 17:22:33 -07:00
1333abc606 etcdserver: strip patch version in cluster version
Strip patch version in cluster version metrics.
2019-10-14 16:59:09 -07:00
1b041a5783 Merge pull request #11249 from spzala/issue9726
doc: add lease time
2019-10-14 19:47:08 -04:00
3ef2ad8e11 Merge pull request #11247 from jpbetz/version-tag-branch-checks
Add version, tag and branch checks to release script
2019-10-13 17:49:27 -07:00
9002c1951f doc: add lease time
The current lease time is short and as such can lead to a timeout
error as explained in the related issue which can be confusing.

Fixes #9726
2019-10-13 16:38:28 -04:00
a4e9d81df7 Merge pull request #11225 from spzala/issue11210
pkg: handle version env variable
2019-10-13 11:30:33 -07:00
27535517b1 pkg: handle version env variable
Version flag is meant for displaying version and it's a boolean.
It's for an internal use, and we may not want users to set
it in the environment.

Fixes # 11210
2019-10-13 13:23:59 -04:00
f20daa5977 Merge pull request #11233 from jingyih/unset_old_cluster_version_metrics
etcdserver: unset old cluster version in metrics
2019-10-12 12:07:45 -07:00
9c4194f6ef etcdserver: unset old cluster version in metrics 2019-10-11 22:25:03 -07:00
36696fe2cc Add version, tag and branch checks to release script 2019-10-11 15:47:15 -07:00
0824b08cab Merge pull request #11237 from YoyinZyc/prevent-darwin-build
scripts: avoid release builds on darwin machine.
2019-10-11 10:39:14 -07:00
99731be14a Merge pull request #11242 from jpbetz/changelog-3316-bad
CHANGELOG: Note that 3.3.16 is a bad release and add 3.3.17 release notes
2019-10-11 10:38:24 -07:00
53718bbf33 CHANGELOG: Note that 3.3.16 is a bad release and add 3.3.17 release notes 2019-10-11 10:20:43 -07:00
b9358a0bc8 scripts: avoid release builds on darwin machine. 2019-10-11 09:56:48 -07:00
b7bf33bf5d Merge pull request #11234 from YoyinZyc/release-script
Scripts: fix read failure prompt in release
2019-10-10 16:01:22 -07:00
55efdfe364 scripts: fix read failure prompt in release; use https for git clone. 2019-10-10 13:23:36 -07:00
c60618234b Merge pull request #11228 from heroku/ffz/BumpLogrus
go.mod: Bump Logrus and x/crypto
2019-10-10 11:08:02 -07:00
efc154b095 Merge pull request #11231 from swapnilgm/patch-1
Documenration: Add gardener/etcd-backup-restore to the tools list.
2019-10-10 10:36:00 -07:00
e5aecf8678 Documentation: Add gardener/etcd-backup-restore to the tools list
Etcd-backup-restore is collection of components to backup and restore the etcd. It features the periodic full and incremental backups, automated restore, Validation of etcd data directory with multi cloud provider support.
2019-10-10 21:18:41 +05:30
5c883280df Merge pull request #4 from etcd-io/master
Rebase master
2019-10-09 16:22:54 -07:00
9efa0448e2 go.mod: bump x/crypto because of [CVE-2019-11840]
Related to https://github.com/sirupsen/logrus/issues/1035
2019-10-09 16:03:31 -07:00
9830872d31 go.mod: bump the version of logrus
Related to https://github.com/sirupsen/logrus/issues/1035
2019-10-09 16:03:23 -07:00
a6a1fdd457 Merge pull request #11224 from YoyinZyc/update-changelog
CHANGELOG: update #11179 in changelog-3.4
2019-10-09 13:27:28 -07:00
fe2ada4b45 CHANGELOG: update #11179 in changelog-3.4 2019-10-09 13:06:11 -07:00
7f20ab8369 Merge pull request #3 from etcd-io/master
Rebase
2019-10-09 12:50:27 -07:00
f197ab4578 Merge pull request #11219 from andyliuliming/changelog_for_cherry_pick
changelog: for the skip client san verification option.
2019-10-09 09:41:49 -07:00
1e1ce6b651 changelog for the skip client san verification option. 2019-10-09 13:28:23 +08:00
56bfdab2f0 Merge pull request #11212 from YoyinZyc/tls-san-testing
Add tests for certs with dns names.
2019-10-08 16:41:30 -07:00
6aae90325c Merge pull request #11211 from jpbetz/ipv6-endpoints
Replace endpoint.ParseHostPort with net.SplitHostPort to fix IPv6 client endpoints
2019-10-08 15:15:16 -07:00
594354b886 Replace endpoint.ParseHostPort with net.SplitHostPort to fix IPv6 client endpoints 2019-10-08 14:53:49 -07:00
eb4b800fda tests: updated ubuntu version in Dockerfile 2019-10-08 14:30:15 -07:00
79bfc90f2b tests/docker-dns: adding tests for certs with dns names. 2019-10-08 14:23:10 -07:00
340f0ac797 Merge pull request #11179 from YoyinZyc/trace
Add tracing to range request in etcd server.
2019-10-08 13:23:53 -07:00
2263930462 Merge pull request #2 from etcd-io/master
Rebase master
2019-10-08 12:52:05 -07:00
57aa68af5a etcdserver: trace compaction request; add return parameter 'trace' to applierV3.Compaction()
mvcc: trace compaction request; add input parameter 'trace' to KV.Compact()
2019-10-07 09:55:27 -07:00
555eb1951f Merge pull request #11192 from i-sevostyanov/master
Removed duplicate check in confchange.Simple
2019-10-04 08:25:35 -04:00
a0d24279ee Merge pull request #11202 from jingyih/update_changelog
CHANGELOG: update from #11194
2019-10-03 16:03:47 -07:00
2bf8e03c73 CHANGELOG: update from #11194 2019-10-03 14:51:16 -07:00
c2f23094c8 Merge pull request #11190 from gyuho/grpc
vendor: upgrade gRPC Go to v1.24.0
2019-10-03 10:26:48 -07:00
6e74099b6f Merge pull request #11184 from jpbetz/correct-authority-checks
clientv3: Set authority used in cert checks to host of endpoint
2019-10-03 10:21:55 -07:00
81a6b4ec9a Merge pull request #11194 from jingyih/fix_etcdctl_memberAdd
etcdctl: fix member add command
2019-10-03 09:04:06 -07:00
a5abf91771 etcdctl: fix member add command 2019-10-02 17:43:32 -07:00
3a3eb24c69 etcdserver: trace raft requests. 2019-10-01 15:38:52 -07:00
401df4bb8e etcdserver: add put request steps.
mvcc: add put request steps; add trace to KV.Write() as input parameter.
2019-10-01 14:08:06 -07:00
d487b16de1 confchange: removed duplicate check in confchange.Simple. 2019-10-01 11:32:12 +03:00
236ac2a905 Merge pull request #11175 from spzala/governance
*: create project governance
2019-09-30 13:41:07 -07:00
1d6ef8370e pkg: use zap logger to format the structure log output. 2019-09-30 13:11:21 -07:00
3830b3ef11 pkg: add field to record additional detail of trace; add stepThreshold
to reduce log volume.
2019-09-30 13:11:21 -07:00
f4e7fc56a7 pkg: create package traceutil for tracing. mvcc: add tracing
steps:range from the in-memory index tree; range from boltdb.
etcdserver: add tracing steps: agreement among raft nodes before
linerized reading; authentication; filter and sort kv pairs; assemble
the response.
2019-09-30 13:06:02 -07:00
036cb96fd1 *: create project governance
Create project governance.
2019-09-30 15:24:14 -04:00
426463c433 vendor: upgrade gRPC Go to v1.24.0
Picking up some performance improvements and bug fixes.

https://github.com/grpc/grpc-go/releases/tag/v1.24.0

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-09-30 10:43:02 -07:00
3712a5d045 CHANGELOG-3.4: update
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-09-27 23:38:49 -07:00
fce0e23d1b *: use Go 1.13.1
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-09-27 23:37:11 -07:00
46f3e8349b scripts/build-binary: fix darwin tar commands
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-09-27 23:35:34 -07:00
97388ce454 clientv3: Set authority used in cert checks to host of endpoint 2019-09-25 15:14:23 -07:00
efd1fc634b Merge pull request #11181 from jingyih/fix_doc
doc: clarify metrics flag
2019-09-25 10:47:12 -07:00
20acacdea5 doc: clarify metrics flag 2019-09-24 15:27:46 -07:00
06ec6c4b66 *: create project governance
Create project governance.
2019-09-24 12:50:21 -04:00
6075b9def1 Merge pull request #11174 from anakaiti/patch-1
README: fix formatting on hangouts link
2019-09-23 08:58:12 -07:00
7cb2bb67bf README: fix formatting on hangouts link
Added link and removed wrongly copied text
2019-09-23 22:19:37 +07:00
4f4777182b Merge pull request #11172 from spzala/slack
*: add slack contact
2019-09-22 23:05:36 -07:00
4681061b1f *: add slack contact
Add slack chat contact.
2019-09-22 16:12:31 -04:00
129138760c Update README.md with 9/19/2019 meeting recording 2019-09-19 11:55:43 -07:00
cbbaf2b148 Merge pull request #11167 from lsytj0413/fix-unknown-field
test(functional): remove unknown field Etcd.Debug
2019-09-18 19:06:30 -07:00
2c95b49b63 test(functional): remove unknown field Etcd.Debug 2019-09-19 09:51:51 +08:00
e84029cc04 Merge pull request #11162 from yaojingguo/remove-cancel
clientv3: remove the redundant CancelFunc invocation
2019-09-18 12:39:49 -07:00
9088d07062 Merge pull request #11164 from spzala/codeofconduct
*: update project code of conduct
2019-09-18 14:39:54 -04:00
5370570fec *: update project code of conduct
Update the code of conduct. Remove notice file.
2019-09-18 14:09:18 -04:00
e24564224a clientv3: remove the redundant CancelFunc invocation 2019-09-18 23:06:49 +08:00
501bb07dd3 Merge pull request #11161 from yaojingguo/remove-slash
clientv3/concurrency: remove the unneeded slash
2019-09-18 18:54:01 +08:00
e53298afb1 clientv3/concurrency: remove the unneeded slash
Since NewMutex will append a slash to pfx, there is no need to append a
slash beforehand.
2019-09-18 16:37:31 +08:00
838315283d scripts/release: fix SHA256SUMS command
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-09-17 14:12:50 -07:00
c327120ba0 scripts/release: fix docker push command
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-09-17 13:52:22 -07:00
2530c900fd CHANGELOG: update with patch release
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-09-17 13:29:30 -07:00
a546864790 Merge pull request #11153 from beautytiger/dev-190916
integration:  fix bug in for loop, make it break properly
2019-09-17 10:53:36 -07:00
39b4d147e1 Merge pull request #11151 from vimalk78/integration-fixes
travis: re-enable bom tests
2019-09-17 08:47:12 -07:00
6287052bd0 integration: fix bug in for loop, make it break properly 2019-09-17 11:27:31 +08:00
9bb9a8819c Merge pull request #11152 from spzala/cherrypick
hack: fix cherrypick instruction
2019-09-16 12:12:26 -07:00
78fb1e34f8 hack: fix cherrypick instruction
Remotes is not a valid git command. Also, set the environmental variable
correctly.
2019-09-15 17:48:04 -04:00
e4cb346c3a travis: re-enable bom tests
bill-of-materials was fixed for module aware 'go list' as part of https://github.com/coreos/license-bill-of-materials/pull/17
So can re enable bom tests

fixes #11132
2019-09-14 13:57:55 -07:00
589ab747f7 Merge pull request #11014 from dbavatar/peervalidation
etcdserver: Fix PeerURL validation
2019-09-13 17:42:39 -07:00
0dd10cf6b8 etcdserver: Fix PeerURL validation
In case of URLs that are synonyms, the current lexicographic sorting
and compare of the URLs fails with frustrating errors. Make sure to do
a full comparison between every set of PeerURLs before failing.

Fixes #11013
2019-09-13 17:53:40 -04:00
4de594a3fe Merge pull request #11149 from spzala/embedzaplogger
CHANGELOG: update 3.4.1 and 3.5
2019-09-13 14:07:53 -07:00
b4be60515b CHANGELOG: update 3.4.1 and 3.5
Update from #11147 and #11148
2019-09-13 15:51:46 -04:00
bf3d1fb484 Merge pull request #11147 from ChrisRx/revert-embed-logger
embed: expose ZapLoggerBuilder
2019-09-13 09:31:05 -07:00
e8660c0cec embed: expose ZapLoggerBuilder
This exposes the ZapLoggerBuilder in the embed.Config to allow for
custom loggers to be defined and used by embedded etcd.

Fixes #11144
2019-09-13 07:46:01 -04:00
1e7e66727e Merge pull request #11146 from vimalk78/clientv3-fixes
CHANGELOG : Update CHANGELOG-3.5.md for Mutex.TryLock
2019-09-12 21:13:01 -07:00
82e3579250 *: Update CHANGELOG-3.5.md for Mutex.TryLock
Added https://github.com/etcd-io/etcd/pull/11104 to CHANGELOG for 3.5
2019-09-12 14:34:26 -07:00
79b15a9c46 Merge pull request #11104 from vimalk78/clientv3-fixes
clientv3/concurrency: Added Mutex.TryLock()
2019-09-12 12:23:29 -07:00
2822da8659 CHANGELOG: update gRPC Dependency changes
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-09-11 14:56:18 -07:00
cee9a84c82 Merge pull request #11140 from gyuho/grpc
vendor: upgrade to gRPC v1.23.1
2019-09-11 14:16:07 -07:00
2ed05bfc33 vendor: upgrade to gRPC v1.23.1
https://github.com/grpc/grpc-go/releases/tag/v1.23.1

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-09-11 12:25:49 -07:00
62822c52c8 Merge pull request #11138 from spzala/lock10840
ETCDCTL_README: clarify the usage of ETCDCTL_* variables
2019-09-10 15:31:26 -04:00
c9d00ce130 README: require 1.13
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-09-10 10:43:06 -07:00
04ddfa8b8d clientv3/concurrency: Added Mutex.TryLock()
TryLock locks the mutex if not already locked by another session.
If lock is held by another session, return immediately after attempting necessary cleanup

Added integration test

Fixes #10493
2019-09-09 20:16:07 -07:00
55b37261bc ETCDCTL_README: clarify the usage of ETCDCTL_* variables
fixes # 10840
2019-09-09 16:31:32 -04:00
594005d7de Merge pull request #11136 from jingyih/update_changelog
CHANGELOG: update to add new metrics
2019-09-06 23:06:25 -07:00
93d97bedde CHANGELOG: update to add new metrics 2019-09-06 17:27:58 -07:00
dc56dfc68f Merge pull request #11109 from vimalk78/tools-fix
tools/etcd-dump-logs: Fixed default values for -entry-type flag
2019-09-06 13:48:33 -07:00
00171cc17d CHANGELOG: update 3.4 patch release, 3.5
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-09-06 13:25:31 -07:00
d2c2130d72 Merge pull request #11110 from gyuho/go
*: update test Go version / release version
2019-09-06 13:16:44 -07:00
ef0eec1b04 CHANGELOG: update Go version, 3.4 patch release
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-09-06 13:06:42 -07:00
92317650ec travis: skipping bom tests for now
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-09-06 12:58:43 -07:00
d4d57c5422 test: skip govet shadow tests for now
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-09-06 12:51:10 -07:00
88d998be4c Merge pull request #10975 from lzhfromustc/currentRev
Add critical section to protect s.currentRev
2019-09-06 12:27:53 -07:00
e98479ddfe tools/etcd-dump-logs: Fixed test cases
Fixed failing test cases due to changes in previous commit
2019-09-06 20:11:41 +01:00
4e551d06ed tools/etcd-dump-logs: Fixed default values for -entry-type flag
The tool takes default values but it was not visible which default
values were taken. Added default values in proper place, and added a
newline at the end of output.
2019-09-06 20:11:41 +01:00
077dd74827 mvcc: add a TODO in (*store).Hash, to warn against potential data race of currentRev and suggest feasible fix 2019-09-06 15:05:43 -04:00
2cab6edf94 go.mod: use Go 1.13
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-09-06 11:39:16 -07:00
1dff148f69 scripts/updatedep: use Go 1.13
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-09-06 11:39:03 -07:00
a3f7202c5f *: use TLS.Config.MaxVersion to TLS 1.2
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-09-06 11:38:03 -07:00
42ad719155 *: update test Go version / release version
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-09-05 21:46:56 -07:00
64b3e59766 Merge pull request #11129 from vimalk78/integration-fixes
integration : fix TestTLSClientCipherSuitesMismatch in go1.13
2019-09-05 21:46:43 -07:00
130cf96c98 Merge pull request #11128 from jingyih/update_changelog
CHANGELOG-3.5: update from #11126
2019-09-05 20:15:42 -04:00
2648a36f8c integration : fix TestTLSClientCipherSuitesMismatch in go1.13
In go1.13, the TLS13 is enablled by default, and as per go1.13 release notes :
TLS 1.3 cipher suites are not configurable. All supported cipher suites are safe,
and if PreferServerCipherSuites is set in Config the preference order is based
on the available hardware.

Fixing the test case for go1.13 by limiting the TLS version to TLS12
2019-09-06 01:12:32 +01:00
c40fc778ce CHANGELOG: update changelog 3.5
Add etcd_debugging_mvcc_current_revision and
etcd_debugging_mvcc_compact_revision.
2019-09-05 16:45:11 -07:00
fc8f29bc40 Merge pull request #11126 from jingyih/add_metric_store_revision
mvcc: add store revision metrics
2019-09-05 16:41:59 -07:00
0f8c46a0f3 mvcc: add store revision metrics
Add experimental metrics etcd_debugging_mvcc_current_revision and
etcd_debugging_mvcc_compact_revision.
2019-09-05 15:40:06 -07:00
e2035ba49a Merge pull request #11113 from vimalk78/learner-fixes
. : added Procfile.learner
2019-09-05 12:52:36 -07:00
53fd227f5c . : added Procfile.learner
Added Procfile.learner to easily start cluster with learner
Modified README.md to highlight its usage
Update review comments
2019-09-05 17:18:48 +01:00
cbfaecdb85 Merge pull request #11117 from vimalk78/wal-fixes
wal : wal.Verify defer close the opened WAL files
2019-09-04 23:25:29 -07:00
01a79d4a9d Merge pull request #11118 from zhangjianweibj/re-fix-percent-bug
etcdserver: remove dup percentage sign in log
2019-09-04 22:02:56 -07:00
81a34ab6d5 etcdserver: remove dup percentage sign in log 2019-09-05 11:24:39 +08:00
adbae79565 wal : wal.Verify defer close the opened WAL files
wal.Verify() : The opened WAL files are not closed in error cases. Fixed by adding a
defer.
2019-09-04 23:38:14 +01:00
fb41ebea52 Merge pull request #11108 from gyuho/fix-zap
embed: fix secure server logging message
2019-09-03 09:42:54 -07:00
f3d67acf3d Merge pull request #11103 from mrueg/shellcheck
scripts/release: Apply shellcheck findings
2019-09-03 09:42:13 -07:00
ea0f08de20 embed: fix secure server logging message
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-09-03 08:56:32 -07:00
d981fe6b6b scripts/release: Apply shellcheck findings
I run https://github.com/koalaman/shellcheck/ over scripts/* and fixed
the findings it returned.

Signed-off-by: Manuel Rüger <manuel@rueg.eu>
2019-09-02 17:50:04 +02:00
14624b7d64 Merge pull request #11097 from philips/sha256sums
scripts/release: rename SHA256SUM to SHA256SUMS
2019-08-30 13:34:50 -07:00
f108a32393 scripts/release: rename SHA256SUM to SHA256SUMS
These files are commonly called SHA256SUMS and with this change rget
works for v3.4.0 as well.
2019-08-30 13:31:17 -07:00
93ae5d2f5b Merge pull request #11095 from KeepCaim/master
Documentation:fix clerical error
2019-08-30 09:54:38 -04:00
6795d20ff0 Documentation:fix clerical error 2019-08-30 13:20:22 +08:00
83414f3db0 CHANGELOG-3.4: update "golang.org/x/sys" vendor
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-29 14:46:26 -07:00
876df8d123 Merge pull request #10834 from carlosedp/riscv64
vendor: update x/sys and x/net modules to support Risc-V
2019-08-29 14:03:32 -07:00
7c6ef608bd vendor: x/sys and x/net to support building on Risc-V
Signed-off-by: Carlos de Paula <me@carlosedp.com>
2019-08-29 17:08:41 -03:00
4d210173ae CHANGELOG-3.4: add v3.4.0 for tomorrow
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-29 12:07:24 -07:00
9214f4e4ba CHANGELOG: v3.4.0-rc.4
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-29 09:40:05 -07:00
837fe89d0b scripts/release: fix sha256sum
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-29 09:39:18 -07:00
5b991ab51c Merge pull request #11093 from hexfusion/fx_cl_4.3
CHANGELOG-3.4: add sha256sum
2019-08-29 08:39:08 -07:00
431756ab59 CHANGELOG-3.4: add sha256sum
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2019-08-29 13:00:13 +00:00
af840f0666 Merge pull request #11087 from hexfusion/add_sum
scripts/release: add sha256sum summary of release assets
2019-08-28 23:11:02 -07:00
2386b945c6 scripts/release: add sha256sum summary of release assets
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2019-08-28 15:56:39 +00:00
7b4ae58c41 Merge pull request #11076 from vimalk78/docs-fixes
Documentation: Add section headers to learning/design-learner.md
2019-08-27 10:18:07 -07:00
9164d27aaa CHANGELOG-3.4: add v3.4.0-rc.3
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-27 10:11:29 -07:00
9da9221d3f Merge pull request #11081 from gyuho/zap
*: fix zap logger --log-outputs without "stderr"
2019-08-27 09:49:42 -07:00
f22c7c80c1 embed: fix "--log-outputs" setup without "stderr"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-26 22:45:48 -07:00
6ee0c5c5dd pkg/logutil: change to "MergeOutputPaths"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-26 22:45:36 -07:00
7e9a26eb6d Merge pull request #11073 from Wine93/typo
raft: fixed some typos
2019-08-26 11:54:48 -07:00
021adfea21 Merge pull request #11077 from wesraph/fixMissingOptions
etcdserver: add check for nil options
2019-08-26 10:47:30 -07:00
ade5337b92 etcdserver: add check for nil options 2019-08-26 17:43:05 +07:00
f09b09519b Documentation: Add section headers to etcd Learner
In the Background section, the document describes various challenges for cluster membership change.
Added section header for each case described for better readability.
2019-08-25 09:42:33 +01:00
b0534c1b44 raft/log_test: fixed wrong index 2019-08-25 04:47:11 +00:00
5f42161750 raft: fixed some typos and simplify minor logic 2019-08-25 04:46:29 +00:00
6f0ae78b39 Merge pull request #11074 from vimalk78/docs-fixes
Documentation: snapshot can be requested from one etcd node only
2019-08-24 15:27:53 -04:00
751071e867 Documentation: snapshot can be requested from one etcd node only
Updated Snapshot section of demo.md to reflect that snapsot can be requested only from one etcd node at a time.

Fixes : #10855
2019-08-24 18:16:58 +01:00
dd2b88d0ed Merge pull request #11066 from vimalk78/clientv3-fixes
clientv3: add nil checks in Client.Close()
2019-08-23 23:22:42 -07:00
928abd5647 CHANGELOG-3.4: update v3.4.0-rc.2
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-23 01:15:45 -07:00
f4dfd1976d Merge pull request #10971 from nilsocket/codeReformat
raft : write compact if statements
2019-08-23 09:10:26 +08:00
702c69c906 raft : Write compact if statements 2019-08-23 04:31:40 +05:30
c7982425d9 Update 8/22 community meeting video
Update 8/22 community meeting video
2019-08-22 12:53:12 -07:00
522ff40705 Update community meeting info in README.md
Update community meeting info in README.md
2019-08-22 10:46:34 -07:00
56f483ae44 Merge pull request #11069 from jingyih/fix_TestKVPutError
integration: fix TestKVPutError
2019-08-22 10:09:11 -04:00
2680c2afe7 integration: fix TestKVPutError
Give backend quota enough overhead.
2019-08-21 19:56:38 -07:00
7f47de8414 clientv3: add nil checks in Close()
Added nil checks in Close() for Watcher and Lease fields
Added test case
2019-08-21 23:04:42 +01:00
8037e6e087 Merge pull request #11060 from etcd-io/wenjiaswe-patch-1
functional test: fix typo in agent log
2019-08-20 15:22:08 -07:00
341380d84f functional test: fix typo in agent log
Fix typo in functional test agent log to avoid debugging confusion.
2019-08-20 15:04:30 -07:00
b7abc9bf0a Merge pull request #11059 from jingyih/update_changelog_from_PR11056
CHANGELOG-3.3: update from #11056
2019-08-20 11:27:30 -07:00
867d93636a CHANGELOG-3.3: update_from_PR11056 2019-08-20 11:18:14 -07:00
c89777dd70 Merge pull request #11047 from ethan-daocloud/patch-4
lease: cleanup typo words in lessor.go
2019-08-19 19:09:22 -07:00
0a6173c9b6 lease: cleanup typo words in lessor.go
Signed-off-by: Guangming Wang <guangming.wang@daocloud.io>
2019-08-20 09:35:19 +08:00
62d565c419 CHANGELOG-3.3: release v3.3.15
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-19 12:08:28 -07:00
43fe8c3ee0 CHANGELOG-3.4: fix casing
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-16 16:50:46 -07:00
8b653bad4a CHANGELOG: release v3.3.14
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-16 16:28:57 -07:00
f4bb43887f Documentation/upgrades: special upgrade guides for >= 3.3.14
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-16 16:18:53 -07:00
fd1181d8b6 Merge pull request #11045 from jingyih/update_etcdmain_helper
etcdmain: update help message
2019-08-16 13:09:35 -07:00
4a6bf3552e CHANGELOG-3.4: log raft prober change
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-16 09:02:47 -07:00
4a2b4c8f7e Merge pull request #11037 from tbg/interactive
raft: proactively probe newly added followers
2019-08-16 10:24:42 +02:00
47ae53d25d rafttest: print Ready before processing it
It was confusing to see the effects of the Ready (i.e. log messages)
printed before the Ready itself.
2019-08-16 09:41:35 +02:00
99f8046fd1 raft: fix a test file name 2019-08-16 09:38:44 +02:00
8d1946d16a raft: document problem with leader self-removal
When a leader removes itself, it will retain its leadership but not
accept new proposals, making the range effectively stuck until manual
intervention triggers a campaign event.

This commit documents the behavior. It does not correct it yet.
2019-08-16 09:38:44 +02:00
306e75a96f raft: add a batch of interaction-driven conf change tests
Verifiy the behavior in various v1 and v2 conf change operations.
This also includes various fixups, notably it adds protection
against transitioning in and out of new configs when this is not
permissible.

There are more threads to pull, but those are left for future commits.
2019-08-16 09:38:44 +02:00
871c2d716f etcdmain: update help message
Add experimental-peer-skip-client-san-verification flag description to
help message. Add default values.
2019-08-15 21:22:17 -07:00
9b29151d30 Merge pull request #11044 from gtamas/master
Documentation: added ETCD Manager tool
2019-08-15 16:25:22 -07:00
9d3468d7be CHANGELOG-3.3: highlight v3.3.14-rc.0 release
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-15 15:07:03 -07:00
c337cd9a57 CHANGELOG: update Go version
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-15 14:48:54 -07:00
f6e3f94f3e Documentation: added ETCD Manager tool
New tool: ETCD Manager

ETCD Manager is a multi-platform ETCD v3 client. Currently, builds are available form Mac, Wiindows and Linux, but iOS / Android builds will also be added in the future.
It aims to be a modern, efficient and easy to use GUI with full coverage of ETCD APIs / functionality. The first public (beta) release is already available.
2019-08-15 23:42:24 +02:00
966321bdcd *: use Go 1.12.9
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-15 14:28:41 -07:00
577d5305f8 CHANGELOG: update new compaction limit change
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-15 14:03:21 -07:00
c55410ccea Merge pull request #11034 from jpbetz/force-commit-compact
mvcc: Optimize compaction for short commit pauses
2019-08-15 13:28:32 -07:00
f279bfb775 mvcc: keep 64-bit alignment in "store" struct
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-15 13:01:32 -07:00
b5aa46486b clientv3/integration: fix "mvcc.NewStore" call
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-15 11:48:53 -07:00
9b51febaf5 *: Add experimental-compaction-batch-limit flag 2019-08-15 11:47:23 -07:00
d57bc6e724 mvcc: Optimize compaction for short commit pauses 2019-08-15 11:47:23 -07:00
3c31fbbce3 Merge pull request #11040 from ethan-daocloud/patch-3
cleanup: fix typos in doc/comment
2019-08-15 09:33:48 -07:00
110808ebdd Merge pull request #11024 from xiang90/maintainers
MAINTAINERS: add Tobias Grieger as a maintainer to raft
2019-08-15 09:25:48 -07:00
9365660ca8 cleanup: fix typos in doc/comment
Signed-off-by: Guangming Wang <guangming.wang@daocloud.io>
2019-08-15 21:29:32 +08:00
c7b106896f CHANGELOG: highlight breaking changes in clientv3 resolver
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-14 17:00:53 -07:00
508203db15 Documentation/upgrades: fix 3.4 guides
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-14 17:00:46 -07:00
bbb379fa4a Merge pull request #10974 from lzhfromustc/watchers
proxy: Add critical section to protect wps.watchers and wps.nextWatcherID
2019-08-14 16:14:27 -07:00
02ed271527 CHANGELOG-3.3: add v3.3.14-beta.0
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-14 12:33:23 -07:00
4e19150676 raft: proactively probe newly added followers
When the leader applied a new configuration that added voters, it would
not immediately probe these voters, delaying when they would be caught
up.

I noticed this while writing an interaction-driven test, which has now
been cleaned up and completed.
2019-08-14 20:53:34 +02:00
3d6721f751 rafttest: add _breakpoint directive
It is a helper case to attach a debugger to when a problem needs
to be investigated in a longer test file. In such a case, add the
following stanza immediately before the interesting behavior starts:

_breakpoint:
----
ok

and set a breakpoint on the _breakpoint case.
2019-08-14 20:53:34 +02:00
fdaed88f14 raft: initialize new Progress at LastIndex, not LastIndex+1
Initializing at LastIndex+1 meant that new peers would not be probed
immediately when they appeared in the leader's config, which delays
their getting caught up.
2019-08-14 20:53:34 +02:00
c2d9514370 raft/rafttest: fix stabilize handler
It was bailing out too early.
2019-08-14 17:24:14 +02:00
d047fe84ee CHANGELOG-3.3: highlight 3.3 backports
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-14 01:44:01 -07:00
916e6b5400 CHANGELOG-3.3: add more changes
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-14 01:35:02 -07:00
9aa27c303e CHANGELOG: update backports
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-14 01:10:49 -07:00
fd0d43dad9 scripts/release: clean up minor tag docker commands
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-13 22:00:07 -07:00
08f2685330 CHANGELOG: update 3.3 + 3.4 changes
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-13 21:46:09 -07:00
5535092ce3 Makefile: explicit about GOOS in docker-test builds
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-13 16:56:52 -07:00
1ea2acd9b3 Merge pull request #11032 from jingyih/changelog_add_mvcc_db_open_read_transactions
CHANGELOG-3.4: add etcd_mvcc_db_open_read_transactions
2019-08-13 15:50:08 -07:00
a6c792dfce CHANGELOG: add etcd_mvcc_db_open_read_transactions 2019-08-13 15:34:35 -07:00
96ce27cf5d Merge pull request #11031 from gyuho/ccc
*: highlight "--enable-v2=false"
2019-08-13 15:32:21 -07:00
092ee6d321 Documentation/upgrades: highlight "--enable-v2=false"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-13 15:23:58 -07:00
fb7981b6e5 CHANGELOG: --enable-v2=false by default
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-13 15:14:16 -07:00
170861c5c9 Merge pull request #11029 from gyuho/grpc
vendor: upgrade grpc-go to 1.23.0
2019-08-13 14:44:07 -07:00
daa104093f Merge pull request #11030 from jingyih/update_changelog_from_pr10523
CHANGELOG-3.4: update from 10523
2019-08-13 14:28:19 -07:00
578ff0d416 CHANGELOG-3.4: update from 10523 2019-08-13 14:18:00 -07:00
4e3c2e0a3a vendor: update "net/http2" to latest
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-13 13:35:50 -07:00
02b2779814 vendor: upgrade grpc-go to 1.23.0
https://github.com/grpc/grpc-go/releases/tag/v1.23.0

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-13 12:57:14 -07:00
c0161f7e7d *: use Go 1.12.8
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-13 12:45:12 -07:00
fdbaf3ea9c Merge pull request #11025 from gyuho/ccc
clientv3: use Endpoints(), fix context creation
2019-08-13 11:17:43 -07:00
97fd40c587 clientv3: use Endpoints(), fix context creation
If overwritten, the previous context should be canceled first.

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-12 21:39:50 -07:00
c6e4076353 MAINTAINERS: add tbg 2019-08-12 17:16:36 -07:00
8d823e70dd Merge pull request #11018 from gyuho/yq
scripts/release: update "yq" command
2019-08-12 11:03:37 -07:00
dd0ed3f05e CHANGELOG-3.4: add "code changes" from 3.3
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-12 10:23:33 -07:00
c72fa51b2a scripts: remove ".aci" commands
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-12 10:20:21 -07:00
af38185f92 scripts/release: fix version check commands
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-12 10:20:13 -07:00
ac613c481f scripts: fix build docker commands, add more logging
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-12 10:20:05 -07:00
7299a6a106 *: remove "acbuild"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-12 09:31:22 -07:00
1f4f8ae731 scripts/release: update "yq" command
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-12 09:26:04 -07:00
65e226ad92 Merge pull request #11017 from ethan-daocloud/patch-2
cleanup: correct summary message in put.go
2019-08-12 10:20:51 -04:00
b5ee1de076 cleanup: correct summary message in put.go 2019-08-12 21:13:58 +08:00
029401ab81 Merge pull request #11005 from tbg/interactiontest
raft/rafttest: introduce datadriven testing
2019-08-12 11:52:52 +02:00
e8090e57a2 raft/rafttest: introduce datadriven testing
It has often been tedious to test the interactions between multi-member
Raft groups, especially when many steps were required to reach a certain
scenario. Often, this boilerplate was as boring as it is hard to write
and hard to maintain, making it attractive to resort to shortcuts
whenever possible, which in turn tended to undercut how meaningful and
maintainable the tests ended up being - that is, if the tests were even
written, which sometimes they weren't.

This change introduces a datadriven framework specifically for testing
deterministically the interaction between multiple members of a raft group
with the goal of reducing the friction for writing these tests to near
zero.

In the near term, this will be used to add thorough testing for joint
consensus (which is already available today, but wildly undertested),
but just converting an existing test into this framework has shown that
the concise representation and built-in inspection of log messages
highlights unexpected behavior much more readily than the previous unit
tests did (the test in question is `snapshot_succeed_via_app_resp`; the
reader is invited to compare the old and new version of it).

The main building block is `InteractionEnv`, which holds on to the state
of the whole system and exposes various relevant methods for
manipulating it, including but not limited to adding nodes, delivering
and dropping messages, and proposing configuration changes. All of this
is extensible so that in the future I hope to use it to explore the
phenomena discussed in

https://github.com/etcd-io/etcd/issues/7625#issuecomment-488798263

which requires injecting appropriate "crash points" in the Ready
handling loop. Discussions of the "what if X happened in state Y"
can quickly be made concrete by "scripting up an interaction test".

Additionally, this framework is intentionally not kept internal to the
raft package.. Though this is in its infancy, a goal is that it should
be possible for a suite of interaction tests to allow applications to
validate that their Storage implementation behaves accordingly, simply
by running a raft-provided interaction suite against their Storage.
2019-08-12 11:13:51 +02:00
56ad881b1b Merge pull request #11015 from gyuho/typo
raft: fix typo
2019-08-10 17:26:29 +02:00
8e2225b4f1 Merge pull request #11016 from ethan-daocloud/patch-1
etcd-dump-logs: correct logging message word
2019-08-10 04:56:50 -07:00
867b31e01a etcd-dump-logs: correct logging message word
Signed-off-by: Guangming Wang <guangming.wang@daocloud.io>
2019-08-10 17:01:57 +08:00
6c87b21821 raft: fix typo
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-09 21:26:48 -07:00
f57c16c271 vendor: bump datadriven
Picks up some fixes for papercuts.
2019-08-10 00:02:59 +02:00
4a4629fd9f Merge pull request #10957 from Hanaasagi/fix-metric-name-typo
test: fix metric name typo
2019-08-09 13:23:26 -07:00
5e90267d1b CHANGELOG: update 3.3 + 3.4 with raft changes
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-09 11:32:10 -07:00
4cec8dddc6 Merge pull request #11003 from tbg/interaction/restore
raft: fix restoring joint configurations
2019-08-09 20:13:04 +02:00
84c69cca76 Merge pull request #10970 from nilsocket/minorFix1
raft : remove unnecessary, if check
2019-08-09 11:03:01 -07:00
37ab5bdd21 raft: fix restoring joint configurations
While writing interaction tests for joint configuration changes, I
realized that this wasn't working yet - restoring had no notion of
the joint configuration and was simply dropping it on the floor.

This commit introduces a helper `confchange.Restore` which takes
a `ConfState` and initializes a `Tracker` from it.

This is then used both in `(*raft).restore` as well as in `newRaft`.
2019-08-09 19:28:43 +02:00
a5f785a232 confchange: clean up unnecessary block 2019-08-09 19:28:43 +02:00
7948f39790 Merge pull request #11004 from tbg/interaction/unused-type
raft/tracker: visit Progress in stable order
2019-08-09 12:32:04 +02:00
5ce1856cce Merge pull request #11010 from etcd-io/wenjiaswe-patch-1
functional: Update functional test README.md
2019-08-08 20:57:26 -07:00
ab9e3d9829 functional: Update functional test README.md 2019-08-08 18:40:15 -07:00
0b2b25e1c1 CHANGELOG: update metrics
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-08 15:08:10 -07:00
046c705f97 Merge pull request #11009 from gyuho/snapshot
*: add inflight snapshot metrics
2019-08-08 13:56:14 -07:00
06b82c200f etcdserver: add "etcd_server_snapshot_apply_inflights_total"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-08 13:33:52 -07:00
a4badc33a3 integration: test snapshot inflights metrics
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-08 13:33:52 -07:00
46bddacacb etcdserver/api: add "etcd_network_snapshot_send_inflights_total", "etcd_network_snapshot_receive_inflights_total"
Useful for deciding when to terminate the unhealthy follower.
If the follower is receiving a leader snapshot, operator may wait.

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-08 13:33:48 -07:00
43ce2eefaa Merge pull request #10995 from yuzeming/patch-3
agent: fix data race and deadlock
2019-08-08 12:22:20 -07:00
c762a3d7f7 agent: fix a data race and deadlock
add 1-size buffer for `errc`  to avoid deadlock of child goroutine
add a local variable to a void data race in `err`
when `case <-stream.Context().Done():` is taken
2019-08-08 11:05:30 -07:00
e745649cce Merge pull request #10960 from spzala/readmesec
README: update security reference
2019-08-08 13:31:33 -04:00
c4b8ec5369 CHANGELOG: update links, raft updates
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-08 09:20:16 -07:00
bfcd590f05 Merge pull request #11000 from retroflexer/doc-fix-broken-links
doc: Fix broken links referring to readthedocs.io
2019-08-08 09:12:39 -07:00
1c65af7acf Merge pull request #11006 from gyuho/functional
functiona: fix flaky tests
2019-08-08 09:08:23 -07:00
72e00cea3a functional/agent: copy file, instead of renaming
To retain failure logs in CI testing.

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-08 08:12:05 -07:00
d1c7be24b0 functional/rpcpb: make client log less verbose
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-08 08:06:48 -07:00
0926a434b7 functional.yaml: try lower snapshot count for flaky tests, error threshold
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-08 08:06:48 -07:00
a41bd303ec Merge pull request #10998 from tbg/learners-vote
raft: let learners vote
2019-08-08 11:26:17 +02:00
1b3e0821a7 raft/tracker: visit Progress in stable order
This is helpful for upcoming testing work which allows datadriven
testing of the interaction of multiple nodes. This testing requires
determinism to work correctly.
2019-08-08 09:37:33 +02:00
a0b2c6ad4b proxy/grpcproxy: Add critical section to protect wps.watchers and wps.nextWatcherID 2019-08-07 17:58:49 -07:00
03bd10076f Merge pull request #10955 from lzhfromustc/master
Avoid potential double lock of tsafeSet
2019-08-07 15:50:05 -07:00
0e7173b447 pkg/types: Avoid potential double lock of tsafeSet.
(tsafeSet).Sub and (tsafeSet).Equals can cause double lock bug if ts and other is pointing the same variable

gofmt the code and add some comments
2019-08-07 15:08:00 -07:00
158354755a test: output etcd server logs when functional tests fail
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-07 10:16:15 -07:00
9553994cd7 raft/auorum: remove unused type 2019-08-07 18:53:01 +02:00
742f928c6a Broken link in runtime-configuration.md
See the issue created here:
https://github.com/etcd-io/etcd/issues/10989#issuecomment-518726038

doc: fix broken links referring to etcd.redhatdocs.io

Adding links to internal Documentation within github.com.

Update runtime-configuration.md

Update runtime-configuration.md

Update CHANGELOG-3.3.md

Remove extra space

Keep the formatting similar to original
2019-08-07 10:50:21 -04:00
c30c2e345b raft: let learners vote
It turns out that that learners must be allowed to cast votes.

This seems counter- intuitive but is necessary in the situation in which
a learner has been promoted (i.e. is now a voter) but has not learned
about this yet.

For example, consider a group in which id=1 is a learner and id=2 and
id=3 are voters. A configuration change promoting 1 can be committed on
the quorum `{2,3}` without the config change being appended to the
learner's log. If the leader (say 2) fails, there are de facto two
voters remaining. Only 3 can win an election (due to its log containing
all committed entries), but to do so it will need 1 to vote. But 1
considers itself a learner and will continue to do so until 3 has
stepped up as leader, replicates the conf change to 1, and 1 applies it.

Ultimately, by receiving a request to vote, the learner realizes that
the candidate believes it to be a voter, and that it should act
accordingly. The candidate's config may be stale, too; but in that case
it won't win the election, at least in the absence of the bug discussed
in:
https://github.com/etcd-io/etcd/issues/7625#issuecomment-488798263.
2019-08-07 12:03:18 +02:00
0d85aa1b41 Merge pull request #10993 from yuzeming/patch-1
integration: fix a data race about `err`
2019-08-06 15:58:21 -07:00
88f4b83ba9 mvcc: fix typo in test
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-06 15:09:05 -07:00
a996a8a912 Merge pull request #10990 from gyuho/grpc
vendor: update gRPC to latest
2019-08-06 15:08:11 -07:00
877aa2497e Merge pull request #10994 from yuzeming/patch-2
v3rpc: fix a typo `err`
2019-08-06 15:06:27 -07:00
181419256d integration: fix a data race about err
don't share `err` between goroutines
2019-08-06 14:58:15 -07:00
3edb569ad3 v3rpc: fix a typo err
don't read return value in child goroutine which causes data race.
2019-08-06 14:04:58 -07:00
017b6c424e stream: Prevent panic when newAttemptLocked fails to get a transport for the new attempt
Testing https://github.com/grpc/grpc-go/pull/2958

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-06 13:08:47 -07:00
f5f400b14a vendor: update gRPC to latest
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-06 10:20:02 -07:00
44a00a33ef Merge pull request #10987 from wenjiaswe/functional-test-fix
functional: update go.etcd.io/etcd link and go image registry for func…
2019-08-05 22:45:12 -07:00
f7397d0628 functional:update go.etcd.io/etcd link and go image registry for functional test 2019-08-05 22:19:45 -07:00
bcaaeebc82 Merge pull request #10985 from etcd-io/wenjiaswe-update-functional-readme
functional test: Update functional README.md
2019-08-05 21:45:09 -07:00
0a0b2be8fc functional test: Update functional README.md 2019-08-05 20:51:24 -07:00
a494e0658d Merge pull request #10981 from gyuho/deprecate-grpc-clientconnclosing
Deprecate "grpc.ErrClientConnClosing"
2019-08-05 14:37:44 -07:00
a0cabb57b5 Documentation/upgrades: highlight "grpc.ErrClientConnClosing"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-05 13:29:45 -07:00
3b71672f84 CHANGELOG-3.4: deprecate "grpc.ErrClientConnClosing"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-05 13:29:03 -07:00
9b2f18c6fb proxy/grpcproxy: deprecate "grpc.ErrClientConnClosing"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-05 13:27:16 -07:00
0bd27ea963 functional: deprecate "grpc.ErrClientConnClosing"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-05 13:27:16 -07:00
9b385737f5 clientv3: deprecate "grpc.ErrClientConnClosing"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-05 13:27:16 -07:00
4bf584893c functional: use Go 1.12.7 as default
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-05 12:40:31 -07:00
ac87ebdb02 pkg/adt: remove TODO
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-05 00:24:39 -07:00
4b0af5b4ac clientv3: document "WithBlock" dial option
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-04 23:52:17 -07:00
2847367b60 travis: do not allow CPU 4 test failures
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-04 23:35:19 -07:00
f7992237ce scripts/release: remove acbuild commands
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-04 23:20:41 -07:00
af19d014e1 CHANGELOG-3.4: highlight rbtree fix
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-04 23:09:07 -07:00
003362ef8e pkg/adt: fix interval tree black-height property based on rbtree
Author: xkey <xk33430@ly.com>
ref. https://github.com/etcd-io/etcd/pull/10978

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-04 23:08:45 -07:00
9a2af7378a tests/e2e: skip release tests until release candidate
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-03 00:09:44 -07:00
b842cf7770 tests/e2e: fix upgrade, metrics tests
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-02 15:57:45 -07:00
189071dcd4 functional: remove "embed" support in tests
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-02 15:56:52 -07:00
7fbbb9c8bf *: add 3.5 capability for 3.5 dev tree
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-02 15:27:54 -07:00
3658571e3a etcdserver/api: enable 3.4 capability
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-08-02 15:24:18 -07:00
0d99469cdb raft : newRaft() does check for validity of Config 2019-08-02 03:09:51 +05:30
3ef1683bab test: fix metric name typo 2019-07-31 12:43:46 +09:00
7b26cd37e9 README: update security reference
Now that we have security disclosure and release process in place,
update the related reference.
2019-07-30 22:23:55 -04:00
7aa6358510 etcdserver: remove auth validation loop
Remove auth validation loop in v3_server.raftRequest(). Re-validation
when error ErrAuthOldRevision occurs should be handled on client side.
2019-02-12 15:40:39 -08:00
3256 changed files with 198161 additions and 651540 deletions

View File

@ -0,0 +1,23 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/go
{
"name": "Go",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/go:1.21-bookworm",
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"ghcr.io/devcontainers/features/github-cli:1": {}
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [2379, 2380],
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "make build"
// Configure tool-specific properties.
// "customizations": {},
}

View File

@ -1,2 +0,0 @@
Please read https://github.com/etcd-io/etcd/blob/master/Documentation/reporting_bugs.md.

102
.github/ISSUE_TEMPLATE/bug-report.yml vendored Normal file
View File

@ -0,0 +1,102 @@
---
name: Bug Report
description: Report a bug encountered while operating etcd
labels:
- type/bug
body:
- type: checkboxes
id: confirmations
attributes:
label: Bug report criteria
description: Please confirm this bug report meets the following criteria.
options:
- label: This bug report is not security related, security issues should be disclosed privately via security@etcd.io.
- label: This is not a support request or question, support requests or questions should be raised in the etcd [discussion forums](https://github.com/etcd-io/etcd/discussions).
- label: You have read the etcd [bug reporting guidelines](https://github.com/etcd-io/etcd/blob/main/Documentation/contributor-guide/reporting_bugs.md).
- label: Existing open issues along with etcd [frequently asked questions](https://etcd.io/docs/latest/faq) have been checked and this is not a duplicate.
- type: markdown
attributes:
value: |
Please fill the form below and provide as much information as possible.
Not doing so may result in your bug not being addressed in a timely manner.
- type: textarea
id: problem
attributes:
label: What happened?
validations:
required: true
- type: textarea
id: expected
attributes:
label: What did you expect to happen?
validations:
required: true
- type: textarea
id: repro
attributes:
label: How can we reproduce it (as minimally and precisely as possible)?
validations:
required: true
- type: textarea
id: additional
attributes:
label: Anything else we need to know?
- type: textarea
id: etcdVersion
attributes:
label: Etcd version (please run commands below)
value: |
<details>
```console
$ etcd --version
# paste output here
$ etcdctl version
# paste output here
```
</details>
validations:
required: true
- type: textarea
id: config
attributes:
label: Etcd configuration (command line flags or environment variables)
value: |
<details>
# paste your configuration here
</details>
- type: textarea
id: etcdDebugInformation
attributes:
label: Etcd debug information (please run commands below, feel free to obfuscate the IP address or FQDN in the output)
value: |
<details>
```console
$ etcdctl member list -w table
# paste output here
$ etcdctl --endpoints=<member list> endpoint status -w table
# paste output here
```
</details>
- type: textarea
id: logs
attributes:
label: Relevant log output
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: Shell

6
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@ -0,0 +1,6 @@
---
blank_issues_enabled: false
contact_links:
- name: Question
url: https://github.com/etcd-io/etcd/discussions
about: Question relating to Etcd

View File

@ -0,0 +1,19 @@
---
name: Feature request
description: Provide idea for a new feature
labels:
- type/feature
body:
- type: textarea
id: feature
attributes:
label: What would you like to be added?
validations:
required: true
- type: textarea
id: rationale
attributes:
label: Why is this needed?
validations:
required: true

View File

@ -0,0 +1,31 @@
---
name: Membership nomination
description: Nominate new etcd members
labels:
- area/community
body:
- type: textarea
id: feature
attributes:
label: Who would you like to nominate?
validations:
required: true
- id: requirements
type: checkboxes
attributes:
label: Requirements
options:
- label: I have reviewed the [community membership guidelines](https://github.com/etcd-io/etcd/blob/main/Documentation/contributor-guide/community-membership.md)
required: true
- label: The members are actively contributing to 1 or more etcd subprojects
required: true
- label: The members are being sponsored by two current reviewers or a current maintainer.
required: true
- type: textarea
id: rationale
attributes:
label: How do the new members meet the regular active contribution requirements?
validations:
required: true

35
.github/ISSUE_TEMPLATE/test-flake.yml vendored Normal file
View File

@ -0,0 +1,35 @@
---
name: Flaking Test
description: Report flaky tests
labels:
- type/flake
- area/testing
body:
- type: textarea
id: workflows
attributes:
label: Which github workflows are flaking?
validations:
required: true
- type: textarea
id: tests
attributes:
label: Which tests are flaking?
validations:
required: true
- type: input
id: link
attributes:
label: Github Action link
- type: textarea
id: reason
attributes:
label: Reason for failure (if possible)
- type: textarea
id: additional
attributes:
label: Anything else we need to know?

View File

@ -1,2 +1,2 @@
Please read https://github.com/etcd-io/etcd/blob/master/CONTRIBUTING.md#contribution-flow.
Please read https://github.com/etcd-io/etcd/blob/main/CONTRIBUTING.md#contribution-flow.

2
.github/SECURITY.md vendored
View File

@ -1,2 +1,2 @@
Please read https://github.com/etcd-io/etcd/blob/master/security/README.md.
Please read https://github.com/etcd-io/etcd/blob/main/security/README.md.

26
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,26 @@
---
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
- package-ecosystem: gomod
directory: /
schedule:
interval: weekly
allow:
- dependency-type: all
- package-ecosystem: gomod
directory: /tools/mod # Not linked from /go.mod
schedule:
interval: weekly
allow:
- dependency-type: all
- package-ecosystem: docker
directory: /
schedule:
interval: weekly

56
.github/stale.yml vendored Normal file
View File

@ -0,0 +1,56 @@
---
# Configuration for probot-stale - https://github.com/probot/stale
# Number of days of inactivity before an Issue or Pull Request becomes stale
daysUntilStale: 90
# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
daysUntilClose: 21
# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)
onlyLabels: []
# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
exemptLabels:
- "stage/tracked"
# Set to true to ignore issues in a project (defaults to false)
exemptProjects: false
# Set to true to ignore issues in a milestone (defaults to false)
exemptMilestones: false
# Set to true to ignore issues with an assignee (defaults to false)
exemptAssignees: false
# Label to use when marking as stale
staleLabel: stale
# Comment to post when marking as stale. Set to `false` to disable
markComment: This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 21 days if no further activity occurs. Thank you for your contributions.
# Comment to post when removing the stale label.
# unmarkComment: >
# Your comment here.
# Comment to post when closing a stale Issue or Pull Request.
# closeComment: >
# Your comment here.
# Limit the number of actions per hour, from 1-30. Default is 30
limitPerRun: 30
# Limit to only `issues` or `pulls`
# only: issues
# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls':
# pulls:
# daysUntilStale: 30
# markComment: >
# This pull request has been automatically marked as stale because it has not had
# recent activity. It will be closed if no further activity occurs. Thank you
# for your contributions.
# issues:
# exemptLabels:
# - confirmed

67
.github/workflows/build.yaml vendored Normal file
View File

@ -0,0 +1,67 @@
---
name: Build
on: [push, pull_request]
permissions: read-all
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target:
- linux-amd64
- linux-386
- darwin-amd64
- darwin-arm64
- windows-amd64
- linux-arm
- linux-arm64
- linux-ppc64le
- linux-s390x
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- id: goversion
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: ${{ steps.goversion.outputs.goversion }}
- env:
TARGET: ${{ matrix.target }}
run: |
set -euo pipefail
echo "${TARGET}"
case "${TARGET}" in
linux-amd64)
GOOS=linux GOARCH=amd64 make build
;;
linux-386)
GOOS=linux GOARCH=386 make build
;;
darwin-amd64)
GOOS=darwin GOARCH=amd64 make build
;;
darwin-arm64)
GOOS=darwin GOARCH=arm64 make build
;;
windows-amd64)
GOOS=windows GOARCH=amd64 make build
;;
linux-arm)
GOOS=linux GOARCH=arm make build
;;
linux-arm64)
GOOS=linux GOARCH=arm64 make build
;;
linux-ppc64le)
GOOS=linux GOARCH=ppc64le make build
;;
linux-s390x)
GOOS=linux GOARCH=s390x make build
;;
*)
echo "Failed to find target"
exit 1
;;
esac

55
.github/workflows/codeql-analysis.yml vendored Normal file
View File

@ -0,0 +1,55 @@
---
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches: [main, release-3.4, release-3.5, release-3.6]
pull_request:
# The branches below must be a subset of the branches above
branches: [main]
schedule:
- cron: '20 14 * * 5'
permissions: read-all
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
language: ['go']
steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@e5f05b81d5b6ff8cfa111c80c22c5fd02a384118 # v3.23.0
with:
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
languages: ${{ matrix.language }}
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@e5f05b81d5b6ff8cfa111c80c22c5fd02a384118 # v3.23.0
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@e5f05b81d5b6ff8cfa111c80c22c5fd02a384118 # v3.23.0

18
.github/workflows/contrib.yaml vendored Normal file
View File

@ -0,0 +1,18 @@
---
name: Test contrib/mixin
on: [push, pull_request]
permissions: read-all
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- id: goversion
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: ${{ steps.goversion.outputs.goversion }}
- run: |
set -euo pipefail
make -C contrib/mixin tools test

32
.github/workflows/coverage.yaml vendored Normal file
View File

@ -0,0 +1,32 @@
---
name: Coverage
on: [push]
permissions: read-all
jobs:
coverage:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target:
- linux-amd64-coverage
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- id: goversion
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: ${{ steps.goversion.outputs.goversion }}
- env:
TARGET: ${{ matrix.target }}
run: |
mkdir "${TARGET}"
case "${TARGET}" in
linux-amd64-coverage)
GOARCH=amd64 ./scripts/codecov_upload.sh
;;
*)
echo "Failed to find target"
exit 1
;;
esac

37
.github/workflows/e2e-arm64.yaml vendored Normal file
View File

@ -0,0 +1,37 @@
---
name: E2E-Arm64
on: [push, pull_request]
permissions: read-all
jobs:
test:
# this is to prevent the job to run at forked projects
if: github.repository == 'etcd-io/etcd'
runs-on: actuated-arm64-8cpu-8gb
strategy:
fail-fast: false
matrix:
target:
- linux-arm64-e2e
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- id: goversion
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: ${{ steps.goversion.outputs.goversion }}
- env:
TARGET: ${{ matrix.target }}
run: |
set -euo pipefail
go clean -testcache
echo "${TARGET}"
case "${TARGET}" in
linux-arm64-e2e)
GOOS=linux GOARCH=arm64 CPU=4 EXPECT_DEBUG=true make test-e2e-release
;;
*)
echo "Failed to find target"
exit 1
;;
esac

40
.github/workflows/e2e.yaml vendored Normal file
View File

@ -0,0 +1,40 @@
---
name: E2E
on: [push, pull_request]
permissions: read-all
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target:
- linux-amd64-e2e
- linux-386-e2e
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- id: goversion
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: ${{ steps.goversion.outputs.goversion }}
- env:
TARGET: ${{ matrix.target }}
run: |
set -euo pipefail
go clean -testcache
echo "${TARGET}"
case "${TARGET}" in
linux-amd64-e2e)
make gofail-enable
VERBOSE=1 GOOS=linux GOARCH=amd64 CPU=4 EXPECT_DEBUG=true make test-e2e-release
;;
linux-386-e2e)
VERBOSE=1 GOOS=linux GOARCH=386 CPU=4 EXPECT_DEBUG=true make test-e2e
;;
*)
echo "Failed to find target"
exit 1
;;
esac

26
.github/workflows/fuzzing.yaml vendored Normal file
View File

@ -0,0 +1,26 @@
---
name: Fuzzing v3rpc
on: [push, pull_request]
permissions: read-all
jobs:
fuzzing:
runs-on: ubuntu-latest
strategy:
fail-fast: false
env:
TARGET_PATH: ./server/etcdserver/api/v3rpc
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- id: goversion
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: ${{ steps.goversion.outputs.goversion }}
- run: |
set -euo pipefail
GOARCH=amd64 CPU=4 make fuzz
- uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0
if: failure()
with:
path: "${{env.TARGET_PATH}}/testdata/fuzz/**/*"

View File

@ -0,0 +1,44 @@
---
name: Approve GitHub Workflows
on:
pull_request_target:
types:
- labeled
- synchronize
branches:
- main
- release-3.5
- release-3.4
jobs:
approve:
name: Approve ok-to-test
if: contains(github.event.pull_request.labels.*.name, 'ok-to-test')
runs-on: ubuntu-latest
permissions:
actions: write
steps:
- name: Update PR
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
continue-on-error: true
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
debug: ${{ secrets.ACTIONS_RUNNER_DEBUG == 'true' }}
script: |
const result = await github.rest.actions.listWorkflowRunsForRepo({
owner: context.repo.owner,
repo: context.repo.repo,
event: "pull_request",
status: "action_required",
head_sha: context.payload.pull_request.head.sha,
per_page: 100
});
for (var run of result.data.workflow_runs) {
await github.rest.actions.approveWorkflowRun({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: run.id
});
}

19
.github/workflows/govuln.yaml vendored Normal file
View File

@ -0,0 +1,19 @@
---
name: Go Vulnerability Checker
on: [push, pull_request]
permissions: read-all
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- id: goversion
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: ${{ steps.goversion.outputs.goversion }}
- run: date
- run: |
set -euo pipefail
go install golang.org/x/vuln/cmd/govulncheck@latest && govulncheck ./...

38
.github/workflows/grpcproxy.yaml vendored Normal file
View File

@ -0,0 +1,38 @@
---
name: grpcProxy-tests
on: [push, pull_request]
permissions: read-all
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target:
- linux-amd64-grpcproxy-integration
- linux-amd64-grpcproxy-e2e
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- id: goversion
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: ${{ steps.goversion.outputs.goversion }}
- env:
TARGET: ${{ matrix.target }}
run: |
set -euo pipefail
echo "${TARGET}"
case "${TARGET}" in
linux-amd64-grpcproxy-integration)
GOOS=linux GOARCH=amd64 CPU=4 make test-grpcproxy-integration
;;
linux-amd64-grpcproxy-e2e)
GOOS=linux GOARCH=amd64 CPU=4 make test-grpcproxy-e2e
;;
*)
echo "Failed to find target"
exit 1
;;
esac

View File

@ -0,0 +1,23 @@
---
name: Measure Test Flakiness
on:
schedule:
- cron: "0 0 * * 0" # run every Sunday at midnight
permissions: read-all
jobs:
measure-test-flakiness:
name: Measure Test Flakiness
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -euo pipefail
./scripts/measure-test-flakiness.sh
make bin/etcd-test-analyzer
bin/etcd-test-analyzer run -token $GITHUB_TOKEN -max-age=168h -workflow Tests -branch main

34
.github/workflows/release.yaml vendored Normal file
View File

@ -0,0 +1,34 @@
---
name: Release
on: [push, pull_request]
permissions: read-all
jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- id: goversion
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: ${{ steps.goversion.outputs.goversion }}
- name: release
run: |
set -euo pipefail
git config --global user.email "github-action@etcd.io"
git config --global user.name "Github Action"
gpg --batch --gen-key <<EOF
%no-protection
Key-Type: 1
Key-Length: 2048
Subkey-Type: 1
Subkey-Length: 2048
Name-Real: Github Action
Name-Email: github-action@etcd.io
Expire-Date: 0
EOF
DRY_RUN=true ./scripts/release.sh --no-upload --no-docker-push --in-place 3.6.99
- name: test-image
run: |
VERSION=3.6.99 ./scripts/test_images.sh

View File

@ -0,0 +1,54 @@
---
name: Robustness Nightly
permissions: read-all
on:
# schedules always run against the main branch, hence we have to create separate jobs
# with individual checkout actions for each of the active release branches
schedule:
- cron: '25 9 * * *' # runs every day at 09:25 UTC
# workflow_dispatch enables manual testing of this job by maintainers
workflow_dispatch:
jobs:
main:
# GHA has a maximum amount of 6h execution time, we try to get done within 3h
uses: ./.github/workflows/robustness-template.yaml
with:
etcdBranch: main
count: 80
testTimeout: 200m
artifactName: main
runs-on: "['ubuntu-latest-8-cores']"
main-arm64:
uses: ./.github/workflows/robustness-template.yaml
with:
etcdBranch: main
count: 80
testTimeout: 200m
artifactName: main-arm64
runs-on: "['actuated-arm64-8cpu-8gb']"
release-35:
uses: ./.github/workflows/robustness-template.yaml
with:
etcdBranch: release-3.5
count: 80
testTimeout: 200m
artifactName: release-35
runs-on: "['ubuntu-latest-8-cores']"
release-35-arm64:
uses: ./.github/workflows/robustness-template.yaml
with:
etcdBranch: release-3.5
count: 100
testTimeout: 200m
artifactName: release-35-arm64
runs-on: "['actuated-arm64-8cpu-8gb']"
release-34:
uses: ./.github/workflows/robustness-template.yaml
with:
etcdBranch: release-3.4
count: 80
testTimeout: 200m
artifactName: release-34
runs-on: "['ubuntu-latest-8-cores']"

View File

@ -0,0 +1,70 @@
---
name: Reusable Robustness Workflow
on:
workflow_call:
inputs:
etcdBranch:
required: true
type: string
count:
required: true
type: number
testTimeout:
required: false
type: string
default: '30m'
artifactName:
required: true
type: string
runs-on:
required: false
type: string
default: "['ubuntu-latest']"
permissions: read-all
jobs:
test:
timeout-minutes: 210
runs-on: ${{ fromJson(inputs.runs-on) }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- id: goversion
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: ${{ steps.goversion.outputs.goversion }}
- name: test-robustness
env:
ETCD_BRANCH: "${{ inputs.etcdBranch }}"
run: |
set -euo pipefail
go clean -testcache
# Build LazyFS
sudo apt update && sudo apt-get --yes install cmake libfuse3-dev libfuse3-3 fuse3
sudo sed -i 's/#user_allow_other/user_allow_other/g' /etc/fuse.conf
make install-lazyfs
# Use --failfast to avoid overriding report generated by failed test
GO_TEST_FLAGS="-v --count ${{ inputs.count }} --timeout ${{ inputs.testTimeout }} --failfast --run TestRobustness"
case "${ETCD_BRANCH}" in
release-3.5)
EXPECT_DEBUG=true GO_TEST_FLAGS=${GO_TEST_FLAGS} RESULTS_DIR=/tmp/results make test-robustness-release-3.5
;;
release-3.4)
EXPECT_DEBUG=true GO_TEST_FLAGS=${GO_TEST_FLAGS} RESULTS_DIR=/tmp/results make test-robustness-release-3.4
;;
main)
make gofail-enable
make build
EXPECT_DEBUG=true GO_TEST_FLAGS=${GO_TEST_FLAGS} RESULTS_DIR=/tmp/results make test-robustness
;;
*)
echo "Failed to find target ${ETCD_BRANCH}"
exit 1
;;
esac
- uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0
if: always()
with:
name: ${{ inputs.artifactName }}
path: /tmp/results/*

21
.github/workflows/robustness.yaml vendored Normal file
View File

@ -0,0 +1,21 @@
---
name: Robustness
on: [push, pull_request]
permissions: read-all
jobs:
main:
uses: ./.github/workflows/robustness-template.yaml
with:
etcdBranch: main
count: 12
testTimeout: 30m
artifactName: main
runs-on: "['ubuntu-latest-8-cores']"
main-arm64:
uses: ./.github/workflows/robustness-template.yaml
with:
etcdBranch: main
count: 12
testTimeout: 30m
artifactName: main-arm64
runs-on: "['actuated-arm64-8cpu-8gb']"

55
.github/workflows/scorecards.yml vendored Normal file
View File

@ -0,0 +1,55 @@
---
name: Scorecards supply-chain security
on:
# Only the default branch is supported.
branch_protection_rule:
schedule:
- cron: '45 1 * * 0'
push:
branches: ["main"]
# Declare default permissions as read only.
permissions: read-all
jobs:
analysis:
name: Scorecards analysis
runs-on: ubuntu-latest
permissions:
# Needed to upload the results to code-scanning dashboard.
security-events: write
# Used to receive a badge.
id-token: write
steps:
- name: "Checkout code"
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
persist-credentials: false
- name: "Run analysis"
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
with:
results_file: results.sarif
results_format: sarif
# Publish the results for public repositories to enable scorecard badges. For more details, see
# https://github.com/ossf/scorecard-action#publishing-results.
# For private repositories, `publish_results` will automatically be set to `false`, regardless
# of the value entered here.
publish_results: true
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0
with:
name: SARIF file
path: results.sarif
retention-days: 5
# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@e5f05b81d5b6ff8cfa111c80c22c5fd02a384118 # v3.23.0
with:
sarif_file: results.sarif

51
.github/workflows/static-analysis.yaml vendored Normal file
View File

@ -0,0 +1,51 @@
---
name: Static Analysis
on: [push, pull_request]
permissions: read-all
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- id: goversion
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: ${{ steps.goversion.outputs.goversion }}
- id: golangci_lint_version
run: echo "golangci_lint_version=$(cd tools/mod && go list -m -f {{.Version}} github.com/golangci/golangci-lint)" >> "$GITHUB_OUTPUT"
- name: golangci-lint
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7.0
with:
version: ${{ steps.golangci_lint_version.outputs.golangci_lint_version }}
args: --config tools/.golangci.yaml
- name: protoc
uses: arduino/setup-protoc@149f6c87b92550901b26acd1632e11c3662e381f # v1.3.0
with:
version: '3.20.3'
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- run: |
set -euo pipefail
cargo install marker --version 0.9.0
- run: |
set -euo pipefail
make verify
- run: |
set -euo pipefail
make fix
DIFF=$(git status --porcelain)
if [ -n "$DIFF" ]; then
echo "These files were modified:"
echo
echo "$DIFF"
echo
exit 1
fi

73
.github/workflows/tests-template.yaml vendored Normal file
View File

@ -0,0 +1,73 @@
---
name: Reusable Tests Workflow
on:
workflow_call:
inputs:
arch:
required: true
type: string
runs-on:
required: true
type: string
permissions: read-all
jobs:
test:
runs-on: ${{ inputs.runs-on }}
# this is to prevent arm64 jobs from running at forked projects
if: inputs.arch == 'amd64' || github.repository == 'etcd-io/etcd'
strategy:
fail-fast: false
matrix:
target:
- linux-${{ inputs.arch }}-integration-1-cpu
- linux-${{ inputs.arch }}-integration-2-cpu
- linux-${{ inputs.arch }}-integration-4-cpu
- linux-${{ inputs.arch }}-unit-4-cpu
- linux-386-unit-1-cpu
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- id: goversion
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: ${{ steps.goversion.outputs.goversion }}
- env:
TARGET: ${{ matrix.target }}
run: |
set -euo pipefail
go clean -testcache
mkdir "${TARGET}"
export JUNIT_REPORT_DIR=$(realpath ${TARGET})
case "${TARGET}" in
linux-${{ inputs.arch }}-integration-1-cpu)
make gofail-enable
GOOS=linux GOARCH=${{ inputs.arch }} CPU=1 make test-integration
;;
linux-${{ inputs.arch }}-integration-2-cpu)
make gofail-enable
GOOS=linux GOARCH=${{ inputs.arch }} CPU=2 make test-integration
;;
linux-${{ inputs.arch }}-integration-4-cpu)
make gofail-enable
GOOS=linux GOARCH=${{ inputs.arch }} CPU=4 make test-integration
;;
linux-${{ inputs.arch }}-unit-4-cpu)
GOOS=linux GOARCH=${{ inputs.arch }} CPU=4 GO_TEST_FLAGS='-p=2' make test-unit
;;
linux-386-unit-1-cpu)
# skip running single-threaded 386 unit tests only if arch is arm64
if [ "${{ inputs.arch }}" == "arm64" ]; then exit; fi
GOOS=linux GOARCH=386 CPU=1 GO_TEST_FLAGS='-p=4' make test-unit
;;
*)
echo "Failed to find target"
exit 1
;;
esac
- uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0
if: always()
with:
name: "${{ matrix.target }}"
path: ./**/junit_*.xml

15
.github/workflows/tests.yaml vendored Normal file
View File

@ -0,0 +1,15 @@
---
name: Tests
on: [push, pull_request]
permissions: read-all
jobs:
amd64:
uses: ./.github/workflows/tests-template.yaml
with:
arch: amd64
runs-on: ubuntu-latest
arm64:
uses: ./.github/workflows/tests-template.yaml
with:
arch: arm64
runs-on: actuated-arm64-8cpu-8gb

37
.gitignore vendored
View File

@ -7,30 +7,31 @@
/bin
*.etcd
*.log
*.swp
/etcd
/hack/insta-discovery/.env
*.coverprofile
*.test
hack/tls-setup/certs
.idea
*.iml
/contrib/mixin/manifests
/contrib/raftexample/raftexample
/contrib/raftexample/raftexample-*
# TODO: use dep prune
# https://github.com/golang/dep/issues/120#issuecomment-306518546
vendor/**/*
!vendor/**/
!vendor/**/*.go
!vendor/**/*.c
!vendor/**/*.cpp
!vendor/**/*.s
!vendor/**/COPYING*
!vendor/**/PATENTS*
!vendor/**/NOTICE*
!vendor/**/Licence*
!vendor/**/License*
!vendor/**/LICENCE*
!vendor/**/LICENSE*
vendor/**/*_test.go
/vendor
/tests/e2e/default.proxy
*.tmp
*.bak
.gobincache/
.DS_Store
/Documentation/dev-guide/api_reference_v3.md
/Documentation/dev-guide/api_concurrency_reference_v3.md
/tools/etcd-dump-db/etcd-dump-db
/tools/etcd-dump-logs/etcd-dump-logs
/tools/etcd-dump-metrics/etcd-dump-metrics
/tools/local-tester/bridge/bridge
/tools/proto-annotations/proto-annotations
/tools/benchmark/benchmark
/out
/etcd-dump-logs

1
.go-version Normal file
View File

@ -0,0 +1 @@
1.21.5

View File

@ -1,132 +0,0 @@
language: go
go_import_path: go.etcd.io/etcd
sudo: required
services: docker
go:
- 1.12.7
- tip
notifications:
on_success: never
on_failure: never
env:
matrix:
- TARGET=linux-amd64-fmt
- TARGET=linux-amd64-integration-1-cpu
- TARGET=linux-amd64-integration-2-cpu
- TARGET=linux-amd64-integration-4-cpu
- TARGET=linux-amd64-functional
- TARGET=linux-amd64-unit
- TARGET=all-build
- TARGET=linux-amd64-grpcproxy
- TARGET=linux-amd64-coverage
- TARGET=linux-amd64-fmt-unit-go-tip
- TARGET=linux-386-unit
matrix:
fast_finish: true
allow_failures:
- go: 1.12.7
env: TARGET=linux-amd64-integration-4-cpu
- go: 1.12.7
env: TARGET=linux-amd64-grpcproxy
- go: 1.12.7
env: TARGET=linux-amd64-coverage
- go: tip
env: TARGET=linux-amd64-fmt-unit-go-tip
- go: 1.12.7
env: TARGET=linux-386-unit
exclude:
- go: tip
env: TARGET=linux-amd64-fmt
- go: tip
env: TARGET=linux-amd64-integration-1-cpu
- go: tip
env: TARGET=linux-amd64-integration-2-cpu
- go: tip
env: TARGET=linux-amd64-integration-4-cpu
- go: tip
env: TARGET=linux-amd64-functional
- go: tip
env: TARGET=linux-amd64-unit
- go: tip
env: TARGET=all-build
- go: tip
env: TARGET=linux-amd64-grpcproxy
- go: tip
env: TARGET=linux-amd64-coverage
- go: 1.12.7
env: TARGET=linux-amd64-fmt-unit-go-tip
- go: tip
env: TARGET=linux-386-unit
before_install:
- if [[ $TRAVIS_GO_VERSION == 1.* ]]; then docker pull gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION}; fi
install:
- go get -t -v -d ./...
script:
- echo "TRAVIS_GO_VERSION=${TRAVIS_GO_VERSION}"
- >
case "${TARGET}" in
linux-amd64-fmt)
docker run --rm \
--volume=`pwd`:/go/src/go.etcd.io/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \
/bin/bash -c "GOARCH=amd64 PASSES='fmt bom dep' ./test"
;;
linux-amd64-integration-1-cpu)
docker run --rm \
--volume=`pwd`:/go/src/go.etcd.io/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \
/bin/bash -c "GOARCH=amd64 CPU=1 PASSES='integration' ./test"
;;
linux-amd64-integration-2-cpu)
docker run --rm \
--volume=`pwd`:/go/src/go.etcd.io/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \
/bin/bash -c "GOARCH=amd64 CPU=2 PASSES='integration' ./test"
;;
linux-amd64-integration-4-cpu)
docker run --rm \
--volume=`pwd`:/go/src/go.etcd.io/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \
/bin/bash -c "GOARCH=amd64 CPU=4 PASSES='integration' ./test"
;;
linux-amd64-functional)
docker run --rm \
--volume=`pwd`:/go/src/go.etcd.io/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \
/bin/bash -c "./build && GOARCH=amd64 PASSES='functional' ./test"
;;
linux-amd64-unit)
docker run --rm \
--volume=`pwd`:/go/src/go.etcd.io/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \
/bin/bash -c "GOARCH=amd64 PASSES='unit' ./test"
;;
all-build)
docker run --rm \
--volume=`pwd`:/go/src/go.etcd.io/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \
/bin/bash -c "GOARCH=amd64 PASSES='build' ./test \
&& GOARCH=386 PASSES='build' ./test \
&& GO_BUILD_FLAGS='-v' GOOS=darwin GOARCH=amd64 ./build \
&& GO_BUILD_FLAGS='-v' GOOS=windows GOARCH=amd64 ./build \
&& GO_BUILD_FLAGS='-v' GOARCH=arm ./build \
&& GO_BUILD_FLAGS='-v' GOARCH=arm64 ./build \
&& GO_BUILD_FLAGS='-v' GOARCH=ppc64le ./build"
;;
linux-amd64-grpcproxy)
sudo HOST_TMP_DIR=/tmp TEST_OPTS="PASSES='build grpcproxy'" make docker-test
;;
linux-amd64-coverage)
sudo HOST_TMP_DIR=/tmp make docker-test-coverage
;;
linux-amd64-fmt-unit-go-tip)
GOARCH=amd64 PASSES='fmt unit' ./test
;;
linux-386-unit)
docker run --rm \
--volume=`pwd`:/go/src/go.etcd.io/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \
/bin/bash -c "GOARCH=386 PASSES='unit' ./test"
;;
esac

109
.words
View File

@ -1,109 +0,0 @@
DefaultMaxRequestBytes
ErrCodeEnhanceYourCalm
ErrTimeout
GoAway
KeepAlive
Keepalive
MiB
ResourceExhausted
RPC
RPCs
parsedTarget
SRV
WithRequireLeader
InfoLevel
args
backoff
blackhole
blackholed
cancelable
cancelation
cluster_proxy
defragment
defragmenting
deleter
dev
/dev/null
dev/null
errClientDisconnected
etcd
gRPC
goroutine
goroutines
healthcheck
hostname
iff
inflight
keepalive
keepalives
keyspace
linearization
liveness
linearized
localhost
mutex
prefetching
protobuf
prometheus
rafthttp
repin
rpc
serializable
statusError
teardown
too_many_pings
transactional
uncontended
unprefixed
unlisting
nondeterministically
atomics
transferee
Balancer
lexicographically
lexically
accessors
unbuffered
nils
reconnection
mutators
ConsistentIndexGetter
OutputWALDir
WAL
consistentIndex
todo
saveWALAndSnap
subconns
nop
SubConns
DNS
passthrough
ccBalancerWrapper
rebalanced
addrConns
subConn
TestBalancerDoNotBlockOnClose
middleware
clusterName
jitter
FIXME
retriable
github
retriable
jitter
WithBackoff
BackoffLinearWithJitter
jitter
WithMax
ServerStreams
BidiStreams
transientFailure
BackoffFunc
CallOptions
PermitWithoutStream
__lostleader
ErrConnClosing
unfreed
grpcAddr
clientURLs

View File

@ -1,291 +0,0 @@
<hr>
## [v3.0.16](https://github.com/etcd-io/etcd/releases/tag/v3.0.16) (2016-11-13)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.0.15...v3.0.16) and [v3.0 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_0.md) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.0 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_0.md).**
### Go
- Compile with [*Go 1.6.4*](https://golang.org/doc/devel/release.html#go1.6).
<hr>
## [v3.0.15](https://github.com/etcd-io/etcd/releases/tag/v3.0.15) (2016-11-11)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.0.14...v3.0.15) and [v3.0 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_0.md) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.0 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_0.md).**
### Fixed
- Fix cancel watch request with wrong range end.
### Go
- Compile with [*Go 1.6.3*](https://golang.org/doc/devel/release.html#go1.6).
<hr>
## [v3.0.14](https://github.com/etcd-io/etcd/releases/tag/v3.0.14) (2016-11-04)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.0.13...v3.0.14) and [v3.0 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_0.md) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.0 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_0.md).**
### Added
- v3 `etcdctl migrate` command now supports `--no-ttl` flag to discard keys on transform.
### Go
- Compile with [*Go 1.6.3*](https://golang.org/doc/devel/release.html#go1.6).
<hr>
## [v3.0.13](https://github.com/etcd-io/etcd/releases/tag/v3.0.13) (2016-10-24)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.0.12...v3.0.13) and [v3.0 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_0.md) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.0 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_0.md).**
### Go
- Compile with [*Go 1.6.3*](https://golang.org/doc/devel/release.html#go1.6).
<hr>
## [v3.0.12](https://github.com/etcd-io/etcd/releases/tag/v3.0.12) (2016-10-07)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.0.11...v3.0.12) and [v3.0 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_0.md) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.0 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_0.md).**
### Go
- Compile with [*Go 1.6.3*](https://golang.org/doc/devel/release.html#go1.6).
<hr>
## [v3.0.11](https://github.com/etcd-io/etcd/releases/tag/v3.0.11) (2016-10-07)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.0.10...v3.0.11) and [v3.0 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_0.md) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.0 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_0.md).**
### Added
- Server returns previous key-value (optional)
- `clientv3.WithPrevKV` option
- v3 etcdctl `put,watch,del --prev-kv` flag
### Go
- Compile with [*Go 1.6.3*](https://golang.org/doc/devel/release.html#go1.6).
<hr>
## [v3.0.10](https://github.com/etcd-io/etcd/releases/tag/v3.0.10) (2016-09-23)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.0.9...v3.0.10) and [v3.0 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_0.md) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.0 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_0.md).**
### Go
- Compile with [*Go 1.6.3*](https://golang.org/doc/devel/release.html#go1.6).
<hr>
## [v3.0.9](https://github.com/etcd-io/etcd/releases/tag/v3.0.9) (2016-09-15)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.0.8...v3.0.9) and [v3.0 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_0.md) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.0 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_0.md).**
### Added
- Warn on domain names on listen URLs (v3.2 will reject domain names).
### Go
- Compile with [*Go 1.6.3*](https://golang.org/doc/devel/release.html#go1.6).
<hr>
## [v3.0.8](https://github.com/etcd-io/etcd/releases/tag/v3.0.8) (2016-09-09)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.0.7...v3.0.8) and [v3.0 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_0.md) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.0 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_0.md).**
### Other
- Allow only IP addresses in listen URLs (domain names are rejected).
### Go
- Compile with [*Go 1.6.3*](https://golang.org/doc/devel/release.html#go1.6).
<hr>
## [v3.0.7](https://github.com/etcd-io/etcd/releases/tag/v3.0.7) (2016-08-31)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.0.6...v3.0.7) and [v3.0 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_0.md) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.0 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_0.md).**
### Other
- SRV records only allow A records (RFC 2052).
### Go
- Compile with [*Go 1.6.3*](https://golang.org/doc/devel/release.html#go1.6).
<hr>
## [v3.0.6](https://github.com/etcd-io/etcd/releases/tag/v3.0.6) (2016-08-19)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.0.5...v3.0.6) and [v3.0 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_0.md) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.0 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_0.md).**
### Go
- Compile with [*Go 1.6.3*](https://golang.org/doc/devel/release.html#go1.6).
<hr>
## [v3.0.5](https://github.com/etcd-io/etcd/releases/tag/v3.0.5) (2016-08-19)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.0.4...v3.0.5) and [v3.0 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_0.md) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.0 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_0.md).**
### Other
- SRV records (e.g., infra1.example.com) must match the discovery domain (i.e., example.com) if no custom certificate authority is given.
### Go
- Compile with [*Go 1.6.3*](https://golang.org/doc/devel/release.html#go1.6).
<hr>
## [v3.0.4](https://github.com/etcd-io/etcd/releases/tag/v3.0.4) (2016-07-27)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.0.3...v3.0.4) and [v3.0 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_0.md) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.0 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_0.md).**
### Added
- v2 `etcdctl ls` command now supports `--output=json`.
- Add /var/lib/etcd directory to etcd official Docker image.
### Other
- v2 auth can now use common name from TLS certificate when `--client-cert-auth` is enabled.
### Go
- Compile with [*Go 1.6.3*](https://golang.org/doc/devel/release.html#go1.6).
<hr>
## [v3.0.3](https://github.com/etcd-io/etcd/releases/tag/v3.0.3) (2016-07-15)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.0.2...v3.0.3) and [v3.0 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_0.md) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.0 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_0.md).**
### Other
- Revert Dockerfile to use `CMD`, instead of `ENTRYPOINT`, to support `etcdctl` run.
- Docker commands for v3.0.2 won't work without specifying executable binary paths.
- v3 etcdctl default endpoints are now `127.0.0.1:2379`.
### Go
- Compile with [*Go 1.6.2*](https://golang.org/doc/devel/release.html#go1.6).
<hr>
## [v3.0.2](https://github.com/etcd-io/etcd/releases/tag/v3.0.2) (2016-07-08)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.0.1...v3.0.2) and [v3.0 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_0.md) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.0 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_0.md).**
### Other
- Dockerfile uses `ENTRYPOINT`, instead of `CMD`, to run etcd without binary path specified.
### Go
- Compile with [*Go 1.6.2*](https://golang.org/doc/devel/release.html#go1.6).
<hr>
## [v3.0.1](https://github.com/etcd-io/etcd/releases/tag/v3.0.1) (2016-07-01)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.0.0...v3.0.1) and [v3.0 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_0.md) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.0 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_0.md).**
### Go
- Compile with [*Go 1.6.2*](https://golang.org/doc/devel/release.html#go1.6).
<hr>
## [v3.0.0](https://github.com/etcd-io/etcd/releases/tag/v3.0.0) (2016-06-30)
See [code changes](https://github.com/etcd-io/etcd/compare/v2.3.0...v3.0.0) and [v3.0 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_0.md) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.0 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_0.md).**
### Go
- Compile with [*Go 1.6.2*](https://golang.org/doc/devel/release.html#go1.6).
<hr>

View File

@ -1,734 +0,0 @@
Previous change logs can be found at [CHANGELOG-3.2](https://github.com/etcd-io/etcd/blob/master/CHANGELOG-3.2.md).
The minimum recommended etcd versions to run in **production** are 3.1.11+, 3.2.26+, and 3.3.11+.
<hr>
## [v3.3.14](https://github.com/etcd-io/etcd/releases/tag/v3.3.14) (2019-TBD)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.3.13...v3.3.14) and [v3.3 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_3.md) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.3 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_3.md).**
### etcd server
- Fix [race condition in `rafthttp` transport pause/resume](https://github.com/etcd-io/etcd/pull/10826).
### client v3
- Fix [gRPC panic "send on closed channel](https://github.com/etcd-io/etcd/issues/9956) by upgrading [`google.golang.org/grpc`](https://github.com/grpc/grpc-go/releases) from [**`v1.7.5`**](https://github.com/grpc/grpc-go/releases/tag/v1.7.5) to [**`v1.23.0`**](https://github.com/grpc/grpc-go/releases/tag/v1.23.0).
- Rewrite [client balancer](https://github.com/etcd-io/etcd/pull/9860) with [new gRPC balancer interface](https://github.com/etcd-io/etcd/issues/9106).
- Upgrade [gRPC to v1.23.0](https://github.com/etcd-io/etcd/pull/10911).
- Improve [client balancer failover against secure endpoints](https://github.com/etcd-io/etcd/pull/10911).
- Fix ["kube-apiserver 1.13.x refuses to work when first etcd-server is not available" (kubernetes#72102)](https://github.com/kubernetes/kubernetes/issues/72102).
### etcdctl v3
- Add [`etcdctl endpoint health --write-out` support](https://github.com/etcd-io/etcd/pull/9540).
- Previously, [`etcdctl endpoint health --write-out json` did not work](https://github.com/etcd-io/etcd/issues/9532).
- The command output is changed. Previously, if endpoint is unreachable, the command output is
"\<endpoint\> is unhealthy: failed to connect: \<error message\>". This change unified the error message, all error types
now have the same output "\<endpoint\> is unhealthy: failed to commit proposal: \<error message\>".
- Add [missing newline in `etcdctl endpoint health`](https://github.com/etcd-io/etcd/pull/10793).
<hr>
## [v3.3.13](https://github.com/etcd-io/etcd/releases/tag/v3.3.13) (2019-05-02)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.3.12...v3.3.13) and [v3.3 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_3.md) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.3 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_3.md).**
### Improved
- Improve [heartbeat send failure logging](https://github.com/etcd-io/etcd/pull/10663).
- Add [`Verify` function to perform corruption check on WAL contents](https://github.com/etcd-io/etcd/pull/10603).
### Metrics, Monitoring
See [List of metrics](https://etcd.readthedocs.io/en/latest/operate.html#v3-3) for all metrics per release.
Note that any `etcd_debugging_*` metrics are experimental and subject to change.
- Fix bug where [db_compaction_total_duration_milliseconds metric incorrectly measured duration as 0](https://github.com/etcd-io/etcd/pull/10646).
### client v3
- Fix [`(*Client).Endpoints()` method race condition](https://github.com/etcd-io/etcd/pull/10595).
### Package `wal`
- Add [`Verify` function to perform corruption check on WAL contents](https://github.com/etcd-io/etcd/pull/10603).
### Dependency
- Migrate [`github.com/ugorji/go/codec`](https://github.com/ugorji/go/releases) to [**`github.com/json-iterator/go`**](https://github.com/json-iterator/go) (See [#10667](https://github.com/etcd-io/etcd/pull/10667) for more).
- Migrate [`github.com/ghodss/yaml`](https://github.com/ghodss/yaml/releases) to [**`sigs.k8s.io/yaml`**](https://github.com/kubernetes-sigs/yaml) (See [#10718](https://github.com/etcd-io/etcd/pull/10718) for more).
### Go
- Compile with [*Go 1.10.8*](https://golang.org/doc/devel/release.html#go1.10).
<hr>
## [v3.3.12](https://github.com/etcd-io/etcd/releases/tag/v3.3.12) (2019-02-07)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.3.11...v3.3.12) and [v3.3 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_3.md) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.3 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_3.md).**
### etcdctl
- [Strip out insecure endpoints from DNS SRV records when using discovery](https://github.com/etcd-io/etcd/pull/10443) with etcdctl v2
### Go
- Compile with [*Go 1.10.8*](https://golang.org/doc/devel/release.html#go1.10).
<hr>
## [v3.3.11](https://github.com/etcd-io/etcd/releases/tag/v3.3.11) (2019-01-11)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.3.10...v3.3.11) and [v3.3 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_3.md) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.3 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_3.md).**
### gRPC Proxy
- Fix [memory leak in cache layer](https://github.com/etcd-io/etcd/pull/10327).
### Security, Authentication
- Disable [CommonName authentication for gRPC-gateway](https://github.com/etcd-io/etcd/pull/10366) gRPC-gateway proxy requests to etcd server use the etcd client server TLS certificate. If that certificate contains CommonName we do not want to use that for authentication as it could lead to permission escalation.
### Go
- Compile with [*Go 1.10.7*](https://golang.org/doc/devel/release.html#go1.10).
<hr>
## [v3.3.10](https://github.com/etcd-io/etcd/releases/tag/v3.3.10) (2018-10-10)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.3.9...v3.3.10) and [v3.3 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_3.md) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.3 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_3.md).**
### Improved
- Improve ["became inactive" warning log](https://github.com/etcd-io/etcd/pull/10024), which indicates message send to a peer failed.
- Improve [read index wait timeout warning log](https://github.com/etcd-io/etcd/pull/10026), which indicates that local node might have slow network.
- Add [gRPC interceptor for debugging logs](https://github.com/etcd-io/etcd/pull/9990); enable `etcd --debug` flag to see per-request debug information.
- Add [consistency check in snapshot status](https://github.com/etcd-io/etcd/pull/10109). If consistency check on snapshot file fails, `snapshot status` returns `"snapshot file integrity check failed..."` error.
### Metrics, Monitoring
See [List of metrics](https://etcd.io/docs/v3.3.12/metrics/) for all metrics per release.
Note that any `etcd_debugging_*` metrics are experimental and subject to change.
- Improve [`etcd_network_peer_round_trip_time_seconds`](https://github.com/etcd-io/etcd/pull/10155) Prometheus metric to track leader heartbeats.
- Previously, it only samples the TCP connection for snapshot messages.
- Add [`etcd_snap_db_fsync_duration_seconds_count`](https://github.com/etcd-io/etcd/pull/9997) Prometheus metric.
- Add [`etcd_snap_db_save_total_duration_seconds_bucket`](https://github.com/etcd-io/etcd/pull/9997) Prometheus metric.
- Add [`etcd_network_snapshot_send_success`](https://github.com/etcd-io/etcd/pull/9997) Prometheus metric.
- Add [`etcd_network_snapshot_send_failures`](https://github.com/etcd-io/etcd/pull/9997) Prometheus metric.
- Add [`etcd_network_snapshot_send_total_duration_seconds`](https://github.com/etcd-io/etcd/pull/9997) Prometheus metric.
- Add [`etcd_network_snapshot_receive_success`](https://github.com/etcd-io/etcd/pull/9997) Prometheus metric.
- Add [`etcd_network_snapshot_receive_failures`](https://github.com/etcd-io/etcd/pull/9997) Prometheus metric.
- Add [`etcd_network_snapshot_receive_total_duration_seconds`](https://github.com/etcd-io/etcd/pull/9997) Prometheus metric.
- Add [`etcd_server_id`](https://github.com/etcd-io/etcd/pull/9998) Prometheus metric.
- Add [`etcd_server_health_success`](https://github.com/etcd-io/etcd/pull/10156) Prometheus metric.
- Add [`etcd_server_health_failures`](https://github.com/etcd-io/etcd/pull/10156) Prometheus metric.
- Add [`etcd_server_read_indexes_failed_total`](https://github.com/etcd-io/etcd/pull/10094) Prometheus metric.
### client v3
- Fix logic on [release lock key if cancelled](https://github.com/etcd-io/etcd/pull/10153) in `clientv3/concurrency` package.
### Go
- Compile with [*Go 1.10.4*](https://golang.org/doc/devel/release.html#go1.10).
<hr>
## [v3.3.9](https://github.com/etcd-io/etcd/releases/tag/v3.3.9) (2018-07-24)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.3.8...v3.3.9) and [v3.3 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_3.md) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.3 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_3.md).**
### Improved
- Improve [Raft Read Index timeout warning messages](https://github.com/etcd-io/etcd/pull/9897).
### Security, Authentication
- Compile with [*Go 1.10.3*](https://golang.org/doc/devel/release.html#go1.10) to support [crypto/x509 "Name Constraints"](https://github.com/etcd-io/etcd/issues/9912).
### Metrics, Monitoring
See [List of metrics](https://etcd.io/docs/v3.3.12/metrics/) for all metrics per release.
Note that any `etcd_debugging_*` metrics are experimental and subject to change.
- Add [`etcd_server_go_version`](https://github.com/etcd-io/etcd/pull/9957) Prometheus metric.
- Add [`etcd_server_heartbeat_send_failures_total`](https://github.com/etcd-io/etcd/pull/9940) Prometheus metric.
- Add [`etcd_server_slow_apply_total`](https://github.com/etcd-io/etcd/pull/9940) Prometheus metric.
- Add [`etcd_disk_backend_defrag_duration_seconds`](https://github.com/etcd-io/etcd/pull/9940) Prometheus metric.
- Add [`etcd_mvcc_hash_duration_seconds`](https://github.com/etcd-io/etcd/pull/9940) Prometheus metric.
- Add [`etcd_mvcc_hash_rev_duration_seconds`](https://github.com/etcd-io/etcd/pull/9940) Prometheus metric.
- Add [`etcd_server_slow_read_indexes_total`](https://github.com/etcd-io/etcd/pull/9897) Prometheus metric.
- Add [`etcd_server_quota_backend_bytes`](https://github.com/etcd-io/etcd/pull/9820) Prometheus metric.
- Use it with `etcd_mvcc_db_total_size_in_bytes` and `etcd_mvcc_db_total_size_in_use_in_bytes`.
- `etcd_server_quota_backend_bytes 2.147483648e+09` means current quota size is 2 GB.
- `etcd_mvcc_db_total_size_in_bytes 20480` means current physically allocated DB size is 20 KB.
- `etcd_mvcc_db_total_size_in_use_in_bytes 16384` means future DB size if defragment operation is complete.
- `etcd_mvcc_db_total_size_in_bytes - etcd_mvcc_db_total_size_in_use_in_bytes` is the number of bytes that can be saved on disk with defragment operation.
- Add [`etcd_mvcc_db_total_size_in_bytes`](https://github.com/etcd-io/etcd/pull/9819) Prometheus metric.
- In addition to [`etcd_debugging_mvcc_db_total_size_in_bytes`](https://github.com/etcd-io/etcd/pull/9819).
- Add [`etcd_mvcc_db_total_size_in_use_in_bytes`](https://github.com/etcd-io/etcd/pull/9256) Prometheus metric.
- Use it with `etcd_mvcc_db_total_size_in_bytes` and `etcd_mvcc_db_total_size_in_use_in_bytes`.
- `etcd_server_quota_backend_bytes 2.147483648e+09` means current quota size is 2 GB.
- `etcd_mvcc_db_total_size_in_bytes 20480` means current physically allocated DB size is 20 KB.
- `etcd_mvcc_db_total_size_in_use_in_bytes 16384` means future DB size if defragment operation is complete.
- `etcd_mvcc_db_total_size_in_bytes - etcd_mvcc_db_total_size_in_use_in_bytes` is the number of bytes that can be saved on disk with defragment operation.
### client v3
- Fix [lease keepalive interval updates when response queue is full](https://github.com/etcd-io/etcd/pull/9952).
- If `<-chan *clientv3LeaseKeepAliveResponse` from `clientv3.Lease.KeepAlive` was never consumed or channel is full, client was [sending keepalive request every 500ms](https://github.com/etcd-io/etcd/issues/9911) instead of expected rate of every "TTL / 3" duration.
### Go
- Compile with [*Go 1.10.3*](https://golang.org/doc/devel/release.html#go1.10).
<hr>
## [v3.3.8](https://github.com/etcd-io/etcd/releases/tag/v3.3.8) (2018-06-15)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.3.7...v3.3.8) and [v3.3 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_3.md) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.3 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_3.md).**
### Improved
- Improve [slow request apply warning log](https://github.com/etcd-io/etcd/pull/9288).
- e.g. `read-only range request "key:\"/a\" range_end:\"/b\" " with result "range_response_count:3 size:96" took too long (97.966µs) to execute`.
- Redact [request value field](https://github.com/etcd-io/etcd/pull/9822).
- Provide [response size](https://github.com/etcd-io/etcd/pull/9826).
- Add [backoff on watch retries on transient errors](https://github.com/etcd-io/etcd/pull/9840).
### Go
- Compile with [*Go 1.9.7*](https://golang.org/doc/devel/release.html#go1.9).
<hr>
## [v3.3.7](https://github.com/etcd-io/etcd/releases/tag/v3.3.7) (2018-06-06)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.3.6...v3.3.7) and [v3.3 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_3.md) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.3 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_3.md).**
### Security, Authentication
- Support TLS cipher suite whitelisting.
- To block [weak cipher suites](https://github.com/etcd-io/etcd/issues/8320).
- TLS handshake fails when client hello is requested with invalid cipher suites.
- Add [`etcd --cipher-suites`](https://github.com/etcd-io/etcd/pull/9801) flag.
- If empty, Go auto-populates the list.
### etcdctl v3
- Fix [`etcdctl move-leader` command for TLS-enabled endpoints](https://github.com/etcd-io/etcd/pull/9807).
### Go
- Compile with [*Go 1.9.6*](https://golang.org/doc/devel/release.html#go1.9).
<hr>
## [v3.3.6](https://github.com/etcd-io/etcd/releases/tag/v3.3.6) (2018-05-31)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.3.5...v3.3.6) and [v3.3 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_3.md) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.3 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_3.md).**
### etcd server
- Allow [empty auth token](https://github.com/etcd-io/etcd/pull/9369).
- Previously, when auth token is an empty string, it returns [`failed to initialize the etcd server: auth: invalid auth options` error](https://github.com/etcd-io/etcd/issues/9349).
- Fix [auth storage panic on server lease revoke routine with JWT token](https://github.com/etcd-io/etcd/issues/9695).
- Fix [`mvcc` server panic from restore operation](https://github.com/etcd-io/etcd/pull/9775).
- Let's assume that a watcher had been requested with a future revision X and sent to node A that became network-partitioned thereafter. Meanwhile, cluster makes progress. Then when the partition gets removed, the leader sends a snapshot to node A. Previously if the snapshot's latest revision is still lower than the watch revision X, **etcd server panicked** during snapshot restore operation.
- Now, this server-side panic has been fixed.
### Go
- Compile with [*Go 1.9.6*](https://golang.org/doc/devel/release.html#go1.9).
<hr>
## [v3.3.5](https://github.com/etcd-io/etcd/releases/tag/v3.3.5) (2018-05-09)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.3.4...v3.3.5) and [v3.3 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_3.md) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.3 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_3.md).**
### etcdctl v3
- Fix [`etcdctl watch [key] [range_end] -- [exec-command…]`](https://github.com/etcd-io/etcd/pull/9688) parsing.
- Previously, `ETCDCTL_API=3 ./bin/etcdctl watch foo -- echo watch event received` panicked.
### Go
- Compile with [*Go 1.9.6*](https://golang.org/doc/devel/release.html#go1.9).
<hr>
## [v3.3.4](https://github.com/etcd-io/etcd/releases/tag/v3.3.4) (2018-04-24)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.3.3...v3.3.4) and [v3.3 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_3.md) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.3 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_3.md).**
### Metrics, Monitoring
See [List of metrics](https://etcd.io/docs/v3.3.12/metrics/) for all metrics per release.
Note that any `etcd_debugging_*` metrics are experimental and subject to change.
- Add [`etcd_server_is_leader`](https://github.com/etcd-io/etcd/pull/9587) Prometheus metric.
- Fix [`etcd_debugging_server_lease_expired_total`](https://github.com/etcd-io/etcd/pull/9557) Prometheus metric.
- Fix [race conditions in v2 server stat collecting](https://github.com/etcd-io/etcd/pull/9562).
### Security, Authentication
- Fix [TLS reload](https://github.com/etcd-io/etcd/pull/9570) when [certificate SAN field only includes IP addresses but no domain names](https://github.com/etcd-io/etcd/issues/9541).
- In Go, server calls `(*tls.Config).GetCertificate` for TLS reload if and only if server's `(*tls.Config).Certificates` field is not empty, or `(*tls.ClientHelloInfo).ServerName` is not empty with a valid SNI from the client. Previously, etcd always populates `(*tls.Config).Certificates` on the initial client TLS handshake, as non-empty. Thus, client was always expected to supply a matching SNI in order to pass the TLS verification and to trigger `(*tls.Config).GetCertificate` to reload TLS assets.
- However, a certificate whose SAN field does [not include any domain names but only IP addresses](https://github.com/etcd-io/etcd/issues/9541) would request `*tls.ClientHelloInfo` with an empty `ServerName` field, thus failing to trigger the TLS reload on initial TLS handshake; this becomes a problem when expired certificates need to be replaced online.
- Now, `(*tls.Config).Certificates` is created empty on initial TLS client handshake, first to trigger `(*tls.Config).GetCertificate`, and then to populate rest of the certificates on every new TLS connection, even when client SNI is empty (e.g. cert only includes IPs).
### etcd server
- Add [`etcd --initial-election-tick-advance`](https://github.com/etcd-io/etcd/pull/9591) flag to configure initial election tick fast-forward.
- By default, `etcd --initial-election-tick-advance=true`, then local member fast-forwards election ticks to speed up "initial" leader election trigger.
- This benefits the case of larger election ticks. For instance, cross datacenter deployment may require longer election timeout of 10-second. If true, local node does not need wait up to 10-second. Instead, forwards its election ticks to 8-second, and have only 2-second left before leader election.
- Major assumptions are that: cluster has no active leader thus advancing ticks enables faster leader election. Or cluster already has an established leader, and rejoining follower is likely to receive heartbeats from the leader after tick advance and before election timeout.
- However, when network from leader to rejoining follower is congested, and the follower does not receive leader heartbeat within left election ticks, disruptive election has to happen thus affecting cluster availabilities.
- Now, this can be disabled by setting `--initial-election-tick-advance=false`.
- Disabling this would slow down initial bootstrap process for cross datacenter deployments. Make tradeoffs by configuring `etcd --initial-election-tick-advance` at the cost of slow initial bootstrap.
- If single-node, it advances ticks regardless.
- Address [disruptive rejoining follower node](https://github.com/etcd-io/etcd/issues/9333).
### Package `embed`
- Add [`embed.Config.InitialElectionTickAdvance`](https://github.com/etcd-io/etcd/pull/9591) to enable/disable initial election tick fast-forward.
- `embed.NewConfig()` would return `*embed.Config` with `InitialElectionTickAdvance` as true by default.
### Go
- Compile with [*Go 1.9.5*](https://golang.org/doc/devel/release.html#go1.9).
<hr>
## [v3.3.3](https://github.com/etcd-io/etcd/releases/tag/v3.3.3) (2018-03-29)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.3.2...v3.3.3) and [v3.3 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_3.md) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.3 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_3.md).**
### Improved
- Adjust [election timeout on server restart](https://github.com/etcd-io/etcd/pull/9415) to reduce [disruptive rejoining servers](https://github.com/etcd-io/etcd/issues/9333).
- Previously, etcd fast-forwards election ticks on server start, with only one tick left for leader election. This is to speed up start phase, without having to wait until all election ticks elapse. Advancing election ticks is useful for cross datacenter deployments with larger election timeouts. However, it was affecting cluster availability if the last tick elapses before leader contacts the restarted node.
- Now, when etcd restarts, it adjusts election ticks with more than one tick left, thus more time for leader to prevent disruptive restart.
- Adjust [periodic compaction retention window](https://github.com/etcd-io/etcd/pull/9485).
- e.g. `etcd --auto-compaction-mode=revision --auto-compaction-retention=1000` automatically `Compact` on `"latest revision" - 1000` every 5-minute (when latest revision is 30000, compact on revision 29000).
- e.g. Previously, `etcd --auto-compaction-mode=periodic --auto-compaction-retention=72h` automatically `Compact` with 72-hour retention windown for every 7.2-hour. **Now, `Compact` happens, for every 1-hour but still with 72-hour retention window.**
- e.g. Previously, `etcd --auto-compaction-mode=periodic --auto-compaction-retention=30m` automatically `Compact` with 30-minute retention windown for every 3-minute. **Now, `Compact` happens, for every 30-minute but still with 30-minute retention window.**
- Periodic compactor keeps recording latest revisions for every compaction period when given period is less than 1-hour, or for every 1-hour when given compaction period is greater than 1-hour (e.g. 1-hour when `etcd --auto-compaction-mode=periodic --auto-compaction-retention=24h`).
- For every compaction period or 1-hour, compactor uses the last revision that was fetched before compaction period, to discard historical data.
- The retention window of compaction period moves for every given compaction period or hour.
- For instance, when hourly writes are 100 and `etcd --auto-compaction-mode=periodic --auto-compaction-retention=24h`, `v3.2.x`, `v3.3.0`, `v3.3.1`, and `v3.3.2` compact revision 2400, 2640, and 2880 for every 2.4-hour, while `v3.3.3` *or later* compacts revision 2400, 2500, 2600 for every 1-hour.
- Futhermore, when `etcd --auto-compaction-mode=periodic --auto-compaction-retention=30m` and writes per minute are about 1000, `v3.3.0`, `v3.3.1`, and `v3.3.2` compact revision 30000, 33000, and 36000, for every 3-minute, while `v3.3.3` *or later* compacts revision 30000, 60000, and 90000, for every 30-minute.
### Metrics, Monitoring
See [List of metrics](https://etcd.io/docs/v3.3.12/metrics/) for all metrics per release.
Note that any `etcd_debugging_*` metrics are experimental and subject to change.
- Add missing [`etcd_network_peer_sent_failures_total` count](https://github.com/etcd-io/etcd/pull/9437).
### Go
- Compile with [*Go 1.9.5*](https://golang.org/doc/devel/release.html#go1.9).
<hr>
## [v3.3.2](https://github.com/etcd-io/etcd/releases/tag/v3.3.2) (2018-03-08)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.3.1...v3.3.2) and [v3.3 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_3.md) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.3 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_3.md).**
### etcd server
- Fix [server panic on invalid Election Proclaim/Resign HTTP(S) requests](https://github.com/etcd-io/etcd/pull/9379).
- Previously, wrong-formatted HTTP requests to Election API could trigger panic in etcd server.
- e.g. `curl -L http://localhost:2379/v3/election/proclaim -X POST -d '{"value":""}'`, `curl -L http://localhost:2379/v3/election/resign -X POST -d '{"value":""}'`.
- Fix [revision-based compaction retention parsing](https://github.com/etcd-io/etcd/pull/9339).
- Previously, `etcd --auto-compaction-mode revision --auto-compaction-retention 1` was [translated to revision retention 3600000000000](https://github.com/etcd-io/etcd/issues/9337).
- Now, `etcd --auto-compaction-mode revision --auto-compaction-retention 1` is correctly parsed as revision retention 1.
- Prevent [overflow by large `TTL` values for `Lease` `Grant`](https://github.com/etcd-io/etcd/pull/9399).
- `TTL` parameter to `Grant` request is unit of second.
- Leases with too large `TTL` values exceeding `math.MaxInt64` [expire in unexpected ways](https://github.com/etcd-io/etcd/issues/9374).
- Server now returns `rpctypes.ErrLeaseTTLTooLarge` to client, when the requested `TTL` is larger than *9,000,000,000 seconds* (which is >285 years).
- Again, etcd `Lease` is meant for short-periodic keepalives or sessions, in the range of seconds or minutes. Not for hours or days!
- Enable etcd server [`raft.Config.CheckQuorum` when starting with `ForceNewCluster`](https://github.com/etcd-io/etcd/pull/9347).
### Proxy v2
- Fix [v2 proxy leaky HTTP requests](https://github.com/etcd-io/etcd/pull/9336).
### Go
- Compile with [*Go 1.9.4*](https://golang.org/doc/devel/release.html#go1.9).
<hr>
## [v3.3.1](https://github.com/etcd-io/etcd/releases/tag/v3.3.1) (2018-02-12)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.3.0...v3.3.1) and [v3.3 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_3.md) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.3 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_3.md).**
### Improved
- Add [warnings on requests taking too long](https://github.com/etcd-io/etcd/pull/9288).
- e.g. `etcdserver: read-only range request "key:\"\\000\" range_end:\"\\000\" " took too long [3.389041388s] to execute`
### etcd server
- Fix [`mvcc` "unsynced" watcher restore operation](https://github.com/etcd-io/etcd/pull/9281).
- "unsynced" watcher is watcher that needs to be in sync with events that have happened.
- That is, "unsynced" watcher is the slow watcher that was requested on old revision.
- "unsynced" watcher restore operation was not correctly populating its underlying watcher group.
- Which possibly causes [missing events from "unsynced" watchers](https://github.com/etcd-io/etcd/issues/9086).
- A node gets network partitioned with a watcher on a future revision, and falls behind receiving a leader snapshot after partition gets removed. When applying this snapshot, etcd watch storage moves current synced watchers to unsynced since sync watchers might have become stale during network partition. And reset synced watcher group to restart watcher routines. Previously, there was a bug when moving from synced watcher group to unsynced, thus client would miss events when the watcher was requested to the network-partitioned node.
### Go
- Compile with [*Go 1.9.4*](https://golang.org/doc/devel/release.html#go1.9).
<hr>
## [v3.3.0](https://github.com/etcd-io/etcd/releases/tag/v3.3.0) (2018-02-01)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.0...v3.3.0) and [v3.3 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_3.md) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.3 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_3.md).**
- [v3.3.0-rc.4](https://github.com/etcd-io/etcd/releases/tag/v3.3.0-rc.4) (2018-01-22), see [code changes](https://github.com/etcd-io/etcd/compare/v3.3.0-rc.3...v3.3.0-rc.4).
- [v3.3.0-rc.3](https://github.com/etcd-io/etcd/releases/tag/v3.3.0-rc.3) (2018-01-17), see [code changes](https://github.com/etcd-io/etcd/compare/v3.3.0-rc.2...v3.3.0-rc.3).
- [v3.3.0-rc.2](https://github.com/etcd-io/etcd/releases/tag/v3.3.0-rc.2) (2018-01-11), see [code changes](https://github.com/etcd-io/etcd/compare/v3.3.0-rc.1...v3.3.0-rc.2).
- [v3.3.0-rc.1](https://github.com/etcd-io/etcd/releases/tag/v3.3.0-rc.1) (2018-01-02), see [code changes](https://github.com/etcd-io/etcd/compare/v3.3.0-rc.0...v3.3.0-rc.1).
- [v3.3.0-rc.0](https://github.com/etcd-io/etcd/releases/tag/v3.3.0-rc.0) (2017-12-20), see [code changes](https://github.com/etcd-io/etcd/compare/v3.2.0...v3.3.0-rc.0).
### Improved
- Use [`coreos/bbolt`](https://github.com/coreos/bbolt/releases) to replace [`boltdb/bolt`](https://github.com/boltdb/bolt#project-status).
- Fix [etcd database size grows until `mvcc: database space exceeded`](https://github.com/etcd-io/etcd/issues/8009).
- [Support database size larger than 8GiB](https://github.com/etcd-io/etcd/pull/7525) (8GiB is now a suggested maximum size for normal environments)
- [Reduce memory allocation](https://github.com/etcd-io/etcd/pull/8428) on [Range operations](https://github.com/etcd-io/etcd/pull/8475).
- [Rate limit](https://github.com/etcd-io/etcd/pull/8099) and [randomize](https://github.com/etcd-io/etcd/pull/8101) lease revoke on restart or leader elections.
- Prevent [spikes in Raft proposal rate](https://github.com/etcd-io/etcd/issues/8096).
- Support `clientv3` balancer failover under [network faults/partitions](https://github.com/etcd-io/etcd/issues/8711).
- Better warning on [mismatched `etcd --initial-cluster`](https://github.com/etcd-io/etcd/pull/8083) flag.
- etcd compares `etcd --initial-advertise-peer-urls` against corresponding `etcd --initial-cluster` URLs with forward-lookup.
- If resolved IP addresses of `etcd --initial-advertise-peer-urls` and `etcd --initial-cluster` do not match (e.g. [due to DNS error](https://github.com/etcd-io/etcd/pull/9210)), etcd will exit with errors.
- v3.2 error: `etcd --initial-cluster must include s1=https://s1.test:2380 given --initial-advertise-peer-urls=https://s1.test:2380`.
- v3.3 error: `failed to resolve https://s1.test:2380 to match --initial-cluster=s1=https://s1.test:2380 (failed to resolve "https://s1.test:2380" (error ...))`.
### Breaking Changes
- Require [`google.golang.org/grpc`](https://github.com/grpc/grpc-go/releases) [**`v1.7.4`**](https://github.com/grpc/grpc-go/releases/tag/v1.7.4) or [**`v1.7.5`**](https://github.com/grpc/grpc-go/releases/tag/v1.7.5).
- Deprecate [`metadata.Incoming/OutgoingContext`](https://github.com/etcd-io/etcd/pull/7896).
- Deprecate `grpclog.Logger`, upgrade to [`grpclog.LoggerV2`](https://github.com/etcd-io/etcd/pull/8533).
- Deprecate [`grpc.ErrClientConnTimeout`](https://github.com/etcd-io/etcd/pull/8505) errors in `clientv3`.
- Use [`MaxRecvMsgSize` and `MaxSendMsgSize`](https://github.com/etcd-io/etcd/pull/8437) to limit message size, in etcd server.
- Translate [gRPC status error in v3 client `Snapshot` API](https://github.com/etcd-io/etcd/pull/9038).
- v3 `etcdctl` [`lease timetolive LEASE_ID`](https://github.com/etcd-io/etcd/issues/9028) on expired lease now prints [`"lease LEASE_ID already expired"`](https://github.com/etcd-io/etcd/pull/9047).
- <=3.2 prints `"lease LEASE_ID granted with TTL(0s), remaining(-1s)"`.
- Replace [gRPC gateway](https://github.com/grpc-ecosystem/grpc-gateway) endpoint `/v3alpha` with [`/v3beta`](https://github.com/etcd-io/etcd/pull/8880).
- To deprecate [`/v3alpha`](https://github.com/etcd-io/etcd/issues/8125) in v3.4.
- In v3.3, `curl -L http://localhost:2379/v3alpha/kv/put -X POST -d '{"key": "Zm9v", "value": "YmFy"}'` still works as a fallback to `curl -L http://localhost:2379/v3beta/kv/put -X POST -d '{"key": "Zm9v", "value": "YmFy"}'`, but `curl -L http://localhost:2379/v3alpha/kv/put -X POST -d '{"key": "Zm9v", "value": "YmFy"}'` won't work in v3.4. Use `curl -L http://localhost:2379/v3beta/kv/put -X POST -d '{"key": "Zm9v", "value": "YmFy"}'` instead.
- Change `etcd --auto-compaction-retention` flag to [accept string values](https://github.com/etcd-io/etcd/pull/8563) with [finer granularity](https://github.com/etcd-io/etcd/issues/8503).
- Now that `etcd --auto-compaction-retention` accepts string values, etcd configuration YAML file `auto-compaction-retention` field must be changed to `string` type.
- Previously, `--config-file etcd.config.yaml` can have `auto-compaction-retention: 24` field, now must be `auto-compaction-retention: "24"` or `auto-compaction-retention: "24h"`.
- If configured as `etcd --auto-compaction-mode periodic --auto-compaction-retention "24h"`, the time duration value for `etcd --auto-compaction-retention` flag must be valid for [`time.ParseDuration`](https://golang.org/pkg/time/#ParseDuration) function in Go.
### Dependency
- Upgrade [`boltdb/bolt`](https://github.com/boltdb/bolt#project-status) from [**`v1.3.0`**](https://github.com/boltdb/bolt/releases/tag/v1.3.0) to [`coreos/bbolt`](https://github.com/coreos/bbolt/releases) [**`v1.3.1-coreos.6`**](https://github.com/coreos/bbolt/releases/tag/v1.3.1-coreos.6).
- Upgrade [`google.golang.org/grpc`](https://github.com/grpc/grpc-go/releases) from [**`v1.2.1`**](https://github.com/grpc/grpc-go/releases/tag/v1.2.1) to [**`v1.7.5`**](https://github.com/grpc/grpc-go/releases/tag/v1.7.5).
- Upgrade [`github.com/ugorji/go/codec`](https://github.com/ugorji/go) to [**`v1.1`**](https://github.com/ugorji/go/releases/tag/v1.1), and [regenerate v2 `client`](https://github.com/etcd-io/etcd/pull/8721).
- Upgrade [`github.com/ugorji/go/codec`](https://github.com/ugorji/go) to [**`ugorji/go@54210f4e0`**](https://github.com/ugorji/go/commit/54210f4e076c57f351166f0ed60e67d3fca57a36), and [regenerate v2 `client`](https://github.com/etcd-io/etcd/pull/8574).
- Upgrade [`github.com/grpc-ecosystem/grpc-gateway`](https://github.com/grpc-ecosystem/grpc-gateway/releases) from [**`v1.2.2`**](https://github.com/grpc-ecosystem/grpc-gateway/releases/tag/v1.2.2) to [**`v1.3.0`**](https://github.com/grpc-ecosystem/grpc-gateway/releases/tag/v1.3.0).
- Upgrade [`golang.org/x/crypto/bcrypt`](https://github.com/golang/crypto) to [**`golang/crypto@6c586e17d`**](https://github.com/golang/crypto/commit/6c586e17d90a7d08bbbc4069984180dce3b04117).
### Metrics, Monitoring
See [List of metrics](https://etcd.io/docs/v3.3.12/metrics/) for all metrics per release.
Note that any `etcd_debugging_*` metrics are experimental and subject to change.
- Add [`etcd --listen-metrics-urls`](https://github.com/etcd-io/etcd/pull/8242) flag for additional `/metrics` and `/health` endpoints.
- Useful for [bypassing critical APIs when monitoring etcd](https://github.com/etcd-io/etcd/issues/8060).
- Add [`etcd_server_version`](https://github.com/etcd-io/etcd/pull/8960) Prometheus metric.
- To replace [Kubernetes `etcd-version-monitor`](https://github.com/etcd-io/etcd/issues/8948).
- Add [`etcd_debugging_mvcc_db_compaction_keys_total`](https://github.com/etcd-io/etcd/pull/8280) Prometheus metric.
- Add [`etcd_debugging_server_lease_expired_total`](https://github.com/etcd-io/etcd/pull/8064) Prometheus metric.
- To improve [lease revoke monitoring](https://github.com/etcd-io/etcd/issues/8050).
- Document [Prometheus 2.0 rules](https://github.com/etcd-io/etcd/pull/8879).
- Initialize gRPC server [metrics with zero values](https://github.com/etcd-io/etcd/pull/8878).
- Fix [range/put/delete operation metrics](https://github.com/etcd-io/etcd/pull/8054) with transaction.
- `etcd_debugging_mvcc_range_total`
- `etcd_debugging_mvcc_put_total`
- `etcd_debugging_mvcc_delete_total`
- `etcd_debugging_mvcc_txn_total`
- Fix [`etcd_debugging_mvcc_keys_total`](https://github.com/etcd-io/etcd/pull/8390) on restore.
- Fix [`etcd_debugging_mvcc_db_total_size_in_bytes`](https://github.com/etcd-io/etcd/pull/8120) on restore.
- Also change to [`prometheus.NewGaugeFunc`](https://github.com/etcd-io/etcd/pull/8150).
### Security, Authentication
See [security doc](https://github.com/etcd-io/etcd/blob/master/Documentation/op-guide/security.md) for more details.
- Add [CRL based connection rejection](https://github.com/etcd-io/etcd/pull/8124) to manage [revoked certs](https://github.com/etcd-io/etcd/issues/4034).
- Document [TLS authentication changes](https://github.com/etcd-io/etcd/pull/8895).
- [Server accepts connections if IP matches, without checking DNS entries](https://github.com/etcd-io/etcd/pull/8223). For instance, if peer cert contains IP addresses and DNS names in Subject Alternative Name (SAN) field, and the remote IP address matches one of those IP addresses, server just accepts connection without further checking the DNS names.
- [Server supports reverse-lookup on wildcard DNS `SAN`](https://github.com/etcd-io/etcd/pull/8281). For instance, if peer cert contains only DNS names (no IP addresses) in Subject Alternative Name (SAN) field, server first reverse-lookups the remote IP address to get a list of names mapping to that address (e.g. `nslookup IPADDR`). Then accepts the connection if those names have a matching name with peer cert's DNS names (either by exact or wildcard match). If none is matched, server forward-lookups each DNS entry in peer cert (e.g. look up `example.default.svc` when the entry is `*.example.default.svc`), and accepts connection only when the host's resolved addresses have the matching IP address with the peer's remote IP address.
- Add [`etcd --peer-cert-allowed-cn`](https://github.com/etcd-io/etcd/pull/8616) flag.
- To support [CommonName(CN) based auth](https://github.com/etcd-io/etcd/issues/8262) for inter peer connection.
- [Swap priority](https://github.com/etcd-io/etcd/pull/8594) of cert CommonName(CN) and username + password.
- To address ["username and password specified in the request should take priority over CN in the cert"](https://github.com/etcd-io/etcd/issues/8584).
- Protect [lease revoke with auth](https://github.com/etcd-io/etcd/pull/8031).
- Provide user's role on [auth permission error](https://github.com/etcd-io/etcd/pull/8164).
- Fix [auth store panic with disabled token](https://github.com/etcd-io/etcd/pull/8695).
### etcd server
- Add [`etcd --experimental-initial-corrupt-check`](https://github.com/etcd-io/etcd/pull/8554) flag to [check cluster database hashes before serving client/peer traffic](https://github.com/etcd-io/etcd/issues/8313).
- `etcd --experimental-initial-corrupt-check=false` by default.
- v3.4 will enable `--initial-corrupt-check=true` by default.
- Add [`etcd --experimental-corrupt-check-time`](https://github.com/etcd-io/etcd/pull/8420) flag to [raise corrupt alarm monitoring](https://github.com/etcd-io/etcd/issues/7125).
- `etcd --experimental-corrupt-check-time=0s` disabled by default.
- Add [`etcd --experimental-enable-v2v3`](https://github.com/etcd-io/etcd/pull/8407) flag to [emulate v2 API with v3](https://github.com/etcd-io/etcd/issues/6925).
- `etcd --experimental-enable-v2v3=false` by default.
- Add [`etcd --max-txn-ops`](https://github.com/etcd-io/etcd/pull/7976) flag to [configure maximum number operations in transaction](https://github.com/etcd-io/etcd/issues/7826).
- Add [`etcd --max-request-bytes`](https://github.com/etcd-io/etcd/pull/7968) flag to [configure maximum client request size](https://github.com/etcd-io/etcd/issues/7923).
- If not configured, it defaults to 1.5 MiB.
- Add [`etcd --client-crl-file`, `--peer-crl-file`](https://github.com/etcd-io/etcd/pull/8124) flags for [Certificate revocation list](https://github.com/etcd-io/etcd/issues/4034).
- Add [`etcd --peer-cert-allowed-cn`](https://github.com/etcd-io/etcd/pull/8616) flag to support [CN-based auth for inter-peer connection](https://github.com/etcd-io/etcd/issues/8262).
- Add [`etcd --listen-metrics-urls`](https://github.com/etcd-io/etcd/pull/8242) flag for additional `/metrics` and `/health` endpoints.
- Support [additional (non) TLS `/metrics` endpoints for a TLS-enabled cluster](https://github.com/etcd-io/etcd/pull/8282).
- e.g. `etcd --listen-metrics-urls=https://localhost:2378,http://localhost:9379` to serve `/metrics` and `/health` on secure port 2378 and insecure port 9379.
- Useful for [bypassing critical APIs when monitoring etcd](https://github.com/etcd-io/etcd/issues/8060).
- Add [`etcd --auto-compaction-mode`](https://github.com/etcd-io/etcd/pull/8123) flag to [support revision-based compaction](https://github.com/etcd-io/etcd/issues/8098).
- Change `etcd --auto-compaction-retention` flag to [accept string values](https://github.com/etcd-io/etcd/pull/8563) with [finer granularity](https://github.com/etcd-io/etcd/issues/8503).
- Now that `etcd --auto-compaction-retention` accepts string values, etcd configuration YAML file `auto-compaction-retention` field must be changed to `string` type.
- Previously, `etcd --config-file etcd.config.yaml` can have `auto-compaction-retention: 24` field, now must be `auto-compaction-retention: "24"` or `auto-compaction-retention: "24h"`.
- If configured as `--auto-compaction-mode periodic --auto-compaction-retention "24h"`, the time duration value for `etcd --auto-compaction-retention` flag must be valid for [`time.ParseDuration`](https://golang.org/pkg/time/#ParseDuration) function in Go.
- e.g. `etcd --auto-compaction-mode=revision --auto-compaction-retention=1000` automatically `Compact` on `"latest revision" - 1000` every 5-minute (when latest revision is 30000, compact on revision 29000).
- e.g. `etcd --auto-compaction-mode=periodic --auto-compaction-retention=72h` automatically `Compact` with 72-hour retention windown, for every 7.2-hour.
- e.g. `etcd --auto-compaction-mode=periodic --auto-compaction-retention=30m` automatically `Compact` with 30-minute retention windown, for every 3-minute.
- Periodic compactor continues to record latest revisions for every 1/10 of given compaction period (e.g. 1-hour when `etcd --auto-compaction-mode=periodic --auto-compaction-retention=10h`).
- For every 1/10 of given compaction period, compactor uses the last revision that was fetched before compaction period, to discard historical data.
- The retention window of compaction period moves for every 1/10 of given compaction period.
- For instance, when hourly writes are 100 and `--auto-compaction-retention=10`, v3.1 compacts revision 1000, 2000, and 3000 for every 10-hour, while v3.2.x, v3.3.0, v3.3.1, and v3.3.2 compact revision 1000, 1100, and 1200 for every 1-hour. Futhermore, when writes per minute are 1000, v3.3.0, v3.3.1, and v3.3.2 with `--auto-compaction-mode=periodic --auto-compaction-retention=30m` compact revision 30000, 33000, and 36000, for every 3-minute with more finer granularity.
- Whether compaction succeeds or not, this process repeats for every 1/10 of given compaction period. If compaction succeeds, it just removes compacted revision from historical revision records.
- Add [`etcd --grpc-keepalive-min-time`, `etcd --grpc-keepalive-interval`, `etcd --grpc-keepalive-timeout`](https://github.com/etcd-io/etcd/pull/8535) flags to configure server-side keepalive policies.
- Serve [`/health` endpoint as unhealthy](https://github.com/etcd-io/etcd/pull/8272) when [alarm (e.g. `NOSPACE`) is raised or there's no leader](https://github.com/etcd-io/etcd/issues/8207).
- Define [`etcdhttp.Health`](https://godoc.org/github.com/coreos/etcd/etcdserver/api/etcdhttp#Health) struct with JSON encoder.
- Note that `"health"` field is [`string` type, not `bool`](https://github.com/etcd-io/etcd/pull/9143).
- e.g. `{"health":"false"}`, `{"health":"true"}`
- [Remove `"errors"` field](https://github.com/etcd-io/etcd/pull/9162) since `v3.3.0-rc.3` (did exist only in `v3.3.0-rc.0`, `v3.3.0-rc.1`, `v3.3.0-rc.2`).
- Move [logging setup to embed package](https://github.com/etcd-io/etcd/pull/8810)
- Disable gRPC server info-level logs by default (can be enabled with `etcd --debug` flag).
- Use [monotonic time in Go 1.9](https://github.com/etcd-io/etcd/pull/8507) for `lease` package.
- Warn on [empty hosts in advertise URLs](https://github.com/etcd-io/etcd/pull/8384).
- Address [advertise client URLs accepts empty hosts](https://github.com/etcd-io/etcd/issues/8379).
- etcd v3.4 will exit on this error.
- e.g. `etcd --advertise-client-urls=http://:2379`.
- Warn on [shadowed environment variables](https://github.com/etcd-io/etcd/pull/8385).
- Address [error on shadowed environment variables](https://github.com/etcd-io/etcd/issues/8380).
- etcd v3.4 will exit on this error.
### API
- Support [ranges in transaction comparisons](https://github.com/etcd-io/etcd/pull/8025) for [disconnected linearized reads](https://github.com/etcd-io/etcd/issues/7924).
- Add [nested transactions](https://github.com/etcd-io/etcd/pull/8102) to extend [proxy use cases](https://github.com/etcd-io/etcd/issues/7857).
- Add [lease comparison target in transaction](https://github.com/etcd-io/etcd/pull/8324).
- Add [lease list](https://github.com/etcd-io/etcd/pull/8358).
- Add [hash by revision](https://github.com/etcd-io/etcd/pull/8263) for [better corruption checking against boltdb](https://github.com/etcd-io/etcd/issues/8016).
### client v3
- Add [health balancer](https://github.com/etcd-io/etcd/pull/8545) to fix [watch API hangs](https://github.com/etcd-io/etcd/issues/7247), improve [endpoint switch under network faults](https://github.com/etcd-io/etcd/issues/7941).
- [Refactor balancer](https://github.com/etcd-io/etcd/pull/8840) and add [client-side keepalive pings](https://github.com/etcd-io/etcd/pull/8199) to handle [network partitions](https://github.com/etcd-io/etcd/issues/8711).
- Add [`MaxCallSendMsgSize` and `MaxCallRecvMsgSize`](https://github.com/etcd-io/etcd/pull/9047) fields to [`clientv3.Config`](https://godoc.org/github.com/coreos/etcd/clientv3#Config).
- Fix [exceeded response size limit error in client-side](https://github.com/etcd-io/etcd/issues/9043).
- Address [kubernetes#51099](https://github.com/kubernetes/kubernetes/issues/51099).
- In previous versions(v3.2.10, v3.2.11), client response size was limited to only 4 MiB.
- `MaxCallSendMsgSize` default value is 2 MiB, if not configured.
- `MaxCallRecvMsgSize` default value is `math.MaxInt32`, if not configured.
- Accept [`Compare_LEASE`](https://github.com/etcd-io/etcd/pull/8324) in [`clientv3.Compare`](https://godoc.org/github.com/coreos/etcd/clientv3#Compare).
- Add [`LeaseValue` helper](https://github.com/etcd-io/etcd/pull/8488) to `Cmp` `LeaseID` values in `Txn`.
- Add [`MoveLeader`](https://github.com/etcd-io/etcd/pull/8153) to `Maintenance`.
- Add [`HashKV`](https://github.com/etcd-io/etcd/pull/8351) to `Maintenance`.
- Add [`Leases`](https://github.com/etcd-io/etcd/pull/8358) to `Lease`.
- Add [`clientv3/ordering`](https://github.com/etcd-io/etcd/pull/8092) for enforce [ordering in serialized requests](https://github.com/etcd-io/etcd/issues/7623).
- Fix ["put at-most-once" violation](https://github.com/etcd-io/etcd/pull/8335).
- Fix [`WatchResponse.Canceled`](https://github.com/etcd-io/etcd/pull/8283) on [compacted watch request](https://github.com/etcd-io/etcd/issues/8231).
- Fix [`concurrency/stm` `Put` with serializable snapshot](https://github.com/etcd-io/etcd/pull/8439).
- Use store revision from first fetch to resolve write conflicts instead of modified revision.
### etcdctl v3
- Add [`etcdctl --discovery-srv`](https://github.com/etcd-io/etcd/pull/8462) flag.
- Add [`etcdctl --keepalive-time`, `--keepalive-timeout`](https://github.com/etcd-io/etcd/pull/8663) flags.
- Add [`etcdctl lease list`](https://github.com/etcd-io/etcd/pull/8358) command.
- Add [`etcdctl lease keep-alive --once`](https://github.com/etcd-io/etcd/pull/8775) flag.
- Make [`lease timetolive LEASE_ID`](https://github.com/etcd-io/etcd/issues/9028) on expired lease print [`lease LEASE_ID already expired`](https://github.com/etcd-io/etcd/pull/9047).
- <=3.2 prints `lease LEASE_ID granted with TTL(0s), remaining(-1s)`.
- Add [`etcdctl snapshot restore --wal-dir`](https://github.com/etcd-io/etcd/pull/9124) flag.
- Add [`etcdctl defrag --data-dir`](https://github.com/etcd-io/etcd/pull/8367) flag.
- Add [`etcdctl move-leader`](https://github.com/etcd-io/etcd/pull/8153) command.
- Add [`etcdctl endpoint hashkv`](https://github.com/etcd-io/etcd/pull/8351) command.
- Add [`etcdctl endpoint --cluster`](https://github.com/etcd-io/etcd/pull/8143) flag, equivalent to [v2 `etcdctl cluster-health`](https://github.com/etcd-io/etcd/issues/8117).
- Make `etcdctl endpoint health` command terminate with [non-zero exit code on unhealthy status](https://github.com/etcd-io/etcd/pull/8342).
- Add [`etcdctl lock --ttl`](https://github.com/etcd-io/etcd/pull/8370) flag.
- Support [`etcdctl watch [key] [range_end] -- [exec-command…]`](https://github.com/etcd-io/etcd/pull/8919), equivalent to [v2 `etcdctl exec-watch`](https://github.com/etcd-io/etcd/issues/8814).
- Make `etcdctl watch -- [exec-command]` set environmental variables [`ETCD_WATCH_REVISION`, `ETCD_WATCH_EVENT_TYPE`, `ETCD_WATCH_KEY`, `ETCD_WATCH_VALUE`](https://github.com/etcd-io/etcd/pull/9142) for each event.
- Support [`etcdctl watch` with environmental variables `ETCDCTL_WATCH_KEY` and `ETCDCTL_WATCH_RANGE_END`](https://github.com/etcd-io/etcd/pull/9142).
- Enable [`clientv3.WithRequireLeader(context.Context)` for `watch`](https://github.com/etcd-io/etcd/pull/8672) command.
- Print [`"del"` instead of `"delete"`](https://github.com/etcd-io/etcd/pull/8297) in `txn` interactive mode.
- Print [`ETCD_INITIAL_ADVERTISE_PEER_URLS` in `member add`](https://github.com/etcd-io/etcd/pull/8332).
### etcdctl v3
- Handle [empty key permission](https://github.com/etcd-io/etcd/pull/8514) in `etcdctl`.
### etcdctl v2
- Add [`etcdctl backup --with-v3`](https://github.com/etcd-io/etcd/pull/8479) flag.
### gRPC Proxy
- Add [`grpc-proxy start --experimental-leasing-prefix`](https://github.com/etcd-io/etcd/pull/8341) flag.
- For disconnected linearized reads.
- Based on [V system leasing](https://github.com/etcd-io/etcd/issues/6065).
- See ["Disconnected consistent reads with etcd" blog post](https://coreos.com/blog/coreos-labs-disconnected-consistent-reads-with-etcd).
- Add [`grpc-proxy start --experimental-serializable-ordering`](https://github.com/etcd-io/etcd/pull/8315) flag.
- To ensure serializable reads have monotonically increasing store revisions across endpoints.
- Add [`grpc-proxy start --metrics-addr`](https://github.com/etcd-io/etcd/pull/8242) flag for an additional `/metrics` endpoint.
- Set `--metrics-addr=http://[HOST]:9379` to serve `/metrics` in insecure port 9379.
- Serve [`/health` endpoint in grpc-proxy](https://github.com/etcd-io/etcd/pull/8322).
- Add [`grpc-proxy start --debug`](https://github.com/etcd-io/etcd/pull/8994) flag.
- Add [`grpc-proxy start --max-send-bytes`](https://github.com/etcd-io/etcd/pull/9250) flag to [configure maximum client request size](https://github.com/etcd-io/etcd/issues/7923).
- Add [`grpc-proxy start --max-recv-bytes`](https://github.com/etcd-io/etcd/pull/9250) flag to [configure maximum client request size](https://github.com/etcd-io/etcd/issues/7923).
- Fix [Snapshot API error handling](https://github.com/etcd-io/etcd/commit/dbd16d52fbf81e5fd806d21ff5e9148d5bf203ab).
- Fix [KV API `PrevKv` flag handling](https://github.com/etcd-io/etcd/pull/8366).
- Fix [KV API `KeysOnly` flag handling](https://github.com/etcd-io/etcd/pull/8552).
### gRPC gateway
- Replace [gRPC gateway](https://github.com/grpc-ecosystem/grpc-gateway) endpoint `/v3alpha` with [`/v3beta`](https://github.com/etcd-io/etcd/pull/8880).
- To deprecate [`/v3alpha`](https://github.com/etcd-io/etcd/issues/8125) in v3.4.
- In v3.3, `curl -L http://localhost:2379/v3alpha/kv/put -X POST -d '{"key": "Zm9v", "value": "YmFy"}'` still works as a fallback to `curl -L http://localhost:2379/v3beta/kv/put -X POST -d '{"key": "Zm9v", "value": "YmFy"}'`, but `curl -L http://localhost:2379/v3alpha/kv/put -X POST -d '{"key": "Zm9v", "value": "YmFy"}'` won't work in v3.4. Use `curl -L http://localhost:2379/v3beta/kv/put -X POST -d '{"key": "Zm9v", "value": "YmFy"}'` instead.
- Support ["authorization" token](https://github.com/etcd-io/etcd/pull/7999).
- Support [websocket for bi-directional streams](https://github.com/etcd-io/etcd/pull/8257).
- Fix [`Watch` API with gRPC gateway](https://github.com/etcd-io/etcd/issues/8237).
- Upgrade gRPC gateway to [v1.3.0](https://github.com/etcd-io/etcd/issues/8838).
### etcd server
- Fix [backend database in-memory index corruption](https://github.com/etcd-io/etcd/pull/8127) issue on restore (only 3.2.0 is affected).
- Fix [watch restore from snapshot](https://github.com/etcd-io/etcd/pull/8427).
- Fix [`mvcc/backend.defragdb` nil-pointer dereference on create bucket failure](https://github.com/etcd-io/etcd/pull/9119).
- Fix [server crash](https://github.com/etcd-io/etcd/pull/8010) on [invalid transaction request from gRPC gateway](https://github.com/etcd-io/etcd/issues/7889).
- Prevent [server panic from member update/add](https://github.com/etcd-io/etcd/pull/9174) with [wrong scheme URLs](https://github.com/etcd-io/etcd/issues/9173).
- Make [peer dial timeout longer](https://github.com/etcd-io/etcd/pull/8599).
- See [coreos/etcd-operator#1300](https://github.com/etcd-io/etcd-operator/issues/1300) for more detail.
- Make server [wait up to request time-out](https://github.com/etcd-io/etcd/pull/8267) with [pending RPCs](https://github.com/etcd-io/etcd/issues/8224).
- Fix [`grpc.Server` panic on `GracefulStop`](https://github.com/etcd-io/etcd/pull/8987) with [TLS-enabled server](https://github.com/etcd-io/etcd/issues/8916).
- Fix ["multiple peer URLs cannot start" issue](https://github.com/etcd-io/etcd/issues/8383).
- Fix server-side auth so [concurrent auth operations do not return old revision error](https://github.com/etcd-io/etcd/pull/8442).
- Handle [WAL renaming failure on Windows](https://github.com/etcd-io/etcd/pull/8286).
- Upgrade [`coreos/go-systemd`](https://github.com/coreos/go-systemd/releases) to `v15` (see https://github.com/coreos/go-systemd/releases/tag/v15).
- [Put back `/v2/machines`](https://github.com/etcd-io/etcd/pull/8062) endpoint for python-etcd wrapper.
### client v2
- [Fail-over v2 client](https://github.com/etcd-io/etcd/pull/8519) to next endpoint on [oneshot failure](https://github.com/etcd-io/etcd/issues/8515).
### Package `raft`
- Add [non-voting member](https://github.com/etcd-io/etcd/pull/8751).
- To implement [Raft thesis 4.2.1 Catching up new servers](https://github.com/etcd-io/etcd/issues/8568).
- `Learner` node does not vote or promote itself.
### Other
- Support previous two minor versions (see our [new release policy](https://github.com/etcd-io/etcd/pull/8805)).
- `v3.3.x` is the last release cycle that supports `ACI`.
- [AppC was officially suspended](https://github.com/appc/spec#-disclaimer-), as of late 2016.
- [`acbuild`](https://github.com/containers/build#this-project-is-currently-unmaintained) is not maintained anymore.
- `*.aci` files won't be available from etcd v3.4 release.
- Add container registry [`gcr.io/etcd-development/etcd`](https://gcr.io/etcd-development/etcd).
- [quay.io/coreos/etcd](https://quay.io/coreos/etcd) is still supported as secondary.
### Go
- Require [*Go 1.9+*](https://github.com/etcd-io/etcd/issues/6174).
- Compile with [*Go 1.9.3*](https://golang.org/doc/devel/release.html#go1.9).
- Deprecate [`golang.org/x/net/context`](https://github.com/etcd-io/etcd/pull/8511).
<hr>

View File

@ -1,557 +0,0 @@
Previous change logs can be found at [CHANGELOG-3.3](https://github.com/etcd-io/etcd/blob/master/CHANGELOG-3.3.md).
<hr>
## v3.4.0 (2019-08-30)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.3.0...v3.4.0) and [v3.4 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_4.md) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.4 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_4.md).**
### Documentation
- etcd now has a new website! Please visit https://etcd.io.
### Improved
- Add Raft learner: [etcd#10725](https://github.com/etcd-io/etcd/pull/10725), [etcd#10727](https://github.com/etcd-io/etcd/pull/10727), [etcd#10730](https://github.com/etcd-io/etcd/pull/10730).
- User guide: [runtime-configuration document](https://github.com/etcd-io/etcd/blob/master/Documentation/op-guide/runtime-configuration.md#add-a-new-member-as-learner).
- API change: [API reference document](https://github.com/etcd-io/etcd/blob/master/Documentation/dev-guide/api_reference_v3.md).
- More details on implementation: [learner design document](https://github.com/etcd-io/etcd/blob/master/Documentation/learning/design-learner.md) and [implementation task list](https://github.com/etcd-io/etcd/issues/10537).
- Rewrite [client balancer](https://github.com/etcd-io/etcd/pull/9860) with [new gRPC balancer interface](https://github.com/etcd-io/etcd/issues/9106).
- Upgrade [gRPC to v1.23.0](https://github.com/etcd-io/etcd/pull/10911).
- Improve [client balancer failover against secure endpoints](https://github.com/etcd-io/etcd/pull/10911).
- Fix ["kube-apiserver 1.13.x refuses to work when first etcd-server is not available" (kubernetes#72102)](https://github.com/kubernetes/kubernetes/issues/72102).
- Fix [gRPC panic "send on closed channel](https://github.com/etcd-io/etcd/issues/9956).
- Add [backoff on watch retries on transient errors](https://github.com/etcd-io/etcd/pull/9840).
- Add [jitter to watch progress notify](https://github.com/etcd-io/etcd/pull/9278) to prevent [spikes in `etcd_network_client_grpc_sent_bytes_total`](https://github.com/etcd-io/etcd/issues/9246).
- Improve [read index wait timeout warning log](https://github.com/etcd-io/etcd/pull/10026), which indicates that local node might have slow network.
- Improve [slow request apply warning log](https://github.com/etcd-io/etcd/pull/9288).
- e.g. `read-only range request "key:\"/a\" range_end:\"/b\" " with result "range_response_count:3 size:96" took too long (97.966µs) to execute`.
- Redact [request value field](https://github.com/etcd-io/etcd/pull/9822).
- Provide [response size](https://github.com/etcd-io/etcd/pull/9826).
- Improve ["became inactive" warning log](https://github.com/etcd-io/etcd/pull/10024), which indicates message send to a peer failed.
- Improve [TLS setup error logging](https://github.com/etcd-io/etcd/pull/9518) to help debug [TLS-enabled cluster configuring issues](https://github.com/etcd-io/etcd/issues/9400).
- Improve [long-running concurrent read transactions under light write workloads](https://github.com/etcd-io/etcd/pull/9296).
- Previously, periodic commit on pending writes blocks incoming read transactions, even if there is no pending write.
- Now, periodic commit operation does not block concurrent read transactions, thus improves long-running read transaction performance.
- Rebased [etcd#10523](https://github.com/etcd-io/etcd/pull/10523).
- Improve [Raft Read Index timeout warning messages](https://github.com/etcd-io/etcd/pull/9897).
- Adjust [election timeout on server restart](https://github.com/etcd-io/etcd/pull/9415) to reduce [disruptive rejoining servers](https://github.com/etcd-io/etcd/issues/9333).
- Previously, etcd fast-forwards election ticks on server start, with only one tick left for leader election. This is to speed up start phase, without having to wait until all election ticks elapse. Advancing election ticks is useful for cross datacenter deployments with larger election timeouts. However, it was affecting cluster availability if the last tick elapses before leader contacts the restarted node.
- Now, when etcd restarts, it adjusts election ticks with more than one tick left, thus more time for leader to prevent disruptive restart.
- Add [Raft Pre-Vote feature](https://github.com/etcd-io/etcd/pull/9352) to reduce [disruptive rejoining servers](https://github.com/etcd-io/etcd/issues/9333).
- For instance, a flaky(or rejoining) member may drop in and out, and start campaign. This member will end up with a higher term, and ignore all incoming messages with lower term. In this case, a new leader eventually need to get elected, thus disruptive to cluster availability. Raft implements Pre-Vote phase to prevent this kind of disruptions. If enabled, Raft runs an additional phase of election to check if pre-candidate can get enough votes to win an election.
- Adjust [periodic compaction retention window](https://github.com/etcd-io/etcd/pull/9485).
- e.g. `etcd --auto-compaction-mode=revision --auto-compaction-retention=1000` automatically `Compact` on `"latest revision" - 1000` every 5-minute (when latest revision is 30000, compact on revision 29000).
- e.g. Previously, `etcd --auto-compaction-mode=periodic --auto-compaction-retention=24h` automatically `Compact` with 24-hour retention windown for every 2.4-hour. Now, `Compact` happens for every 1-hour.
- e.g. Previously, `etcd --auto-compaction-mode=periodic --auto-compaction-retention=30m` automatically `Compact` with 30-minute retention windown for every 3-minute. Now, `Compact` happens for every 30-minute.
- Periodic compactor keeps recording latest revisions for every compaction period when given period is less than 1-hour, or for every 1-hour when given compaction period is greater than 1-hour (e.g. 1-hour when `etcd --auto-compaction-mode=periodic --auto-compaction-retention=24h`).
- For every compaction period or 1-hour, compactor uses the last revision that was fetched before compaction period, to discard historical data.
- The retention window of compaction period moves for every given compaction period or hour.
- For instance, when hourly writes are 100 and `etcd --auto-compaction-mode=periodic --auto-compaction-retention=24h`, `v3.2.x`, `v3.3.0`, `v3.3.1`, and `v3.3.2` compact revision 2400, 2640, and 2880 for every 2.4-hour, while `v3.3.3` *or later* compacts revision 2400, 2500, 2600 for every 1-hour.
- Futhermore, when `etcd --auto-compaction-mode=periodic --auto-compaction-retention=30m` and writes per minute are about 1000, `v3.3.0`, `v3.3.1`, and `v3.3.2` compact revision 30000, 33000, and 36000, for every 3-minute, while `v3.3.3` *or later* compacts revision 30000, 60000, and 90000, for every 30-minute.
- Improve [lease expire/revoke operation performance](https://github.com/etcd-io/etcd/pull/9418), address [lease scalability issue](https://github.com/etcd-io/etcd/issues/9496).
- Make [Lease `Lookup` non-blocking with concurrent `Grant`/`Revoke`](https://github.com/etcd-io/etcd/pull/9229).
- Make etcd server return `raft.ErrProposalDropped` on internal Raft proposal drop in [v3 applier](https://github.com/etcd-io/etcd/pull/9549) and [v2 applier](https://github.com/etcd-io/etcd/pull/9558).
- e.g. a node is removed from cluster, or [`raftpb.MsgProp` arrives at current leader while there is an ongoing leadership transfer](https://github.com/etcd-io/etcd/issues/8975).
- Add [`snapshot`](https://github.com/etcd-io/etcd/pull/9118) package for easier snapshot workflow (see [`godoc.org/github.com/etcd/clientv3/snapshot`](https://godoc.org/github.com/etcd-io/etcd/clientv3/snapshot) for more).
- Improve [functional tester](https://github.com/etcd-io/etcd/tree/master/functional) coverage: [proxy layer to run network fault tests in CI](https://github.com/etcd-io/etcd/pull/9081), [TLS is enabled both for server and client](https://github.com/etcd-io/etcd/pull/9534), [liveness mode](https://github.com/etcd-io/etcd/issues/9230), [shuffle test sequence](https://github.com/etcd-io/etcd/issues/9381), [membership reconfiguration failure cases](https://github.com/etcd-io/etcd/pull/9564), [disastrous quorum loss and snapshot recover from a seed member](https://github.com/etcd-io/etcd/pull/9565), [embedded etcd](https://github.com/etcd-io/etcd/pull/9572).
- Improve [index compaction blocking](https://github.com/etcd-io/etcd/pull/9511) by using a copy on write clone to avoid holding the lock for the traversal of the entire index.
- Update [JWT methods](https://github.com/etcd-io/etcd/pull/9883) to allow for use of any supported signature method/algorithm.
- Add [Lease checkpointing](https://github.com/etcd-io/etcd/pull/9924) to persist remaining TTLs to the consensus log periodically so that long lived leases progress toward expiry in the presence of leader elections and server restarts.
- Enabled by experimental flag "--experimental-enable-lease-checkpoint".
- Add [gRPC interceptor for debugging logs](https://github.com/etcd-io/etcd/pull/9990); enable `etcd --debug` flag to see per-request debug information.
- Add [consistency check in snapshot status](https://github.com/etcd-io/etcd/pull/10109). If consistency check on snapshot file fails, `snapshot status` returns `"snapshot file integrity check failed..."` error.
- Add [`Verify` function to perform corruption check on WAL contents](https://github.com/etcd-io/etcd/pull/10603).
- Improve [heartbeat send failure logging](https://github.com/etcd-io/etcd/pull/10663).
- Support [users with no password](https://github.com/etcd-io/etcd/pull/9817) for reducing security risk introduced by leaked password. The users can only be authenticated with CommonName based auth.
- Add flag `--experimental-peer-skip-client-san-verification` to [skip verification of peer client address](https://github.com/etcd-io/etcd/pull/10524)
### Breaking Changes
- Require [*Go 1.12+*](https://github.com/etcd-io/etcd/pull/10045).
- Use [Go module](https://github.com/etcd-io/etcd/pull/10063) for dependency management.
- Move [`"github.com/coreos/etcd"`](https://github.com/etcd-io/etcd/issues/9965) to [`"github.com/etcd-io/etcd"`](https://github.com/etcd-io/etcd/issues/9965).
- Change import path to `"go.etcd.io/etcd"`.
- e.g. `import "go.etcd.io/etcd/raft"`.
- Make [`ETCDCTL_API=3 etcdctl` default](https://github.com/etcd-io/etcd/issues/9600).
- Now, `etcdctl set foo bar` must be `ETCDCTL_API=2 etcdctl set foo bar`.
- Now, `ETCDCTL_API=3 etcdctl put foo bar` could be just `etcdctl put foo bar`.
- **Remove `etcd --ca-file` flag**, instead [use `etcd --trusted-ca-file`](https://github.com/etcd-io/etcd/pull/9470) (`etcd --ca-file` flag has been marked deprecated since v2.1).
- **Remove `etcd --peer-ca-file` flag**, instead [use `etcd --peer-trusted-ca-file`](https://github.com/etcd-io/etcd/pull/9470) (`etcd --peer-ca-file` flag has been marked deprecated since v2.1).
- **Remove `pkg/transport.TLSInfo.CAFile` field**, instead [use `pkg/transport.TLSInfo.TrustedCAFile`](https://github.com/etcd-io/etcd/pull/9470) (`CAFile` field has been marked deprecated since v2.1).
- Deprecated `latest` [release container](https://console.cloud.google.com/gcr/images/etcd-development/GLOBAL/etcd) tag.
- **`docker pull gcr.io/etcd-development/etcd:latest` would not be up-to-date**.
- Deprecated [minor](https://semver.org/) version [release container](https://console.cloud.google.com/gcr/images/etcd-development/GLOBAL/etcd) tags.
- `docker pull gcr.io/etcd-development/etcd:v3.3` would still work.
- **`docker pull gcr.io/etcd-development/etcd:v3.4` would not work**.
- Use **`docker pull gcr.io/etcd-development/etcd:v3.4.x`** instead, with the exact patch version.
- Drop [ACIs from official release](https://github.com/etcd-io/etcd/pull/9059).
- [AppC was officially suspended](https://github.com/appc/spec#-disclaimer-), as of late 2016.
- [`acbuild`](https://github.com/containers/build#this-project-is-currently-unmaintained) is not maintained anymore.
- `*.aci` files are not available from `v3.4` release.
- Exit on [empty hosts in advertise URLs](https://github.com/etcd-io/etcd/pull/8786).
- Address [advertise client URLs accepts empty hosts](https://github.com/etcd-io/etcd/issues/8379).
- e.g. exit with error on `--advertise-client-urls=http://:2379`.
- e.g. exit with error on `--initial-advertise-peer-urls=http://:2380`.
- Exit on [shadowed environment variables](https://github.com/etcd-io/etcd/pull/9382).
- Address [error on shadowed environment variables](https://github.com/etcd-io/etcd/issues/8380).
- e.g. exit with error on `ETCD_NAME=abc etcd --name=def`.
- e.g. exit with error on `ETCD_INITIAL_CLUSTER_TOKEN=abc etcd --initial-cluster-token=def`.
- e.g. exit with error on `ETCDCTL_ENDPOINTS=abc.com ETCDCTL_API=3 etcdctl endpoint health --endpoints=def.com`.
- Change [`etcdserverpb.AuthRoleRevokePermissionRequest/key,range_end` fields type from `string` to `bytes`](https://github.com/etcd-io/etcd/pull/9433).
- Deprecating `etcd_debugging_mvcc_db_total_size_in_bytes` Prometheus metric (to be removed in v3.5). Use [`etcd_mvcc_db_total_size_in_bytes`](https://github.com/etcd-io/etcd/pull/9819) instead.
- Deprecating `etcd_debugging_mvcc_put_total` Prometheus metric (to be removed in v3.5). Use [`etcd_mvcc_put_total`](https://github.com/etcd-io/etcd/pull/10962) instead.
- Deprecating `etcd_debugging_mvcc_delete_total` Prometheus metric (to be removed in v3.5). Use [`etcd_mvcc_delete_total`](https://github.com/etcd-io/etcd/pull/10962) instead.
- Deprecating `etcd_debugging_mvcc_range_total` Prometheus metric (to be removed in v3.5). Use [`etcd_mvcc_range_total`](https://github.com/etcd-io/etcd/pull/10968) instead.
- Deprecating `etcd_debugging_mvcc_txn_total`Prometheus metric (to be removed in v3.5). Use [`etcd_mvcc_txn_total`](https://github.com/etcd-io/etcd/pull/10968) instead.
- Rename `etcdserver.ServerConfig.SnapCount` field to `etcdserver.ServerConfig.SnapshotCount`, to be consistent with the flag name `etcd --snapshot-count`.
- Rename `embed.Config.SnapCount` field to [`embed.Config.SnapshotCount`](https://github.com/etcd-io/etcd/pull/9745), to be consistent with the flag name `etcd --snapshot-count`.
- Change [`embed.Config.CorsInfo` in `*cors.CORSInfo` type to `embed.Config.CORS` in `map[string]struct{}` type](https://github.com/etcd-io/etcd/pull/9490).
- Remove [`embed.Config.SetupLogging`](https://github.com/etcd-io/etcd/pull/9572).
- Now logger is set up automatically based on [`embed.Config.Logger`, `embed.Config.LogOutputs`, `embed.Config.Debug` fields](https://github.com/etcd-io/etcd/pull/9572).
- Rename [`etcd --log-output` to `etcd --log-outputs`](https://github.com/etcd-io/etcd/pull/9624) to support multiple log outputs.
- **`etcd --log-output`** will be deprecated in v3.5.
- Rename [**`embed.Config.LogOutput`** to **`embed.Config.LogOutputs`**](https://github.com/etcd-io/etcd/pull/9624) to support multiple log outputs.
- Change [**`embed.Config.LogOutputs`** type from `string` to `[]string`](https://github.com/etcd-io/etcd/pull/9579) to support multiple log outputs.
- Now that `etcd --log-outputs` accepts multiple writers, etcd configuration YAML file `log-outputs` field must be changed to `[]string` type.
- Previously, `etcd --config-file etcd.config.yaml` can have `log-outputs: default` field, now must be `log-outputs: [default]`.
- Deprecating [`etcd --debug`](https://github.com/etcd-io/etcd/pull/10947) flag. Use `etcd --log-level=debug` flag instead.
- v3.5 will deprecate `etcd --debug` flag in favor of `etcd --log-level=debug`.
- Change v3 `etcdctl snapshot` exit codes with [`snapshot` package](https://github.com/etcd-io/etcd/pull/9118/commits/df689f4280e1cce4b9d61300be13ca604d41670a).
- Exit on error with exit code 1 (no more exit code 5 or 6 on `snapshot save/restore` commands).
- Migrate dependency management tool from `glide` to [`golang/dep`](https://github.com/etcd-io/etcd/pull/9155).
- <= 3.3 puts `vendor` directory under `cmd/vendor` directory to [prevent conflicting transitive dependencies](https://github.com/etcd-io/etcd/issues/4913).
- 3.4 moves `cmd/vendor` directory to `vendor` at repository root.
- Remove recursive symlinks in `cmd` directory.
- Now `go get/install/build` on `etcd` packages (e.g. `clientv3`, `tools/benchmark`) enforce builds with etcd `vendor` directory.
- Replace [gRPC gateway](https://github.com/grpc-ecosystem/grpc-gateway) endpoint `/v3beta` with [`/v3`](https://github.com/etcd-io/etcd/pull/9298).
- Deprecated [`/v3alpha`](https://github.com/etcd-io/etcd/pull/9298).
- To deprecate [`/v3beta`](https://github.com/etcd-io/etcd/issues/9189) in v3.5.
- In v3.4, `curl -L http://localhost:2379/v3beta/kv/put -X POST -d '{"key": "Zm9v", "value": "YmFy"}'` still works as a fallback to `curl -L http://localhost:2379/v3/kv/put -X POST -d '{"key": "Zm9v", "value": "YmFy"}'`, but `curl -L http://localhost:2379/v3beta/kv/put -X POST -d '{"key": "Zm9v", "value": "YmFy"}'` won't work in v3.5. Use `curl -L http://localhost:2379/v3/kv/put -X POST -d '{"key": "Zm9v", "value": "YmFy"}'` instead.
- Change [`wal` package function signatures](https://github.com/etcd-io/etcd/pull/9572) to support [structured logger and logging to file](https://github.com/etcd-io/etcd/issues/9438) in server-side.
- Previously, `Open(dirpath string, snap walpb.Snapshot) (*WAL, error)`, now `Open(lg *zap.Logger, dirpath string, snap walpb.Snapshot) (*WAL, error)`.
- Previously, `OpenForRead(dirpath string, snap walpb.Snapshot) (*WAL, error)`, now `OpenForRead(lg *zap.Logger, dirpath string, snap walpb.Snapshot) (*WAL, error)`.
- Previously, `Repair(dirpath string) bool`, now `Repair(lg *zap.Logger, dirpath string) bool`.
- Previously, `Create(dirpath string, metadata []byte) (*WAL, error)`, now `Create(lg *zap.Logger, dirpath string, metadata []byte) (*WAL, error)`.
- Remove [`pkg/cors` package](https://github.com/etcd-io/etcd/pull/9490).
- Move internal packages to `etcdserver`.
- `"github.com/coreos/etcd/alarm"` to `"go.etcd.io/etcd/etcdserver/api/v3alarm"`.
- `"github.com/coreos/etcd/compactor"` to `"go.etcd.io/etcd/etcdserver/api/v3compactor"`.
- `"github.com/coreos/etcd/discovery"` to `"go.etcd.io/etcd/etcdserver/api/v2discovery"`.
- `"github.com/coreos/etcd/etcdserver/auth"` to `"go.etcd.io/etcd/etcdserver/api/v2auth"`.
- `"github.com/coreos/etcd/etcdserver/membership"` to `"go.etcd.io/etcd/etcdserver/api/membership"`.
- `"github.com/coreos/etcd/etcdserver/stats"` to `"go.etcd.io/etcd/etcdserver/api/v2stats"`.
- `"github.com/coreos/etcd/error"` to `"go.etcd.io/etcd/etcdserver/api/v2error"`.
- `"github.com/coreos/etcd/rafthttp"` to `"go.etcd.io/etcd/etcdserver/api/rafthttp"`.
- `"github.com/coreos/etcd/snap"` to `"go.etcd.io/etcd/etcdserver/api/snap"`.
- `"github.com/coreos/etcd/store"` to `"go.etcd.io/etcd/etcdserver/api/v2store"`.
- Change [snapshot file permissions](https://github.com/etcd-io/etcd/pull/9977): On Linux, the snapshot file changes from readable by all (mode 0644) to readable by the user only (mode 0600).
- Change [`pkg/adt.IntervalTree` from `struct` to `interface`](https://github.com/etcd-io/etcd/pull/10959).
- See [`pkg/adt` README](https://github.com/etcd-io/etcd/tree/master/pkg/adt) and [`pkg/adt` godoc](https://godoc.org/go.etcd.io/etcd/pkg/adt).
- Release branch `/version` defines version `3.4.x-pre`, instead of `3.4.y+git`.
- Use `3.4.5-pre`, instead of `3.4.4+git`.
### Dependency
- Upgrade [`github.com/coreos/bbolt`](https://github.com/etcd-io/bbolt/releases) from [**`v1.3.1-coreos.6`**](https://github.com/etcd-io/bbolt/releases/tag/v1.3.1-coreos.6) to [`go.etcd.io/bbolt`](https://github.com/etcd-io/bbolt/releases) [**`v1.3.3`**](https://github.com/etcd-io/bbolt/releases/tag/v1.3.3).
- Upgrade [`google.golang.org/grpc`](https://github.com/grpc/grpc-go/releases) from [**`v1.7.5`**](https://github.com/grpc/grpc-go/releases/tag/v1.7.5) to [**`v1.23.0`**](https://github.com/grpc/grpc-go/releases/tag/v1.23.0).
- Migrate [`github.com/ugorji/go/codec`](https://github.com/ugorji/go/releases) to [**`github.com/json-iterator/go`**](https://github.com/json-iterator/go), to [regenerate v2 `client`](https://github.com/etcd-io/etcd/pull/9494) (See [#10667](https://github.com/etcd-io/etcd/pull/10667) for more).
- Migrate [`github.com/ghodss/yaml`](https://github.com/ghodss/yaml/releases) to [**`sigs.k8s.io/yaml`**](https://github.com/kubernetes-sigs/yaml) (See [#10687](https://github.com/etcd-io/etcd/pull/10687) for more).
- Upgrade [`golang.org/x/crypto`](https://github.com/golang/crypto) from [**`crypto@9419663f5`**](https://github.com/golang/crypto/commit/9419663f5a44be8b34ca85f08abc5fe1be11f8a3) to [**`crypto@0709b304e793`**](https://github.com/golang/crypto/commit/0709b304e793a5edb4a2c0145f281ecdc20838a4).
- Upgrade [`golang.org/x/net`](https://github.com/golang/net) from [**`net@66aacef3d`**](https://github.com/golang/net/commit/66aacef3dd8a676686c7ae3716979581e8b03c47) to [**`net@adae6a3d119a`**](https://github.com/golang/net/commit/adae6a3d119ae4890b46832a2e88a95adc62b8e7).
- Upgrade [`golang.org/x/sys`](https://github.com/golang/sys) from [**`sys@ebfc5b463`**](https://github.com/golang/sys/commit/ebfc5b4631820b793c9010c87fd8fef0f39eb082) to [**`sys@56ede360e`**](https://github.com/golang/sys/commit/56ede360ec1c541828fb88741b3f1049406d28f5).
- Upgrade [`golang.org/x/text`](https://github.com/golang/text) from [**`text@b19bf474d`**](https://github.com/golang/text/commit/b19bf474d317b857955b12035d2c5acb57ce8b01) to [**`v0.3.0`**](https://github.com/golang/text/releases/tag/v0.3.0).
- Upgrade [`golang.org/x/time`](https://github.com/golang/time) from [**`time@c06e80d93`**](https://github.com/golang/time/commit/c06e80d9300e4443158a03817b8a8cb37d230320) to [**`time@fbb02b229`**](https://github.com/golang/time/commit/fbb02b2291d28baffd63558aa44b4b56f178d650).
- Upgrade [`github.com/golang/protobuf`](https://github.com/golang/protobuf/releases) from [**`golang/protobuf@1e59b77b5`**](https://github.com/golang/protobuf/commit/1e59b77b52bf8e4b449a57e6f79f21226d571845) to [**`v1.3.2`**](https://github.com/golang/protobuf/releases/tag/v1.3.2).
- Upgrade [`gopkg.in/yaml.v2`](https://github.com/go-yaml/yaml/releases) from [**`yaml@cd8b52f82`**](https://github.com/go-yaml/yaml/commit/cd8b52f8269e0feb286dfeef29f8fe4d5b397e0b) to [**`yaml@5420a8b67`**](https://github.com/go-yaml/yaml/commit/5420a8b6744d3b0345ab293f6fcba19c978f1183).
- Upgrade [`github.com/dgrijalva/jwt-go`](https://github.com/dgrijalva/jwt-go/releases) from [**`v3.0.0`**](https://github.com/dgrijalva/jwt-go/releases/tag/v3.0.0) to [**`v3.2.0`**](https://github.com/dgrijalva/jwt-go/releases/tag/v3.2.0).
- Upgrade [`github.com/soheilhy/cmux`](https://github.com/soheilhy/cmux/releases) from [**`v0.1.3`**](https://github.com/soheilhy/cmux/releases/tag/v0.1.3) to [**`v0.1.4`**](https://github.com/soheilhy/cmux/releases/tag/v0.1.4).
- Upgrade [`github.com/google/btree`](https://github.com/google/btree/releases) from [**`google/btree@925471ac9`**](https://github.com/google/btree/commit/925471ac9e2131377a91e1595defec898166fe49) to [**`v1.0.0`**](https://github.com/google/btree/releases/tag/v1.0.0).
- Upgrade [`github.com/spf13/cobra`](https://github.com/spf13/cobra/releases) from [**`spf13/cobra@1c44ec8d3`**](https://github.com/spf13/cobra/commit/1c44ec8d3f1552cac48999f9306da23c4d8a288b) to [**`v0.0.3`**](https://github.com/spf13/cobra/releases/tag/v0.0.3).
- Upgrade [`github.com/spf13/pflag`](https://github.com/spf13/pflag/releases) from [**`v1.0.0`**](https://github.com/spf13/pflag/releases/tag/v1.0.0) to [**`spf13/pflag@1ce0cc6db`**](https://github.com/spf13/pflag/commit/1ce0cc6db4029d97571db82f85092fccedb572ce).
- Upgrade [`github.com/coreos/go-systemd`](https://github.com/coreos/go-systemd/releases) from [**`v15`**](https://github.com/coreos/go-systemd/releases/tag/v15) to [**`v17`**](https://github.com/coreos/go-systemd/releases/tag/v17).
- Upgrade [`github.com/prometheus/client_golang`](https://github.com/prometheus/client_golang/releases) from [**``prometheus/client_golang@5cec1d042``**](https://github.com/prometheus/client_golang/commit/5cec1d0429b02e4323e042eb04dafdb079ddf568) to [**`v1.0.0`**](https://github.com/prometheus/client_golang/releases/tag/v1.0.0).
- Upgrade [`github.com/grpc-ecosystem/go-grpc-prometheus`](https://github.com/grpc-ecosystem/go-grpc-prometheus/releases) from [**``grpc-ecosystem/go-grpc-prometheus@0dafe0d49``**](https://github.com/grpc-ecosystem/go-grpc-prometheus/commit/0dafe0d496ea71181bf2dd039e7e3f44b6bd11a7) to [**`v1.2.0`**](https://github.com/grpc-ecosystem/go-grpc-prometheus/releases/tag/v1.2.0).
- Upgrade [`github.com/grpc-ecosystem/grpc-gateway`](https://github.com/grpc-ecosystem/grpc-gateway/releases) from [**`v1.3.1`**](https://github.com/grpc-ecosystem/grpc-gateway/releases/tag/v1.3.1) to [**`v1.4.1`**](https://github.com/grpc-ecosystem/grpc-gateway/releases/tag/v1.4.1).
- Migrate [`github.com/kr/pty`](https://github.com/kr/pty/releases) to [**`github.com/creack/pty`**](https://github.com/creack/pty/releases/tag/v1.1.7), as the later has replaced the original module.
- Upgrade [`github.com/gogo/protobuf`](https://github.com/gogo/protobuf/releases) from [**`v1.0.0`**](https://github.com/gogo/protobuf/releases/tag/v1.0.0) to [**`v1.2.1`**](https://github.com/gogo/protobuf/releases/tag/v1.2.1).
### Metrics, Monitoring
Note that any `etcd_debugging_*` metrics are experimental and subject to change.
- Add [`etcd_snap_db_fsync_duration_seconds_count`](https://github.com/etcd-io/etcd/pull/9997) Prometheus metric.
- Add [`etcd_snap_db_save_total_duration_seconds_bucket`](https://github.com/etcd-io/etcd/pull/9997) Prometheus metric.
- Add [`etcd_network_snapshot_send_success`](https://github.com/etcd-io/etcd/pull/9997) Prometheus metric.
- Add [`etcd_network_snapshot_send_failures`](https://github.com/etcd-io/etcd/pull/9997) Prometheus metric.
- Add [`etcd_network_snapshot_send_total_duration_seconds`](https://github.com/etcd-io/etcd/pull/9997) Prometheus metric.
- Add [`etcd_network_snapshot_receive_success`](https://github.com/etcd-io/etcd/pull/9997) Prometheus metric.
- Add [`etcd_network_snapshot_receive_failures`](https://github.com/etcd-io/etcd/pull/9997) Prometheus metric.
- Add [`etcd_network_snapshot_receive_total_duration_seconds`](https://github.com/etcd-io/etcd/pull/9997) Prometheus metric.
- Add [`etcd_network_active_peers`](https://github.com/etcd-io/etcd/pull/9762) Prometheus metric.
- Let's say `"7339c4e5e833c029"` server `/metrics` returns `etcd_network_active_peers{Local="7339c4e5e833c029",Remote="729934363faa4a24"} 1` and `etcd_network_active_peers{Local="7339c4e5e833c029",Remote="b548c2511513015"} 1`. This indicates that the local node `"7339c4e5e833c029"` currently has two active remote peers `"729934363faa4a24"` and `"b548c2511513015"` in a 3-node cluster. If the node `"b548c2511513015"` is down, the local node `"7339c4e5e833c029"` will show `etcd_network_active_peers{Local="7339c4e5e833c029",Remote="729934363faa4a24"} 1` and `etcd_network_active_peers{Local="7339c4e5e833c029",Remote="b548c2511513015"} 0`.
- Add [`etcd_network_disconnected_peers_total`](https://github.com/etcd-io/etcd/pull/9762) Prometheus metric.
- If a remote peer `"b548c2511513015"` is down, the local node `"7339c4e5e833c029"` server `/metrics` would return `etcd_network_disconnected_peers_total{Local="7339c4e5e833c029",Remote="b548c2511513015"} 1`, while active peer metrics will show `etcd_network_active_peers{Local="7339c4e5e833c029",Remote="729934363faa4a24"} 1` and `etcd_network_active_peers{Local="7339c4e5e833c029",Remote="b548c2511513015"} 0`.
- Add [`etcd_network_server_stream_failures_total`](https://github.com/etcd-io/etcd/pull/9760) Prometheus metric.
- e.g. `etcd_network_server_stream_failures_total{API="lease-keepalive",Type="receive"} 1`
- e.g. `etcd_network_server_stream_failures_total{API="watch",Type="receive"} 1`
- Improve [`etcd_network_peer_round_trip_time_seconds`](https://github.com/etcd-io/etcd/pull/10155) Prometheus metric to track leader heartbeats.
- Previously, it only samples the TCP connection for snapshot messages.
- Increase [`etcd_network_peer_round_trip_time_seconds`](https://github.com/etcd-io/etcd/pull/9762) Prometheus metric histogram upper-bound.
- Previously, highest bucket only collects requests taking 0.8192 seconds or more.
- Now, highest buckets collect 0.8192 seconds, 1.6384 seconds, and 3.2768 seconds or more.
- Add [`etcd_server_is_leader`](https://github.com/etcd-io/etcd/pull/9587) Prometheus metric.
- Add [`etcd_server_id`](https://github.com/etcd-io/etcd/pull/9998) Prometheus metric.
- Add [`etcd_cluster_version`](https://github.com/etcd-io/etcd/pull/10257) Prometheus metric.
- Add [`etcd_server_version`](https://github.com/etcd-io/etcd/pull/8960) Prometheus metric.
- To replace [Kubernetes `etcd-version-monitor`](https://github.com/etcd-io/etcd/issues/8948).
- Add [`etcd_server_go_version`](https://github.com/etcd-io/etcd/pull/9957) Prometheus metric.
- Add [`etcd_server_health_success`](https://github.com/etcd-io/etcd/pull/10156) Prometheus metric.
- Add [`etcd_server_health_failures`](https://github.com/etcd-io/etcd/pull/10156) Prometheus metric.
- Add [`etcd_server_read_indexes_failed_total`](https://github.com/etcd-io/etcd/pull/10094) Prometheus metric.
- Add [`etcd_server_heartbeat_send_failures_total`](https://github.com/etcd-io/etcd/pull/9761) Prometheus metric.
- Add [`etcd_server_slow_apply_total`](https://github.com/etcd-io/etcd/pull/9761) Prometheus metric.
- Add [`etcd_server_slow_read_indexes_total`](https://github.com/etcd-io/etcd/pull/9897) Prometheus metric.
- Add [`etcd_server_quota_backend_bytes`](https://github.com/etcd-io/etcd/pull/9820) Prometheus metric.
- Use it with `etcd_mvcc_db_total_size_in_bytes` and `etcd_mvcc_db_total_size_in_use_in_bytes`.
- `etcd_server_quota_backend_bytes 2.147483648e+09` means current quota size is 2 GB.
- `etcd_mvcc_db_total_size_in_bytes 20480` means current physically allocated DB size is 20 KB.
- `etcd_mvcc_db_total_size_in_use_in_bytes 16384` means future DB size if defragment operation is complete.
- `etcd_mvcc_db_total_size_in_bytes - etcd_mvcc_db_total_size_in_use_in_bytes` is the number of bytes that can be saved on disk with defragment operation.
- Add [`etcd_mvcc_db_total_size_in_use_in_bytes`](https://github.com/etcd-io/etcd/pull/9256) Prometheus metric.
- Use it with `etcd_mvcc_db_total_size_in_bytes` and `etcd_mvcc_db_total_size_in_use_in_bytes`.
- `etcd_server_quota_backend_bytes 2.147483648e+09` means current quota size is 2 GB.
- `etcd_mvcc_db_total_size_in_bytes 20480` means current physically allocated DB size is 20 KB.
- `etcd_mvcc_db_total_size_in_use_in_bytes 16384` means future DB size if defragment operation is complete.
- `etcd_mvcc_db_total_size_in_bytes - etcd_mvcc_db_total_size_in_use_in_bytes` is the number of bytes that can be saved on disk with defragment operation.
- Add [`etcd_snap_fsync_duration_seconds`](https://github.com/etcd-io/etcd/pull/9762) Prometheus metric.
- Add [`etcd_disk_backend_defrag_duration_seconds`](https://github.com/etcd-io/etcd/pull/9761) Prometheus metric.
- Add [`etcd_mvcc_hash_duration_seconds`](https://github.com/etcd-io/etcd/pull/9761) Prometheus metric.
- Add [`etcd_mvcc_hash_rev_duration_seconds`](https://github.com/etcd-io/etcd/pull/9761) Prometheus metric.
- Add [`etcd_debugging_disk_backend_commit_rebalance_duration_seconds`](https://github.com/etcd-io/etcd/pull/9834) Prometheus metric.
- Add [`etcd_debugging_disk_backend_commit_spill_duration_seconds`](https://github.com/etcd-io/etcd/pull/9834) Prometheus metric.
- Add [`etcd_debugging_disk_backend_commit_write_duration_seconds`](https://github.com/etcd-io/etcd/pull/9834) Prometheus metric.
- Add [`etcd_debugging_lease_granted_total`](https://github.com/etcd-io/etcd/pull/9778) Prometheus metric.
- Add [`etcd_debugging_lease_revoked_total`](https://github.com/etcd-io/etcd/pull/9778) Prometheus metric.
- Add [`etcd_debugging_lease_renewed_total`](https://github.com/etcd-io/etcd/pull/9778) Prometheus metric.
- Add [`etcd_debugging_lease_ttl_total`](https://github.com/etcd-io/etcd/pull/9778) Prometheus metric.
- Add [`etcd_server_is_learner`](https://github.com/etcd-io/etcd/pull/10731) Prometheus metric.
- Add [`etcd_server_learner_promote_failures`](https://github.com/etcd-io/etcd/pull/10731) Prometheus metric.
- Add [`etcd_server_learner_promote_successes`](https://github.com/etcd-io/etcd/pull/10731) Prometheus metric.
- Increase [`etcd_debugging_mvcc_index_compaction_pause_duration_milliseconds`](https://github.com/etcd-io/etcd/pull/9762) Prometheus metric histogram upper-bound.
- Previously, highest bucket only collects requests taking 1.024 seconds or more.
- Now, highest buckets collect 1.024 seconds, 2.048 seconds, and 4.096 seconds or more.
- Fix missing [`etcd_network_peer_sent_failures_total`](https://github.com/etcd-io/etcd/pull/9437) Prometheus metric count.
- Fix [`etcd_debugging_server_lease_expired_total`](https://github.com/etcd-io/etcd/pull/9557) Prometheus metric.
- Fix [race conditions in v2 server stat collecting](https://github.com/etcd-io/etcd/pull/9562).
- Change [gRPC proxy to expose etcd server endpoint /metrics](https://github.com/etcd-io/etcd/pull/10618).
- The metrics that were exposed via the proxy were not etcd server members but instead the proxy itself.
- Fix bug where [db_compaction_total_duration_milliseconds metric incorrectly measured duration as 0](https://github.com/etcd-io/etcd/pull/10646).
- Deprecating `etcd_debugging_mvcc_db_total_size_in_bytes` Prometheus metric (to be removed in v3.5). Use [`etcd_mvcc_db_total_size_in_bytes`](https://github.com/etcd-io/etcd/pull/9819) instead.
- Deprecating `etcd_debugging_mvcc_put_total` Prometheus metric (to be removed in v3.5). Use [`etcd_mvcc_put_total`](https://github.com/etcd-io/etcd/pull/10962) instead.
- Deprecating `etcd_debugging_mvcc_delete_total` Prometheus metric (to be removed in v3.5). Use [`etcd_mvcc_delete_total`](https://github.com/etcd-io/etcd/pull/10962) instead.
- Deprecating `etcd_debugging_mvcc_range_total` Prometheus metric (to be removed in v3.5). Use [`etcd_mvcc_range_total`](https://github.com/etcd-io/etcd/pull/10968) instead.
- Deprecating `etcd_debugging_mvcc_txn_total`Prometheus metric (to be removed in v3.5). Use [`etcd_mvcc_txn_total`](https://github.com/etcd-io/etcd/pull/10968) instead.
### Security, Authentication
See [security doc](https://github.com/etcd-io/etcd/blob/master/Documentation/op-guide/security.md) for more details.
- Support TLS cipher suite whitelisting.
- To block [weak cipher suites](https://github.com/etcd-io/etcd/issues/8320).
- TLS handshake fails when client hello is requested with invalid cipher suites.
- Add [`etcd --cipher-suites`](https://github.com/etcd-io/etcd/pull/9801) flag.
- If empty, Go auto-populates the list.
- Add [`etcd --host-whitelist`](https://github.com/etcd-io/etcd/pull/9372) flag, [`etcdserver.Config.HostWhitelist`](https://github.com/etcd-io/etcd/pull/9372), and [`embed.Config.HostWhitelist`](https://github.com/etcd-io/etcd/pull/9372), to prevent ["DNS Rebinding"](https://en.wikipedia.org/wiki/DNS_rebinding) attack.
- Any website can simply create an authorized DNS name, and direct DNS to `"localhost"` (or any other address). Then, all HTTP endpoints of etcd server listening on `"localhost"` becomes accessible, thus vulnerable to [DNS rebinding attacks (CVE-2018-5702)](https://bugs.chromium.org/p/project-zero/issues/detail?id=1447#c2).
- Client origin enforce policy works as follow:
- If client connection is secure via HTTPS, allow any hostnames..
- If client connection is not secure and `"HostWhitelist"` is not empty, only allow HTTP requests whose Host field is listed in whitelist.
- By default, `"HostWhitelist"` is `"*"`, which means insecure server allows all client HTTP requests.
- Note that the client origin policy is enforced whether authentication is enabled or not, for tighter controls.
- When specifying hostnames, loopback addresses are not added automatically. To allow loopback interfaces, add them to whitelist manually (e.g. `"localhost"`, `"127.0.0.1"`, etc.).
- e.g. `etcd --host-whitelist example.com`, then the server will reject all HTTP requests whose Host field is not `example.com` (also rejects requests to `"localhost"`).
- Support [`etcd --cors`](https://github.com/etcd-io/etcd/pull/9490) in v3 HTTP requests (gRPC gateway).
- Support [`ttl` field for `etcd` Authentication JWT token](https://github.com/etcd-io/etcd/pull/8302).
- e.g. `etcd --auth-token jwt,pub-key=<pub key path>,priv-key=<priv key path>,sign-method=<sign method>,ttl=5m`.
- Allow empty token provider in [`etcdserver.ServerConfig.AuthToken`](https://github.com/etcd-io/etcd/pull/9369).
- Fix [TLS reload](https://github.com/etcd-io/etcd/pull/9570) when [certificate SAN field only includes IP addresses but no domain names](https://github.com/etcd-io/etcd/issues/9541).
- In Go, server calls `(*tls.Config).GetCertificate` for TLS reload if and only if server's `(*tls.Config).Certificates` field is not empty, or `(*tls.ClientHelloInfo).ServerName` is not empty with a valid SNI from the client. Previously, etcd always populates `(*tls.Config).Certificates` on the initial client TLS handshake, as non-empty. Thus, client was always expected to supply a matching SNI in order to pass the TLS verification and to trigger `(*tls.Config).GetCertificate` to reload TLS assets.
- However, a certificate whose SAN field does [not include any domain names but only IP addresses](https://github.com/etcd-io/etcd/issues/9541) would request `*tls.ClientHelloInfo` with an empty `ServerName` field, thus failing to trigger the TLS reload on initial TLS handshake; this becomes a problem when expired certificates need to be replaced online.
- Now, `(*tls.Config).Certificates` is created empty on initial TLS client handshake, first to trigger `(*tls.Config).GetCertificate`, and then to populate rest of the certificates on every new TLS connection, even when client SNI is empty (e.g. cert only includes IPs).
### etcd server
- Add [`rpctypes.ErrLeaderChanged`](https://github.com/etcd-io/etcd/pull/10094).
- Now linearizable requests with read index would fail fast when there is a leadership change, instead of waiting until context timeout.
- Add [`etcd --initial-election-tick-advance`](https://github.com/etcd-io/etcd/pull/9591) flag to configure initial election tick fast-forward.
- By default, `etcd --initial-election-tick-advance=true`, then local member fast-forwards election ticks to speed up "initial" leader election trigger.
- This benefits the case of larger election ticks. For instance, cross datacenter deployment may require longer election timeout of 10-second. If true, local node does not need wait up to 10-second. Instead, forwards its election ticks to 8-second, and have only 2-second left before leader election.
- Major assumptions are that: cluster has no active leader thus advancing ticks enables faster leader election. Or cluster already has an established leader, and rejoining follower is likely to receive heartbeats from the leader after tick advance and before election timeout.
- However, when network from leader to rejoining follower is congested, and the follower does not receive leader heartbeat within left election ticks, disruptive election has to happen thus affecting cluster availabilities.
- Now, this can be disabled by setting `etcd --initial-election-tick-advance=false`.
- Disabling this would slow down initial bootstrap process for cross datacenter deployments. Make tradeoffs by configuring `etcd --initial-election-tick-advance` at the cost of slow initial bootstrap.
- If single-node, it advances ticks regardless.
- Address [disruptive rejoining follower node](https://github.com/etcd-io/etcd/issues/9333).
- Add [`etcd --pre-vote`](https://github.com/etcd-io/etcd/pull/9352) flag to enable to run an additional Raft election phase.
- For instance, a flaky(or rejoining) member may drop in and out, and start campaign. This member will end up with a higher term, and ignore all incoming messages with lower term. In this case, a new leader eventually need to get elected, thus disruptive to cluster availability. Raft implements Pre-Vote phase to prevent this kind of disruptions. If enabled, Raft runs an additional phase of election to check if pre-candidate can get enough votes to win an election.
- `etcd --pre-vote=false` by default.
- v3.5 will enable `etcd --pre-vote=true` by default.
- Add [`etcd --discovery-srv-name`](https://github.com/etcd-io/etcd/pull/8690) flag to support custom DNS SRV name with discovery.
- If not given, etcd queries `_etcd-server-ssl._tcp.[YOUR_HOST]` and `_etcd-server._tcp.[YOUR_HOST]`.
- If `etcd --discovery-srv-name="foo"`, then query `_etcd-server-ssl-foo._tcp.[YOUR_HOST]` and `_etcd-server-foo._tcp.[YOUR_HOST]`.
- Useful for operating multiple etcd clusters under the same domain.
- Support TLS cipher suite whitelisting.
- To block [weak cipher suites](https://github.com/etcd-io/etcd/issues/8320).
- TLS handshake fails when client hello is requested with invalid cipher suites.
- Add [`etcd --cipher-suites`](https://github.com/etcd-io/etcd/pull/9801) flag.
- If empty, Go auto-populates the list.
- Support [`etcd --cors`](https://github.com/etcd-io/etcd/pull/9490) in v3 HTTP requests (gRPC gateway).
- Rename [`etcd --log-output` to `etcd --log-outputs`](https://github.com/etcd-io/etcd/pull/9624) to support multiple log outputs.
- **`etcd --log-output` will be deprecated in v3.5**.
- Add [`etcd --logger`](https://github.com/etcd-io/etcd/pull/9572) flag to support [structured logger and multiple log outputs](https://github.com/etcd-io/etcd/issues/9438) in server-side.
- **`etcd --logger=capnslog` will be deprecated in v3.5**.
- Main motivation is to promote automated etcd monitoring, rather than looking back server logs when it starts breaking. Future development will make etcd log as few as possible, and make etcd easier to monitor with metrics and alerts.
- `etcd --logger=capnslog --log-outputs=default` is the default setting and same as previous etcd server logging format.
- `etcd --logger=zap --log-outputs=default` is not supported when `etcd --logger=zap`.
- Use `etcd --logger=zap --log-outputs=stderr` instead.
- Or, use `etcd --logger=zap --log-outputs=systemd/journal` to send logs to the local systemd journal.
- Previously, if etcd parent process ID (PPID) is 1 (e.g. run with systemd), `etcd --logger=capnslog --log-outputs=default` redirects server logs to local systemd journal. And if write to journald fails, it writes to `os.Stderr` as a fallback.
- However, even with PPID 1, it can fail to dial systemd journal (e.g. run embedded etcd with Docker container). Then, [every single log write will fail](https://github.com/etcd-io/etcd/pull/9729) and fall back to `os.Stderr`, which is inefficient.
- To avoid this problem, systemd journal logging must be configured manually.
- `etcd --logger=zap --log-outputs=stderr` will log server operations in [JSON-encoded format](https://godoc.org/go.uber.org/zap#NewProductionEncoderConfig) and writes logs to `os.Stderr`. Use this to override journald log redirects.
- `etcd --logger=zap --log-outputs=stdout` will log server operations in [JSON-encoded format](https://godoc.org/go.uber.org/zap#NewProductionEncoderConfig) and writes logs to `os.Stdout` Use this to override journald log redirects.
- `etcd --logger=zap --log-outputs=a.log` will log server operations in [JSON-encoded format](https://godoc.org/go.uber.org/zap#NewProductionEncoderConfig) and writes logs to the specified file `a.log`.
- `etcd --logger=zap --log-outputs=a.log,b.log,c.log,stdout` [writes server logs to multiple files `a.log`, `b.log` and `c.log` at the same time](https://github.com/etcd-io/etcd/pull/9579) and outputs to `os.Stderr`, in [JSON-encoded format](https://godoc.org/go.uber.org/zap#NewProductionEncoderConfig).
- `etcd --logger=zap --log-outputs=/dev/null` will discard all server logs.
- Add [`etcd --log-level`](https://github.com/etcd-io/etcd/pull/10947) flag to support log level.
- v3.5 will deprecate `etcd --debug` flag in favor of `etcd --log-level=debug`.
- Add [`etcd --backend-batch-limit`](https://github.com/etcd-io/etcd/pull/10283) flag.
- Add [`etcd --backend-batch-interval`](https://github.com/etcd-io/etcd/pull/10283) flag.
- Fix [`mvcc` "unsynced" watcher restore operation](https://github.com/etcd-io/etcd/pull/9281).
- "unsynced" watcher is watcher that needs to be in sync with events that have happened.
- That is, "unsynced" watcher is the slow watcher that was requested on old revision.
- "unsynced" watcher restore operation was not correctly populating its underlying watcher group.
- Which possibly causes [missing events from "unsynced" watchers](https://github.com/etcd-io/etcd/issues/9086).
- A node gets network partitioned with a watcher on a future revision, and falls behind receiving a leader snapshot after partition gets removed. When applying this snapshot, etcd watch storage moves current synced watchers to unsynced since sync watchers might have become stale during network partition. And reset synced watcher group to restart watcher routines. Previously, there was a bug when moving from synced watcher group to unsynced, thus client would miss events when the watcher was requested to the network-partitioned node.
- Fix [`mvcc` server panic from restore operation](https://github.com/etcd-io/etcd/pull/9775).
- Let's assume that a watcher had been requested with a future revision X and sent to node A that became network-partitioned thereafter. Meanwhile, cluster makes progress. Then when the partition gets removed, the leader sends a snapshot to node A. Previously if the snapshot's latest revision is still lower than the watch revision X, **etcd server panicked** during snapshot restore operation.
- Now, this server-side panic has been fixed.
- Fix [server panic on invalid Election Proclaim/Resign HTTP(S) requests](https://github.com/etcd-io/etcd/pull/9379).
- Previously, wrong-formatted HTTP requests to Election API could trigger panic in etcd server.
- e.g. `curl -L http://localhost:2379/v3/election/proclaim -X POST -d '{"value":""}'`, `curl -L http://localhost:2379/v3/election/resign -X POST -d '{"value":""}'`.
- Fix [revision-based compaction retention parsing](https://github.com/etcd-io/etcd/pull/9339).
- Previously, `etcd --auto-compaction-mode revision --auto-compaction-retention 1` was [translated to revision retention 3600000000000](https://github.com/etcd-io/etcd/issues/9337).
- Now, `etcd --auto-compaction-mode revision --auto-compaction-retention 1` is correctly parsed as revision retention 1.
- Prevent [overflow by large `TTL` values for `Lease` `Grant`](https://github.com/etcd-io/etcd/pull/9399).
- `TTL` parameter to `Grant` request is unit of second.
- Leases with too large `TTL` values exceeding `math.MaxInt64` [expire in unexpected ways](https://github.com/etcd-io/etcd/issues/9374).
- Server now returns `rpctypes.ErrLeaseTTLTooLarge` to client, when the requested `TTL` is larger than *9,000,000,000 seconds* (which is >285 years).
- Again, etcd `Lease` is meant for short-periodic keepalives or sessions, in the range of seconds or minutes. Not for hours or days!
- Fix [expired lease revoke](https://github.com/etcd-io/etcd/pull/10693).
- Fix ["the key is not deleted when the bound lease expires"](https://github.com/etcd-io/etcd/issues/10686).
- Enable etcd server [`raft.Config.CheckQuorum` when starting with `ForceNewCluster`](https://github.com/etcd-io/etcd/pull/9347).
- Allow [non-WAL files in `etcd --wal-dir` directory](https://github.com/etcd-io/etcd/pull/9743).
- Previously, existing files such as [`lost+found`](https://github.com/etcd-io/etcd/issues/7287) in WAL directory prevent etcd server boot.
- Now, WAL directory that contains only `lost+found` or a file that's not suffixed with `.wal` is considered non-initialized.
- Fix [`ETCD_CONFIG_FILE` env variable parsing in `etcd`](https://github.com/etcd-io/etcd/pull/10762).
- Fix [race condition in `rafthttp` transport pause/resume](https://github.com/etcd-io/etcd/pull/10826).
- Fix [server crash from creating an empty role](https://github.com/etcd-io/etcd/pull/10907).
- Previously, creating a role with an empty name crashed etcd server with an error code `Unavailable`.
- Now, creating a role with an empty name is not allowed with an error code `InvalidArgument`.
### API
- Add `isLearner` field to `etcdserverpb.Member`, `etcdserverpb.MemberAddRequest` and `etcdserverpb.StatusResponse` as part of [raft learner implementation](https://github.com/etcd-io/etcd/pull/10725).
- Add `MemberPromote` rpc to `etcdserverpb.Cluster` interface and the corresponding `MemberPromoteRequest` and `MemberPromoteResponse` as part of [raft learner implementation](https://github.com/etcd-io/etcd/pull/10725).
- Add [`snapshot`](https://github.com/etcd-io/etcd/pull/9118) package for snapshot restore/save operations (see [`godoc.org/github.com/etcd/clientv3/snapshot`](https://godoc.org/github.com/coreos/etcd/clientv3/snapshot) for more).
- Add [`watch_id` field to `etcdserverpb.WatchCreateRequest`](https://github.com/etcd-io/etcd/pull/9065) to allow user-provided watch ID to `mvcc`.
- Corresponding `watch_id` is returned via `etcdserverpb.WatchResponse`, if any.
- Add [`fragment` field to `etcdserverpb.WatchCreateRequest`](https://github.com/etcd-io/etcd/pull/9291) to request etcd server to [split watch events](https://github.com/etcd-io/etcd/issues/9294) when the total size of events exceeds `etcd --max-request-bytes` flag value plus gRPC-overhead 512 bytes.
- The default server-side request bytes limit is `embed.DefaultMaxRequestBytes` which is 1.5 MiB plus gRPC-overhead 512 bytes.
- If watch response events exceed this server-side request limit and watch request is created with `fragment` field `true`, the server will split watch events into a set of chunks, each of which is a subset of watch events below server-side request limit.
- Useful when client-side has limited bandwidths.
- For example, watch response contains 10 events, where each event is 1 MiB. And server `etcd --max-request-bytes` flag value is 1 MiB. Then, server will send 10 separate fragmented events to the client.
- For example, watch response contains 5 events, where each event is 2 MiB. And server `etcd --max-request-bytes` flag value is 1 MiB and `clientv3.Config.MaxCallRecvMsgSize` is 1 MiB. Then, server will try to send 5 separate fragmented events to the client, and the client will error with `"code = ResourceExhausted desc = grpc: received message larger than max (...)"`.
- Client must implement fragmented watch event merge (which `clientv3` does in etcd v3.4).
- Add [`raftAppliedIndex` field to `etcdserverpb.StatusResponse`](https://github.com/etcd-io/etcd/pull/9176) for current Raft applied index.
- Add [`errors` field to `etcdserverpb.StatusResponse`](https://github.com/etcd-io/etcd/pull/9206) for server-side error.
- e.g. `"etcdserver: no leader", "NOSPACE", "CORRUPT"`
- Add [`dbSizeInUse` field to `etcdserverpb.StatusResponse`](https://github.com/etcd-io/etcd/pull/9256) for actual DB size after compaction.
- Add [`WatchRequest.WatchProgressRequest`](https://github.com/etcd-io/etcd/pull/9869).
- To manually trigger broadcasting watch progress event (empty watch response with latest header) to all associated watch streams.
- Think of it as `WithProgressNotify` that can be triggered manually.
Note: **v3.5 will deprecate `etcd --log-package-levels` flag for `capnslog`**; `etcd --logger=zap --log-outputs=stderr` will the default. **v3.5 will deprecate `[CLIENT-URL]/config/local/log` endpoint.**
### Package `embed`
- Add [`embed.Config.CipherSuites`](https://github.com/etcd-io/etcd/pull/9801) to specify a list of supported cipher suites for TLS handshake between client/server and peers.
- If empty, Go auto-populates the list.
- Both `embed.Config.ClientTLSInfo.CipherSuites` and `embed.Config.CipherSuites` cannot be non-empty at the same time.
- If not empty, specify either `embed.Config.ClientTLSInfo.CipherSuites` or `embed.Config.CipherSuites`.
- Add [`embed.Config.InitialElectionTickAdvance`](https://github.com/etcd-io/etcd/pull/9591) to enable/disable initial election tick fast-forward.
- `embed.NewConfig()` would return `*embed.Config` with `InitialElectionTickAdvance` as true by default.
- Define [`embed.CompactorModePeriodic`](https://godoc.org/github.com/etcd-io/etcd/embed#pkg-variables) for `compactor.ModePeriodic`.
- Define [`embed.CompactorModeRevision`](https://godoc.org/github.com/etcd-io/etcd/embed#pkg-variables) for `compactor.ModeRevision`.
- Change [`embed.Config.CorsInfo` in `*cors.CORSInfo` type to `embed.Config.CORS` in `map[string]struct{}` type](https://github.com/etcd-io/etcd/pull/9490).
- Remove [`embed.Config.SetupLogging`](https://github.com/etcd-io/etcd/pull/9572).
- Now logger is set up automatically based on [`embed.Config.Logger`, `embed.Config.LogOutputs`, `embed.Config.Debug` fields](https://github.com/etcd-io/etcd/pull/9572).
- Add [`embed.Config.Logger`](https://github.com/etcd-io/etcd/pull/9518) to support [structured logger `zap`](https://github.com/uber-go/zap) in server-side.
- Add [`embed.Config.LogLevel`](https://github.com/etcd-io/etcd/pull/10947).
- Rename `embed.Config.SnapCount` field to [`embed.Config.SnapshotCount`](https://github.com/etcd-io/etcd/pull/9745), to be consistent with the flag name `etcd --snapshot-count`.
- Rename [**`embed.Config.LogOutput`** to **`embed.Config.LogOutputs`**](https://github.com/etcd-io/etcd/pull/9624) to support multiple log outputs.
- Change [**`embed.Config.LogOutputs`** type from `string` to `[]string`](https://github.com/etcd-io/etcd/pull/9579) to support multiple log outputs.
- Add [`embed.Config.BackendBatchLimit`](https://github.com/etcd-io/etcd/pull/10283) field.
- Add [`embed.Config.BackendBatchInterval`](https://github.com/etcd-io/etcd/pull/10283) field.
### Package `integration`
- Add [`CLUSTER_DEBUG` to enable test cluster logging](https://github.com/etcd-io/etcd/pull/9678).
- Deprecated `capnslog` in integration tests.
### client v3
- Add [`MemberAddAsLearner`](https://github.com/etcd-io/etcd/pull/10725) to `Clientv3.Cluster` interface. This API is used to add a learner member to etcd cluster.
- Add [`MemberPromote`](https://github.com/etcd-io/etcd/pull/10727) to `Clientv3.Cluster` interface. This API is used to promote a learner member in etcd cluster.
- Client may receive [`rpctypes.ErrLeaderChanged`](https://github.com/etcd-io/etcd/pull/10094) from server.
- Now linearizable requests with read index would fail fast when there is a leadership change, instead of waiting until context timeout.
- Add [`WithFragment` `OpOption`](https://github.com/etcd-io/etcd/pull/9291) to support [watch events fragmentation](https://github.com/etcd-io/etcd/issues/9294) when the total size of events exceeds `etcd --max-request-bytes` flag value plus gRPC-overhead 512 bytes.
- Watch fragmentation is disabled by default.
- The default server-side request bytes limit is `embed.DefaultMaxRequestBytes` which is 1.5 MiB plus gRPC-overhead 512 bytes.
- If watch response events exceed this server-side request limit and watch request is created with `fragment` field `true`, the server will split watch events into a set of chunks, each of which is a subset of watch events below server-side request limit.
- Useful when client-side has limited bandwidths.
- For example, watch response contains 10 events, where each event is 1 MiB. And server `etcd --max-request-bytes` flag value is 1 MiB. Then, server will send 10 separate fragmented events to the client.
- For example, watch response contains 5 events, where each event is 2 MiB. And server `etcd --max-request-bytes` flag value is 1 MiB and `clientv3.Config.MaxCallRecvMsgSize` is 1 MiB. Then, server will try to send 5 separate fragmented events to the client, and the client will error with `"code = ResourceExhausted desc = grpc: received message larger than max (...)"`.
- Add [`Watcher.RequestProgress` method](https://github.com/etcd-io/etcd/pull/9869).
- To manually trigger broadcasting watch progress event (empty watch response with latest header) to all associated watch streams.
- Think of it as `WithProgressNotify` that can be triggered manually.
- Fix [lease keepalive interval updates when response queue is full](https://github.com/etcd-io/etcd/pull/9952).
- If `<-chan *clientv3LeaseKeepAliveResponse` from `clientv3.Lease.KeepAlive` was never consumed or channel is full, client was [sending keepalive request every 500ms](https://github.com/etcd-io/etcd/issues/9911) instead of expected rate of every "TTL / 3" duration.
- Change [snapshot file permissions](https://github.com/etcd-io/etcd/pull/9977): On Linux, the snapshot file changes from readable by all (mode 0644) to readable by the user only (mode 0600).
- Client may choose to send keepalive pings to server using [`PermitWithoutStream`](https://github.com/etcd-io/etcd/pull/10146).
- By setting `PermitWithoutStream` to true, client can send keepalive pings to server without any active streams(RPCs). In other words, it allows sending keepalive pings with unary or simple RPC calls.
- `PermitWithoutStream` is set to false by default.
- Fix logic on [release lock key if cancelled](https://github.com/etcd-io/etcd/pull/10153) in `clientv3/concurrency` package.
- Fix [`(*Client).Endpoints()` method race condition](https://github.com/etcd-io/etcd/pull/10595).
### etcdctl v3
- Make [`ETCDCTL_API=3 etcdctl` default](https://github.com/etcd-io/etcd/issues/9600).
- Now, `etcdctl set foo bar` must be `ETCDCTL_API=2 etcdctl set foo bar`.
- Now, `ETCDCTL_API=3 etcdctl put foo bar` could be just `etcdctl put foo bar`.
- Add [`etcdctl member add --learner` and `etcdctl member promote`](https://github.com/etcd-io/etcd/pull/10725) to add and promote raft learner member in etcd cluster.
- Add [`etcdctl --password`](https://github.com/etcd-io/etcd/pull/9730) flag.
- To support [`:` character in user name](https://github.com/etcd-io/etcd/issues/9691).
- e.g. `etcdctl --user user --password password get foo`
- Add [`etcdctl user add --new-user-password`](https://github.com/etcd-io/etcd/pull/9730) flag.
- Add [`etcdctl check datascale`](https://github.com/etcd-io/etcd/pull/9185) command.
- Add [`etcdctl check datascale --auto-compact, --auto-defrag`](https://github.com/etcd-io/etcd/pull/9351) flags.
- Add [`etcdctl check perf --auto-compact, --auto-defrag`](https://github.com/etcd-io/etcd/pull/9330) flags.
- Add [`etcdctl defrag --cluster`](https://github.com/etcd-io/etcd/pull/9390) flag.
- Add ["raft applied index" field to `endpoint status`](https://github.com/etcd-io/etcd/pull/9176).
- Add ["errors" field to `endpoint status`](https://github.com/etcd-io/etcd/pull/9206).
- Add [`etcdctl endpoint health --write-out` support](https://github.com/etcd-io/etcd/pull/9540).
- Previously, [`etcdctl endpoint health --write-out json` did not work](https://github.com/etcd-io/etcd/issues/9532).
- Add [missing newline in `etcdctl endpoint health`](https://github.com/etcd-io/etcd/pull/10793).
- Fix [`etcdctl watch [key] [range_end] -- [exec-command…]`](https://github.com/etcd-io/etcd/pull/9688) parsing.
- Previously, `ETCDCTL_API=3 etcdctl watch foo -- echo watch event received` panicked.
- Fix [`etcdctl move-leader` command for TLS-enabled endpoints](https://github.com/etcd-io/etcd/pull/9807).
- Add [`progress` command to `etcdctl watch --interactive`](https://github.com/etcd-io/etcd/pull/9869).
- To manually trigger broadcasting watch progress event (empty watch response with latest header) to all associated watch streams.
- Think of it as `WithProgressNotify` that can be triggered manually.
- Add [timeout](https://github.com/etcd-io/etcd/pull/10301) to `etcdctl snapshot
save`.
- User can specify timeout of `etcdctl snapshot save` command using flag `--command-timeout`.
- Fix etcdctl to [strip out insecure endpoints from DNS SRV records when using discovery](https://github.com/etcd-io/etcd/pull/10443)
### gRPC proxy
- Fix [etcd server panic from restore operation](https://github.com/etcd-io/etcd/pull/9775).
- Let's assume that a watcher had been requested with a future revision X and sent to node A that became network-partitioned thereafter. Meanwhile, cluster makes progress. Then when the partition gets removed, the leader sends a snapshot to node A. Previously if the snapshot's latest revision is still lower than the watch revision X, **etcd server panicked** during snapshot restore operation.
- Especially, gRPC proxy was affected, since it detects a leader loss with a key `"proxy-namespace__lostleader"` and a watch revision `"int64(math.MaxInt64 - 2)"`.
- Now, this server-side panic has been fixed.
- Fix [memory leak in cache layer](https://github.com/etcd-io/etcd/pull/10327).
- Change [gRPC proxy to expose etcd server endpoint /metrics](https://github.com/etcd-io/etcd/pull/10618).
- The metrics that were exposed via the proxy were not etcd server members but instead the proxy itself.
### gRPC gateway
- Replace [gRPC gateway](https://github.com/grpc-ecosystem/grpc-gateway) endpoint `/v3beta` with [`/v3`](https://github.com/etcd-io/etcd/pull/9298).
- Deprecated [`/v3alpha`](https://github.com/etcd-io/etcd/pull/9298).
- To deprecate [`/v3beta`](https://github.com/etcd-io/etcd/issues/9189) in v3.5.
- In v3.4, `curl -L http://localhost:2379/v3beta/kv/put -X POST -d '{"key": "Zm9v", "value": "YmFy"}'` still works as a fallback to `curl -L http://localhost:2379/v3/kv/put -X POST -d '{"key": "Zm9v", "value": "YmFy"}'`, but `curl -L http://localhost:2379/v3beta/kv/put -X POST -d '{"key": "Zm9v", "value": "YmFy"}'` won't work in v3.5. Use `curl -L http://localhost:2379/v3/kv/put -X POST -d '{"key": "Zm9v", "value": "YmFy"}'` instead.
- Add API endpoints [`/{v3beta,v3}/lease/leases, /{v3beta,v3}/lease/revoke, /{v3beta,v3}/lease/timetolive`](https://github.com/etcd-io/etcd/pull/9450).
- To deprecate [`/{v3beta,v3}/kv/lease/leases, /{v3beta,v3}/kv/lease/revoke, /{v3beta,v3}/kv/lease/timetolive`](https://github.com/etcd-io/etcd/issues/9430) in v3.5.
- Support [`etcd --cors`](https://github.com/etcd-io/etcd/pull/9490) in v3 HTTP requests (gRPC gateway).
### Package `raft`
- Fix [deadlock during PreVote migration process](https://github.com/etcd-io/etcd/pull/8525).
- Add [`raft.ErrProposalDropped`](https://github.com/etcd-io/etcd/pull/9067).
- Now [`(r *raft) Step` returns `raft.ErrProposalDropped`](https://github.com/etcd-io/etcd/pull/9137) if a proposal has been ignored.
- e.g. a node is removed from cluster, or [`raftpb.MsgProp` arrives at current leader while there is an ongoing leadership transfer](https://github.com/etcd-io/etcd/issues/8975).
- Improve [Raft `becomeLeader` and `stepLeader`](https://github.com/etcd-io/etcd/pull/9073) by keeping track of latest `pb.EntryConfChange` index.
- Previously record `pendingConf` boolean field scanning the entire tail of the log, which can delay hearbeat send.
- Fix [missing learner nodes on `(n *node) ApplyConfChange`](https://github.com/etcd-io/etcd/pull/9116).
- Add [`raft.Config.MaxUncommittedEntriesSize`](https://github.com/etcd-io/etcd/pull/10167) to limit the total size of the uncommitted entries in bytes.
- Once exceeded, raft returns `raft.ErrProposalDropped` error.
- Prevent [unbounded Raft log growth](https://github.com/cockroachdb/cockroach/issues/27772).
- There was a bug in [PR#10167](https://github.com/etcd-io/etcd/pull/10167) but fixed via [PR#10199](https://github.com/etcd-io/etcd/pull/10199).
- Add [`raft.Ready.CommittedEntries` pagination using `raft.Config.MaxSizePerMsg`](https://github.com/etcd-io/etcd/pull/9982).
- This prevents out-of-memory errors if the raft log has become very large and commits all at once.
- Fix [correctness bug in CommittedEntries pagination](https://github.com/etcd-io/etcd/pull/10063).
- Optimize [message send flow control](https://github.com/etcd-io/etcd/pull/9985).
- Leader now sends more append entries if it has more non-empty entries to send after updating flow control information.
- Now, Raft allows multiple in-flight append messages.
- Optimize [memory allocation when boxing slice in `maybeCommit`](https://github.com/etcd-io/etcd/pull/10679).
- By boxing a heap-allocated slice header instead of the slice header on the stack, we can avoid an allocation when passing through the sort.Interface interface.
- Avoid [memory allocation in Raft entry `String` method](https://github.com/etcd-io/etcd/pull/10680).
- Avoid [multiple memory allocations when merging stable and unstable log](https://github.com/etcd-io/etcd/pull/10684).
- Extract [progress tracking into own component](https://github.com/etcd-io/etcd/pull/10683).
- Add [package `raft/tracker`](https://github.com/etcd-io/etcd/pull/10807).
- Optimize [string representation of `Progress`](https://github.com/etcd-io/etcd/pull/10882).
- Make [relationship between `node` and `RawNode` explicit](https://github.com/etcd-io/etcd/pull/10803).
- Prevent [learners from becoming leader](https://github.com/etcd-io/etcd/pull/10822).
- Add [package `raft/quorum` to reason about committed indexes as well as vote outcomes for both majority and joint quorums](https://github.com/etcd-io/etcd/pull/10779).
- Bundle [Voters and Learner into `raft/tracker.Config` struct](https://github.com/etcd-io/etcd/pull/10865).
- Use [membership sets in progress tracking](https://github.com/etcd-io/etcd/pull/10779).
- Implement [joint quorum computation](https://github.com/etcd-io/etcd/pull/10779).
- Refactor [`raft/node.go` to centralize configuration change application](https://github.com/etcd-io/etcd/pull/10865).
- Allow [voter to become learner through snapshot](https://github.com/etcd-io/etcd/pull/10864).
- Add [package `raft/confchange` to internally support joint consensus](https://github.com/etcd-io/etcd/pull/10779).
- Use [`RawNode` for node's event loop](https://github.com/etcd-io/etcd/pull/10892).
- Add [`RawNode.Bootstrap` method](https://github.com/etcd-io/etcd/pull/10892).
- Add [`raftpb.ConfChangeV2` to use joint quorums](https://github.com/etcd-io/etcd/pull/10914).
- `raftpb.ConfChange` continues to work as today: it allows carrying out a single configuration change. A `pb.ConfChange` proposal gets added to the Raft log as such and is thus also observed by the app during Ready handling, and fed back to ApplyConfChange.
- `raftpb.ConfChangeV2` allows joint configuration changes but will continue to carry out configuration changes in "one phase" (i.e. without ever entering a joint config) when this is possible.
- `raftpb.ConfChangeV2` messages initiate configuration changes. They support both the simple "one at a time" membership change protocol and full Joint Consensus allowing for arbitrary changes in membership.
- Change [`raftpb.ConfState.Nodes` to `raftpb.ConfState.Voters`](https://github.com/etcd-io/etcd/pull/10914).
### Package `wal`
- Add [`Verify` function to perform corruption check on WAL contents](https://github.com/etcd-io/etcd/pull/10603).
- Fix [`wal` directory cleanup on creation failures](https://github.com/etcd-io/etcd/pull/10689).
### Tooling
- Add [`etcd-dump-logs --entry-type`](https://github.com/etcd-io/etcd/pull/9628) flag to support WAL log filtering by entry type.
- Add [`etcd-dump-logs --stream-decoder`](https://github.com/etcd-io/etcd/pull/9790) flag to support custom decoder.
### Go
- Require [*Go 1.12+*](https://github.com/etcd-io/etcd/pull/10045).
- Compile with [*Go 1.12*](https://golang.org/doc/devel/release.html#go1.12).
### Dockerfile
- [Rebase etcd image from Alpine to Debian](https://github.com/etcd-io/etcd/pull/10805) to improve security and maintenance effort for etcd release.
<hr>

View File

@ -1,80 +0,0 @@
Previous change logs can be found at [CHANGELOG-3.4](https://github.com/etcd-io/etcd/blob/master/CHANGELOG-3.4.md).
<hr>
## v3.5.0 (TBD)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.4.0...v3.5.0) and [v3.5 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_5.md) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.5 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_5.md).**
### Breaking Changes
- [gRPC gateway](https://github.com/grpc-ecosystem/grpc-gateway) only supports [`/v3`](TODO) endpoint.
- Deprecated [`/v3beta`](https://github.com/etcd-io/etcd/pull/9298).
- `curl -L http://localhost:2379/v3beta/kv/put -X POST -d '{"key": "Zm9v", "value": "YmFy"}'` does work in v3.5. Use `curl -L http://localhost:2379/v3/kv/put -X POST -d '{"key": "Zm9v", "value": "YmFy"}'` instead.
- **`etcd --experimental-enable-v2v3` flag has been deprecated.** Use **`etcd --enable-v2v3`** instead.
- Change [`etcd --experimental-enable-v2v3`](TODO) flag to `etcd --enable-v2v3`; v2 storage emulation is now stable.
- **`etcd --debug` flag has been deprecated.** Use **`etcd --log-level=debug`** instead.
- Remove [`embed.Config.Debug`](https://github.com/etcd-io/etcd/pull/10947).
- **`etcd --log-output` flag has been deprecated.** Use **`etcd --log-outputs`** instead.
- **`etcd --logger=zap --log-outputs=stderr`** is now the default.
- **`etcd --logger=capnslog` flag value has been deprecated.**
- **`etcd --logger=zap --log-outputs=default` flag value is not supported.**.
- Use `etcd --logger=zap --log-outputs=stderr`.
- Or, use `etcd --logger=zap --log-outputs=systemd/journal` to send logs to the local systemd journal.
- Previously, if etcd parent process ID (PPID) is 1 (e.g. run with systemd), `etcd --logger=capnslog --log-outputs=default` redirects server logs to local systemd journal. And if write to journald fails, it writes to `os.Stderr` as a fallback.
- However, even with PPID 1, it can fail to dial systemd journal (e.g. run embedded etcd with Docker container). Then, [every single log write will fail](https://github.com/etcd-io/etcd/pull/9729) and fall back to `os.Stderr`, which is inefficient.
- To avoid this problem, systemd journal logging must be configured manually.
- **`etcd --log-outputs=stderr`** is now the default.
- **`etcd --log-package-levels` flag for `capnslog` has been deprecated.** Now, **`etcd --logger=zap --log-outputs=stderr`** is the default.
- **`[CLIENT-URL]/config/local/log` endpoint has been deprecated, as is `etcd --log-package-levels` flag.**
- `curl http://127.0.0.1:2379/config/local/log -XPUT -d '{"Level":"DEBUG"}'` won't work.
- Please use `etcd --logger=zap --log-outputs=stderr` instead.
- Deprecated `etcd_debugging_mvcc_db_total_size_in_bytes` Prometheus metric. Use `etcd_mvcc_db_total_size_in_bytes` instead.
- Deprecated `etcd_debugging_mvcc_put_total` Prometheus metric. Use `etcd_mvcc_put_total` instead.
- Deprecated `etcd_debugging_mvcc_delete_total` Prometheus metric. Use `etcd_mvcc_delete_total` instead.
- Deprecated `etcd_debugging_mvcc_txn_total` Prometheus metric. Use `etcd_mvcc_txn_total` instead.
- Deprecated `etcd_debugging_mvcc_range_total` Prometheus metric. Use `etcd_mvcc_range_total` instead.
- Master branch `/version` outputs `3.5.0-pre`, instead of `3.4.0+git`.
### Metrics, Monitoring
Note that any `etcd_debugging_*` metrics are experimental and subject to change.
- Deprecated `etcd_debugging_mvcc_db_total_size_in_bytes` Prometheus metric. Use `etcd_mvcc_db_total_size_in_bytes` instead.
- Deprecated `etcd_debugging_mvcc_put_total` Prometheus metric. Use `etcd_mvcc_put_total` instead.
- Deprecated `etcd_debugging_mvcc_delete_total` Prometheus metric. Use `etcd_mvcc_delete_total` instead.
- Deprecated `etcd_debugging_mvcc_txn_total` Prometheus metric. Use `etcd_mvcc_txn_total` instead.
- Deprecated `etcd_debugging_mvcc_range_total` Prometheus metric. Use `etcd_mvcc_range_total` instead.
### etcd server
- [`etcd --enable-v2v3`](TODO) flag is now stable.
- `etcd --experimental-enable-v2v3` has been deprecated.
- Added [more v2v3 integration tests](https://github.com/etcd-io/etcd/pull/9634).
- `etcd --enable-v2=true --enable-v2v3=''` by default, to enable v2 API server that is backed by **v2 store**.
- `etcd --enable-v2=true --enable-v2v3=/aaa` to enable v2 API server that is backed by **v3 storage**.
- `etcd --enable-v2=false --enable-v2v3=''` to disable v2 API server.
- `etcd --enable-v2=false --enable-v2v3=/aaa` to disable v2 API server. TODO: error?
- Automatically [create parent directory if it does not exist](https://github.com/etcd-io/etcd/pull/9626) (fix [issue#9609](https://github.com/etcd-io/etcd/issues/9609)).
- v4.0 will configure `etcd --enable-v2=true --enable-v2v3=/aaa` to enable v2 API server that is backed by **v3 storage**.
### Package `embed`
- Remove [`embed.Config.Debug`](https://github.com/etcd-io/etcd/pull/10947).
- Use `embed.Config.LogLevel` instead.
### gRPC gateway
- [gRPC gateway](https://github.com/grpc-ecosystem/grpc-gateway) only supports [`/v3`](TODO) endpoint.
- Deprecated [`/v3beta`](https://github.com/etcd-io/etcd/pull/9298).
- `curl -L http://localhost:2379/v3beta/kv/put -X POST -d '{"key": "Zm9v", "value": "YmFy"}'` does work in v3.5. Use `curl -L http://localhost:2379/v3/kv/put -X POST -d '{"key": "Zm9v", "value": "YmFy"}'` instead.
<hr>

291
CHANGELOG/CHANGELOG-3.0.md Normal file
View File

@ -0,0 +1,291 @@
<hr>
## [v3.0.16](https://github.com/etcd-io/etcd/releases/tag/v3.0.16) (2016-11-13)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.0.15...v3.0.16) and [v3.0 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_0/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.0 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_0/).**
### Go
- Compile with [*Go 1.6.4*](https://golang.org/doc/devel/release.html#go1.6).
<hr>
## [v3.0.15](https://github.com/etcd-io/etcd/releases/tag/v3.0.15) (2016-11-11)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.0.14...v3.0.15) and [v3.0 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_0/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.0 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_0/).**
### Fixed
- Fix cancel watch request with wrong range end.
### Go
- Compile with [*Go 1.6.3*](https://golang.org/doc/devel/release.html#go1.6).
<hr>
## [v3.0.14](https://github.com/etcd-io/etcd/releases/tag/v3.0.14) (2016-11-04)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.0.13...v3.0.14) and [v3.0 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_0/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.0 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_0/).**
### Added
- v3 `etcdctl migrate` command now supports `--no-ttl` flag to discard keys on transform.
### Go
- Compile with [*Go 1.6.3*](https://golang.org/doc/devel/release.html#go1.6).
<hr>
## [v3.0.13](https://github.com/etcd-io/etcd/releases/tag/v3.0.13) (2016-10-24)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.0.12...v3.0.13) and [v3.0 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_0/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.0 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_0/).**
### Go
- Compile with [*Go 1.6.3*](https://golang.org/doc/devel/release.html#go1.6).
<hr>
## [v3.0.12](https://github.com/etcd-io/etcd/releases/tag/v3.0.12) (2016-10-07)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.0.11...v3.0.12) and [v3.0 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_0/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.0 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_0/).**
### Go
- Compile with [*Go 1.6.3*](https://golang.org/doc/devel/release.html#go1.6).
<hr>
## [v3.0.11](https://github.com/etcd-io/etcd/releases/tag/v3.0.11) (2016-10-07)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.0.10...v3.0.11) and [v3.0 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_0/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.0 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_0/).**
### Added
- Server returns previous key-value (optional)
- `clientv3.WithPrevKV` option
- v3 etcdctl `put,watch,del --prev-kv` flag
### Go
- Compile with [*Go 1.6.3*](https://golang.org/doc/devel/release.html#go1.6).
<hr>
## [v3.0.10](https://github.com/etcd-io/etcd/releases/tag/v3.0.10) (2016-09-23)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.0.9...v3.0.10) and [v3.0 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_0/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.0 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_0/).**
### Go
- Compile with [*Go 1.6.3*](https://golang.org/doc/devel/release.html#go1.6).
<hr>
## [v3.0.9](https://github.com/etcd-io/etcd/releases/tag/v3.0.9) (2016-09-15)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.0.8...v3.0.9) and [v3.0 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_0/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.0 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_0/).**
### Added
- Warn on domain names on listen URLs (v3.2 will reject domain names).
### Go
- Compile with [*Go 1.6.3*](https://golang.org/doc/devel/release.html#go1.6).
<hr>
## [v3.0.8](https://github.com/etcd-io/etcd/releases/tag/v3.0.8) (2016-09-09)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.0.7...v3.0.8) and [v3.0 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_0/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.0 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_0/).**
### Other
- Allow only IP addresses in listen URLs (domain names are rejected).
### Go
- Compile with [*Go 1.6.3*](https://golang.org/doc/devel/release.html#go1.6).
<hr>
## [v3.0.7](https://github.com/etcd-io/etcd/releases/tag/v3.0.7) (2016-08-31)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.0.6...v3.0.7) and [v3.0 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_0/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.0 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_0/).**
### Other
- SRV records only allow A records (RFC 2052).
### Go
- Compile with [*Go 1.6.3*](https://golang.org/doc/devel/release.html#go1.6).
<hr>
## [v3.0.6](https://github.com/etcd-io/etcd/releases/tag/v3.0.6) (2016-08-19)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.0.5...v3.0.6) and [v3.0 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_0/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.0 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_0/).**
### Go
- Compile with [*Go 1.6.3*](https://golang.org/doc/devel/release.html#go1.6).
<hr>
## [v3.0.5](https://github.com/etcd-io/etcd/releases/tag/v3.0.5) (2016-08-19)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.0.4...v3.0.5) and [v3.0 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_0/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.0 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_0/).**
### Other
- SRV records (e.g., infra1.example.com) must match the discovery domain (i.e., example.com) if no custom certificate authority is given.
### Go
- Compile with [*Go 1.6.3*](https://golang.org/doc/devel/release.html#go1.6).
<hr>
## [v3.0.4](https://github.com/etcd-io/etcd/releases/tag/v3.0.4) (2016-07-27)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.0.3...v3.0.4) and [v3.0 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_0/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.0 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_0/).**
### Added
- v2 `etcdctl ls` command now supports `--output=json`.
- Add /var/lib/etcd directory to etcd official Docker image.
### Other
- v2 auth can now use common name from TLS certificate when `--client-cert-auth` is enabled.
### Go
- Compile with [*Go 1.6.3*](https://golang.org/doc/devel/release.html#go1.6).
<hr>
## [v3.0.3](https://github.com/etcd-io/etcd/releases/tag/v3.0.3) (2016-07-15)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.0.2...v3.0.3) and [v3.0 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_0/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.0 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_0/).**
### Other
- Revert Dockerfile to use `CMD`, instead of `ENTRYPOINT`, to support `etcdctl` run.
- Docker commands for v3.0.2 won't work without specifying executable binary paths.
- v3 etcdctl default endpoints are now `127.0.0.1:2379`.
### Go
- Compile with [*Go 1.6.2*](https://golang.org/doc/devel/release.html#go1.6).
<hr>
## [v3.0.2](https://github.com/etcd-io/etcd/releases/tag/v3.0.2) (2016-07-08)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.0.1...v3.0.2) and [v3.0 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_0/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.0 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_0/).**
### Other
- Dockerfile uses `ENTRYPOINT`, instead of `CMD`, to run etcd without binary path specified.
### Go
- Compile with [*Go 1.6.2*](https://golang.org/doc/devel/release.html#go1.6).
<hr>
## [v3.0.1](https://github.com/etcd-io/etcd/releases/tag/v3.0.1) (2016-07-01)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.0.0...v3.0.1) and [v3.0 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_0/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.0 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_0/).**
### Go
- Compile with [*Go 1.6.2*](https://golang.org/doc/devel/release.html#go1.6).
<hr>
## [v3.0.0](https://github.com/etcd-io/etcd/releases/tag/v3.0.0) (2016-06-30)
See [code changes](https://github.com/etcd-io/etcd/compare/v2.3.0...v3.0.0) and [v3.0 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_0/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.0 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_0/).**
### Go
- Compile with [*Go 1.6.2*](https://golang.org/doc/devel/release.html#go1.6).
<hr>

View File

@ -1,16 +1,12 @@
Previous change logs can be found at [CHANGELOG-3.0](https://github.com/etcd-io/etcd/blob/master/CHANGELOG-3.0.md).
The minimum recommended etcd versions to run in **production** are 3.1.11+, 3.2.26+, and 3.3.11+.
Previous change logs can be found at [CHANGELOG-3.0](https://github.com/etcd-io/etcd/blob/main/CHANGELOG/CHANGELOG-3.0.md).
<hr>
## [v3.1.21](https://github.com/etcd-io/etcd/releases/tag/v3.1.21) (2019-TBD)
### etcdctl
### etcdctl v3
- [Strip out insecure endpoints from DNS SRV records when using discovery](https://github.com/etcd-io/etcd/pull/10443) with etcdctl v2
- Add [`etcdctl endpoint health --write-out` support](https://github.com/etcd-io/etcd/pull/9540).
@ -21,15 +17,19 @@ The minimum recommended etcd versions to run in **production** are 3.1.11+, 3.2.
### Metrics, Monitoring
See [List of metrics](https://github.com/etcd-io/etcd/tree/main/Documentation/metrics) for all metrics per release.
Note that any `etcd_debugging_*` metrics are experimental and subject to change.
- Fix bug where [db_compaction_total_duration_milliseconds metric incorrectly measured duration as 0](https://github.com/etcd-io/etcd/pull/10646).
<hr>
## [v3.1.20](https://github.com/etcd-io/etcd/releases/tag/v3.1.20) (2018-10-10)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.19...v3.1.20) and [v3.1 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_1.md) for any breaking changes.
See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.19...v3.1.20) and [v3.1 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_1/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.1 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_1.md).**
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.1 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_1/).**
### Improved
@ -40,7 +40,7 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.19...v3.1.20) an
### Metrics, Monitoring
See [List of metrics](https://etcd.io/docs/v3.1.12/metrics/) for all metrics per release.
See [List of metrics](https://github.com/etcd-io/etcd/tree/main/Documentation/metrics) for all metrics per release.
Note that any `etcd_debugging_*` metrics are experimental and subject to change.
@ -74,9 +74,9 @@ Note that any `etcd_debugging_*` metrics are experimental and subject to change.
## [v3.1.19](https://github.com/etcd-io/etcd/releases/tag/v3.1.19) (2018-07-24)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.18...v3.1.19) and [v3.1 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_1.md) for any breaking changes.
See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.18...v3.1.19) and [v3.1 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_1/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.1 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_1.md).**
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.1 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_1/).**
### Improved
@ -84,7 +84,7 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.18...v3.1.19) an
### Metrics, Monitoring
See [List of metrics](https://etcd.io/docs/v3.1.12/metrics/) for all metrics per release.
See [List of metrics](https://github.com/etcd-io/etcd/tree/main/Documentation/metrics) for all metrics per release.
Note that any `etcd_debugging_*` metrics are experimental and subject to change.
@ -120,13 +120,13 @@ Note that any `etcd_debugging_*` metrics are experimental and subject to change.
## [v3.1.18](https://github.com/etcd-io/etcd/releases/tag/v3.1.18) (2018-06-15)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.17...v3.1.18) and [v3.1 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_1.md) for any breaking changes.
See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.17...v3.1.18) and [v3.1 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_1/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.1 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_1.md).**
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.1 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_1/).**
### Metrics, Monitoring
See [List of metrics](https://etcd.io/docs/v3.1.12/metrics/) for all metrics per release.
See [List of metrics](https://github.com/etcd-io/etcd/tree/main/Documentation/metrics) for all metrics per release.
Note that any `etcd_debugging_*` metrics are experimental and subject to change.
@ -143,9 +143,9 @@ Note that any `etcd_debugging_*` metrics are experimental and subject to change.
## [v3.1.17](https://github.com/etcd-io/etcd/releases/tag/v3.1.17) (2018-06-06)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.16...v3.1.17) and [v3.1 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_1.md) for any breaking changes.
See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.16...v3.1.17) and [v3.1 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_1/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.1 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_1.md).**
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.1 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_1/).**
### etcd server
@ -164,9 +164,9 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.16...v3.1.17) an
## [v3.1.16](https://github.com/etcd-io/etcd/releases/tag/v3.1.16) (2018-05-31)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.15...v3.1.16) and [v3.1 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_1.md) for any breaking changes.
See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.15...v3.1.16) and [v3.1 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_1/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.1 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_1.md).**
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.1 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_1/).**
### etcd server
@ -184,9 +184,9 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.15...v3.1.16) an
## [v3.1.15](https://github.com/etcd-io/etcd/releases/tag/v3.1.15) (2018-05-09)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.14...v3.1.15) and [v3.1 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_1.md) for any breaking changes.
See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.14...v3.1.15) and [v3.1 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_1/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.1 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_1.md).**
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.1 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_1/).**
### etcd server
@ -204,13 +204,13 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.14...v3.1.15) an
## [v3.1.14](https://github.com/etcd-io/etcd/releases/tag/v3.1.14) (2018-04-24)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.13...v3.1.14) and [v3.1 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_1.md) for any breaking changes.
See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.13...v3.1.14) and [v3.1 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_1/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.1 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_1.md).**
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.1 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_1/).**
### Metrics, Monitoring
See [List of metrics](https://etcd.io/docs/v3.1.12/metrics/) for all metrics per release.
See [List of metrics](https://github.com/etcd-io/etcd/tree/main/Documentation/metrics) for all metrics per release.
Note that any `etcd_debugging_*` metrics are experimental and subject to change.
@ -238,9 +238,9 @@ Note that any `etcd_debugging_*` metrics are experimental and subject to change.
## [v3.1.13](https://github.com/etcd-io/etcd/releases/tag/v3.1.13) (2018-03-29)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.12...v3.1.13) and [v3.1 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_1.md) for any breaking changes.
See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.12...v3.1.13) and [v3.1 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_1/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.1 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_1.md).**
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.1 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_1/).**
### Improved
@ -250,7 +250,7 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.12...v3.1.13) an
### Metrics, Monitoring
See [List of metrics](https://etcd.io/docs/v3.1.12/metrics/) for all metrics per release.
See [List of metrics](https://github.com/etcd-io/etcd/tree/main/Documentation/metrics) for all metrics per release.
Note that any `etcd_debugging_*` metrics are experimental and subject to change.
@ -266,9 +266,9 @@ Note that any `etcd_debugging_*` metrics are experimental and subject to change.
## [v3.1.12](https://github.com/etcd-io/etcd/releases/tag/v3.1.12) (2018-03-08)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.11...v3.1.12) and [v3.1 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_1.md) for any breaking changes.
See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.11...v3.1.12) and [v3.1 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_1/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.1 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_1.md).**
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.1 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_1/).**
### etcd server
@ -289,9 +289,9 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.11...v3.1.12) an
## [v3.1.11](https://github.com/etcd-io/etcd/releases/tag/v3.1.11) (2017-11-28)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.10...v3.1.11) and [v3.1 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_1.md) for any breaking changes.
See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.10...v3.1.11) and [v3.1 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_1/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.1 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_1.md).**
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.1 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_1/).**
### etcd server
@ -308,9 +308,9 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.10...v3.1.11) an
## [v3.1.10](https://github.com/etcd-io/etcd/releases/tag/v3.1.10) (2017-07-14)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.9...v3.1.10) and [v3.1 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_1.md) for any breaking changes.
See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.9...v3.1.10) and [v3.1 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_1/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.1 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_1.md).**
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.1 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_1/).**
### Added
@ -328,9 +328,9 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.9...v3.1.10) and
## [v3.1.9](https://github.com/etcd-io/etcd/releases/tag/v3.1.9) (2017-06-09)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.8...v3.1.9) and [v3.1 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_1.md) for any breaking changes.
See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.8...v3.1.9) and [v3.1 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_1/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.1 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_1.md).**
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.1 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_1/).**
### etcd server
@ -346,9 +346,9 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.8...v3.1.9) and
## [v3.1.8](https://github.com/etcd-io/etcd/releases/tag/v3.1.8) (2017-05-19)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.7...v3.1.8) and [v3.1 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_1.md) for any breaking changes.
See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.7...v3.1.8) and [v3.1 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_1/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.1 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_1.md).**
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.1 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_1/).**
### Go
@ -360,9 +360,9 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.7...v3.1.8) and
## [v3.1.7](https://github.com/etcd-io/etcd/releases/tag/v3.1.7) (2017-04-28)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.6...v3.1.7) and [v3.1 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_1.md) for any breaking changes.
See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.6...v3.1.7) and [v3.1 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_1/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.1 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_1.md).**
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.1 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_1/).**
### Go
@ -374,9 +374,9 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.6...v3.1.7) and
## [v3.1.6](https://github.com/etcd-io/etcd/releases/tag/v3.1.6) (2017-04-19)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.5...v3.1.6) and [v3.1 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_1.md) for any breaking changes.
See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.5...v3.1.6) and [v3.1 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_1/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.1 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_1.md).**
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.1 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_1/).**
### etcd server
@ -393,9 +393,9 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.5...v3.1.6) and
## [v3.1.5](https://github.com/etcd-io/etcd/releases/tag/v3.1.5) (2017-03-27)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.4...v3.1.5) and [v3.1 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_1.md) for any breaking changes.
See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.4...v3.1.5) and [v3.1 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_1/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.1 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_1.md).**
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.1 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_1/).**
### etcd server
@ -416,9 +416,9 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.4...v3.1.5) and
## [v3.1.4](https://github.com/etcd-io/etcd/releases/tag/v3.1.4) (2017-03-22)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.3...v3.1.4) and [v3.1 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_1.md) for any breaking changes.
See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.3...v3.1.4) and [v3.1 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_1/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.1 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_1.md).**
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.1 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_1/).**
### Go
@ -430,9 +430,9 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.3...v3.1.4) and
## [v3.1.3](https://github.com/etcd-io/etcd/releases/tag/v3.1.3) (2017-03-10)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.2...v3.1.3) and [v3.1 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_1.md) for any breaking changes.
See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.2...v3.1.3) and [v3.1 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_1/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.1 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_1.md).**
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.1 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_1/).**
### etcd gateway
@ -457,9 +457,9 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.2...v3.1.3) and
## [v3.1.2](https://github.com/etcd-io/etcd/releases/tag/v3.1.2) (2017-02-24)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.1...v3.1.2) and [v3.1 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_1.md) for any breaking changes.
See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.1...v3.1.2) and [v3.1 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_1/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.1 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_1.md).**
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.1 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_1/).**
### etcd gateway
@ -479,9 +479,9 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.1...v3.1.2) and
## [v3.1.1](https://github.com/etcd-io/etcd/releases/tag/v3.1.1) (2017-02-17)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.0...v3.1.1) and [v3.1 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_1.md) for any breaking changes.
See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.0...v3.1.1) and [v3.1 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_1/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.1 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_1.md).**
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.1 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_1/).**
### Go
@ -493,9 +493,9 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.0...v3.1.1) and
## [v3.1.0](https://github.com/etcd-io/etcd/releases/tag/v3.1.0) (2017-01-20)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.0.0...v3.1.0) and [v3.1 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_1.md) for any breaking changes.
See [code changes](https://github.com/etcd-io/etcd/compare/v3.0.0...v3.1.0) and [v3.1 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_1/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.1 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_1.md).**
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.1 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_1/).**
### Improved
@ -516,7 +516,7 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.0.0...v3.1.0) and
### Security, Authentication
See [security doc](https://github.com/etcd-io/etcd/blob/master/Documentation/op-guide/security.md) for more details.
See [security doc](https://etcd.io/docs/latest/op-guide/security/) for more details.
- SRV records (e.g., infra1.example.com) must match the discovery domain (i.e., example.com) if no custom certificate authority is given.
- `TLSConfig.ServerName` is ignored with user-provided certificates for backwards compatibility; to be deprecated.

View File

@ -1,17 +1,136 @@
Previous change logs can be found at [CHANGELOG-3.1](https://github.com/etcd-io/etcd/blob/master/CHANGELOG-3.1.md).
Previous change logs can be found at [CHANGELOG-3.1](https://github.com/etcd-io/etcd/blob/main/CHANGELOG/CHANGELOG-3.1.md).
The minimum recommended etcd versions to run in **production** are 3.1.11+, 3.2.26+, and 3.3.11+.
## v3.2.33 (TBD)
<hr>
## [v3.2.32](https://github.com/etcd-io/etcd/releases/tag/v3.2.32) (2021-03-28)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.31...v3.2.32) and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/) for any breaking changes.
### Package `wal`
- add wal slice bound check to make sure entry index is not greater than the number of entries
- check slice size in decodeRecord
- fix panic when decoder not set
### Package `fileutil`
- fix constant for linux locking
### Go
- Compile with [*Go 1.12.17*](https://golang.org/doc/devel/release.html#go1.12).
<hr>
## [v3.2.27](https://github.com/etcd-io/etcd/releases/tag/v3.2.27) (2019-TBD)
## [v3.2.31](https://github.com/etcd-io/etcd/releases/tag/v3.2.31) (2020-08-18)
### etcdctl
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.30...v3.2.31) and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/) for any breaking changes.
### auth, etcdserver
- Improve [`runtime.FDUsage` call pattern to reduce objects malloc of Memory Usage and CPU Usage](https://github.com/etcd-io/etcd/pull/11986).
- [attaching a fake root token when calling `LeaseRevoke`](https://github.com/etcd-io/etcd/pull/11691).
- fix a data corruption bug caused by lease expiration when authentication is enabled and upgrading cluster from etcd-3.2 to etcd-3.3
### Package `runtime`
- Optimize [`runtime.FDUsage` by removing unnecessary sorting](https://github.com/etcd-io/etcd/pull/12214).
### Metrics, Monitoring
- Add [`os_fd_used` and `os_fd_limit` to monitor current OS file descriptors](https://github.com/etcd-io/etcd/pull/12214).
### Go
- Compile with [*Go 1.12.17*](https://golang.org/doc/devel/release.html#go1.12).
<hr>
## [v3.2.30](https://github.com/etcd-io/etcd/releases/tag/v3.2.30) (2020-04-01)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.29...v3.2.30) and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/) for any breaking changes.
### Package `wal`
- Add [`etcd_wal_write_bytes_total`](https://github.com/etcd-io/etcd/pull/11738).
### Metrics, Monitoring
- Add [`etcd_wal_write_bytes_total`](https://github.com/etcd-io/etcd/pull/11738).
### Go
- Compile with [*Go 1.12.17*](https://golang.org/doc/devel/release.html#go1.12).
<hr>
## [v3.2.29](https://github.com/etcd-io/etcd/releases/tag/v3.2.29) (2020-03-18)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.28...v3.2.29) and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/) for any breaking changes.
### etcd server
- [Fix corruption bug in defrag](https://github.com/etcd-io/etcd/pull/11613).
- Log [`[CLIENT-PORT]/health` check in server side](https://github.com/etcd-io/etcd/pull/11704).
### client v3
- Fix [`"hasleader"` metadata embedding](https://github.com/etcd-io/etcd/pull/11687).
- Previously, `clientv3.WithRequireLeader(ctx)` was overwriting existing context keys.
### Metrics, Monitoring
See [List of metrics](https://github.com/etcd-io/etcd/tree/main/Documentation/metrics) for all metrics per release.
- Add [`etcd_server_client_requests_total` with `"type"` and `"client_api_version"` labels](https://github.com/etcd-io/etcd/pull/11687).
### Go
- Compile with [*Go 1.8.7*](https://golang.org/doc/devel/release.html#go1.8).
<hr>
## [v3.2.28](https://github.com/etcd-io/etcd/releases/tag/v3.2.28) (2019-11-10)
### Improved
- Add `etcd --experimental-peer-skip-client-san-verification` to [skip verification of peer client address](https://github.com/etcd-io/etcd/pull/11195).
### Metrics, Monitoring
See [List of metrics](https://github.com/etcd-io/etcd/tree/main/Documentation/metrics) for all metrics per release.
Note that any `etcd_debugging_*` metrics are experimental and subject to change.
- Add [`etcd_cluster_version`](https://github.com/etcd-io/etcd/pull/11271) Prometheus metric.
### etcdserver
- Fix [`wait purge file loop during shutdown`](https://github.com/etcd-io/etcd/pull/11308).
- Previously, during shutdown etcd could accidentally remove needed wal files, resulting in catastrophic error `etcdserver: open wal error: wal: file not found.` during startup.
- Now, etcd makes sure the purge file loop exits before server signals stop of the raft node.
### Go
- Compile with [*Go 1.8.7*](https://golang.org/doc/devel/release.html#go1.8).
<hr>
## [v3.2.27](https://github.com/etcd-io/etcd/releases/tag/v3.2.27) (2019-09-17)
### etcdctl v3
- [Strip out insecure endpoints from DNS SRV records when using discovery](https://github.com/etcd-io/etcd/pull/10443) with etcdctl v2
- Add [`etcdctl endpoint health --write-out` support](https://github.com/etcd-io/etcd/pull/9540).
@ -19,19 +138,37 @@ The minimum recommended etcd versions to run in **production** are 3.1.11+, 3.2.
- The command output is changed. Previously, if endpoint is unreachable, the command output is
"\<endpoint\> is unhealthy: failed to connect: \<error message\>". This change unified the error message, all error types
now have the same output "\<endpoint\> is unhealthy: failed to commit proposal: \<error message\>".
- Fix [`etcdctl snapshot status` to not modify snapshot file](https://github.com/etcd-io/etcd/pull/11157).
- For example, start etcd `v3.3.10`
- Write some data
- Use etcdctl `v3.3.10` to save snapshot
- Somehow, upgrading Kubernetes fails, thus rolling back to previous version etcd `v3.2.24`
- Run etcdctl `v3.2.24` `snapshot status` against the snapshot file saved from `v3.3.10` server
- Run etcdctl `v3.2.24` `snapshot restore` fails with `"expected sha256 [12..."`
### Metrics, Monitoring
See [List of metrics](https://github.com/etcd-io/etcd/tree/main/Documentation/metrics) for all metrics per release.
Note that any `etcd_debugging_*` metrics are experimental and subject to change.
- Fix bug where [db_compaction_total_duration_milliseconds metric incorrectly measured duration as 0](https://github.com/etcd-io/etcd/pull/10646).
- Add [`etcd_debugging_mvcc_current_revision`](https://github.com/etcd-io/etcd/pull/11126) Prometheus metric.
- Add [`etcd_debugging_mvcc_compact_revision`](https://github.com/etcd-io/etcd/pull/11126) Prometheus metric.
### Go
- Compile with [*Go 1.8.7*](https://golang.org/doc/devel/release.html#go1.8).
<hr>
## [v3.2.26](https://github.com/etcd-io/etcd/releases/tag/v3.2.26) (2019-01-11)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.25...v3.2.26) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_3.md) for any breaking changes.
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.25...v3.2.26) and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_3/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/).**
### gRPC Proxy
@ -51,9 +188,9 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.25...v3.2.26) an
## [v3.2.25](https://github.com/etcd-io/etcd/releases/tag/v3.2.25) (2018-10-10)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.24...v3.2.25) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.24...v3.2.25) and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/).**
### Improved
@ -64,7 +201,7 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.24...v3.2.25) an
### Metrics, Monitoring
See [List of metrics](https://etcd.io/docs/v3.2.17/metrics/) for all metrics per release.
See [List of metrics](https://github.com/etcd-io/etcd/tree/main/Documentation/metrics) for all metrics per release.
Note that any `etcd_debugging_*` metrics are experimental and subject to change.
@ -98,9 +235,9 @@ Note that any `etcd_debugging_*` metrics are experimental and subject to change.
## [v3.2.24](https://github.com/etcd-io/etcd/releases/tag/v3.2.24) (2018-07-24)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.23...v3.2.24) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.23...v3.2.24) and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/).**
### Improved
@ -108,7 +245,7 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.23...v3.2.24) an
### Metrics, Monitoring
See [List of metrics](https://etcd.io/docs/v3.2.27/metrics/) for all metrics per release.
See [List of metrics](https://github.com/etcd-io/etcd/tree/main/Documentation/metrics) for all metrics per release.
Note that any `etcd_debugging_*` metrics are experimental and subject to change.
@ -154,9 +291,9 @@ Note that any `etcd_debugging_*` metrics are experimental and subject to change.
## [v3.2.23](https://github.com/etcd-io/etcd/releases/tag/v3.2.23) (2018-06-15)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.22...v3.2.23) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.22...v3.2.23) and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/).**
### Improved
@ -168,7 +305,7 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.22...v3.2.23) an
### Metrics, Monitoring
See [List of metrics](https://etcd.io/docs/v3.2.27/metrics/) for all metrics per release.
See [List of metrics](https://github.com/etcd-io/etcd/tree/main/Documentation/metrics) for all metrics per release.
Note that any `etcd_debugging_*` metrics are experimental and subject to change.
@ -185,9 +322,9 @@ Note that any `etcd_debugging_*` metrics are experimental and subject to change.
## [v3.2.22](https://github.com/etcd-io/etcd/releases/tag/v3.2.22) (2018-06-06)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.21...v3.2.22) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.21...v3.2.22) and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/).**
### Security, Authentication
@ -207,9 +344,9 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.21...v3.2.22) an
## [v3.2.21](https://github.com/etcd-io/etcd/releases/tag/v3.2.21) (2018-05-31)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.20...v3.2.21) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.20...v3.2.21) and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/).**
### etcd server
@ -228,9 +365,9 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.20...v3.2.21) an
## [v3.2.20](https://github.com/etcd-io/etcd/releases/tag/v3.2.20) (2018-05-09)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.19...v3.2.20) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.19...v3.2.20) and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/).**
### etcd server
@ -248,13 +385,13 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.19...v3.2.20) an
## [v3.2.19](https://github.com/etcd-io/etcd/releases/tag/v3.2.19) (2018-04-24)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.18...v3.2.19) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.18...v3.2.19) and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/).**
### Metrics, Monitoring
See [List of metrics](https://etcd.io/docs/v3.2.27/metrics/) for all metrics per release.
See [List of metrics](https://github.com/etcd-io/etcd/tree/main/Documentation/metrics) for all metrics per release.
Note that any `etcd_debugging_*` metrics are experimental and subject to change.
@ -291,9 +428,9 @@ Note that any `etcd_debugging_*` metrics are experimental and subject to change.
## [v3.2.18](https://github.com/etcd-io/etcd/releases/tag/v3.2.18) (2018-03-29)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.17...v3.2.18) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.17...v3.2.18) and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/).**
### Improved
@ -303,7 +440,7 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.17...v3.2.18) an
### Metrics, Monitoring
See [List of metrics](https://etcd.io/docs/v3.2.27/metrics/) for all metrics per release.
See [List of metrics](https://github.com/etcd-io/etcd/tree/main/Documentation/metrics) for all metrics per release.
Note that any `etcd_debugging_*` metrics are experimental and subject to change.
@ -319,9 +456,9 @@ Note that any `etcd_debugging_*` metrics are experimental and subject to change.
## [v3.2.17](https://github.com/etcd-io/etcd/releases/tag/v3.2.17) (2018-03-08)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.16...v3.2.17) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.16...v3.2.17) and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/).**
### etcd server
@ -349,9 +486,9 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.16...v3.2.17) an
## [v3.2.16](https://github.com/etcd-io/etcd/releases/tag/v3.2.16) (2018-02-12)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.15...v3.2.16) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.15...v3.2.16) and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/).**
### etcd server
@ -372,9 +509,9 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.15...v3.2.16) an
## [v3.2.15](https://github.com/etcd-io/etcd/releases/tag/v3.2.15) (2018-01-22)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.14...v3.2.15) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.14...v3.2.15) and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/).**
### etcd server
@ -391,9 +528,9 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.14...v3.2.15) an
## [v3.2.14](https://github.com/etcd-io/etcd/releases/tag/v3.2.14) (2018-01-11)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.13...v3.2.14) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.13...v3.2.14) and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/).**
### Improved
@ -413,9 +550,9 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.13...v3.2.14) an
## [v3.2.13](https://github.com/etcd-io/etcd/releases/tag/v3.2.13) (2018-01-02)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.12...v3.2.13) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.12...v3.2.13) and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/).**
### etcd server
@ -432,9 +569,9 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.12...v3.2.13) an
## [v3.2.12](https://github.com/etcd-io/etcd/releases/tag/v3.2.12) (2017-12-20)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.11...v3.2.12) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.11...v3.2.12) and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/).**
### Dependency
@ -464,9 +601,9 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.11...v3.2.12) an
## [v3.2.11](https://github.com/etcd-io/etcd/releases/tag/v3.2.11) (2017-12-05)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.10...v3.2.11) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.10...v3.2.11) and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/).**
### Dependency
@ -474,7 +611,7 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.10...v3.2.11) an
### Security, Authentication
See [security doc](https://github.com/etcd-io/etcd/blob/master/Documentation/op-guide/security.md) for more details.
See [security doc](https://etcd.io/docs/latest/op-guide/security/) for more details.
- Log [more details on TLS handshake failures](https://github.com/etcd-io/etcd/pull/8952/files).
@ -497,9 +634,9 @@ See [security doc](https://github.com/etcd-io/etcd/blob/master/Documentation/op-
## [v3.2.10](https://github.com/etcd-io/etcd/releases/tag/v3.2.10) (2017-11-16)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.9...v3.2.10) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.9...v3.2.10) and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/).**
### Dependency
@ -508,7 +645,7 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.9...v3.2.10) and
### Security, Authentication
See [security doc](https://github.com/etcd-io/etcd/blob/master/Documentation/op-guide/security.md) for more details.
See [security doc](https://etcd.io/docs/latest/op-guide/security/) for more details.
- Revert [discovery SRV auth `ServerName` with `*.{ROOT_DOMAIN}`](https://github.com/etcd-io/etcd/pull/8651) to support non-wildcard subject alternative names in the certs (see [issue #8445](https://github.com/etcd-io/etcd/issues/8445) for more contexts).
- For instance, `etcd --discovery-srv=etcd.local` will only authenticate peers/clients when the provided certs have root domain `etcd.local` (**not `*.etcd.local`**) as an entry in Subject Alternative Name (SAN) field.
@ -531,13 +668,13 @@ See [security doc](https://github.com/etcd-io/etcd/blob/master/Documentation/op-
## [v3.2.9](https://github.com/etcd-io/etcd/releases/tag/v3.2.9) (2017-10-06)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.8...v3.2.9) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.8...v3.2.9) and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/).**
### Security, Authentication
See [security doc](https://github.com/etcd-io/etcd/blob/master/Documentation/op-guide/security.md) for more details.
See [security doc](https://etcd.io/docs/latest/op-guide/security/) for more details.
- Update `golang.org/x/crypto/bcrypt` (see [golang/crypto@6c586e1](https://github.com/golang/crypto/commit/6c586e17d90a7d08bbbc4069984180dce3b04117)).
- Fix discovery SRV bootstrapping to [authenticate `ServerName` with `*.{ROOT_DOMAIN}`](https://github.com/etcd-io/etcd/pull/8651), in order to support sub-domain wildcard matching (see [issue #8445](https://github.com/etcd-io/etcd/issues/8445) for more contexts).
@ -553,9 +690,9 @@ See [security doc](https://github.com/etcd-io/etcd/blob/master/Documentation/op-
## [v3.2.8](https://github.com/etcd-io/etcd/releases/tag/v3.2.8) (2017-09-29)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.7...v3.2.8) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.7...v3.2.8) and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/).**
### client v2
@ -575,9 +712,9 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.7...v3.2.8) and
## [v3.2.7](https://github.com/etcd-io/etcd/releases/tag/v3.2.7) (2017-09-01)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.6...v3.2.7) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.6...v3.2.7) and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/).**
### Security, Authentication
@ -598,9 +735,9 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.6...v3.2.7) and
## [v3.2.6](https://github.com/etcd-io/etcd/releases/tag/v3.2.6) (2017-08-21)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.5...v3.2.6) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.5...v3.2.6) and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/).**
### etcd server
@ -610,7 +747,7 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.5...v3.2.6) and
### Metrics, Monitoring
See [List of metrics](https://etcd.io/docs/v3.2.27/metrics/) for all metrics per release.
See [List of metrics](https://github.com/etcd-io/etcd/tree/main/Documentation/metrics) for all metrics per release.
Note that any `etcd_debugging_*` metrics are experimental and subject to change.
@ -626,9 +763,9 @@ Note that any `etcd_debugging_*` metrics are experimental and subject to change.
## [v3.2.5](https://github.com/etcd-io/etcd/releases/tag/v3.2.5) (2017-08-04)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.4...v3.2.5) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.4...v3.2.5) and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/).**
### etcdctl v3
@ -636,13 +773,13 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.4...v3.2.5) and
### Security, Authentication
See [security doc](https://github.com/etcd-io/etcd/blob/master/Documentation/op-guide/security.md) for more details.
See [security doc](https://etcd.io/docs/latest/op-guide/security/) for more details.
- [Server supports reverse-lookup on wildcard DNS `SAN`](https://github.com/etcd-io/etcd/pull/8281). For instance, if peer cert contains only DNS names (no IP addresses) in Subject Alternative Name (SAN) field, server first reverse-lookups the remote IP address to get a list of names mapping to that address (e.g. `nslookup IPADDR`). Then accepts the connection if those names have a matching name with peer cert's DNS names (either by exact or wildcard match). If none is matched, server forward-lookups each DNS entry in peer cert (e.g. look up `example.default.svc` when the entry is `*.example.default.svc`), and accepts connection only when the host's resolved addresses have the matching IP address with the peer's remote IP address. For example, peer B's CSR (with `cfssl`) SAN field is `["*.example.default.svc", "*.example.default.svc.cluster.local"]` when peer B's remote IP address is `10.138.0.2`. When peer B tries to join the cluster, peer A reverse-lookup the IP `10.138.0.2` to get the list of host names. And either exact or wildcard match the host names with peer B's cert DNS names in Subject Alternative Name (SAN) field. If none of reverse/forward lookups worked, it returns an error `"tls: "10.138.0.2" does not match any of DNSNames ["*.example.default.svc","*.example.default.svc.cluster.local"]`. See [issue#8268](https://github.com/etcd-io/etcd/issues/8268) for more detail.
### Metrics, Monitoring
See [List of metrics](https://etcd.io/docs/v3.2.27/metrics/) for all metrics per release.
See [List of metrics](https://github.com/etcd-io/etcd/tree/main/Documentation/metrics) for all metrics per release.
Note that any `etcd_debugging_*` metrics are experimental and subject to change.
@ -666,9 +803,9 @@ Note that any `etcd_debugging_*` metrics are experimental and subject to change.
## [v3.2.4](https://github.com/etcd-io/etcd/releases/tag/v3.2.4) (2017-07-19)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.3...v3.2.4) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.3...v3.2.4) and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/).**
### etcd server
@ -688,9 +825,9 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.3...v3.2.4) and
## [v3.2.3](https://github.com/etcd-io/etcd/releases/tag/v3.2.3) (2017-07-14)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.2...v3.2.3) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.2...v3.2.3) and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/).**
### client v3
@ -711,9 +848,9 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.2...v3.2.3) and
## [v3.2.2](https://github.com/etcd-io/etcd/releases/tag/v3.2.2) (2017-07-07)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.1...v3.2.2) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.1...v3.2.2) and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/).**
### Improved
@ -722,7 +859,7 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.1...v3.2.2) and
### Security, Authentication
See [security doc](https://github.com/etcd-io/etcd/blob/master/Documentation/op-guide/security.md) for more details.
See [security doc](https://etcd.io/docs/latest/op-guide/security/) for more details.
- [Server accepts connections if IP matches, without checking DNS entries](https://github.com/etcd-io/etcd/pull/8223). For instance, if peer cert contains IP addresses and DNS names in Subject Alternative Name (SAN) field, and the remote IP address matches one of those IP addresses, server just accepts connection without further checking the DNS names. For example, peer B's CSR (with `cfssl`) SAN field is `["invalid.domain", "10.138.0.2"]` when peer B's remote IP address is `10.138.0.2` and `invalid.domain` is a invalid host. When peer B tries to join the cluster, peer A successfully authenticates B, since Subject Alternative Name (SAN) field has a valid matching IP address. See [issue#8206](https://github.com/etcd-io/etcd/issues/8206) for more detail.
@ -747,9 +884,9 @@ See [security doc](https://github.com/etcd-io/etcd/blob/master/Documentation/op-
## [v3.2.1](https://github.com/etcd-io/etcd/releases/tag/v3.2.1) (2017-06-23)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.0...v3.2.1) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.
See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.0...v3.2.1) and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/).**
### etcd server
@ -761,7 +898,7 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.2.0...v3.2.1) and
### Metrics, Monitoring
See [List of metrics](https://etcd.io/docs/v3.2.27/metrics/) for all metrics per release.
See [List of metrics](https://github.com/etcd-io/etcd/tree/main/Documentation/metrics) for all metrics per release.
Note that any `etcd_debugging_*` metrics are experimental and subject to change.
@ -777,9 +914,9 @@ Note that any `etcd_debugging_*` metrics are experimental and subject to change.
## [v3.2.0](https://github.com/etcd-io/etcd/releases/tag/v3.2.0) (2017-06-09)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.0...v3.2.0) and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md) for any breaking changes.
See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.0...v3.2.0) and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md).**
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.2 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_2/).**
### Improved
@ -804,7 +941,7 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.1.0...v3.2.0) and
### Metrics, Monitoring
See [List of metrics](https://etcd.io/docs/v3.2.27/metrics/) for all metrics per release.
See [List of metrics](https://github.com/etcd-io/etcd/tree/main/Documentation/metrics) for all metrics per release.
Note that any `etcd_debugging_*` metrics are experimental and subject to change.
@ -813,7 +950,7 @@ Note that any `etcd_debugging_*` metrics are experimental and subject to change.
### Security, Authentication
See [security doc](https://github.com/etcd-io/etcd/blob/master/Documentation/op-guide/security.md) for more details.
See [security doc](https://etcd.io/docs/latest/op-guide/security/) for more details.
- [TLS certificates get reloaded on every client connection](https://github.com/etcd-io/etcd/pull/7829). This is useful when replacing expiry certs without stopping etcd servers; it can be done by overwriting old certs with new ones. Refreshing certs for every connection should not have too much overhead, but can be improved in the future, with caching layer. Example tests can be found [here](https://github.com/etcd-io/etcd/blob/b041ce5d514a4b4aaeefbffb008f0c7570a18986/integration/v3_grpc_test.go#L1601-L1757).
- [Server denies incoming peer certs with wrong IP `SAN`](https://github.com/etcd-io/etcd/pull/7687). For instance, if peer cert contains any IP addresses in Subject Alternative Name (SAN) field, server authenticates a peer only when the remote IP address matches one of those IP addresses. This is to prevent unauthorized endpoints from joining the cluster. For example, peer B's CSR (with `cfssl`) SAN field is `["*.example.default.svc", "*.example.default.svc.cluster.local", "10.138.0.27"]` when peer B's actual IP address is `10.138.0.2`, not `10.138.0.27`. When peer B tries to join the cluster, peer A will reject B with the error `x509: certificate is valid for 10.138.0.27, not 10.138.0.2`, because B's remote IP address does not match the one in Subject Alternative Name (SAN) field.

1121
CHANGELOG/CHANGELOG-3.3.md Normal file

File diff suppressed because it is too large Load Diff

1292
CHANGELOG/CHANGELOG-3.4.md Normal file

File diff suppressed because it is too large Load Diff

545
CHANGELOG/CHANGELOG-3.5.md Normal file
View File

@ -0,0 +1,545 @@
Previous change logs can be found at [CHANGELOG-3.4](https://github.com/etcd-io/etcd/blob/main/CHANGELOG/CHANGELOG-3.4.md).
<hr>
## v3.5.12 (tbd)
### etcd server
- [Add livez/readyz HTTP endpoints](https://github.com/etcd-io/etcd/pull/17039)
## v3.5.11 (2023-12-07)
### etcd server
- Fix distributed tracing by ensuring `--experimental-distributed-tracing-sampling-rate` configuration option is available to [set tracing sample rate](https://github.com/etcd-io/etcd/pull/16951).
- Fix [url redirects while checking peer urls during new member addition](https://github.com/etcd-io/etcd/pull/16986)
### Dependencies
- Compile binaries using [go 1.20.12](https://github.com/etcd-io/etcd/pull/17077)
- Fix [CVE-2023-47108](https://github.com/advisories/GHSA-8pgv-569h-w5rw) by [bumping go.opentelemetry.io/otel to 1.20.0 and go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc to 0.46.0](https://github.com/etcd-io/etcd/pull/16946).
<hr>
## v3.5.10 (2023-10-27)
### etcd server
- Fix [`--socket-reuse-port` and `--socket-reuse-address` not able to be set in configuration file](https://github.com/etcd-io/etcd/pull/16435).
- Fix [corruption check may get a `ErrCompacted` error when server has just been compacted](https://github.com/etcd-io/etcd/pull/16048)
- Improve [Lease put performance for the case that auth is disabled or the user is admin](https://github.com/etcd-io/etcd/pull/16019)
- Improve [Skip getting authInfo from incoming context when auth is disabled](https://github.com/etcd-io/etcd/pull/16241)
- Fix [Hash and HashKV have duplicated RESTful API](https://github.com/etcd-io/etcd/pull/16490)
### etcdutl v3
- Add [optional --bump-revision and --mark-compacted flag to etcdutl snapshot restore operation](https://github.com/etcd-io/etcd/pull/16165).
### etcdctl v3
- Add [optional --bump-revision and --mark-compacted flag to etcdctl snapshot restore operation](https://github.com/etcd-io/etcd/pull/16165).
### etcd grpc-proxy
- Fix [Memberlist results not updated when proxy node down](https://github.com/etcd-io/etcd/pull/15907).
### Package `clientv3`
- Fix [Multiple endpoints with same prefix got mixed up](https://github.com/etcd-io/etcd/pull/15939)
- Fix [Unexpected blocking when barrier waits on a nonexistent key](https://github.com/etcd-io/etcd/pull/16188)
- Fix [Reset auth token when failing to authenticate due to auth being disabled](https://github.com/etcd-io/etcd/pull/16241)
- Fix [panic in etcd validate secure endpoints](https://github.com/etcd-io/etcd/pull/16565)
### Dependencies
- Compile binaries using [go 1.20.10](https://github.com/etcd-io/etcd/pull/16745).
- Upgrade gRPC to 1.58.3 in https://github.com/etcd-io/etcd/pull/16625, https://github.com/etcd-io/etcd/pull/16781 and https://github.com/etcd-io/etcd/pull/16790. Note that gRPC server will reject requests with connection header (refer to https://github.com/grpc/grpc-go/pull/4803).
- Upgrade [bbolt to v1.3.8](https://github.com/etcd-io/etcd/pull/16833)
<hr>
## v3.5.9 (2023-05-11)
### etcd server
- Fix [LeaseTimeToLive API may return keys to clients which have no read permission on the keys](https://github.com/etcd-io/etcd/pull/15815).
### Dependencies
- Compile binaries using [go 1.19.9](https://github.com/etcd-io/etcd/pull/15822).
<hr>
## v3.5.8 (2023-04-13)
### etcd server
- Add [`etcd --tls-min-version --tls-max-version`](https://github.com/etcd-io/etcd/pull/15483) to enable support for TLS 1.3.
- Add [`etcd --listen-client-http-urls`](https://github.com/etcd-io/etcd/pull/15589) flag to support separating http server from grpc one, thus giving full immunity to [watch stream starvation under high read load](https://github.com/etcd-io/etcd/issues/15402).
- Change [http2 frame scheduler to random algorithm](https://github.com/etcd-io/etcd/pull/15452)
- Fix [Watch response traveling back in time when reconnecting member downloads snapshot from the leader](https://github.com/etcd-io/etcd/pull/15515)
- Fix [race when starting both secure & insecure gRPC servers on the same address](https://github.com/etcd-io/etcd/pull/15517)
- Fix [server/auth: disallow creating empty permission ranges](https://github.com/etcd-io/etcd/pull/15619)
- Fix [aligning zap log timestamp resolution to microseconds](https://github.com/etcd-io/etcd/pull/15240). Etcd now uses zap timestamp format: `2006-01-02T15:04:05.999999Z0700` (microsecond instead of milliseconds precision).
- Fix [wsproxy did not print log in JSON format](https://github.com/etcd-io/etcd/pull/15661).
- Fix [CVE-2021-28235](https://nvd.nist.gov/vuln/detail/CVE-2021-28235) by [clearing password after authenticating the user](https://github.com/etcd-io/etcd/pull/15653).
- Fix [etcdserver may panic when parsing a JWT token without username or revision](https://github.com/etcd-io/etcd/pull/15676).
- Fix [Requested watcher progress notifications are not synchronised with stream](https://github.com/etcd-io/etcd/pull/15695).
### Package `netutil`
- Fix [consistently format IPv6 addresses for comparison](https://github.com/etcd-io/etcd/pull/15187).
### Package `clientv3`
- Fix [etcd might send duplicated events to watch clients](https://github.com/etcd-io/etcd/pull/15274).
### Dependencies
- Recommend [Go 1.19+](https://github.com/etcd-io/etcd/pull/15337).
- Compile binaries using [go to 1.19.8](https://github.com/etcd-io/etcd/pull/15651)
- Upgrade [golang.org/x/net to v0.7.0](https://github.com/etcd-io/etcd/pull/15337)
- Upgrade [bbolt to v1.3.7](https://github.com/etcd-io/etcd/pull/15222).
### Docker image
- [Remove nsswitch.conf from docker image](https://github.com/etcd-io/etcd/pull/15161)
- Fix [etcd docker images all tagged with amd64 architecture](https://github.com/etcd-io/etcd/pull/15612)
<hr>
## v3.5.7 (2023-01-20)
### etcd server
- Fix [Remove memberID from data corrupt alarm](https://github.com/etcd-io/etcd/pull/14852).
- Fix [Allow non mutating requests pass through quotaKVServer when NOSPACE](https://github.com/etcd-io/etcd/pull/14884).
- Fix [nil pointer panic for readonly txn due to nil response](https://github.com/etcd-io/etcd/pull/14899).
- Fix [The last record which was partially synced to disk isn't automatically repaired](https://github.com/etcd-io/etcd/pull/15069).
- Fix [etcdserver might promote a non-started learner](https://github.com/etcd-io/etcd/pull/15096).
### Package `clientv3`
- Reverted the fix to [auth invalid token and old revision errors in watch](https://github.com/etcd-io/etcd/pull/14995).
### Dependencies
- Recommend [Go 1.17+](https://github.com/etcd-io/etcd/pull/15019).
- Compile binaries using [Go 1.17.13](https://github.com/etcd-io/etcd/pull/15019)
- Bumped [some dependencies](https://github.com/etcd-io/etcd/pull/15018) to address some HIGH Vulnerabilities.
### Docker image
- Use [distroless base image](https://github.com/etcd-io/etcd/pull/15016) to address critical Vulnerabilities.
- Updated [base image from base-debian11 to static-debian11 and removed dependency on busybox](https://github.com/etcd-io/etcd/pull/15037).
<hr>
## v3.5.6 (2022-11-21)
### etcd server
- Fix [auth invalid token and old revision errors in watch](https://github.com/etcd-io/etcd/pull/14547)
- Fix [avoid closing a watch with ID 0 incorrectly](https://github.com/etcd-io/etcd/pull/14563)
- Fix [auth: fix data consistency issue caused by recovery from snapshot](https://github.com/etcd-io/etcd/pull/14648)
- Fix [revision might be inconsistency between members when etcd crashes during processing defragmentation operation](https://github.com/etcd-io/etcd/pull/14733)
- Fix [timestamp in inconsistent format](https://github.com/etcd-io/etcd/pull/14799)
- Fix [Failed resolving host due to lost DNS record](https://github.com/etcd-io/etcd/pull/14573)
### Package `clientv3`
- Fix [Add backoff before retry when watch stream returns unavailable](https://github.com/etcd-io/etcd/pull/14582).
- Fix [stack overflow error in double barrier](https://github.com/etcd-io/etcd/pull/14658)
- Fix [Refreshing token on CommonName based authentication causes segmentation violation in client](https://github.com/etcd-io/etcd/pull/14790).
### etcd grpc-proxy
- Add [`etcd grpc-proxy start --listen-cipher-suites`](https://github.com/etcd-io/etcd/pull/14500) flag to support adding configurable cipher list.
<hr>
## v3.5.5 (2022-09-15)
### Deprecations
- Deprecated [SetKeepAlive and SetKeepAlivePeriod in limitListenerConn](https://github.com/etcd-io/etcd/pull/14366).
### Package `clientv3`
- Fix [do not overwrite authTokenBundle on dial](https://github.com/etcd-io/etcd/pull/14132).
- Fix [IsOptsWithPrefix returns false even if WithPrefix() is included](https://github.com/etcd-io/etcd/pull/14187).
### etcd server
- [Build official darwin/arm64 artifacts](https://github.com/etcd-io/etcd/pull/14436).
- Add [`etcd --max-concurrent-streams`](https://github.com/etcd-io/etcd/pull/14219) flag to configure the max concurrent streams each client can open at a time, and defaults to math.MaxUint32.
- Add [`etcd --experimental-compact-hash-check-enabled --experimental-compact-hash-check-time`](https://github.com/etcd-io/etcd/issues/14039) flags to support enabling reliable corruption detection on compacted revisions.
- Fix [unexpected error during txn](https://github.com/etcd-io/etcd/issues/14110).
- Fix [lease leak issue due to tokenProvider isn't enabled when restoring auth store from a snapshot](https://github.com/etcd-io/etcd/pull/13205).
- Fix [the race condition between goroutine and channel on the same leases to be revoked](https://github.com/etcd-io/etcd/pull/14087).
- Fix [lessor may continue to schedule checkpoint after stepping down leader role](https://github.com/etcd-io/etcd/pull/14087).
- Fix [Restrict the max size of each WAL entry to the remaining size of the WAL file](https://github.com/etcd-io/etcd/pull/14127).
- Fix [Protect rangePermCache with a RW lock correctly](https://github.com/etcd-io/etcd/pull/14227)
- Fix [memberID equals zero in corruption alarm](https://github.com/etcd-io/etcd/pull/14272)
- Fix [Durability API guarantee broken in single node cluster](https://github.com/etcd-io/etcd/pull/14424)
- Fix [etcd fails to start after performing alarm list operation and then power off/on](https://github.com/etcd-io/etcd/pull/14429)
- Fix [authentication data not loaded on member startup](https://github.com/etcd-io/etcd/pull/14409)
### etcdctl v3
- Fix [etcdctl move-leader may fail for multiple endpoints](https://github.com/etcd-io/etcd/pull/14434)
### Other
- [Bump golang.org/x/crypto to latest version](https://github.com/etcd-io/etcd/pull/13996) to address [CVE-2022-27191](https://github.com/advisories/GHSA-8c26-wmh5-6g9v).
- [Bump OpenTelemetry to 1.0.1 and gRPC to 1.41.0](https://github.com/etcd-io/etcd/pull/14312).
<hr>
## v3.5.4 (2022-04-24)
### etcd server
- Fix [etcd panic on startup (auth enabled)](https://github.com/etcd-io/etcd/pull/13946)
### package `client/pkg/v3`
- [Revert the change of trimming the trailing dot from SRV.Target](https://github.com/etcd-io/etcd/pull/13950) returned by DNS lookup
<hr>
## v3.5.3 (2022-04-13)
### etcd server
- Fix [Provide a better liveness probe for when etcd runs as a Kubernetes pod](https://github.com/etcd-io/etcd/pull/13706)
- Fix [inconsistent log format](https://github.com/etcd-io/etcd/pull/13864)
- Fix [Inconsistent revision and data occurs](https://github.com/etcd-io/etcd/pull/13908)
- Fix [Etcdserver is still in progress of processing LeaseGrantRequest when it receives a LeaseKeepAliveRequest on the same leaseID](https://github.com/etcd-io/etcd/pull/13932)
- Fix [consistent_index coming from snapshot is overwritten by the old local value](https://github.com/etcd-io/etcd/pull/13933)
- [Update container base image snapshot](https://github.com/etcd-io/etcd/pull/13862)
- Fix [Defrag unsets backend options](https://github.com/etcd-io/etcd/pull/13701).
### package `client/pkg/v3`
- [Trim the suffix dot from the target](https://github.com/etcd-io/etcd/pull/13714) in SRV records returned by DNS lookup
### etcdctl v3
- [Always print the raft_term in decimal](https://github.com/etcd-io/etcd/pull/13727) when displaying member list in json.
<hr>
## [v3.5.2](https://github.com/etcd-io/etcd/releases/tag/v3.5.2) (2022-02-01)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.5.1...v3.5.2) and [v3.5 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_5/) for any breaking changes.
### etcd server
- Fix [exclude the same alarm type activated by multiple peers](https://github.com/etcd-io/etcd/pull/13476).
- Add [`etcd --experimental-enable-lease-checkpoint-persist`](https://github.com/etcd-io/etcd/pull/13508) flag to enable checkpoint persisting.
- Fix [Lease checkpoints don't prevent to reset ttl on leader change](https://github.com/etcd-io/etcd/pull/13508), requires enabling checkpoint persisting.
- Fix [assertion failed due to tx closed when recovering v3 backend from a snapshot db](https://github.com/etcd-io/etcd/pull/13501)
- Fix [segmentation violation(SIGSEGV) error due to premature unlocking of watchableStore](https://github.com/etcd-io/etcd/pull/13541)
<hr>
## [v3.5.1](https://github.com/etcd-io/etcd/releases/tag/v3.5.1) (2021-10-15)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.5.0...v3.5.1) and [v3.5 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_5/) for any breaking changes.
### etcd server
- Fix [self-signed-cert-validity parameter cannot be specified in the config file](https://github.com/etcd-io/etcd/pull/13237).
- Fix [ensure that cluster members stored in v2store and backend are in sync](https://github.com/etcd-io/etcd/pull/13348)
### etcd client
- [Fix etcd client sends invalid :authority header](https://github.com/etcd-io/etcd/issues/13192)
### package clientv3
- Endpoints self identify now as `etcd-endpoints://{id}/{authority}` where authority is based on first endpoint passed, for example `etcd-endpoints://0xc0009d8540/localhost:2079`
### Other
- Updated [base image](https://github.com/etcd-io/etcd/pull/13386) from `debian:buster-v1.4.0` to `debian:bullseye-20210927` to fix the following critical CVEs:
- [CVE-2021-3711](https://nvd.nist.gov/vuln/detail/CVE-2021-3711): miscalculation of a buffer size in openssl's SM2 decryption
- [CVE-2021-35942](https://nvd.nist.gov/vuln/detail/CVE-2021-35942): integer overflow flaw in glibc
- [CVE-2019-9893](https://nvd.nist.gov/vuln/detail/CVE-2019-9893): incorrect syscall argument generation in libseccomp
- [CVE-2021-36159](https://nvd.nist.gov/vuln/detail/CVE-2021-36159): libfetch in apk-tools mishandles numeric strings in FTP and HTTP protocols to allow out of bound reads.
<hr>
## v3.5.0 (2021-06)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.4.0...v3.5.0) and [v3.5 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_5/) for any breaking changes.
- [v3.5.0](https://github.com/etcd-io/etcd/releases/tag/v3.5.0) (2021 TBD), see [code changes](https://github.com/etcd-io/etcd/compare/v3.5.0-rc.1...v3.5.0).
- [v3.5.0-rc.1](https://github.com/etcd-io/etcd/releases/tag/v3.5.0-rc.1) (2021-06-10), see [code changes](https://github.com/etcd-io/etcd/compare/v3.5.0-rc.0...v3.5.0-rc.1).
- [v3.5.0-rc.0](https://github.com/etcd-io/etcd/releases/tag/v3.5.0-rc.0) (2021-06-04), see [code changes](https://github.com/etcd-io/etcd/compare/v3.5.0-beta.4...v3.5.0-rc.0).
- [v3.5.0-beta.4](https://github.com/etcd-io/etcd/releases/tag/v3.5.0-beta.4) (2021-05-26), see [code changes](https://github.com/etcd-io/etcd/compare/v3.5.0-beta.3...v3.5.0-beta.4).
- [v3.5.0-beta.3](https://github.com/etcd-io/etcd/releases/tag/v3.5.0-beta.3) (2021-05-18), see [code changes](https://github.com/etcd-io/etcd/compare/v3.5.0-beta.2...v3.5.0-beta.3).
- [v3.5.0-beta.2](https://github.com/etcd-io/etcd/releases/tag/v3.5.0-beta.2) (2021-05-18), see [code changes](https://github.com/etcd-io/etcd/compare/v3.5.0-beta.1...v3.5.0-beta.2).
- [v3.5.0-beta.1](https://github.com/etcd-io/etcd/releases/tag/v3.5.0-beta.1) (2021-05-18), see [code changes](https://github.com/etcd-io/etcd/compare/v3.4.0...v3.5.0-beta.1).
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v3.5 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_3_5/).**
### Breaking Changes
- `go.etcd.io/etcd` Go packages have moved to `go.etcd.io/etcd/{api,pkg,raft,client,etcdctl,server,raft,tests}/v3` to follow the [Go modules](https://github.com/golang/go/wiki/Modules) conventions
- `go.etcd.io/clientv3/snapshot` SnapshotManager class have moved to `go.etcd.io/clientv3/etcdctl`.
The method `snapshot.Save` to download a snapshot from the remote server was preserved in 'go.etcd.io/clientv3/snapshot`.
- `go.etcd.io/client' package got migrated to 'go.etcd.io/client/v2'.
- Changed behavior of clientv3 API [MemberList](https://github.com/etcd-io/etcd/pull/11639).
- Previously, it is directly served with server's local data, which could be stale.
- Now, it is served with linearizable guarantee. If the server is disconnected from quorum, `MemberList` call will fail.
- [gRPC gateway](https://github.com/grpc-ecosystem/grpc-gateway) only supports [`/v3`](TODO) endpoint.
- Deprecated [`/v3beta`](https://github.com/etcd-io/etcd/pull/9298).
- `curl -L http://localhost:2379/v3beta/kv/put -X POST -d '{"key": "Zm9v", "value": "YmFy"}'` doesn't work in v3.5. Use `curl -L http://localhost:2379/v3/kv/put -X POST -d '{"key": "Zm9v", "value": "YmFy"}'` instead.
- **`etcd --experimental-enable-v2v3` flag remains experimental and to be deprecated.**
- v2 storage emulation feature will be deprecated in the next release.
- etcd 3.5 is the last version that supports V2 API. Flags `--enable-v2` and `--experimental-enable-v2v3` [are now deprecated](https://github.com/etcd-io/etcd/pull/12940) and will be removed in etcd v3.6 release.
- **`etcd --experimental-backend-bbolt-freelist-type` flag has been deprecated.** Use **`etcd --backend-bbolt-freelist-type`** instead. The default type is hashmap and it is stable now.
- **`etcd --debug` flag has been deprecated.** Use **`etcd --log-level=debug`** instead.
- Remove [`embed.Config.Debug`](https://github.com/etcd-io/etcd/pull/10947).
- **`etcd --log-output` flag has been deprecated.** Use **`etcd --log-outputs`** instead.
- **`etcd --logger=zap --log-outputs=stderr`** is now the default.
- **`etcd --logger=capnslog` flag value has been deprecated.**
- **`etcd --logger=zap --log-outputs=default` flag value is not supported.**.
- Use `etcd --logger=zap --log-outputs=stderr`.
- Or, use `etcd --logger=zap --log-outputs=systemd/journal` to send logs to the local systemd journal.
- Previously, if etcd parent process ID (PPID) is 1 (e.g. run with systemd), `etcd --logger=capnslog --log-outputs=default` redirects server logs to local systemd journal. And if write to journald fails, it writes to `os.Stderr` as a fallback.
- However, even with PPID 1, it can fail to dial systemd journal (e.g. run embedded etcd with Docker container). Then, [every single log write will fail](https://github.com/etcd-io/etcd/pull/9729) and fall back to `os.Stderr`, which is inefficient.
- To avoid this problem, systemd journal logging must be configured manually.
- **`etcd --log-outputs=stderr`** is now the default.
- **`etcd --log-package-levels` flag for `capnslog` has been deprecated.** Now, **`etcd --logger=zap --log-outputs=stderr`** is the default.
- **`[CLIENT-URL]/config/local/log` endpoint has been deprecated, as is `etcd --log-package-levels` flag.**
- `curl http://127.0.0.1:2379/config/local/log -XPUT -d '{"Level":"DEBUG"}'` won't work.
- Please use `etcd --logger=zap --log-outputs=stderr` instead.
- Deprecated `etcd_debugging_mvcc_db_total_size_in_bytes` Prometheus metric. Use `etcd_mvcc_db_total_size_in_bytes` instead.
- Deprecated `etcd_debugging_mvcc_put_total` Prometheus metric. Use `etcd_mvcc_put_total` instead.
- Deprecated `etcd_debugging_mvcc_delete_total` Prometheus metric. Use `etcd_mvcc_delete_total` instead.
- Deprecated `etcd_debugging_mvcc_txn_total` Prometheus metric. Use `etcd_mvcc_txn_total` instead.
- Deprecated `etcd_debugging_mvcc_range_total` Prometheus metric. Use `etcd_mvcc_range_total` instead.
- Main branch `/version` outputs `3.5.0-pre`, instead of `3.4.0+git`.
- Changed `proxy` package function signature to [support structured logger](https://github.com/etcd-io/etcd/pull/11614).
- Previously, `NewClusterProxy(c *clientv3.Client, advaddr string, prefix string) (pb.ClusterServer, <-chan struct{})`, now `NewClusterProxy(lg *zap.Logger, c *clientv3.Client, advaddr string, prefix string) (pb.ClusterServer, <-chan struct{})`.
- Previously, `Register(c *clientv3.Client, prefix string, addr string, ttl int)`, now `Register(lg *zap.Logger, c *clientv3.Client, prefix string, addr string, ttl int) <-chan struct{}`.
- Previously, `NewHandler(t *http.Transport, urlsFunc GetProxyURLs, failureWait time.Duration, refreshInterval time.Duration) http.Handler`, now `NewHandler(lg *zap.Logger, t *http.Transport, urlsFunc GetProxyURLs, failureWait time.Duration, refreshInterval time.Duration) http.Handler`.
- Changed `pkg/flags` function signature to [support structured logger](https://github.com/etcd-io/etcd/pull/11616).
- Previously, `SetFlagsFromEnv(prefix string, fs *flag.FlagSet) error`, now `SetFlagsFromEnv(lg *zap.Logger, prefix string, fs *flag.FlagSet) error`.
- Previously, `SetPflagsFromEnv(prefix string, fs *pflag.FlagSet) error`, now `SetPflagsFromEnv(lg *zap.Logger, prefix string, fs *pflag.FlagSet) error`.
- ClientV3 supports [grpc resolver API](https://github.com/etcd-io/etcd/blob/main/client/v3/naming/resolver/resolver.go).
- Endpoints can be managed using [endpoints.Manager](https://github.com/etcd-io/etcd/blob/main/client/v3/naming/endpoints/endpoints.go)
- Previously supported [GRPCResolver was decomissioned](https://github.com/etcd-io/etcd/pull/12675). Use [resolver](https://github.com/etcd-io/etcd/blob/main/client/v3/naming/resolver/resolver.go) instead.
- Turned on [--pre-vote by default](https://github.com/etcd-io/etcd/pull/12770). Should prevent disrupting RAFT leader by an individual member.
- [ETCD_CLIENT_DEBUG env](https://github.com/etcd-io/etcd/pull/12786): Now supports log levels (debug, info, warn, error, dpanic, panic, fatal). Only when set, overrides application-wide grpc logging settings.
- [Embed Etcd.Close()](https://github.com/etcd-io/etcd/pull/12828) needs to called exactly once and closes Etcd.Err() stream.
- [Embed Etcd does not override global/grpc logger](https://github.com/etcd-io/etcd/pull/12861) be default any longer. If desired, please call `embed.Config::SetupGlobalLoggers()` explicitly.
- [Embed Etcd custom logger should be configured using simpler builder `NewZapLoggerBuilder`](https://github.com/etcd-io/etcd/pull/12973).
- Client errors of `context cancelled` or `context deadline exceeded` are exposed as `codes.Canceled` and `codes.DeadlineExceeded`, instead of `codes.Unknown`.
### Storage format changes
- [WAL log's snapshots persists raftpb.ConfState](https://github.com/etcd-io/etcd/pull/12735)
- [Backend persists raftpb.ConfState](https://github.com/etcd-io/etcd/pull/12962) in the `meta` bucket `confState` key.
- [Backend persists applied term](https://github.com/etcd-io/etcd/pull/) in the `meta` bucket.
- Backend persists `downgrade` in the `cluster` bucket
### Security
- Add [`TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256` and `TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256` to `etcd --cipher-suites`](https://github.com/etcd-io/etcd/pull/11864).
- Changed [the format of WAL entries related to auth for not keeping password as a plain text](https://github.com/etcd-io/etcd/pull/11943).
- Add third party [Security Audit Report](https://github.com/etcd-io/etcd/pull/12201).
- A [log warning](https://github.com/etcd-io/etcd/pull/12242) is added when etcd uses any existing directory that has a permission different than 700 on Linux and 777 on Windows.
- Add optional [`ClientCertFile` and `ClientKeyFile`](https://github.com/etcd-io/etcd/pull/12705) options for peer and client tls configuration when split certificates are used.
### Metrics, Monitoring
See [List of metrics](https://etcd.io/docs/latest/metrics/) for all metrics per release.
Note that any `etcd_debugging_*` metrics are experimental and subject to change.
- Deprecated `etcd_debugging_mvcc_db_total_size_in_bytes` Prometheus metric. Use `etcd_mvcc_db_total_size_in_bytes` instead.
- Deprecated `etcd_debugging_mvcc_put_total` Prometheus metric. Use `etcd_mvcc_put_total` instead.
- Deprecated `etcd_debugging_mvcc_delete_total` Prometheus metric. Use `etcd_mvcc_delete_total` instead.
- Deprecated `etcd_debugging_mvcc_txn_total` Prometheus metric. Use `etcd_mvcc_txn_total` instead.
- Deprecated `etcd_debugging_mvcc_range_total` Prometheus metric. Use `etcd_mvcc_range_total` instead.
- Add [`etcd_debugging_mvcc_current_revision`](https://github.com/etcd-io/etcd/pull/11126) Prometheus metric.
- Add [`etcd_debugging_mvcc_compact_revision`](https://github.com/etcd-io/etcd/pull/11126) Prometheus metric.
- Change [`etcd_cluster_version`](https://github.com/etcd-io/etcd/pull/11254) Prometheus metrics to include only major and minor version.
- Add [`etcd_debugging_mvcc_total_put_size_in_bytes`](https://github.com/etcd-io/etcd/pull/11374) Prometheus metric.
- Add [`etcd_server_client_requests_total` with `"type"` and `"client_api_version"` labels](https://github.com/etcd-io/etcd/pull/11687).
- Add [`etcd_wal_write_bytes_total`](https://github.com/etcd-io/etcd/pull/11738).
- Add [`etcd_debugging_auth_revision`](https://github.com/etcd-io/etcd/commit/f14d2a087f7b0fd6f7980b95b5e0b945109c95f3).
- Add [`os_fd_used` and `os_fd_limit` to monitor current OS file descriptors](https://github.com/etcd-io/etcd/pull/12214).
- Add [`etcd_disk_defrag_inflight`](https://github.com/etcd-io/etcd/pull/13395).
### etcd server
- Add [don't attempt to grant nil permission to a role](https://github.com/etcd-io/etcd/pull/13086).
- Add [don't activate alarms w/missing AlarmType](https://github.com/etcd-io/etcd/pull/13084).
- Add [`TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256` and `TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256` to `etcd --cipher-suites`](https://github.com/etcd-io/etcd/pull/11864).
- Automatically [create parent directory if it does not exist](https://github.com/etcd-io/etcd/pull/9626) (fix [issue#9609](https://github.com/etcd-io/etcd/issues/9609)).
- v4.0 will configure `etcd --enable-v2=true --enable-v2v3=/aaa` to enable v2 API server that is backed by **v3 storage**.
- [`etcd --backend-bbolt-freelist-type`] flag is now stable.
- `etcd --experimental-backend-bbolt-freelist-type` has been deprecated.
- Support [downgrade API](https://github.com/etcd-io/etcd/pull/11715).
- Deprecate v2 apply on cluster version. [Use v3 request to set cluster version and recover cluster version from v3 backend](https://github.com/etcd-io/etcd/pull/11427).
- [Use v2 api to update cluster version to support mixed version cluster during upgrade](https://github.com/etcd-io/etcd/pull/12988).
- [Fix corruption bug in defrag](https://github.com/etcd-io/etcd/pull/11613).
- Fix [quorum protection logic when promoting a learner](https://github.com/etcd-io/etcd/pull/11640).
- Improve [peer corruption checker](https://github.com/etcd-io/etcd/pull/11621) to work when peer mTLS is enabled.
- Log [`[CLIENT-PORT]/health` check in server side](https://github.com/etcd-io/etcd/pull/11704).
- Log [successful etcd server-side health check in debug level](https://github.com/etcd-io/etcd/pull/12677).
- Improve [compaction performance when latest index is greater than 1-million](https://github.com/etcd-io/etcd/pull/11734).
- [Refactor consistentindex](https://github.com/etcd-io/etcd/pull/11699).
- [Add log when etcdserver failed to apply command](https://github.com/etcd-io/etcd/pull/11670).
- Improve [count-only range performance](https://github.com/etcd-io/etcd/pull/11771).
- Remove [redundant storage restore operation to shorten the startup time](https://github.com/etcd-io/etcd/pull/11779).
- With 40 million key test data,it can shorten the startup time from 5 min to 2.5 min.
- [Fix deadlock bug in mvcc](https://github.com/etcd-io/etcd/pull/11817).
- Fix [inconsistency between WAL and server snapshot](https://github.com/etcd-io/etcd/pull/11888).
- Previously, server restore fails if it had crashed after persisting raft hard state but before saving snapshot.
- See https://github.com/etcd-io/etcd/issues/10219 for more.
- Add [missing CRC checksum check in WAL validate method otherwise causes panic](https://github.com/etcd-io/etcd/pull/11924).
- See https://github.com/etcd-io/etcd/issues/11918.
- Improve logging around snapshot send and receive.
- [Push down RangeOptions.limit argv into index tree to reduce memory overhead](https://github.com/etcd-io/etcd/pull/11990).
- Add [reason field for /health response](https://github.com/etcd-io/etcd/pull/11983).
- Add [exclude alarms from health check conditionally](https://github.com/etcd-io/etcd/pull/12880).
- Add [`etcd --unsafe-no-fsync`](https://github.com/etcd-io/etcd/pull/11946) flag.
- Setting the flag disables all uses of fsync, which is unsafe and will cause data loss. This flag makes it possible to run an etcd node for testing and development without placing lots of load on the file system.
- Add [`etcd --auth-token-ttl`](https://github.com/etcd-io/etcd/pull/11980) flag to customize `simpleTokenTTL` settings.
- Improve [`runtime.FDUsage` call pattern to reduce objects malloc of Memory Usage and CPU Usage](https://github.com/etcd-io/etcd/pull/11986).
- Improve [mvcc.watchResponse channel Memory Usage](https://github.com/etcd-io/etcd/pull/11987).
- Log [expensive request info in UnaryInterceptor](https://github.com/etcd-io/etcd/pull/12086).
- [Fix invalid Go type in etcdserverpb](https://github.com/etcd-io/etcd/pull/12000).
- [Improve healthcheck by using v3 range request and its corresponding timeout](https://github.com/etcd-io/etcd/pull/12195).
- Add [`etcd --experimental-watch-progress-notify-interval`](https://github.com/etcd-io/etcd/pull/12216) flag to make watch progress notify interval configurable.
- Fix [server panic in slow writes warnings](https://github.com/etcd-io/etcd/issues/12197).
- Fixed via [PR#12238](https://github.com/etcd-io/etcd/pull/12238).
- [Fix server panic](https://github.com/etcd-io/etcd/pull/12288) when force-new-cluster flag is enabled in a cluster which had learner node.
- Add [`etcd --self-signed-cert-validity`](https://github.com/etcd-io/etcd/pull/12429) flag to support setting certificate expiration time.
- Notice, certificates generated by etcd are valid for 1 year by default when specifying the auto-tls or peer-auto-tls option.
- Add [`etcd --experimental-warning-apply-duration`](https://github.com/etcd-io/etcd/pull/12448) flag which allows apply duration threshold to be configurable.
- Add [`etcd --experimental-memory-mlock`](https://github.com/etcd-io/etcd/pull/TODO) flag which prevents etcd memory pages to be swapped out.
- Add [`etcd --socket-reuse-port`](https://github.com/etcd-io/etcd/pull/12702) flag
- Setting this flag enables `SO_REUSEPORT` which allows rebind of a port already in use. User should take caution when using this flag to ensure flock is properly enforced.
- Add [`etcd --socket-reuse-address`](https://github.com/etcd-io/etcd/pull/12702) flag
- Setting this flag enables `SO_REUSEADDR` which allows binding to an address in `TIME_WAIT` state, improving etcd restart time.
- Reduce [around 30% memory allocation by logging range response size without marshal](https://github.com/etcd-io/etcd/pull/12871).
- `ETCD_VERIFY="all"` environment triggers [additional verification of consistency](https://github.com/etcd-io/etcd/pull/12901) of etcd data-dir files.
- Add [`etcd --enable-log-rotation`](https://github.com/etcd-io/etcd/pull/12774) boolean flag which enables log rotation if true.
- Add [`etcd --log-rotation-config-json`](https://github.com/etcd-io/etcd/pull/12774) flag which allows passthrough of JSON config to configure log rotation for a file output target.
- Add experimental distributed tracing boolean flag [`--experimental-enable-distributed-tracing`](https://github.com/etcd-io/etcd/pull/12919) which enables tracing.
- Add [`etcd --experimental-distributed-tracing-address`](https://github.com/etcd-io/etcd/pull/12919) string flag which allows configuring the OpenTelemetry collector address.
- Add [`etcd --experimental-distributed-tracing-service-name`](https://github.com/etcd-io/etcd/pull/12919) string flag which allows changing the default "etcd" service name.
- Add [`etcd --experimental-distributed-tracing-instance-id`](https://github.com/etcd-io/etcd/pull/12919) string flag which configures an instance ID, which must be unique per etcd instance.
- Add [`--experimental-bootstrap-defrag-threshold-megabytes`](https://github.com/etcd-io/etcd/pull/12941) which configures a threshold for the unused db size and etcdserver will automatically perform defragmentation on bootstrap when it exceeds this value. The functionality is disabled if the value is 0.
### Package `runtime`
- Optimize [`runtime.FDUsage` by removing unnecessary sorting](https://github.com/etcd-io/etcd/pull/12214).
### Package `embed`
- Remove [`embed.Config.Debug`](https://github.com/etcd-io/etcd/pull/10947).
- Use `embed.Config.LogLevel` instead.
- Add [`embed.Config.ZapLoggerBuilder`](https://github.com/etcd-io/etcd/pull/11147) to allow creating a custom zap logger.
- Replace [global `*zap.Logger` with etcd server logger object](https://github.com/etcd-io/etcd/pull/12212).
- Add [`embed.Config.EnableLogRotation`](https://github.com/etcd-io/etcd/pull/12774) which enables log rotation if true.
- Add [`embed.Config.LogRotationConfigJSON`](https://github.com/etcd-io/etcd/pull/12774) to allow passthrough of JSON config to configure log rotation for a file output target.
- Add [`embed.Config.ExperimentalEnableDistributedTracing`](https://github.com/etcd-io/etcd/pull/12919) which enables experimental distributed tracing if true.
- Add [`embed.Config.ExperimentalDistributedTracingAddress`](https://github.com/etcd-io/etcd/pull/12919) which allows overriding default collector address.
- Add [`embed.Config.ExperimentalDistributedTracingServiceName`](https://github.com/etcd-io/etcd/pull/12919) which allows overriding default "etcd" service name.
- Add [`embed.Config.ExperimentalDistributedTracingServiceInstanceID`](https://github.com/etcd-io/etcd/pull/12919) which allows configuring an instance ID, which must be uniquer per etcd instance.
### Package `clientv3`
- Remove [excessive watch cancel logging messages](https://github.com/etcd-io/etcd/pull/12187).
- See [kubernetes/kubernetes#93450](https://github.com/kubernetes/kubernetes/issues/93450).
- Add [`TryLock`](https://github.com/etcd-io/etcd/pull/11104) method to `clientv3/concurrency/Mutex`. A non-blocking method on `Mutex` which does not wait to get lock on the Mutex, returns immediately if Mutex is locked by another session.
- Fix [client balancer failover against multiple endpoints](https://github.com/etcd-io/etcd/pull/11184).
- Fix [`"kube-apiserver: failover on multi-member etcd cluster fails certificate check on DNS mismatch"`](https://github.com/kubernetes/kubernetes/issues/83028).
- Fix [IPv6 endpoint parsing in client](https://github.com/etcd-io/etcd/pull/11211).
- Fix ["1.16: etcd client does not parse IPv6 addresses correctly when members are joining" (kubernetes#83550)](https://github.com/kubernetes/kubernetes/issues/83550).
- Fix [errors caused by grpc changing balancer/resolver API](https://github.com/etcd-io/etcd/pull/11564). This change is compatible with grpc >= [v1.26.0](https://github.com/grpc/grpc-go/releases/tag/v1.26.0), but is not compatible with < v1.26.0 version.
- Use [ServerName as the authority](https://github.com/etcd-io/etcd/pull/11574) after bumping to grpc v1.26.0. Remove workaround in [#11184](https://github.com/etcd-io/etcd/pull/11184).
- Fix [`"hasleader"` metadata embedding](https://github.com/etcd-io/etcd/pull/11687).
- Previously, `clientv3.WithRequireLeader(ctx)` was overwriting existing context keys.
- Fix [watch leak caused by lazy cancellation](https://github.com/etcd-io/etcd/pull/11850). When clients cancel their watches, a cancel request will now be immediately sent to the server instead of waiting for the next watch event.
- Make sure [save snapshot downloads checksum for integrity checks](https://github.com/etcd-io/etcd/pull/11896).
- Fix [auth token invalid after watch reconnects](https://github.com/etcd-io/etcd/pull/12264). Get AuthToken automatically when clientConn is ready.
- Improve [clientv3:get AuthToken gracefully without extra connection](https://github.com/etcd-io/etcd/pull/12165).
- Changed [clientv3 dialing code](https://github.com/etcd-io/etcd/pull/12671) to use grpc resolver API instead of custom balancer.
- Endpoints self identify now as `etcd-endpoints://{id}/#initially={list of endpoints}` e.g. `etcd-endpoints://0xc0009d8540/#initially=[localhost:2079]`
- Make sure [save snapshot downloads checksum for integrity checks](https://github.com/etcd-io/etcd/pull/11896).
### Package `lease`
- Fix [memory leak in follower nodes](https://github.com/etcd-io/etcd/pull/11731).
- https://github.com/etcd-io/etcd/issues/11495
- https://github.com/etcd-io/etcd/issues/11730
- Make sure [grant/revoke won't be applied repeatedly after restarting etcd](https://github.com/etcd-io/etcd/pull/11935).
### Package `wal`
- Add [`etcd_wal_write_bytes_total`](https://github.com/etcd-io/etcd/pull/11738).
- Handle [out-of-range slice bound in `ReadAll` and entry limit in `decodeRecord`](https://github.com/etcd-io/etcd/pull/11793).
### etcdctl v3
- Fix `etcdctl member add` command to prevent potential timeout. ([PR#11194](https://github.com/etcd-io/etcd/pull/11194) and [PR#11638](https://github.com/etcd-io/etcd/pull/11638))
- Add [`etcdctl watch --progress-notify`](https://github.com/etcd-io/etcd/pull/11462) flag.
- Add [`etcdctl auth status`](https://github.com/etcd-io/etcd/pull/11536) command to check if authentication is enabled
- Add [`etcdctl get --count-only`](https://github.com/etcd-io/etcd/pull/11743) flag for output type `fields`.
- Add [`etcdctl member list -w=json --hex`](https://github.com/etcd-io/etcd/pull/11812) flag to print memberListResponse in hex format json.
- Changed [`etcdctl lock <lockname> exec-command`](https://github.com/etcd-io/etcd/pull/12829) to return exit code of exec-command.
- [New tool: `etcdutl`](https://github.com/etcd-io/etcd/pull/12971) incorporated functionality of: `etcdctl snapshot status|restore`, `etcdctl backup`, `etcdctl defrag --data-dir ...`.
- [ETCDCTL_API=3 `etcdctl migrate`](https://github.com/etcd-io/etcd/pull/12971) has been decommissioned. Use etcd <=v3.4 to restore v2 storage.
### gRPC gateway
- [gRPC gateway](https://github.com/grpc-ecosystem/grpc-gateway) only supports [`/v3`](TODO) endpoint.
- Deprecated [`/v3beta`](https://github.com/etcd-io/etcd/pull/9298).
- `curl -L http://localhost:2379/v3beta/kv/put -X POST -d '{"key": "Zm9v", "value": "YmFy"}'` does work in v3.5. Use `curl -L http://localhost:2379/v3/kv/put -X POST -d '{"key": "Zm9v", "value": "YmFy"}'` instead.
- Set [`enable-grpc-gateway`](https://github.com/etcd-io/etcd/pull/12297) flag to true when using a config file to keep the defaults the same as the command line configuration.
### gRPC Proxy
- Fix [`panic on error`](https://github.com/etcd-io/etcd/pull/11694) for metrics handler.
- Add [gRPC keepalive related flags](https://github.com/etcd-io/etcd/pull/11711) `grpc-keepalive-min-time`, `grpc-keepalive-interval` and `grpc-keepalive-timeout`.
- [Fix grpc watch proxy hangs when failed to cancel a watcher](https://github.com/etcd-io/etcd/pull/12030) .
- Add [metrics handler for grpcproxy self](https://github.com/etcd-io/etcd/pull/12107).
- Add [health handler for grpcproxy self](https://github.com/etcd-io/etcd/pull/12114).
### Auth
- Fix [NoPassword check when adding user through GRPC gateway](https://github.com/etcd-io/etcd/pull/11418) ([issue#11414](https://github.com/etcd-io/etcd/issues/11414))
- Fix bug where [some auth related messages are logged at wrong level](https://github.com/etcd-io/etcd/pull/11586)
- [Fix a data corruption bug by saving consistent index](https://github.com/etcd-io/etcd/pull/11652).
- [Improve checkPassword performance](https://github.com/etcd-io/etcd/pull/11735).
- [Add authRevision field in AuthStatus](https://github.com/etcd-io/etcd/pull/11659).
- Fix [a bug of not refreshing expired tokens](https://github.com/etcd-io/etcd/pull/13308).
-
### API
- Add [`/v3/auth/status`](https://github.com/etcd-io/etcd/pull/11536) endpoint to check if authentication is enabled
- [Add `Linearizable` field to `etcdserverpb.MemberListRequest`](https://github.com/etcd-io/etcd/pull/11639).
- [Learner support Snapshot RPC](https://github.com/etcd-io/etcd/pull/12890/).
### Package `netutil`
- Remove [`netutil.DropPort/RecoverPort/SetLatency/RemoveLatency`](https://github.com/etcd-io/etcd/pull/12491).
- These are not used anymore. They were only used for older versions of functional testing.
- Removed to adhere to best security practices, minimize arbitrary shell invocation.
### `tools/etcd-dump-metrics`
- Implement [input validation to prevent arbitrary shell invocation](https://github.com/etcd-io/etcd/pull/12491).
### Dependency
- Upgrade [`google.golang.org/grpc`](https://github.com/grpc/grpc-go/releases) from [**`v1.23.0`**](https://github.com/grpc/grpc-go/releases/tag/v1.23.0) to [**`v1.37.0`**](https://github.com/grpc/grpc-go/releases/tag/v1.37.0).
- Upgrade [`go.uber.org/zap`](https://github.com/uber-go/zap/releases) from [**`v1.14.1`**](https://github.com/uber-go/zap/releases/tag/v1.14.1) to [**`v1.16.0`**](https://github.com/uber-go/zap/releases/tag/v1.16.0).
### Platforms
- etcd now [officially supports `arm64`](https://github.com/etcd-io/etcd/pull/12929).
- See https://github.com/etcd-io/etcd/pull/12928 for adding automated tests with `arm64` EC2 instances (Graviton 2).
- See https://github.com/etcd-io/website/pull/273 for new platform support tier policies.
### Release
- Add s390x build support ([PR#11548](https://github.com/etcd-io/etcd/pull/11548) and [PR#11358](https://github.com/etcd-io/etcd/pull/11358))
### Go
- Require [*Go 1.16+*](https://github.com/etcd-io/etcd/pull/11110).
- Compile with [*Go 1.16+*](https://golang.org/doc/devel/release.html#go1.16)
- etcd uses [go modules](https://github.com/etcd-io/etcd/pull/12279) (instead of vendor dir) to track dependencies.
### Project Governance
- The etcd team has added, a well defined and openly discussed, project [governance](https://github.com/etcd-io/etcd/pull/11175).
<hr>

104
CHANGELOG/CHANGELOG-3.6.md Normal file
View File

@ -0,0 +1,104 @@
Previous change logs can be found at [CHANGELOG-3.5](https://github.com/etcd-io/etcd/blob/main/CHANGELOG/CHANGELOG-3.5.md).
<hr>
## v3.6.0 (TBD)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.5.0...v3.6.0).
### Breaking Changes
- `etcd` will no longer start on data dir created by newer versions (for example etcd v3.6 will not run on v3.7+ data dir). To downgrade data dir please check out `etcdutl migrate` command.
- `etcd` doesn't support serving client requests on the peer listen endpoints (--listen-peer-urls). See [pull/13565](https://github.com/etcd-io/etcd/pull/13565).
- `etcdctl` will sleep(2s) in case of range delete without `--range` flag. See [pull/13747](https://github.com/etcd-io/etcd/pull/13747)
- Applications which depend on etcd v3.6 packages must be built with go version >= v1.18.
### Deprecations
- Deprecated [V2 discovery](https://etcd.io/docs/v3.5/dev-internal/discovery_protocol/).
- Deprecated [SetKeepAlive and SetKeepAlivePeriod in limitListenerConn](https://github.com/etcd-io/etcd/pull/14356).
- Removed [etcdctl defrag --data-dir](https://github.com/etcd-io/etcd/pull/13793).
- Removed [etcdctl snapshot status](https://github.com/etcd-io/etcd/pull/13809).
- Removed [etcdctl snapshot restore](https://github.com/etcd-io/etcd/pull/13809).
- Removed [etcdutl snapshot save](https://github.com/etcd-io/etcd/pull/13809).
### etcdctl v3
- Add command to generate [shell completion](https://github.com/etcd-io/etcd/pull/13133).
- When print endpoint status, [show db size in use](https://github.com/etcd-io/etcd/pull/13639)
- [Always print the raft_term in decimal](https://github.com/etcd-io/etcd/pull/13711) when displaying member list in json.
- [Add one more field `storageVersion`](https://github.com/etcd-io/etcd/pull/13773) into the response of command `etcdctl endpoint status`.
- Add [`--max-txn-ops`](https://github.com/etcd-io/etcd/pull/14340) flag to make-mirror command.
- Add [`--consistency`](https://github.com/etcd-io/etcd/pull/15261) flag to member list command.
- Display [field `hash_revision`](https://github.com/etcd-io/etcd/pull/14812) for `etcdctl endpoint hash` command.
### etcdutl v3
- Add command to generate [shell completion](https://github.com/etcd-io/etcd/pull/13142).
- Add `migrate` command for downgrading/upgrading etcd data dir files.
- Add [optional --bump-revision and --mark-compacted flag to etcdutl snapshot restore operation](https://github.com/etcd-io/etcd/pull/16029).
- Removed [legacy etcdutl backup](https://github.com/etcd-io/etcd/pull/16662)
### Package `clientv3`
- [Support serializable `MemberList` operation](https://github.com/etcd-io/etcd/pull/15261).
### Package `server`
- Package `mvcc` was moved to `storage/mvcc`
- Package `mvcc/backend` was moved to `storage/backend`
- Package `mvcc/buckets` was moved to `storage/schema`
- Package `wal` was moved to `storage/wal`
- Package `datadir` was moved to `storage/datadir`
### Package `raft`
- [Decouple raft from etcd](https://github.com/etcd-io/etcd/issues/14713). Migrated raft to a separate [repository](https://github.com/etcd-io/raft), and renamed raft module to `go.etcd.io/raft/v3`.
### etcd server
- Add [`etcd --log-format`](https://github.com/etcd-io/etcd/pull/13339) flag to support log format.
- Add [`etcd --experimental-max-learners`](https://github.com/etcd-io/etcd/pull/13377) flag to allow configuration of learner max membership.
- Add [`etcd --experimental-enable-lease-checkpoint-persist`](https://github.com/etcd-io/etcd/pull/13508) flag to handle upgrade from v3.5.2 clusters with this feature enabled.
- Add [`etcdctl make-mirror --rev`](https://github.com/etcd-io/etcd/pull/13519) flag to support incremental mirror.
- Add [v3 discovery](https://github.com/etcd-io/etcd/pull/13635) to bootstrap a new etcd cluster.
- Add [field `storage`](https://github.com/etcd-io/etcd/pull/13772) into the response body of endpoint `/version`.
- Add [`etcd --max-concurrent-streams`](https://github.com/etcd-io/etcd/pull/14169) flag to configure the max concurrent streams each client can open at a time, and defaults to math.MaxUint32.
- Add [`etcd grpc-proxy --experimental-enable-grpc-logging`](https://github.com/etcd-io/etcd/pull/14266) flag to logging all grpc requests and responses.
- Add [`etcd --experimental-compact-hash-check-enabled --experimental-compact-hash-check-time`](https://github.com/etcd-io/etcd/issues/14039) flags to support enabling reliable corruption detection on compacted revisions.
- Add [Protection on maintenance request when auth is enabled](https://github.com/etcd-io/etcd/pull/14663).
- Graduated [`--experimental-warning-unary-request-duration` to `--warning-unary-request-duration`](https://github.com/etcd-io/etcd/pull/14414). Note the experimental flag is deprecated and will be decommissioned in v3.7.
- Add [field `hash_revision` into `HashKVResponse`](https://github.com/etcd-io/etcd/pull/14537).
- Add [`etcd --experimental-snapshot-catch-up-entries`](https://github.com/etcd-io/etcd/pull/15033) flag to configure number of entries for a slow follower to catch up after compacting the raft storage entries and defaults to 5k.
- Decreased [`--snapshot-count` default value from 100,000 to 10,000](https://github.com/etcd-io/etcd/pull/15408)
- Add [`etcd --tls-min-version --tls-max-version`](https://github.com/etcd-io/etcd/pull/15156) to enable support for TLS 1.3.
- Add [`etcd --experimental-stop-grpc-service-on-defrag`](https://github.com/etcd-io/etcd/pull/16278) to enable client failover on defrag.
### etcd grpc-proxy
- Add [`etcd grpc-proxy start --endpoints-auto-sync-interval`](https://github.com/etcd-io/etcd/pull/14354) flag to enable and configure interval of auto sync of endpoints with server.
- Add [`etcd grpc-proxy start --listen-cipher-suites`](https://github.com/etcd-io/etcd/pull/14308) flag to support adding configurable cipher list.
### tools/benchmark
- [Add etcd client autoSync flag](https://github.com/etcd-io/etcd/pull/13416)
### Metrics, Monitoring
See [List of metrics](https://etcd.io/docs/latest/metrics/) for all metrics per release.
- Add [`etcd_disk_defrag_inflight`](https://github.com/etcd-io/etcd/pull/13371).
- Add [`etcd_debugging_server_alarms`](https://github.com/etcd-io/etcd/pull/14276).
### Go
- Require [Go 1.21+](https://github.com/etcd-io/etcd/pull/16594).
- Compile with [Go 1.21+](https://go.dev/doc/devel/release#go1.21.minor). Please refer to [gc-guide](https://go.dev/doc/gc-guide) to configure `GOGC` and `GOMEMLIMIT` properly.
### Other
- Use Distroless as base image to make the image less vulnerable and reduce image size.
- [Upgrade grpc-gateway from v1 to v2](https://github.com/etcd-io/etcd/pull/16595).
<hr>

View File

@ -1,24 +1,18 @@
Previous change logs can be found at [CHANGELOG-3.x](https://github.com/etcd-io/etcd/blob/master/CHANGELOG-3.x.md).
Previous change logs can be found at [CHANGELOG-3.x](https://github.com/etcd-io/etcd/blob/main/CHANGELOG/CHANGELOG-3.x.md).
<hr>
## v4.0.0 (TBD)
See [code changes](https://github.com/etcd-io/etcd/compare/v3.5.0...v4.0.0) and [v4.0 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_4_0.md) for any breaking changes.
See [code changes](https://github.com/etcd-io/etcd/compare/v3.5.0...v4.0.0) and [v4.0 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_4_0/) for any breaking changes.
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v4.0 upgrade guide](https://github.com/etcd-io/etcd/blob/master/Documentation/upgrades/upgrade_4_0.md).**
**Again, before running upgrades from any previous release, please make sure to read change logs below and [v4.0 upgrade guide](https://etcd.io/docs/latest/upgrades/upgrade_4_0/).**
### Breaking Changes
- [Secure etcd by default](https://github.com/etcd-io/etcd/issues/9475)?
- Change `/health` endpoint output.
- Previously, `{"health":"true"}`.
- Now, `{"health":true}`.
- Breaks [Kubernetes `kubectl get componentstatuses` command](https://github.com/kubernetes/kubernetes/issues/58240).
- Deprecate [`etcd --proxy*`](TODO) flags; **no more v2 proxy**.
- Deprecate [v2 storage backend](https://github.com/etcd-io/etcd/issues/9232); **no more v2 store**.
- v2 API is still supported via [v2 emulation](TODO).
@ -31,6 +25,7 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.5.0...v4.0.0) and
- Use [`etcd --initial-corrupt-check`](TODO) instead.
- [`etcd --experimental-corrupt-check-time`](TODO) has been deprecated.
- Use [`etcd --corrupt-check-time`](TODO) instead.
- Enable TLS 1.13, deprecate TLS cipher suites.
### etcd server
@ -38,10 +33,11 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.5.0...v4.0.0) and
- `etcd --initial-corrupt-check=true` by default, to check cluster database hashes before serving client/peer traffic.
- [`etcd --corrupt-check-time`](TODO) flag is now stable (`etcd --experimental-corrupt-check-time` has been deprecated).
- `etcd --corrupt-check-time=12h` by default, to check cluster database hashes for every 12-hour.
- Enable TLS 1.13, deprecate TLS cipher suites.
### Go
- Require [*Go 2*](https://blog.golang.org/go2draft)?
- Require [*Go 2*](https://blog.golang.org/go2draft).
<hr>

21
CHANGELOG/README.md Normal file
View File

@ -0,0 +1,21 @@
# Change logs
## Production recommendation
The minimum recommended etcd versions to run in **production** are v3.4.22+ and v3.5.6+. Refer to the [versioning policy](https://etcd.io/docs/v3.5/op-guide/versioning/) for more details.
### v3.5 data corruption issue
Running etcd v3.5.2, v3.5.1 and v3.5.0 under high load can cause a data corruption issue.
If etcd process is killed, occasionally some committed transactions are not reflected on all the members.
Recommendation is to upgrade to v3.5.4+.
If you have encountered data corruption, please follow instructions on https://etcd.io/docs/v3.5/op-guide/data_corruption/.
## Change log rules
1. Each patch release only includes changes against previous patch release.
For example, the change log of v3.5.5 should only include items which are new to v3.5.4.
2. For the first release (e.g. 3.4.0, 3.5.0, 3.6.0, 4.0.0 etc.) for each minor or major
version, it only includes changes which are new to the first release of previous minor
or major version. For example, v3.5.0 should only include items which are new to v3.4.0,
and v3.6.0 should only include items which are new to v3.5.0.

View File

@ -1,46 +1,123 @@
# How to contribute
etcd is Apache 2.0 licensed and accepts contributions via GitHub pull requests. This document outlines some of the conventions on commit message formatting, contact points for developers, and other resources to help get contributions into etcd.
# Email and chat
- Email: [etcd-dev](https://groups.google.com/forum/?hl=en#!forum/etcd-dev)
- IRC: #[etcd](irc://irc.freenode.org:6667/#etcd) IRC channel on freenode.org
## Getting started
- Fork the repository on GitHub
- Read the README.md for build instructions
## Reporting bugs and creating issues
Reporting bugs is one of the best ways to contribute. However, a good bug report has some very specific qualities, so please read over our short document on [reporting bugs](https://github.com/etcd-io/etcd/blob/master/Documentation/reporting_bugs.md) before submitting a bug report. This document might contain links to known issues, another good reason to take a look there before reporting a bug.
## Contribution flow
etcd is Apache 2.0 licensed and accepts contributions via GitHub pull requests.
This document outlines basics of contributing to etcd.
This is a rough outline of what a contributor's workflow looks like:
* [Find something to work on](#Find-something-to-work-on)
* [Setup development environment](#Setup-development-environment)
* [Implement your change](#Implement-your-change)
* [Commit your change](#Commit-your-change)
* [Create a pull request](#Create-a-pull-request)
* [Get your pull request reviewed](#Get-your-pull-request-reviewed)
- Create a topic branch from where to base the contribution. This is usually master.
- Make commits of logical units.
- Make sure commit messages are in the proper format (see below).
- Push changes in a topic branch to a personal fork of the repository.
- Submit a pull request to etcd-io/etcd.
- The PR must receive a LGTM from two maintainers found in the MAINTAINERS file.
If you have any questions about, please reach out using one of the methods listed in [contact].
Thanks for contributing!
[contact]: ./README.md#Contact
### Code style
## Learn more about etcd
The coding style suggested by the Golang community is used in etcd. See the [style doc](https://github.com/golang/go/wiki/CodeReviewComments) for details.
Before making a change please look through resources below to learn more about etcd and tools used for development.
Please follow this style to make etcd easy to review, maintain and develop.
* Please learn about [Git](https://github.com/git-guides) version control system used in etcd.
* Read the [etcd learning resources](https://etcd.io/docs/v3.5/learning/)
* Read the [etcd community membership](/Documentation/contributor-guide/community-membership.md)
* Watch [etcd deep dive](https://www.youtube.com/watch?v=D2pm6ufIt98&t=927s)
* Watch [etcd code walk through](https://www.youtube.com/watch?v=H3XaSF6wF7w)
### Format of the commit message
## Find something to work on
We follow a rough convention for commit messages that is designed to answer two
questions: what changed and why. The subject line should feature the what and
the body of the commit should describe the why.
All the work in etcd project is tracked in [github issue tracker].
Issues should be properly labeled making it easy to find something for you.
Depending on your interest and experience you should check different labels:
* If you are just starting, check issues labeled with [good first issue].
* When you feel more conformable in your contributions, checkout [help wanted].
* Advanced contributors can try to help with issues labeled [priority/important] covering most relevant work at the time.
If any of aforementioned labels don't have unassigned issues, please [contact] one of the [maintainers] asking to triage more issues.
[github issue tracker]: https://github.com/etcd-io/etcd/issues
[good first issue]: https://github.com/search?type=issues&q=org%3Aetcd-io+state%3Aopen++label%3A%22good+first+issue%22
[help wanted]: https://github.com/search?type=issues&q=org%3Aetcd-io+state%3Aopen++label%3A%22help+wanted%22
[maintainers]: https://github.com/etcd-io/etcd/blob/main/OWNERS
[priority/important]: https://github.com/search?type=issues&q=org%3Aetcd-io+state%3Aopen++label%3A%22priority%2Fimportant%22
## Setup development environment
The etcd project supports two options for development:
1. Manually setup local environment.
2. Automatically setup [devcontainer](https://containers.dev).
For both options the only supported architecture is `linux-amd64`. Bug reports for other environments will generally be ignored. Supporting new environments requires introduction of proper tests and maintainer support that is currently lacking in the etcd project.
If you would like etcd to support your preferred environment you can [file an issue].
### Option 1 - Manually setup local environment
This is the original etcd development environment, is most supported and is backwards compatible for development of older etcd versions.
Follow the steps below to setup the environment:
- [Clone the repository](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository)
- Install Go by following [installation](https://go.dev/doc/install). Please check minimal go version in [go.mod file](./go.mod#L3).
- Install build tools:
- `make`: For debian based distributions you can run `sudo apt-get install build-essential`
- `protoc`: You can download for your os. Use version [`v3.20.3`](https://github.com/protocolbuffers/protobuf/releases/tag/v3.20.3).
- `yamllint`: For debian based distribution you can run `sudo apt-get install yamllint`
- Verify that everything is installed by running `make build`
Note: `make build` runs with `-v`. Other build flags can be added through env `GO_BUILD_FLAGS`, **if required**. Eg.,
```console
GO_BUILD_FLAGS="-buildmode=pie" make build
```
### Option 2 - Automatically setup devcontainer
This is a more recently added environmnent that aims to make it faster for new contributors to get started with etcd. This option is supported for etcd versions 3.6 onwards.
This option can be [used locally](https://code.visualstudio.com/docs/devcontainers/tutorial) on a system running Visual Studio Code and Docker, or in a remote cloud based [Codespaces](https://github.com/features/codespaces) environment.
To get started, create a codespace for this repository by clicking this 👇
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new?hide_repo_select=true&ref=main&repo=11225014)
A codespace will open in a web-based version of Visual Studio Code. The [dev container](.devcontainer/devcontainer.json) is fully configured with software needed for this project.
**Note**: Dev containers is an open spec which is supported by [GitHub Codespaces](https://github.com/codespaces) and [other tools](https://containers.dev/supporting).
[file an issue]: https://github.com/etcd-io/etcd/issues/new/choose
## Implement your change
etcd code should follow coding style suggested by the Golang community.
See the [style doc](https://github.com/golang/go/wiki/CodeReviewComments) for details.
Please ensure that your change passes static analysis (requires [golangci-lint](https://golangci-lint.run/usage/install/)):
- `make verify` to verify if all checks pass.
- `make verify-*` to verify a single check, for example `make verify-bom` to verify if bill-of-materials.json file is up-to-date.
- `make fix` to fix all checks.
- `make fix-*` to fix a single checks, for example `make fix-bom` to update bill-of-materials.json.
Please ensure that your change passes tests.
- `make test-unit` to run unit tests.
- `make test-integration` to run integration tests.
- `make test-e2e` to run e2e tests.
All changes are expected to come with unit test.
All new features are expected to have either e2e or integration tests.
## Commit your change
etcd follows a rough convention for commit messages:
* First line:
* Should start name of package (for example `etcdserver`, `etcdctl`) followed by `:` character.
* Describe the `what` behind the change
* Optionally author might provide the `why` behind the change in the main commit message body.
* Last line should be `Signed-off-by: firstname lastname <email@example.com>` (can be automatically generate by providing `--signoff` to git commit command).
Example of commit message:
```
etcdserver: add grpc interceptor to log info on incoming requests
@ -50,44 +127,29 @@ remote client info, request content (with value field redacted), request
handling latency, response size, etc. Uses zap logger if available,
otherwise uses capnslog.
Fixes #38
Signed-off-by: FirstName LastName <github@github.com>
```
The format can be described more formally as follows:
## Create a pull request
```
<package>: <what changed>
<BLANK LINE>
<why this change was made>
<BLANK LINE>
<footer>
```
Please follow [making a pull request](https://docs.github.com/en/get-started/quickstart/contributing-to-projects#making-a-pull-request) guide.
The first line is the subject and should be no longer than 70 characters, the second
line is always blank, and other lines should be wrapped at 80 characters. This allows
the message to be easier to read on GitHub as well as in various git tools.
If you are still working on the pull request, you can convert it to draft by clicking `Convert to draft` link just below list of reviewers.
### Pull request across multiple files and packages
Multiple small PRs are preferred over single large ones (>500 lines of code).
If multiple files in a package are changed in a pull request for example:
Please make sure there is an associated issue for each PR you submit. Create one if it doesn't exist yet, and close the issue
once the PR gets merged and has been backported to previous stable releases, if necessary. If there are multiple PRs linked to
the same issue, refrain from closing the issue until all PRs have been merged and, if needed, backported to previous stable
releases.
```
etcdserver/config.go
etcdserver/corrupt.go
```
## Get your pull request reviewed
At the end of the review process if multiple commits exist for a single package they
should be squashed/rebased into a single commit before being merged.
Before requesting review please ensure that all GitHub checks were successful.
It might happen that some unrelated tests on your PR are failing, due to their flakiness.
In such cases please [file an issue] to deflake the problematic test and ask one of [maintainers] to rerun the tests.
```
etcdserver: <what changed>
[..]
```
If all checks were successful feel free to reach out for review from people that were involved in the original discussion or [maintainers].
Depending on complexity of the PR it might require between 1 and 2 maintainers to approve your change before merging.
If a pull request spans many packages these commits should be squashed/rebased into a single
commit using message with a more generic `*:` prefix.
```
*: <what changed>
[..]
```
Thanks for contributing!

14
Dockerfile Normal file
View File

@ -0,0 +1,14 @@
ARG ARCH=amd64
FROM --platform=linux/${ARCH} gcr.io/distroless/static-debian12@sha256:4a2c1a51ae5e10ec4758a0f981be3ce5d6ac55445828463fce8dff3a355e0b75
ADD etcd /usr/local/bin/
ADD etcdctl /usr/local/bin/
ADD etcdutl /usr/local/bin/
WORKDIR /var/etcd/
WORKDIR /var/lib/etcd/
EXPOSE 2379 2380
# Define default command.
CMD ["/usr/local/bin/etcd"]

View File

@ -1,17 +0,0 @@
FROM k8s.gcr.io/debian-base:v1.0.0
ADD etcd /usr/local/bin/
ADD etcdctl /usr/local/bin/
RUN mkdir -p /var/etcd/
RUN mkdir -p /var/lib/etcd/
# Alpine Linux doesn't use pam, which means that there is no /etc/nsswitch.conf,
# but Golang relies on /etc/nsswitch.conf to check the order of DNS resolving
# (see https://github.com/golang/go/commit/9dee7771f561cf6aee081c0af6658cc81fac3918)
# To fix this we just create /etc/nsswitch.conf and add the following line:
RUN echo 'hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4' >> /etc/nsswitch.conf
EXPOSE 2379 2380
# Define default command.
CMD ["/usr/local/bin/etcd"]

View File

@ -1,11 +0,0 @@
FROM k8s.gcr.io/debian-base-arm64:v1.0.0
ADD etcd /usr/local/bin/
ADD etcdctl /usr/local/bin/
ADD var/etcd /var/etcd
ADD var/lib/etcd /var/lib/etcd
EXPOSE 2379 2380
# Define default command.
CMD ["/usr/local/bin/etcd"]

View File

@ -1,11 +0,0 @@
FROM k8s.gcr.io/debian-base-ppc64le:v1.0.0
ADD etcd /usr/local/bin/
ADD etcdctl /usr/local/bin/
ADD var/etcd /var/etcd
ADD var/lib/etcd /var/lib/etcd
EXPOSE 2379 2380
# Define default command.
CMD ["/usr/local/bin/etcd"]

View File

@ -1 +0,0 @@
docs.md

4
Documentation/README.md Normal file
View File

@ -0,0 +1,4 @@
This directory includes etcd project internal documentation for new and existing contributors.
For user and developer documentation please go to [etcd.io](https://etcd.io/),
which is developed in [website](https://github.com/etcd-io/website/) repo.

View File

@ -1,18 +0,0 @@
# Benchmarks
etcd benchmarks will be published regularly and tracked for each release below:
- [etcd v2.1.0-alpha][2.1]
- [etcd v2.2.0-rc][2.2]
- [etcd v3 demo][3.0]
# Memory Usage Benchmarks
It records expected memory usage in different scenarios.
- [etcd v2.2.0-rc][2.2-mem]
[2.1]: etcd-2-1-0-alpha-benchmarks.md
[2.2]: etcd-2-2-0-rc-benchmarks.md
[2.2-mem]: etcd-2-2-0-rc-memory-benchmarks.md
[3.0]: etcd-3-demo-benchmarks.md

View File

@ -1,56 +0,0 @@
---
title: Benchmarking etcd v2.1.0
---
## Physical machines
GCE n1-highcpu-2 machine type
- 1x dedicated local SSD mounted under /var/lib/etcd
- 1x dedicated slow disk for the OS
- 1.8 GB memory
- 2x CPUs
- etcd version 2.1.0 alpha
## etcd Cluster
3 etcd members, each runs on a single machine
## Testing
Bootstrap another machine and use the [hey HTTP benchmark tool][hey] to send requests to each etcd member. Check the [benchmark hacking guide][hack-benchmark] for detailed instructions.
## Performance
### reading one single key
| key size in bytes | number of clients | target etcd server | read QPS | 90th Percentile Latency (ms) |
|-------------------|-------------------|--------------------|----------|---------------|
| 64 | 1 | leader only | 1534 | 0.7 |
| 64 | 64 | leader only | 10125 | 9.1 |
| 64 | 256 | leader only | 13892 | 27.1 |
| 256 | 1 | leader only | 1530 | 0.8 |
| 256 | 64 | leader only | 10106 | 10.1 |
| 256 | 256 | leader only | 14667 | 27.0 |
| 64 | 64 | all servers | 24200 | 3.9 |
| 64 | 256 | all servers | 33300 | 11.8 |
| 256 | 64 | all servers | 24800 | 3.9 |
| 256 | 256 | all servers | 33000 | 11.5 |
### writing one single key
| key size in bytes | number of clients | target etcd server | write QPS | 90th Percentile Latency (ms) |
|-------------------|-------------------|--------------------|-----------|---------------|
| 64 | 1 | leader only | 60 | 21.4 |
| 64 | 64 | leader only | 1742 | 46.8 |
| 64 | 256 | leader only | 3982 | 90.5 |
| 256 | 1 | leader only | 58 | 20.3 |
| 256 | 64 | leader only | 1770 | 47.8 |
| 256 | 256 | leader only | 4157 | 105.3 |
| 64 | 64 | all servers | 1028 | 123.4 |
| 64 | 256 | all servers | 3260 | 123.8 |
| 256 | 64 | all servers | 1033 | 121.5 |
| 256 | 256 | all servers | 3061 | 119.3 |
[hey]: https://github.com/rakyll/hey
[hack-benchmark]: https://github.com/coreos/etcd/tree/master/hack/benchmark

View File

@ -1,71 +0,0 @@
---
title: Benchmarking etcd v2.2.0
---
## Physical Machines
GCE n1-highcpu-2 machine type
- 1x dedicated local SSD mounted as etcd data directory
- 1x dedicated slow disk for the OS
- 1.8 GB memory
- 2x CPUs
## etcd Cluster
3 etcd 2.2.0 members, each runs on a single machine.
Detailed versions:
```
etcd Version: 2.2.0
Git SHA: e4561dd
Go Version: go1.5
Go OS/Arch: linux/amd64
```
## Testing
Bootstrap another machine, outside of the etcd cluster, and run the [`hey` HTTP benchmark tool](https://github.com/rakyll/hey) with a connection reuse patch to send requests to each etcd cluster member. See the [benchmark instructions](../../hack/benchmark/) for the patch and the steps to reproduce our procedures.
The performance is calculated through results of 100 benchmark rounds.
## Performance
### Single Key Read Performance
| key size in bytes | number of clients | target etcd server | average read QPS | read QPS stddev | average 90th Percentile Latency (ms) | latency stddev |
|-------------------|-------------------|--------------------|------------------|-----------------|--------------------------------------|----------------|
| 64 | 1 | leader only | 2303 | 200 | 0.49 | 0.06 |
| 64 | 64 | leader only | 15048 | 685 | 7.60 | 0.46 |
| 64 | 256 | leader only | 14508 | 434 | 29.76 | 1.05 |
| 256 | 1 | leader only | 2162 | 214 | 0.52 | 0.06 |
| 256 | 64 | leader only | 14789 | 792 | 7.69| 0.48 |
| 256 | 256 | leader only | 14424 | 512 | 29.92 | 1.42 |
| 64 | 64 | all servers | 45752 | 2048 | 2.47 | 0.14 |
| 64 | 256 | all servers | 46592 | 1273 | 10.14 | 0.59 |
| 256 | 64 | all servers | 45332 | 1847 | 2.48| 0.12 |
| 256 | 256 | all servers | 46485 | 1340 | 10.18 | 0.74 |
### Single Key Write Performance
| key size in bytes | number of clients | target etcd server | average write QPS | write QPS stddev | average 90th Percentile Latency (ms) | latency stddev |
|-------------------|-------------------|--------------------|------------------|-----------------|--------------------------------------|----------------|
| 64 | 1 | leader only | 55 | 4 | 24.51 | 13.26 |
| 64 | 64 | leader only | 2139 | 125 | 35.23 | 3.40 |
| 64 | 256 | leader only | 4581 | 581 | 70.53 | 10.22 |
| 256 | 1 | leader only | 56 | 4 | 22.37| 4.33 |
| 256 | 64 | leader only | 2052 | 151 | 36.83 | 4.20 |
| 256 | 256 | leader only | 4442 | 560 | 71.59 | 10.03 |
| 64 | 64 | all servers | 1625 | 85 | 58.51 | 5.14 |
| 64 | 256 | all servers | 4461 | 298 | 89.47 | 36.48 |
| 256 | 64 | all servers | 1599 | 94 | 60.11| 6.43 |
| 256 | 256 | all servers | 4315 | 193 | 88.98 | 7.01 |
## Performance Changes
- Because etcd now records metrics for each API call, read QPS performance seems to see a minor decrease in most scenarios. This minimal performance impact was judged a reasonable investment for the breadth of monitoring and debugging information returned.
- Write QPS to cluster leaders seems to be increased by a small margin. This is because the main loop and entry apply loops were decoupled in the etcd raft logic, eliminating several blocks between them.
- Write QPS to all members seems to be increased by a significant margin, because followers now receive the latest commit index sooner, and commit proposals more quickly.

View File

@ -1,76 +0,0 @@
---
title: Benchmarking etcd v2.2.0-rc
---
## Physical machine
GCE n1-highcpu-2 machine type
- 1x dedicated local SSD mounted under /var/lib/etcd
- 1x dedicated slow disk for the OS
- 1.8 GB memory
- 2x CPUs
## etcd Cluster
3 etcd 2.2.0-rc members, each runs on a single machine.
Detailed versions:
```
etcd Version: 2.2.0-alpha.1+git
Git SHA: 59a5a7e
Go Version: go1.4.2
Go OS/Arch: linux/amd64
```
Also, we use 3 etcd 2.1.0 alpha-stage members to form cluster to get base performance. etcd's commit head is at [c7146bd5][c7146bd5], which is the same as the one that we use in [etcd 2.1 benchmark][etcd-2.1-benchmark].
## Testing
Bootstrap another machine and use the [hey HTTP benchmark tool][hey] to send requests to each etcd member. Check the [benchmark hacking guide][hack-benchmark] for detailed instructions.
## Performance
### reading one single key
| key size in bytes | number of clients | target etcd server | read QPS | 90th Percentile Latency (ms) |
|-------------------|-------------------|--------------------|----------|---------------|
| 64 | 1 | leader only | 2804 (-5%) | 0.4 (+0%) |
| 64 | 64 | leader only | 17816 (+0%) | 5.7 (-6%) |
| 64 | 256 | leader only | 18667 (-6%) | 20.4 (+2%) |
| 256 | 1 | leader only | 2181 (-15%) | 0.5 (+25%) |
| 256 | 64 | leader only | 17435 (-7%) | 6.0 (+9%) |
| 256 | 256 | leader only | 18180 (-8%) | 21.3 (+3%) |
| 64 | 64 | all servers | 46965 (-4%) | 2.1 (+0%) |
| 64 | 256 | all servers | 55286 (-6%) | 7.4 (+6%) |
| 256 | 64 | all servers | 46603 (-6%) | 2.1 (+5%) |
| 256 | 256 | all servers | 55291 (-6%) | 7.3 (+4%) |
### writing one single key
| key size in bytes | number of clients | target etcd server | write QPS | 90th Percentile Latency (ms) |
|-------------------|-------------------|--------------------|-----------|---------------|
| 64 | 1 | leader only | 76 (+22%) | 19.4 (-15%) |
| 64 | 64 | leader only | 2461 (+45%) | 31.8 (-32%) |
| 64 | 256 | leader only | 4275 (+1%) | 69.6 (-10%) |
| 256 | 1 | leader only | 64 (+20%) | 16.7 (-30%) |
| 256 | 64 | leader only | 2385 (+30%) | 31.5 (-19%) |
| 256 | 256 | leader only | 4353 (-3%) | 74.0 (+9%) |
| 64 | 64 | all servers | 2005 (+81%) | 49.8 (-55%) |
| 64 | 256 | all servers | 4868 (+35%) | 81.5 (-40%) |
| 256 | 64 | all servers | 1925 (+72%) | 47.7 (-59%) |
| 256 | 256 | all servers | 4975 (+36%) | 70.3 (-36%) |
### performance changes explanation
- read QPS in most scenarios is decreased by 5~8%. The reason is that etcd records store metrics for each store operation. The metrics is important for monitoring and debugging, so this is acceptable.
- write QPS to leader is increased by 20~30%. This is because we decouple raft main loop and entry apply loop, which avoids them blocking each other.
- write QPS to all servers is increased by 30~80% because follower could receive latest commit index earlier and commit proposals faster.
[hey]: https://github.com/rakyll/hey
[c7146bd5]: https://github.com/coreos/etcd/commits/c7146bd5f2c73716091262edc638401bb8229144
[etcd-2.1-benchmark]: etcd-2-1-0-alpha-benchmarks.md
[hack-benchmark]: ../../hack/benchmark/

View File

@ -1,51 +0,0 @@
---
title: Benchmarking etcd v2.2.0-rc-memory
---
## Physical machine
GCE n1-standard-2 machine type
- 1x dedicated local SSD mounted under /var/lib/etcd
- 1x dedicated slow disk for the OS
- 7.5 GB memory
- 2x CPUs
## etcd
```
etcd Version: 2.2.0-rc.0+git
Git SHA: 103cb5c
Go Version: go1.5
Go OS/Arch: linux/amd64
```
## Testing
Start 3-member etcd cluster, each of which uses 2 cores.
The length of key name is always 64 bytes, which is a reasonable length of average key bytes.
## Memory Maximal Usage
- etcd may use maximal memory if one follower is dead and the leader keeps sending snapshots.
- `max RSS` is the maximal memory usage recorded in 3 runs.
| value bytes | key number | data size(MB) | max RSS(MB) | max RSS/data rate on leader |
|-------------|-------------|---------------|-------------|-----------------------------|
| 128 | 50000 | 6 | 433 | 72x |
| 128 | 100000 | 12 | 659 | 54x |
| 128 | 200000 | 24 | 1466 | 61x |
| 1024 | 50000 | 48 | 1253 | 26x |
| 1024 | 100000 | 96 | 2344 | 24x |
| 1024 | 200000 | 192 | 4361 | 22x |
## Data Size Threshold
- When etcd reaches data size threshold, it may trigger leader election easily and drop part of proposals.
- For most cases, the etcd cluster should work smoothly if it doesn't hit the threshold. If it doesn't work well due to insufficient resources, decrease its data size.
| value bytes | key number limitation | suggested data size threshold(MB) | consumed RSS(MB) |
|-------------|-----------------------|-----------------------------------|------------------|
| 128 | 400K | 48 | 2400 |
| 1024 | 300K | 292 | 6500 |

View File

@ -1,46 +0,0 @@
---
title: Benchmarking etcd v3
---
## Physical machines
GCE n1-highcpu-2 machine type
- 1x dedicated local SSD mounted under /var/lib/etcd
- 1x dedicated slow disk for the OS
- 1.8 GB memory
- 2x CPUs
- etcd version 2.2.0
## etcd Cluster
1 etcd member running in v3 demo mode
## Testing
Use [etcd v3 benchmark tool][etcd-v3-benchmark].
## Performance
### reading one single key
| key size in bytes | number of clients | read QPS | 90th Percentile Latency (ms) |
|-------------------|-------------------|----------|---------------|
| 256 | 1 | 2716 | 0.4 |
| 256 | 64 | 16623 | 6.1 |
| 256 | 256 | 16622 | 21.7 |
The performance is nearly the same as the one with empty server handler.
### reading one single key after putting
| key size in bytes | number of clients | read QPS | 90th Percentile Latency (ms) |
|-------------------|-------------------|----------|---------------|
| 256 | 1 | 2269 | 0.5 |
| 256 | 64 | 13582 | 8.6 |
| 256 | 256 | 13262 | 47.5 |
The performance with empty server handler is not affected by one put. So the
performance downgrade should be caused by storage package.
[etcd-v3-benchmark]: ../../tools/benchmark/

View File

@ -1,79 +0,0 @@
---
title: Watch Memory Usage Benchmark
---
*NOTE*: The watch features are under active development, and their memory usage may change as that development progresses. We do not expect it to significantly increase beyond the figures stated below.
A primary goal of etcd is supporting a very large number of watchers doing a massively large amount of watching. etcd aims to support O(10k) clients, O(100K) watch streams (O(10) streams per client) and O(10M) total watchings (O(100) watching per stream). The memory consumed by each individual watching accounts for the largest portion of etcd's overall usage, and is therefore the focus of current and future optimizations.
Three related components of etcd watch consume physical memory: each `grpc.Conn`, each watch stream, and each instance of the watching activity. `grpc.Conn` maintains the actual TCP connection and other gRPC connection state. Each `grpc.Conn` consumes O(10kb) of memory, and might have multiple watch streams attached.
Each watch stream is an independent HTTP2 connection which consumes another O(10kb) of memory.
Multiple watchings might share one watch stream.
Watching is the actual struct that tracks the changes on the key-value store. Each watching should only consume < O(1kb).
```
+-------+
| watch |
+---------> | foo |
| +-------+
+------+-----+
| stream |
+--------------> | |
| +------+-----+ +-------+
| | | watch |
| +---------> | bar |
+-----+------+ +-------+
| | +------------+
| conn +-------> | stream |
| | | |
+-----+------+ +------------+
|
|
|
| +------------+
+--------------> | stream |
| |
+------------+
```
The theoretical memory consumption of watch can be approximated with the formula:
`memory = c1 * number_of_conn + c2 * avg_number_of_stream_per_conn + c3 * avg_number_of_watch_stream`
## Testing Environment
etcd version
- git head https://github.com/coreos/etcd/commit/185097ffaa627b909007e772c175e8fefac17af3
GCE n1-standard-2 machine type
- 7.5 GB memory
- 2x CPUs
## Overall memory usage
The overall memory usage captures how much [RSS][rss] etcd consumes with the client watchers. While the result may vary by as much as 10%, it is still meaningful, since the goal is to learn about the rough memory usage and the pattern of allocations.
With the benchmark result, we can calculate roughly that `c1 = 17kb`, `c2 = 18kb` and `c3 = 350bytes`. So each additional client connection consumes 17kb of memory and each additional stream consumes 18kb of memory, and each additional watching only cause 350bytes. A single etcd server can maintain millions of watchings with a few GB of memory in normal case.
| clients | streams per client | watchings per stream | total watching | memory usage |
|---------|---------|-----------|----------------|--------------|
| 1k | 1 | 1 | 1k | 50MB |
| 2k | 1 | 1 | 2k | 90MB |
| 5k | 1 | 1 | 5k | 200MB |
| 1k | 10 | 1 | 10k | 217MB |
| 2k | 10 | 1 | 20k | 417MB |
| 5k | 10 | 1 | 50k | 980MB |
| 1k | 50 | 1 | 50k | 1001MB |
| 2k | 50 | 1 | 100k | 1960MB |
| 5k | 50 | 1 | 250k | 4700MB |
| 1k | 50 | 10 | 500k | 1171MB |
| 2k | 50 | 10 | 1M | 2371MB |
| 5k | 50 | 10 | 2.5M | 5710MB |
| 1k | 50 | 100 | 5M | 2380MB |
| 2k | 50 | 100 | 10M | 4672MB |
| 5k | 50 | 100 | 25M | *OOM* |
[rss]: https://en.wikipedia.org/wiki/Resident_set_size

View File

@ -1,100 +0,0 @@
---
title: Storage Memory Usage Benchmark
---
<!---todo: link storage to storage design doc-->
Two components of etcd storage consume physical memory. The etcd process allocates an *in-memory index* to speed key lookup. The process's *page cache*, managed by the operating system, stores recently-accessed data from disk for quick re-use.
The in-memory index holds all the keys in a [B-tree][btree] data structure, along with pointers to the on-disk data (the values). Each key in the B-tree may contain multiple pointers, pointing to different versions of its values. The theoretical memory consumption of the in-memory index can hence be approximated with the formula:
`N * (c1 + avg_key_size) + N * (avg_versions_of_key) * (c2 + size_of_pointer)`
where `c1` is the key metadata overhead and `c2` is the version metadata overhead.
The graph shows the detailed structure of the in-memory index B-tree.
```
In mem index
+------------+
| key || ... |
+--------------+ | || |
| | +------------+
| | | v1 || ... |
| disk <----------------| || | Tree Node
| | +------------+
| | | v2 || ... |
| <----------------+ || |
| | +------------+
+--------------+ +-----+ | | |
| | | | |
| +------------+
|
|
^
------+
| ... |
| |
+-----+
| ... | Tree Node
| |
+-----+
| ... |
| |
------+
```
[Page cache memory][pagecache] is managed by the operating system and is not covered in detail in this document.
## Testing Environment
etcd version
- git head https://github.com/coreos/etcd/commit/776e9fb7be7eee5e6b58ab977c8887b4fe4d48db
GCE n1-standard-2 machine type
- 7.5 GB memory
- 2x CPUs
## In-memory index memory usage
In this test, we only benchmark the memory usage of the in-memory index. The goal is to find `c1` and `c2` mentioned above and to understand the hard limit of memory consumption of the storage.
We calculate the memory usage consumption via the Go runtime.ReadMemStats. We calculate the total allocated bytes difference before creating the index and after creating the index. It cannot perfectly reflect the memory usage of the in-memory index itself but can show the rough consumption pattern.
| N | versions | key size | memory usage |
|------|----------|----------|--------------|
| 100K | 1 | 64bytes | 22MB |
| 100K | 5 | 64bytes | 39MB |
| 1M | 1 | 64bytes | 218MB |
| 1M | 5 | 64bytes | 432MB |
| 100K | 1 | 256bytes | 41MB |
| 100K | 5 | 256bytes | 65MB |
| 1M | 1 | 256bytes | 409MB |
| 1M | 5 | 256bytes | 506MB |
Based on the result, we can calculate `c1=120bytes`, `c2=30bytes`. We only need two sets of data to calculate `c1` and `c2`, since they are the only unknown variable in the formula. The `c1=120bytes` and `c2=30bytes` are the average value of the 4 sets of `c1` and `c2` we calculated. The key metadata overhead is still relatively nontrivial (50%) for small key-value pairs. However, this is a significant improvement over the old store, which had at least 1000% overhead.
## Overall memory usage
The overall memory usage captures how much RSS etcd consumes with the storage. The value size should have very little impact on the overall memory usage of etcd, since we keep values on disk and only retain hot values in memory, managed by the OS page cache.
| N | versions | key size | value size | memory usage |
|------|----------|----------|------------|--------------|
| 100K | 1 | 64bytes | 256bytes | 40MB |
| 100K | 5 | 64bytes | 256bytes | 89MB |
| 1M | 1 | 64bytes | 256bytes | 470MB |
| 1M | 5 | 64bytes | 256bytes | 880MB |
| 100K | 1 | 64bytes | 1KB | 102MB |
| 100K | 5 | 64bytes | 1KB | 164MB |
| 1M | 1 | 64bytes | 1KB | 587MB |
| 1M | 5 | 64bytes | 1KB | 836MB |
Based on the result, we know the value size does not significantly impact the memory consumption. There is some minor increase due to more data held in the OS page cache.
[btree]: https://en.wikipedia.org/wiki/B-tree
[pagecache]: https://en.wikipedia.org/wiki/Page_cache

View File

@ -1,28 +0,0 @@
---
title: Branch management
---
## Guide
* New development occurs on the [master branch][master].
* Master branch should always have a green build!
* Backwards-compatible bug fixes should target the master branch and subsequently be ported to stable branches.
* Once the master branch is ready for release, it will be tagged and become the new stable branch.
The etcd team has adopted a *rolling release model* and supports two stable versions of etcd.
### Master branch
The `master` branch is our development branch. All new features land here first.
To try new and experimental features, pull `master` and play with it. Note that `master` may not be stable because new features may introduce bugs.
Before the release of the next stable version, feature PRs will be frozen. A [release manager](./dev-internal/release.md#release-management) will be assigned to major/minor version and will lead the etcd community in test, bug-fix and documentation of the release for one to two weeks.
### Stable branches
All branches with prefix `release-` are considered _stable_ branches.
After every minor release (http://semver.org/), we will have a new stable branch for that release, managed by a [patch release manager](./dev-internal/release.md#release-management). We will keep fixing the backwards-compatible bugs for the latest two stable releases. A _patch_ release to each supported release branch, incorporating any bug fixes, will be once every two weeks, given any patches.
[master]: https://github.com/coreos/etcd/tree/master

View File

@ -0,0 +1,27 @@
# Branch management
## Guide
* New development occurs on the [main branch][main].
* Main branch should always have a green build!
* Backwards-compatible bug fixes should target the main branch and subsequently be ported to stable branches.
* Once the main branch is ready for release, it will be tagged and become the new stable branch.
The etcd team has adopted a *rolling release model* and supports two stable versions of etcd.
### Main branch
The `main` branch is our development branch. All new features land here first.
To try new and experimental features, pull `main` and play with it. Note that `main` may not be stable because new features may introduce bugs.
Before the release of the next stable version, feature PRs will be frozen. A [release manager](./release.md#release-management) will be assigned to major/minor version and will lead the etcd community in test, bug-fix and documentation of the release for one to two weeks.
### Stable branches
All branches with prefix `release-` are considered _stable_ branches.
After every minor release ([semver.org](https://semver.org/)), we will have a new stable branch for that release, managed by a [patch release manager](./release.md#release-management). We will keep fixing the backwards-compatible bugs for the latest two stable releases. A _patch_ release to each supported release branch, incorporating any bug fixes, will be once every two weeks, given any patches.
[main]: https://github.com/etcd-io/etcd/tree/main

View File

@ -0,0 +1,168 @@
# Community membership
This doc outlines the various responsibilities of contributor roles in etcd.
| Role | Responsibilities | Requirements | Defined by |
|------------|----------------------------------------------|---------------------------------------------------------------|-------------------------------|
| Member | Active contributor in the community | Sponsored by 2 reviewers and multiple contributions | etcd GitHub org member |
| Reviewer | Review contributions from other members | History of review and authorship | [OWNERS] file reviewer entry |
| Maintainer | Set direction and priorities for the project | Demonstrated responsibility and excellent technical judgement | [OWNERS] file approver entry |
## New contributors
New contributors should be welcomed to the community by existing members,
helped with PR workflow, and directed to relevant documentation and
communication channels.
## Established community members
Established community members are expected to demonstrate their adherence to the
principles in this document, familiarity with project organization, roles,
policies, procedures, conventions, etc., and technical and/or writing ability.
Role-specific expectations, responsibilities, and requirements are enumerated
below.
## Member
Members are continuously active contributors in the community. They can have
issues and PRs assigned to them. Members are expected to remain active
contributors to the community.
**Defined by:** Member of the etcd GitHub organization.
### Requirements
- Enabled [two-factor authentication] on their GitHub account
- Have made multiple contributions to the project or community. Contribution may include, but is not limited to:
- Authoring or reviewing PRs on GitHub. At least one PR must be **merged**.
- Filing or commenting on issues on GitHub
- Contributing to community discussions (e.g. meetings, Slack, email discussion
forums, Stack Overflow)
- Subscribed to etcd-dev@googlegroups.com
- Have read the [contributor guide]
- Sponsored by one active maintainer or two reviewers.
- Sponsors must be from multiple member companies to demonstrate integration across community.
- With no objections from other maintainers
- Open a [membership nomination] issue against the etcd-io/etcd repo
- Ensure your sponsors are @mentioned on the issue
- Make sure that the list of contributions included is representative of your work on the project.
- Members can be removed by a supermajority of the maintainers or can resign by notifying
the maintainers.
### Responsibilities and privileges
- Responsive to issues and PRs assigned to them
- Granted "triage access" to etcd project
- Active owner of code they have contributed (unless ownership is explicitly transferred)
- Code is well tested
- Tests consistently pass
- Addresses bugs or issues discovered after code is accepted
**Note:** members who frequently contribute code are expected to proactively
perform code reviews and work towards becoming a *reviewer*.
## Reviewers
Reviewers are contributors who have demonstrated greater skill in
reviewing the code from other contributors. They are knowledgeable about both
the codebase and software engineering principles. Their LGTM counts towards
merging a code change into the project. A reviewer is generally on the ladder towards
maintainership.
**Defined by:** *reviewers* entry in the [OWNERS] file.
### Requirements
- member for at least 3 months.
- Primary reviewer for at least 5 PRs to the codebase.
- Reviewed or contributed at least 20 substantial PRs to the codebase.
- Knowledgeable about the codebase.
- Sponsored by two active maintainers.
- Sponsors must be from multiple member companies to demonstrate integration across community.
- With no objections from other maintainers
- Reviewers can be removed by a supermajority of the maintainers or can resign by notifying
the maintainers.
### Responsibilities and privileges
- Code reviewer status may be a precondition to accepting large code contributions
- Responsible for project quality control via code reviews
- Focus on code quality and correctness, including testing and factoring
- May also review for more holistic issues, but not a requirement
- Expected to be responsive to review requests
- Assigned PRs to review related to area of expertise
- Assigned test bugs related to area of expertise
- Granted "triage access" to etcd project
## Maintainers
Maintainers are first and foremost contributors that have shown they
are committed to the long term success of a project. Maintainership is about building
trust with the current maintainers and being a person that they can
depend on to make decisions in the best interest of the project in a consistent manner.
**Defined by:** *approvers* entry in the [OWNERS] file.
### Requirements
- Deep understanding of the technical goals and direction of the project
- Deep understanding of the technical domain of the project
- Sustained contributions to design and direction by doing all of:
- Authoring and reviewing proposals
- Initiating, contributing and resolving discussions (emails, GitHub issues, meetings)
- Identifying subtle or complex issues in designs and implementation PRs
- Directly contributed to the project through implementation and / or review
- Sponsored by two active maintainers and elected by supermajority
- Sponsors must be from multiple member companies to demonstrate integration across community.
- To become a maintainer send an email with your candidacy to etcd-maintainers-private@googlegroups.com
- Ensure your sponsors are @mentioned on the email
- Include a list of contributions representative of your work on the project.
- Existing maintainers vote will privately and respond to the email with either acceptance or with feedback for suggested improvement.
- With your membership approved you are expected to:
- Open a PR and add an entry to the [OWNERS] file
- Subscribe to etcd-maintainers@googlegroups.com and etcd-maintainers-private@googlegroups.com
- Request to join to [etcd-maintainer teams of etcd organization of GitHub](https://github.com/orgs/etcd-io/teams/maintainers-etcd)
- Request to join to the private slack channel for etcd maintainers on [kubernetes slack](http://slack.kubernetes.io/)
- Request access to etcd-development GCP project where we publish releases
- Request access to passwords shared between maintainers
### Responsibilities and privileges
- Make and approve technical design decisions
- Set technical direction and priorities
- Define milestones and releases
- Mentor and guide reviewers, and contributors to the project.
- Participate when called upon in the [security disclosure and release process]
- Ensure continued health of the project
- Adequate test coverage to confidently release
- Tests are passing reliably (i.e. not flaky) and are fixed when they fail
- Ensure a healthy process for discussion and decision making is in place.
- Work with other maintainers to maintain the project's overall health and success holistically
### Retiring
Life priorities, interests, and passions can change. Maintainers can retire and
move to [emeritus maintainers]. If a maintainer needs to step down, they should
inform other maintainers, if possible, help find someone to pick up the related
work. At the very least, ensure the related work can be continued. Afterward
they can remove themselves from list of existing maintainers.
If a maintainer has not been performing their duties for period of 12 months,
they can be removed by other maintainers. In that case inactive maintainer will
be first notified via an email. If situation doesn't improve, they will be
removed. If an emeritus maintainer wants to regain an active role, they can do
so by renewing their contributions. Active maintainers should welcome such a move.
Retiring of other maintainers or regaining the status should require approval
of at least two active maintainers.
## Acknowledgements
Contributor roles and responsibilities were written based on [Kubernetes community membership]
[OWNERS]: /OWNERS
[contributor guide]: /CONTRIBUTING.md
[membership nomination]:https://github.com/etcd-io/etcd/issues/new?assignees=&labels=area%2Fcommunity&template=membership-request.yml
[Kubernetes community membership]: https://github.com/kubernetes/community/blob/master/community-membership.md
[emeritus maintainers]: /README.md#etcd-emeritus-maintainers
[security disclosure and release process]: /security/README.md
[two-factor authentication]: https://docs.github.com/en/authentication/securing-your-account-with-two-factor-authentication-2fa/about-two-factor-authentication

View File

@ -0,0 +1,128 @@
# Dependency management
## Table of Contents
- **[Main branch](#main-branch)**
- [Dependencies used in workflows](#dependencies-used-in-workflows)
- [Bumping order](#bumping-order)
- [Steps to bump a dependency](#steps-to-bump-a-dependency)
- [Indirect dependencies](#indirect-dependencies)
- [Known incompatible dependency updates](#known-incompatible-dependency-updates)
- [arduino/setup-protoc](#arduinosetup-protoc)
- [Rotation worksheet](#rotation-worksheet)
- **[Stable branches](#stable-branches)**
- **[Golang versions](#golang-versions)**
## Main branch
The dependabot is enabled & [configured](https://github.com/etcd-io/etcd/blob/main/.github/dependabot.yml) to
manage dependencies for etcd `main` branch. But dependabot doesn't work well for multi-module repository like `etcd`,
see [dependabot-core/issues/6678](https://github.com/dependabot/dependabot-core/issues/6678).
Usually human intervention is required each time when dependabot automatically opens some PRs to bump dependencies.
Please see guidance below.
### Dependencies used in workflows
The PRs which automatically bump dependencies (see examples below) used in workflows are fine, and can be approved & merged directly as long as all checks are successful.
- [build(deps): bump github/codeql-action from 2.2.11 to 2.2.12](https://github.com/etcd-io/etcd/pull/15736)
- [build(deps): bump actions/checkout from 3.5.0 to 3.5.2](https://github.com/etcd-io/etcd/pull/15735)
- [build(deps): bump ossf/scorecard-action from 2.1.2 to 2.1.3](https://github.com/etcd-io/etcd/pull/15607)
### Bumping order
When multiple etcd modules depend on the same package, please bump the package version for all the modules in the correct order. The rule is simple:
if module A depends on module B, then bump the dependency for module B before module A. If the two modules do not depend on each other, then
it doesn't matter to bump which module first. For example, multiple modules depend on `github.com/spf13/cobra`, we need to bump the dependency
in the following order,
- go.etcd.io/etcd/pkg/v3
- go.etcd.io/etcd/server/v3
- go.etcd.io/etcd/etcdctl/v3
- go.etcd.io/etcd/etcdutl/v3
- go.etcd.io/etcd/tests/v3
- go.etcd.io/etcd/v3
- go.etcd.io/etcd/tools/v3
For more details about etcd Golang modules, please check <https://etcd.io/docs/next/dev-internal/modules>
Note the module `go.etcd.io/etcd/tools/v3` doesn't depend on any other modules, nor by any other modules, so it doesn't matter when to bump dependencies for it.
### Steps to bump a dependency
Use the `github.com/spf13/cobra` as an example, follow steps below to bump it from 1.6.1 to 1.7.0 for module `go.etcd.io/etcd/etcdctl/v3`,
```bash
cd ${ETCD_ROOT_DIR}/etcdctl
go get github.com/spf13/cobra@v1.7.0
go mod tidy
cd ..
./scripts/fix.sh
```
Execute the same steps for all other modules. When you finish bumping the dependency for all modules, then commit the change,
```bash
git add .
git commit --signoff -m "dependency: bump github.com/spf13/cobra from 1.6.1 to 1.7.0"
```
Please close the related PRs which were automatically opened by dependabot.
When you bump multiple dependencies in one PR, it's recommended to create a separate commit for each dependency. But it isn't a must; for example,
you can get all dependencies bumping for the module `go.etcd.io/etcd/tools/v3` included in one commit.
### Indirect dependencies
Usually we don't bump a dependency if all modules just indirectly depend on it, such as `github.com/go-logr/logr`.
If an indirect dependency (e.g. `D1`) causes any CVE or bugs which affect etcd, usually the module (e.g. `M1`, not part of etcd, but used by etcd)
which depends on it should bump the dependency (`D1`), and then etcd just needs to bump `M1`. However, if the module (`M1`) somehow doesn't
bump the problematic dependency, then etcd can still bump it (`D1`) directly following the same steps above. But as a long-term solution, etcd should
try to remove the dependency on such module (`M1`) that lack maintenance.
For mixed cases, in which some modules directly while others indirectly depend on a dependency, we have multiple options,
- Bump the dependency for all modules, no matter it's direct or indirect dependency.
- Bump the dependency only for modules which directly depend on it.
We should try to follow the first way, and temporarily fall back to the second one if we run into any issue on the first way. Eventually we
should fix the issue and ensure all modules depend on the same version of the dependency.
### Known incompatible dependency updates
#### arduino/setup-protoc
Please refer to [build(deps): bump arduino/setup-protoc from 1.3.0 to 2.0.0](https://github.com/etcd-io/etcd/pull/16016)
### Rotation worksheet
The dependabot scheduling interval is weekly; it means dependabot will automatically raise a bunch of PRs per week.
Usually human intervention is required each time. We have a [rotation worksheet](https://docs.google.com/spreadsheets/d/1jodHIO7Dk2VWTs1IRnfMFaRktS9IH8XRyifOnPdSY8I/edit#gid=1394774387),
and everyone is welcome to participate; you just need to register your name in the worksheet.
## Stable branches
Usually we don't proactively bump dependencies for stable releases unless there are any CVEs or bugs that affect etcd.
If we have to do it, then follow the same guidance above. Note that there is no `./scripts/fix.sh` in release-3.4, so no need to
execute it for 3.4.
## Golang versions
The etcd project aims to maintain a development branch that is on the latest [Go version](https://go.dev/dl), ideally this will align with the Go version in use for Kubernetes project development. For an example on how to update etcd to a new minor release of Go refer to issue <https://github.com/etcd-io/etcd/issues/16393> and the linked pull requests.
Suggested steps for performing a minor version upgrade for the etcd development branch:
1. Carefully review new Go version release notes and potentially related blog for any deprecations, performance impacts or other considerations.
2. Create a github issue to signal intent to upgrade and invite discussion, example <https://github.com/etcd-io/etcd/issues/16393>.
3. Complete the upgrade locally in your development environment.
4. Run performance benchmarks locally to compare before and after.
5. Raise a pull request for the changes, example <https://github.com/etcd-io/etcd/pull/16394>.
Stable etcd release branches will be maintained to stay on the latest patch release of a supported Go version, however upgrading minor versions will be avoided unless the minor version in use is now out of support. Refer to the [Go release policy](https://go.dev/doc/devel/release).
For an example of how to update etcd to a new patch release of Go refer to issue <https://github.com/etcd-io/etcd/issues/16343> and the linked pull requests.
References:
- <https://github.com/kubernetes/sig-release/blob/master/release-engineering/handbooks/go.md>

View File

@ -0,0 +1,83 @@
# Features
This document provides an overview of etcd features and general development guidelines for adding and deprecating them. The project maintainers can override these guidelines per the need of the project following the project governance.
## Overview
The etcd features fall into three stages, experimental, stable, and unsafe.
### Experimental
Any new feature is usually added as an experimental feature. An experimental feature is characterized as below:
- Might be buggy due to a lack of user testing. Enabling the feature may not work as expected.
- Disabled by default when added initially.
- Support for such a feature may be dropped at any time without notice
- Feature related issues may be given lower priorities.
- It can be removed in the next minor or major release without following the feature deprecation policy unless it graduates to the stable future.
### Stable
A stable feature is characterized as below:
- Supported as part of the supported releases of etcd.
- May be enabled by default.
- Discontinuation of support must follow the feature deprecation policy.
### Unsafe
Unsafe features are rare and listed under the `Unsafe feature:` section in the etcd usage documentation. By default, they are disabled. They should be used with caution following documentation. An unsafe feature can be removed in the next minor or major release without following feature deprecation policy.
## Development Guidelines
### Adding a new feature
Any new enhancements to the etcd are typically added as an experimental feature. The general development requirements are listed below. They can be somewhat flexible depending on the scope of the feature and review discussions, and will evolve over time.
- Open an issue
- It must provide a clear need for the proposed feature.
- It should list development work items as checkboxes. There must be one work item towards future graduation to the stable future.
- Label the issue with `type/feature` and `experimental`.
- Keep the issue open for tracking purpose until a decision is made on graduation.
- Open a Pull Request (PR)
- Provide unit tests. Integreation tests are also recommended as possible.
- Provide robust e2e test coverage. If the feature being added is complicated or quickly needed, maintainers can decide to go with e2e tests for basic coverage initially and have robust coverage added at the later time before feature graduation to the stable feature.
- Provide logs for proper debugging.
- Provide metrics and benchmarks as needed.
- The Feature should be disabled by default.
- Any configuration flags related to the implementation of the feature must be prefixed with `experimental` e.g. `--experimental-feature-name`.
- Add a CHANGELOG entry.
- At least two maintainers must approve feature requirements and related code changes.
### Graduating an Experimental feature to Stable
It is important that experimental features don't get stuck in that stage. They should be revisited and moved to the stable stage following the graduation steps as described here.
#### Locate graduation candidate
Decide if an experimental feature is ready for graduation to the stable stage.
- Find the issue that was used to enable the experimental feature initially. One way to find such issues is to search for issues with `type/feature` and `experimental` labels.
- Fix any known open issues against the feature.
- Make sure the feature was enabled for at least one previous release. Check the PR(s) reference from the issue to see when the feature related code changes were merged.
#### Provide implementation
If an experimental feature is found ready for graduation to the stable stage, open a Pull Request (PR) with the following changes.
- Add robust e2e tests if not already provided.
- Add a new stable feature flag identical to the experimental feature flag but without the `--experimental` prefix.
- Deprecate the experimental feature following the [feature deprecation policy](#Deprecating-a-feature).
- Implementation must ensure that both the graduated and deprecated experimental feature flags work as expected. Note that both these flags will co-exist for the timeframe described in the feature deprecation policy.
- Enable the graduated feature by default if needed.
At least two maintainers must approve the work. Patch releases should not be considered for graduation.
### Deprecating a feature
#### Experimental
An experimental feature deprecates when it graduates to the stable stage.
- Add a deprecation message in the documentation of the experimental feature with a recommendation to use related stable feature. e.g. `DEPRECATED. Use <feature-name> instead.`
- Add a `deprecated` label in the issue that was initially used to enable the experimental feature.
#### Stable
As the project evolves, a stable feature may sometimes need to be deprecated and removed. Such a situation should be handled using the steps below:
- Create an issue for tracking purpose.
- Add a deprecation message in the feature usage documentation before a planned release for feature deprecation. e.g. `To be deprecated in <release>.`. If a new feature replaces the `To be deprecated` feature, then also provide a message saying so. e.g. `Use <feature-name> instead.`.
- Deprecate the feature in the planned release with a message as part of the feature usage documentation. e.g. `DEPRECATED`. If a new feature replaces the deprecated feature, then also provide a message saying so. e.g. `DEPRECATED. Use <feature-name> instead.`.
- Add a `deprecated` label in the related issue.
Remove the deprecated feature in the following release. Close any related issue(s). At least two maintainers must approve the work. Patch releases should not be considered for deprecation.

View File

@ -1,6 +1,4 @@
---
title: Set up a local cluster
---
# Set up local cluster
For testing and development deployments, the quickest and easiest way is to configure a local cluster. For a production deployment, refer to the [clustering][clustering] section.
@ -50,8 +48,9 @@ A `Procfile` at the base of the etcd git repository is provided to easily config
1. Install `goreman` to control Procfile-based applications:
```
$ go get github.com/mattn/goreman
$ go install github.com/mattn/goreman@latest
```
The installation will place executables in the $GOPATH/bin. If $GOPATH environment variable is not set, the tool will be installed into the $HOME/go/bin. Make sure that $PATH is set accordingly in your environment.
2. Start a cluster with `goreman` using etcd's stock Procfile:
@ -91,7 +90,7 @@ Use `etcdctl` to interact with the running cluster:
If OK is printed, storing key-value pair is successful.
### Testing fault tolerance
### Testing fault tolerance
To exercise etcd's fault tolerance, kill a member and attempt to retrieve the key.
@ -147,5 +146,5 @@ To exercise etcd's fault tolerance, kill a member and attempt to retrieve the ke
Restarting the member re-establish the connection. `etcdctl` will now be able to retrieve the key successfully. To learn more about interacting with etcd, read [interacting with etcd section][interacting].
[interacting]: ./interacting_v3.md
[clustering]: ../op-guide/clustering.md
[clustering]: https://etcd.io/docs/latest/op-guide/clustering/
[interacting]: https://etcd.io/docs/latest/dev-guide/interacting_v3/

View File

@ -0,0 +1,33 @@
# Logging Conventions
etcd uses the [zap][zap] library for logging application output categorized into *levels*. A log message's level is determined according to these conventions:
* Debug: Everything is still fine, but even common operations may be logged, and less helpful but more quantity of notices. Usually not used in production.
* Examples:
* Send a normal message to a remote peer
* Write a log entry to disk
* Info: Normal, working log information, everything is fine, but helpful notices for auditing or common operations. Should rather not be logged more frequently than once per a few seconds in normal server's operation.
* Examples:
* Startup configuration
* Start to do snapshot
* Warning: (Hopefully) Temporary conditions that may cause errors, but may work fine. A replica disappearing (that may reconnect) is a warning.
* Examples:
* Failure to send raft message to a remote peer
* Failure to receive heartbeat message within the configured election timeout
* Error: Data has been lost, a request has failed for a bad reason, or a required resource has been lost.
* Examples:
* Failure to allocate disk space for WAL
* Panic: Unrecoverable or unexpected error situation that requires stopping execution.
* Examples:
* Failure to create the database
* Fatal: Unrecoverable or unexpected error situation that requires immediate exit. Mostly used in the test.
* Examples:
* Failure to find the data directory
* Failure to run a test function
[zap]: https://github.com/uber-go/zap

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 129 KiB

View File

@ -0,0 +1,91 @@
# Golang modules
The etcd project (since version 3.5) is organized into multiple
[golang modules](https://golang.org/ref/mod) hosted in a [single repository](https://golang.org/ref/mod#vcs-dir).
![modules graph](modules.svg)
There are following modules:
- **go.etcd.io/etcd/api/v3** - contains API definitions
(like protos & proto-generated libraries) that defines communication protocol
between etcd clients and server.
- **go.etcd.io/etcd/pkg/v3** - collection of utility packages used by etcd
without being specific to etcd itself. A package belongs here
only if it could possibly be moved out into its own repository in the future.
Please avoid adding here code that has a lot of dependencies on its own, as
they automatically becoming dependencies of the client library
(that we want to keep lightweight).
- **go.etcd.io/etcd/client/v3** - client library used to contact etcd over
the network (grpc). Recommended for all new usage of etcd.
- **go.etcd.io/raft/v3** - implementation of distributed consensus
protocol. Should have no etcd specific code. Hosted in a separate repository:
https://github.com/etcd-io/raft.
- **go.etcd.io/etcd/server/v3** - etcd implementation.
The code in this package is etcd internal and should not be consumed
by external projects. The package layout and API can change within the minor versions.
- **go.etcd.io/etcd/etcdctl/v3** - a command line tool to access and manage etcd.
- **go.etcd.io/etcd/tests/v3** - a module that contains all integration tests of etcd.
Notice: All unit-tests (fast and not requiring cross-module dependencies)
should be kept in the local modules to the code under the test.
- **go.etcd.io/bbolt** - implementation of persistent b-tree.
Hosted in a separate repository: https://github.com/etcd-io/bbolt.
### Operations
1. All etcd modules should be released in the same versions, e.g.
`go.etcd.io/etcd/client/v3@v3.5.10` must depend on `go.etcd.io/etcd/api/v3@v3.5.10`.
The consistent updating of versions can by performed using:
```shell script
% DRY_RUN=false TARGET_VERSION="v3.5.10" ./scripts/release_mod.sh update_versions
```
2. The released modules should be tagged according to https://golang.org/ref/mod#vcs-version rules,
i.e. each module should get its own tag.
The tagging can be performed using:
```shell script
% DRY_RUN=false REMOTE_REPO="origin" ./scripts/release_mod.sh push_mod_tags
```
3. All etcd modules should depend on the same versions of underlying dependencies.
This can be verified using:
```shell script
% PASSES="dep" ./test.sh
```
4. The go.mod files must not contain dependencies not being used and must
conform to `go mod tidy` format.
This is being verified by:
```
% PASSES="mod_tidy" ./test.sh
```
5. To trigger actions across all modules (e.g. auto-format all files), please
use/expand the following script:
```shell script
% ./scripts/fix.sh
```
### Future
As a North Star, we would like to evaluate etcd modules towards following model:
![modules graph](modules-future.svg)
This assumes:
- Splitting etcdmigrate/etcdadm out of etcdctl binary.
Thanks to this etcdctl would become clearly a command-line wrapper
around network client API,
while etcdmigrate/etcdadm would support direct physical operations on the
etcd storage files.
- Splitting etcd-proxy out of ./etcd binary, as it contains more experimental code
so carries additional risk & dependencies.
- Deprecation of support for v2 protocol.

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 112 KiB

View File

@ -0,0 +1,75 @@
# Release
The guide talks about how to release a new version of etcd.
The procedure includes some manual steps for sanity checking, but it can probably be further scripted. Please keep this document up-to-date if making changes to the release process.
## Release management
etcd community members are assigned to manage the release each etcd major/minor version as well as manage patches
and to each stable release branch. The managers are responsible for communicating the timelines and status of each
release and for ensuring the stability of the release branch.
| Releases | Manager |
|------------------------|-------------------------------------------------------------|
| 3.4 patch (post 3.4.0) | Benjamin Wang [@ahrtr](https://github.com/ahrtr) |
| 3.5 patch (post 3.5.0) | Marek Siarkowicz [@serathius](https://github.com/serathius) |
All releases version numbers follow the format of [semantic versioning 2.0.0](http://semver.org/).
### Major, minor version release, or its pre-release
- Ensure the relevant milestone on GitHub is complete. All referenced issues should be closed, or moved elsewhere.
- Ensure the latest upgrade documentation is available.
- Bump [hardcoded MinClusterVerion in the repository](https://github.com/etcd-io/etcd/blob/v3.4.15/version/version.go#L29), if necessary.
- Add feature capability maps for the new version, if necessary.
### Patch version release
- To request a backport, devlopers submit cherrypick PRs targeting the release branch. The commits should not include merge commits. The commits should be restricted to bug fixes and security patches.
- The cherrypick PRs should target the appropriate release branch (`base:release-<major>-<minor>`). `hack/patch/cherrypick.sh` may be used to automatically generate cherrypick PRs.
- The release patch manager reviews the cherrypick PRs. Please discuss carefully what is backported to the patch release. Each patch release should be strictly better than it's predecessor.
- The release patch manager will cherry-pick these commits starting from the oldest one into stable branch.
## Write release note
- Write introduction for the new release. For example, what major bug we fix, what new features we introduce or what performance improvement we make.
- Put `[GH XXXX]` at the head of change line to reference Pull Request that introduces the change. Moreover, add a link on it to jump to the Pull Request.
- Find PRs with `release-note` label and explain them in `NEWS` file, as a straightforward summary of changes for end-users.
## Build and push the release artifacts
- Ensure `docker` is available.
Run release script in root directory:
```
DRY_RUN=false ./scripts/release.sh ${VERSION}
```
It generates all release binaries and images under directory ./release.
Binaries are pushed to gcr.io and images are pushed to quay.io and gcr.io.
## Publish release page in GitHub
- Set release title as the version name.
- Follow the format of previous release pages.
- Attach the generated binaries and signatures.
- Select whether it is a pre-release.
- Publish the release!
## Announce to the etcd-dev Googlegroup
- Follow the format of [previous release emails](https://groups.google.com/g/etcd-dev).
- Make sure to include a list of authors that contributed since the previous release - something like the following might be handy:
```
git log ...${PREV_VERSION} --pretty=format:"%an" | sort | uniq | tr '\n' ',' | sed -e 's#,#, #g' -e 's#, $##'
```
- Send email to etcd-dev@googlegroups.com
## Post release
- Create new stable branch through `git push origin ${VERSION_MAJOR}.${VERSION_MINOR}` if this is a major stable release. This assumes `origin` corresponds to "https://github.com/etcd-io/etcd".
- Bump [hardcoded Version in the repository](https://github.com/etcd-io/etcd/blob/v3.4.15/version/version.go#L30) to the version `${VERSION}+git`.

View File

@ -0,0 +1,45 @@
# Reporting bugs
If any part of the etcd project has bugs or documentation mistakes, please let us know by [opening an issue][etcd-issue]. We treat bugs and mistakes very seriously and believe no issue is too small. Before creating a bug report, please check that an issue reporting the same problem does not already exist.
To make the bug report accurate and easy to understand, please try to create bug reports that are:
- Specific. Include as much details as possible: which version, what environment, what configuration, etc. If the bug is related to running the etcd server, please attach the etcd log (the starting log with etcd configuration is especially important).
- Reproducible. Include the steps to reproduce the problem. We understand some issues might be hard to reproduce, please includes the steps that might lead to the problem. If possible, please attach the affected etcd data dir and stack strace to the bug report.
- Isolated. Please try to isolate and reproduce the bug with minimum dependencies. It would significantly slow down the speed to fix a bug if too many dependencies are involved in a bug report. Debugging external systems that rely on etcd is out of scope, but we are happy to provide guidance in the right direction or help with using etcd itself.
- Unique. Do not duplicate existing bug report.
- Scoped. One bug per report. Do not follow up with another bug inside one report.
It may be worthwhile to read [Elika Etemads article on filing good bug reports][filing-good-bugs] before creating a bug report.
We might ask for further information to locate a bug. A duplicated bug report will be closed.
## Frequently asked questions
### How to get a stack trace
``` bash
$ kill -QUIT $PID
```
### How to get etcd version
``` bash
$ etcd --version
```
### How to get etcd configuration and log when it runs as systemd service etcd2.service
``` bash
$ sudo systemctl cat etcd2
$ sudo journalctl -u etcd2
```
Due to an upstream systemd bug, journald may miss the last few log lines when its processes exit. If journalctl says etcd stopped without fatal or panic message, try `sudo journalctl -f -t etcd2` to get full log.
[etcd-issue]: https://github.com/etcd-io/etcd/issues/new
[filing-good-bugs]: http://fantasai.inkedblade.net/style/talks/filing-good-bugs/

View File

@ -0,0 +1,50 @@
# Roadmap
etcd uses GitHub milestones to track all tasks in each major or minor release. The `roadmap.md` file only records the
most important tasks for each release. The list is based on current maintainers capacity that may shift over time.
Proposed milestones is what we think we can deliver with people we have. If we have more support on the important
stuff, we could pick up more items from backlog. Note that etcd will continue to mainly focus on technical debt over
the next few major or minor releases.
Each item has an assigned priority. Refer to [priority definitions](https://github.com/etcd-io/etcd/blob/main/Documentation/contributor-guide/triage_issues.md#step-5---prioritise-the-issue).
## v3.6.0
For a full list of tasks in `v3.6.0`, please see [milestone etcd-v3.6](https://github.com/etcd-io/etcd/milestone/38).
| Title | Priority | Status | Note |
|--------------------------------------------------------------------------------------------------------------------|----------|-------------|--------------------------------------------------------------------------------------------------------------|
| [Support downgrade](https://github.com/etcd-io/etcd/issues/11716) | priority/important-soon | In progress | etcd will support downgrade starting from 3.6.0. But it will also support offline downgrade from 3.5 to 3.4. |
| [StoreV2 deprecation](https://github.com/etcd-io/etcd/issues/12913) | priority/important-soon | In progress | This task will be covered in both 3.6 and 3.7. |
| [Release raft 3.6.0](https://github.com/etcd-io/raft/issues/89) | priority/important-soon | Not started | etcd 3.6.0 will depends on raft 3.6.0 |
| [Release bbolt 1.4.0](https://github.com/etcd-io/bbolt/issues/553) | priority/important-soon | Not started | etcd 3.6.0 will depends on bbolt 1.4.0 |
| [Support /livez and /readyz endpoints](https://github.com/etcd-io/etcd/issues/16007) | priority/important-longterm | In progress | It provides clearer APIs, and can also workaround the stalled writes issue |
| [Bump gRPC](https://github.com/etcd-io/etcd/issues/16290) | priority/important-longterm | Completed | It isn't guaranteed to be resolved in 3.6, and might be postponed to 3.7 depending on the effort and risk. |
| [Deprecate grpc-gateway or bump it](https://github.com/etcd-io/etcd/issues/14499) | priority/important-longterm | Completed | It isn't guaranteed to be resolved in 3.6, and might be postponed to 3.7 depending on the effort and risk. |
| [bbolt: Add logger into bbolt](https://github.com/etcd-io/bbolt/issues/509) | priority/important-longterm | Completed | It's important to diagnose bbolt issues |
| [bbolt: Add surgery commands](https://github.com/etcd-io/bbolt/issues/370) | priority/important-longterm | Completed | Surgery commands are important for fixing corrupted db files |
| [Evaluate and (Gradulate or deprecate/remove) experimental features](https://github.com/etcd-io/etcd/issues/16292) | priority/backlog | Not started | This task will be covered in both 3.6 and 3.7. |
## v3.7.0
For a full list of tasks in `v3.7.0`, please see [milestone etcd-v3.7](https://github.com/etcd-io/etcd/milestone/39).
| Title | Priority | Note |
|-------------------------------------------------------------------------------------------------------------------|----------|-----------------------------------------------------------------------------------|
| [StoreV2 deprecation](https://github.com/etcd-io/etcd/issues/12913) | P0 | Finish the remaining tasks 3.7. |
| [Refactor lease: Lease might be revoked by mistake by old leader](https://github.com/etcd-io/etcd/issues/15247) | P1 | to be investigated & discussed |
| [Integrate raft's new feature (async write) into etcd](https://github.com/etcd-io/etcd/issues/16291) | P1 | It should can improve the performance |
| [bbolt: Support customizing the bbolt rebalance threshold](https://github.com/etcd-io/bbolt/issues/422) | P2 | It may get rid of etcd's defragmentation. Both bbolt and etcd need to be changed. |
| [Evaluate and (graduate or deprecate/remove) experimental features](https://github.com/etcd-io/etcd/issues/16292) | P2 | Finish the remaining tasks 3.7. |
## Backlog (future releases)
| Title | Priority | Note |
|----------------------------------------------------------------------------------------------------------|----------|------|
| [Remove the dependency on grpc-go's experimental API](https://github.com/etcd-io/etcd/issues/15145) | | |
| [Protobuf: cleanup both golang/protobuf and gogo/protobuf](https://github.com/etcd-io/etcd/issues/14533) | | |
| [Proposals should include a merkle root](https://github.com/etcd-io/etcd/issues/13839) | | |
| [Add Distributed Tracing using OpenTelemetry](https://github.com/etcd-io/etcd/issues/12460) | | |
| [Support CA rotation](https://github.com/etcd-io/etcd/issues/11555) | | |
| [bbolt: Migrate all commands to cobra style commands](https://github.com/etcd-io/bbolt/issues/472) | | |
| [raft: enhance the configuration change validation](https://github.com/etcd-io/raft/issues/80) | | |

View File

@ -0,0 +1,190 @@
# Issue triage guidelines
## Purpose
Speed up issue management.
The `etcd` issues are listed at <https://github.com/etcd-io/etcd/issues> and are identified with labels. For example, an issue that is identified as a bug will be set to label `type/bug`.
The etcd project uses labels to indicate common attributes such as `area`, `type` and `priority` of incoming issues.
New issues will often start out without any labels, but typically `etcd` maintainers, reviewers and members will add labels by following these triage guidelines. The detailed list of labels can be found at <https://github.com/etcd-io/etcd/labels>.
## Scope
This document serves as the primary guidelines for triaging incoming issues in `etcd`.
All contributors are encouraged and welcome to help manage issues which will help reduce burden on project maintainers, though the work and responsibilities discussed in this document are created with `etcd` project reviewers and members in mind as these individuals will have triage access to the etcd project which is a requirement for actions like applying labels or closing issues.
Refer to [etcd community membership](https://github.com/etcd-io/etcd/blob/main/Documentation/contributor-guide/community-membership.md) for guidance on becoming and etcd project member or reviewer.
## Step 1 - Find an issue to triage
To get started you can use the following recommended issue searches to identify issues that are in need of triage:
* [Issues that have no labels](https://github.com/etcd-io/etcd/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated+no%3Alabel)
* [Issues created recently](https://github.com/etcd-io/etcd/issues?q=is%3Aissue+is%3Aopen+)
* [Issues not assigned but linked pr](https://github.com/etcd-io/etcd/issues?q=is%3Aopen+is%3Aissue+no%3Aassignee+linked%3Apr)
* [Issues with no comments](https://github.com/etcd-io/etcd/issues?q=is%3Aopen+is%3Aissue+comments%3A0+)
* [Issues with help wanted](https://github.com/etcd-io/etcd/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22+)
## Step 2 - Check the issue is valid
Before we start adding labels or trying to work out a priority, our first triage step needs to be working out if the issue actually belongs to the etcd project and is not a duplicate.
### Issues that don't belong to etcd
Sometime issues are reported that actually belongs to other projects that `etcd` use. For example, `grpc` or `golang` issues. Such issues should be addressed by asking reporter to open issues in appropriate other project.
These issues can generally be closed unless a maintainer and issue reporter see a need to keep it open for tracking purpose. If you have triage permissions please close it, alternatively mention the @etcd-io/members group to request a member with triage access close the issue.
### Duplicate issues
If an issue is a duplicate, add a comment stating so along with a reference for the original issue and if you have triage permissions please close it, alternatively mention the @etcd-io/members group to request a member with triage access close the issue.
## Step 3 - Apply the appropriate type label
Adding a `type` label to an issue helps create visibility on the health of the project and helps contributors identify potential priorities, i.e. addressing existing bugs or test flakes before implementing new features.
### Support requests
As a general rule the focus for etcd support is to address common themes in a broad way that helps all users, i.e. through channels like known issues, frequently asked questions and high quality documentation. To make the best use of project members time we should avoid providing 1:1 support if a broad approach is available.
Some people mistakenly use our GitHub bug report or feature request templates to file support requests. Usually they are asking for help operating or configuring some aspect of etcd. Support requests for etcd should instead be raised as [discussions](https://github.com/etcd-io/etcd/discussions).
Common types of support requests are:
1. Questions about configuring or operating existing well documented etcd features, for example <https://github.com/etcd-io/etcd/issues/15945>. Note - If an existing feature is not well documented please apply the `area/documentation` label and propose documentation improvements that would prevent future users from stumbling on the problem again.
2. Bug reports or questions about unspported versions of etcd, for example <https://github.com/etcd-io/etcd/issues/15796>. When responding to these issues please refer to our [supported versions documentation](https://etcd.io/docs/latest/op-guide/versioning) and encourage the reporter to upgrade to a recent patch release of a supported version as soon as possible. We should limit the effort supporting users that do not make the effort to run a supported version of etcd or ensure their version is patched.
3. Bug reports that do not provide a complete list of steps to reproduce issue and/or contributors are not able to reproduce the issue, for example <https://github.com/etcd-io/etcd/issues/15740>. We should limit the effort we put into reproducing issues ourselves and motivate users to provide necessary information to accept the bug report.
4. General questions that are filed using feature request or bug report issue templates, for example <https://github.com/etcd-io/etcd/issues/15914>. Note - These types of requests may surface good additions to our [frequently asked questions](https://etcd.io/docs/v3.5/faq).
If you identify that an issue is a support request please:
1. Add the `type/support` or `type/question` label.
2. Add the following comment to inform the issue creator that discussions should be used instead and that this issue will be converted to a discussion.
> Thank you for your question, this support issue will be moved to our [Discussion Forums](https://github.com/etcd-io/etcd/discussions).
>
> We are trying to consolidate the channels to which questions for help/support are posted so that we can improve our efficiency in responding to your requests, and to make it easier for you to find answers to frequently asked questions and how to address common use cases.
>
> We regularly see messages posted in multiple forums, with the full response thread only in one place or, worse, spread across multiple forums. Also, the large volume of support issues on GitHub is making it difficult for us to use issues to identify real bugs.
>
> Members of the etcd community use Discussion Forums to field support requests. Before posting a new question, please search these for answers to similar questions, and also familiarize yourself with:
>
> 1. [user documentation](https://etcd.io/docs/latest)
> 2. [frequently asked questions](https://etcd.io/docs/v3.5/faq)
>
> Again, thanks for using etcd and raising this question.
>
> The etcd team
3. Finally, click `Convert to discussion` on the right hand panel, selecting the appropriate discussion category.
### Bug reports
If an issue has been raised as a bug it should already have the `type/bug` label, however if this is missing for an issue you determine to be a bug please add the label manually.
The next step is to validate if the issue is indeed a bug. If not, add a comment with findings and close trivial issue. For non-trivial issue, wait to hear back from issue reporter and see if there is any objection. If issue reporter does not reply in 30 days, close the issue.
If the problem can not be reproduced or requires more information, leave a comment for the issue reporter as soon as possible while the issue will be fresh for the issue reporter.
### Feature requests
New feature requests should be created via the etcd feature request template and in theory already have the `type/feature` label, however if this is missing for an issue you determine to be a feature please add the label manually.
### Test flakes
Test flakes are a specific type of bug that the etcd project tracks separately as these are a priority to address. These should be created via the test flake template and in theory already have the `type/flake` label, however if this is missing for an issue you determine to be related to a flaking test please add the label manually.
## Step 4 - Define the areas impacted
Adding an `area` label to an issue helps create visibility on which areas of the etcd project require attention and helps contributors find issues to work on relating to their particular skills or knowledge of the etcd codebase.
If an issue crosses multiple domains please add additional `area` labels to reflect that.
Below is a brief summary of the area labels in active use by the etcd project along with any notes on their use:
| Label | Notes |
| --- | --- |
| area/external | Tracking label for issues raised that are external to etcd. |
| area/community | |
| area/raft | |
| area/clientv3 | |
| area/performance | |
| area/security | |
| area/tls | |
| area/auth | |
| area/etcdctl | |
| area/etcdutl | |
| area/contrib | Not to be confused with `area/community` this label is specifically used for issues relating to community maintained scripts or files in the `contrib/` directory which aren't part of the core etcd project. |
| area/documentation | |
| area/tooling | Generally used in relation to the third party / external utilities or tools that are used in various stages of the etcd build, test or release process, for example tooling to create sboms. |
| area/testing | |
| area/robustness-testing | |
## Step 5 - Prioritise the issue
If an issue lacks a priority label it has not been formally prioritized yet.
Adding a `priority` label helps the etcd project understand what is important and should be worked on now, and conversely what is not as important and is on the project backlog.
|Priority label|What it means|Examples|
|---|---|---|
| `priority/critical-urgent` | Maintainers are responsible for making sure that these issues (in their area) are being actively worked on—i.e., drop what you're doing. Stuff is burning. These should be fixed before the next release. | user-visible critical bugs in core features <br> broken builds on tier1 supported platforms <br> tests and critical security issues |
| `priority/important-soon` | Must be staffed and worked on either currently or very soon—ideally in time for the next release. | |
| `priority/important-longterm` | Important over the long term, but may not be currently staffed and/or may require multiple releases to complete. | |
| `priority/backlog` | General agreement that this is a nice-to-have, but no one's available to work on it anytime soon. Community contributions would be most welcome in the meantime, though it might take a while to get them reviewed if reviewers are fully occupied with higher-priority issues—for example, immediately before a release.| |
| `priority/awaiting-more-evidence` | Possibly useful, but not yet enough support to actually get it done. | Mostly placeholders for potentially good ideas, so that they don't get completely forgotten, and can be referenced or deduped every time they come up |
## Step 6 - Support new contributors
As part of the `etcd` triage process once the `kind` and `area` have been determined, please consider if the issue would be suitable for a less experienced contributor. The `good first issue` label is a subset of the `help wanted` label, indicating that members have committed to providing extra assistance for new contributors. All `good first issue` items also have the `help wanted` label.
### Help wanted
Items marked with the `help wanted` label need to ensure that they meet these criteria:
* **Low Barrier to Entry** - It should be easy for new contributors.
* **Clear** - The task is agreed upon and does not require further discussions in the community.
* **Goldilocks priority** - The priority should not be so high that a core contributor should do it, but not too low that it isnt useful enough for a core contributor to spend time reviewing it, answering questions, helping get it into a release, etc.
### Good first issue
Items marked with `good first issue` are intended for first-time contributors. It indicates that members will keep an eye out for these pull requests and shepherd it through our processes.
New contributors should not be left to find an approver, ping for reviews, decipher test commands, or identify that their build failed due to a flake. It is important to make new contributors feel welcome and valued. We should assure them that they will have an extra level of help with their first contribution.
After a contributor has successfully completed one or two `good first issue` items, they should be ready to move on to `help wanted` items.
* **No Barrier to Entry** - The task is something that a new contributor can tackle without advanced setup or domain knowledge.
* **Solution Explained** - The recommended solution is clearly described in the issue.
* **Gives Examples** - Link to examples of similar implementations so new contributors have a reference guide for their changes.
* **Identifies Relevant Code** - The relevant code and tests to be changed should be linked in the issue.
* **Ready to Test** - There should be existing tests that can be modified, or existing test cases fit to be copied. If the area of code doesnt have tests, before labeling the issue, add a test fixture. This prep often makes a great help wanted task!
## Step 7 - Follow up
Once initial triage has been completed, issues need to be re-evaluated over time to ensure they don't become stale incorrectly.
### Track important issues
If an issue is at risk of being closed by stale bot in future, but is an important issuefor the etcd project, then please apply the `stage/tracked` label and remove any `stale` labels that exist. This will ensure the project does not lose sight of the issue.
### Close incomplete issues
Issues that lack enough information from the issue reporter should be closed if issue reporter do not provide information in 30 days. Issues can always be re-opened at a later date if new information is provided.
### Check for incomplete work
If an issue owned by a developer has no pull request created in 30 days, contact the issue owner and kindly ask about the status of their work, or to release ownership on the issue if needed.

View File

@ -0,0 +1,28 @@
# PR management
## Purpose
Speed up PR management.
The `etcd` PRs are listed at https://github.com/etcd-io/etcd/pulls
A PR can have various labels, milestone, reviewer etc. The detailed list of labels can be found at
https://github.com/kubernetes/kubernetes/labels
Following are few example searches on PR for convenience:
* [Open PRS for milestone etcd-v3.6](https://github.com/etcd-io/etcd/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Aopen+milestone%3Aetcd-v3.6)
* [PRs under investigation](https://github.com/etcd-io/etcd/labels/Investigating)
## Scope
These guidelines serves as a primary document for managing PRs in `etcd`. Everyone is welcome to help manage PRs but the work and responsibilities discussed in this document is created with `etcd` maintainers and active contributors in mind.
## Handle inactive PRs
Poke PR owner if review comments are not addressed in 15 days. If PR owner does not reply in 90 days, update the PR with a new commit if possible. If not, inactive PR should be closed after 180 days.
## Poke reviewer if needed
Reviewers are responsive in a timely fashion, but considering everyone is busy, give them some time after requesting review if quick response is not provided. If response is not provided in 10 days, feel free to contact them via adding a comment in the PR or sending an email or message on the Slack.
## Verify important labels are in place
Make sure that appropriate reviewers are added to the PR. Also, make sure that a milestone is identified. If any of these or other important labels are missing, add them. If a correct label cannot be decided, leave a comment for the maintainers to do so as needed.

View File

@ -1,456 +0,0 @@
---
title: Demo
---
This series of examples shows the basic procedures for working with an etcd cluster.
## Set up a cluster
<img src="https://storage.googleapis.com/etcd/demo/01_etcd_clustering_2016051001.gif" alt="01_etcd_clustering_2016050601"/>
On each etcd node, specify the cluster members:
```
TOKEN=token-01
CLUSTER_STATE=new
NAME_1=machine-1
NAME_2=machine-2
NAME_3=machine-3
HOST_1=10.240.0.17
HOST_2=10.240.0.18
HOST_3=10.240.0.19
CLUSTER=${NAME_1}=http://${HOST_1}:2380,${NAME_2}=http://${HOST_2}:2380,${NAME_3}=http://${HOST_3}:2380
```
Run this on each machine:
```
# For machine 1
THIS_NAME=${NAME_1}
THIS_IP=${HOST_1}
etcd --data-dir=data.etcd --name ${THIS_NAME} \
--initial-advertise-peer-urls http://${THIS_IP}:2380 --listen-peer-urls http://${THIS_IP}:2380 \
--advertise-client-urls http://${THIS_IP}:2379 --listen-client-urls http://${THIS_IP}:2379 \
--initial-cluster ${CLUSTER} \
--initial-cluster-state ${CLUSTER_STATE} --initial-cluster-token ${TOKEN}
# For machine 2
THIS_NAME=${NAME_2}
THIS_IP=${HOST_2}
etcd --data-dir=data.etcd --name ${THIS_NAME} \
--initial-advertise-peer-urls http://${THIS_IP}:2380 --listen-peer-urls http://${THIS_IP}:2380 \
--advertise-client-urls http://${THIS_IP}:2379 --listen-client-urls http://${THIS_IP}:2379 \
--initial-cluster ${CLUSTER} \
--initial-cluster-state ${CLUSTER_STATE} --initial-cluster-token ${TOKEN}
# For machine 3
THIS_NAME=${NAME_3}
THIS_IP=${HOST_3}
etcd --data-dir=data.etcd --name ${THIS_NAME} \
--initial-advertise-peer-urls http://${THIS_IP}:2380 --listen-peer-urls http://${THIS_IP}:2380 \
--advertise-client-urls http://${THIS_IP}:2379 --listen-client-urls http://${THIS_IP}:2379 \
--initial-cluster ${CLUSTER} \
--initial-cluster-state ${CLUSTER_STATE} --initial-cluster-token ${TOKEN}
```
Or use our public discovery service:
```
curl https://discovery.etcd.io/new?size=3
https://discovery.etcd.io/a81b5818e67a6ea83e9d4daea5ecbc92
# grab this token
TOKEN=token-01
CLUSTER_STATE=new
NAME_1=machine-1
NAME_2=machine-2
NAME_3=machine-3
HOST_1=10.240.0.17
HOST_2=10.240.0.18
HOST_3=10.240.0.19
DISCOVERY=https://discovery.etcd.io/a81b5818e67a6ea83e9d4daea5ecbc92
THIS_NAME=${NAME_1}
THIS_IP=${HOST_1}
etcd --data-dir=data.etcd --name ${THIS_NAME} \
--initial-advertise-peer-urls http://${THIS_IP}:2380 --listen-peer-urls http://${THIS_IP}:2380 \
--advertise-client-urls http://${THIS_IP}:2379 --listen-client-urls http://${THIS_IP}:2379 \
--discovery ${DISCOVERY} \
--initial-cluster-state ${CLUSTER_STATE} --initial-cluster-token ${TOKEN}
THIS_NAME=${NAME_2}
THIS_IP=${HOST_2}
etcd --data-dir=data.etcd --name ${THIS_NAME} \
--initial-advertise-peer-urls http://${THIS_IP}:2380 --listen-peer-urls http://${THIS_IP}:2380 \
--advertise-client-urls http://${THIS_IP}:2379 --listen-client-urls http://${THIS_IP}:2379 \
--discovery ${DISCOVERY} \
--initial-cluster-state ${CLUSTER_STATE} --initial-cluster-token ${TOKEN}
THIS_NAME=${NAME_3}
THIS_IP=${HOST_3}
etcd --data-dir=data.etcd --name ${THIS_NAME} \
--initial-advertise-peer-urls http://${THIS_IP}:2380 --listen-peer-urls http://${THIS_IP}:2380 \
--advertise-client-urls http://${THIS_IP}:2379 --listen-client-urls http://${THIS_IP}:2379 \
--discovery ${DISCOVERY} \
--initial-cluster-state ${CLUSTER_STATE} --initial-cluster-token ${TOKEN}
```
Now etcd is ready! To connect to etcd with etcdctl:
```
export ETCDCTL_API=3
HOST_1=10.240.0.17
HOST_2=10.240.0.18
HOST_3=10.240.0.19
ENDPOINTS=$HOST_1:2379,$HOST_2:2379,$HOST_3:2379
etcdctl --endpoints=$ENDPOINTS member list
```
## Access etcd
<img src="https://storage.googleapis.com/etcd/demo/02_etcdctl_access_etcd_2016051001.gif" alt="02_etcdctl_access_etcd_2016051001"/>
`put` command to write:
```
etcdctl --endpoints=$ENDPOINTS put foo "Hello World!"
```
`get` to read from etcd:
```
etcdctl --endpoints=$ENDPOINTS get foo
etcdctl --endpoints=$ENDPOINTS --write-out="json" get foo
```
## Get by prefix
<img src="https://storage.googleapis.com/etcd/demo/03_etcdctl_get_by_prefix_2016050501.gif" alt="03_etcdctl_get_by_prefix_2016050501"/>
```
etcdctl --endpoints=$ENDPOINTS put web1 value1
etcdctl --endpoints=$ENDPOINTS put web2 value2
etcdctl --endpoints=$ENDPOINTS put web3 value3
etcdctl --endpoints=$ENDPOINTS get web --prefix
```
## Delete
<img src="https://storage.googleapis.com/etcd/demo/04_etcdctl_delete_2016050601.gif" alt="04_etcdctl_delete_2016050601"/>
```
etcdctl --endpoints=$ENDPOINTS put key myvalue
etcdctl --endpoints=$ENDPOINTS del key
etcdctl --endpoints=$ENDPOINTS put k1 value1
etcdctl --endpoints=$ENDPOINTS put k2 value2
etcdctl --endpoints=$ENDPOINTS del k --prefix
```
## Transactional write
`txn` to wrap multiple requests into one transaction:
<img src="https://storage.googleapis.com/etcd/demo/05_etcdctl_transaction_2016050501.gif" alt="05_etcdctl_transaction_2016050501"/>
```
etcdctl --endpoints=$ENDPOINTS put user1 bad
etcdctl --endpoints=$ENDPOINTS txn --interactive
compares:
value("user1") = "bad"
success requests (get, put, delete):
del user1
failure requests (get, put, delete):
put user1 good
```
## Watch
`watch` to get notified of future changes:
<img src="https://storage.googleapis.com/etcd/demo/06_etcdctl_watch_2016050501.gif" alt="06_etcdctl_watch_2016050501"/>
```
etcdctl --endpoints=$ENDPOINTS watch stock1
etcdctl --endpoints=$ENDPOINTS put stock1 1000
etcdctl --endpoints=$ENDPOINTS watch stock --prefix
etcdctl --endpoints=$ENDPOINTS put stock1 10
etcdctl --endpoints=$ENDPOINTS put stock2 20
```
## Lease
`lease` to write with TTL:
<img src="https://storage.googleapis.com/etcd/demo/07_etcdctl_lease_2016050501.gif" alt="07_etcdctl_lease_2016050501"/>
```
etcdctl --endpoints=$ENDPOINTS lease grant 300
# lease 2be7547fbc6a5afa granted with TTL(300s)
etcdctl --endpoints=$ENDPOINTS put sample value --lease=2be7547fbc6a5afa
etcdctl --endpoints=$ENDPOINTS get sample
etcdctl --endpoints=$ENDPOINTS lease keep-alive 2be7547fbc6a5afa
etcdctl --endpoints=$ENDPOINTS lease revoke 2be7547fbc6a5afa
# or after 300 seconds
etcdctl --endpoints=$ENDPOINTS get sample
```
## Distributed locks
`lock` for distributed lock:
<img src="https://storage.googleapis.com/etcd/demo/08_etcdctl_lock_2016050501.gif" alt="08_etcdctl_lock_2016050501"/>
```
etcdctl --endpoints=$ENDPOINTS lock mutex1
# another client with the same name blocks
etcdctl --endpoints=$ENDPOINTS lock mutex1
```
## Elections
`elect` for leader election:
<img src="https://storage.googleapis.com/etcd/demo/09_etcdctl_elect_2016050501.gif" alt="09_etcdctl_elect_2016050501"/>
```
etcdctl --endpoints=$ENDPOINTS elect one p1
# another client with the same name blocks
etcdctl --endpoints=$ENDPOINTS elect one p2
```
## Cluster status
Specify the initial cluster configuration for each machine:
<img src="https://storage.googleapis.com/etcd/demo/10_etcdctl_endpoint_2016050501.gif" alt="10_etcdctl_endpoint_2016050501"/>
```
etcdctl --write-out=table --endpoints=$ENDPOINTS endpoint status
+------------------+------------------+---------+---------+-----------+-----------+------------+
| ENDPOINT | ID | VERSION | DB SIZE | IS LEADER | RAFT TERM | RAFT INDEX |
+------------------+------------------+---------+---------+-----------+-----------+------------+
| 10.240.0.17:2379 | 4917a7ab173fabe7 | 3.0.0 | 45 kB | true | 4 | 16726 |
| 10.240.0.18:2379 | 59796ba9cd1bcd72 | 3.0.0 | 45 kB | false | 4 | 16726 |
| 10.240.0.19:2379 | 94df724b66343e6c | 3.0.0 | 45 kB | false | 4 | 16726 |
+------------------+------------------+---------+---------+-----------+-----------+------------+
```
```
etcdctl --endpoints=$ENDPOINTS endpoint health
10.240.0.17:2379 is healthy: successfully committed proposal: took = 3.345431ms
10.240.0.19:2379 is healthy: successfully committed proposal: took = 3.767967ms
10.240.0.18:2379 is healthy: successfully committed proposal: took = 4.025451ms
```
## Snapshot
`snapshot` to save point-in-time snapshot of etcd database:
<img src="https://storage.googleapis.com/etcd/demo/11_etcdctl_snapshot_2016051001.gif" alt="11_etcdctl_snapshot_2016051001"/>
```
etcdctl --endpoints=$ENDPOINTS snapshot save my.db
Snapshot saved at my.db
```
```
etcdctl --write-out=table --endpoints=$ENDPOINTS snapshot status my.db
+---------+----------+------------+------------+
| HASH | REVISION | TOTAL KEYS | TOTAL SIZE |
+---------+----------+------------+------------+
| c55e8b8 | 9 | 13 | 25 kB |
+---------+----------+------------+------------+
```
## Migrate
`migrate` to transform etcd v2 to v3 data:
<img src="https://storage.googleapis.com/etcd/demo/12_etcdctl_migrate_2016061602.gif" alt="12_etcdctl_migrate_2016061602"/>
```
# write key in etcd version 2 store
export ETCDCTL_API=2
etcdctl --endpoints=http://$ENDPOINT set foo bar
# read key in etcd v2
etcdctl --endpoints=$ENDPOINTS --output="json" get foo
# stop etcd node to migrate, one by one
# migrate v2 data
export ETCDCTL_API=3
etcdctl --endpoints=$ENDPOINT migrate --data-dir="default.etcd" --wal-dir="default.etcd/member/wal"
# restart etcd node after migrate, one by one
# confirm that the key got migrated
etcdctl --endpoints=$ENDPOINTS get /foo
```
## Member
`member` to add,remove,update membership:
<img src="https://storage.googleapis.com/etcd/demo/13_etcdctl_member_2016062301.gif" alt="13_etcdctl_member_2016062301"/>
```
# For each machine
TOKEN=my-etcd-token-1
CLUSTER_STATE=new
NAME_1=etcd-node-1
NAME_2=etcd-node-2
NAME_3=etcd-node-3
HOST_1=10.240.0.13
HOST_2=10.240.0.14
HOST_3=10.240.0.15
CLUSTER=${NAME_1}=http://${HOST_1}:2380,${NAME_2}=http://${HOST_2}:2380,${NAME_3}=http://${HOST_3}:2380
# For node 1
THIS_NAME=${NAME_1}
THIS_IP=${HOST_1}
etcd --data-dir=data.etcd --name ${THIS_NAME} \
--initial-advertise-peer-urls http://${THIS_IP}:2380 \
--listen-peer-urls http://${THIS_IP}:2380 \
--advertise-client-urls http://${THIS_IP}:2379 \
--listen-client-urls http://${THIS_IP}:2379 \
--initial-cluster ${CLUSTER} \
--initial-cluster-state ${CLUSTER_STATE} \
--initial-cluster-token ${TOKEN}
# For node 2
THIS_NAME=${NAME_2}
THIS_IP=${HOST_2}
etcd --data-dir=data.etcd --name ${THIS_NAME} \
--initial-advertise-peer-urls http://${THIS_IP}:2380 \
--listen-peer-urls http://${THIS_IP}:2380 \
--advertise-client-urls http://${THIS_IP}:2379 \
--listen-client-urls http://${THIS_IP}:2379 \
--initial-cluster ${CLUSTER} \
--initial-cluster-state ${CLUSTER_STATE} \
--initial-cluster-token ${TOKEN}
# For node 3
THIS_NAME=${NAME_3}
THIS_IP=${HOST_3}
etcd --data-dir=data.etcd --name ${THIS_NAME} \
--initial-advertise-peer-urls http://${THIS_IP}:2380 \
--listen-peer-urls http://${THIS_IP}:2380 \
--advertise-client-urls http://${THIS_IP}:2379 \
--listen-client-urls http://${THIS_IP}:2379 \
--initial-cluster ${CLUSTER} \
--initial-cluster-state ${CLUSTER_STATE} \
--initial-cluster-token ${TOKEN}
```
Then replace a member with `member remove` and `member add` commands:
```
# get member ID
export ETCDCTL_API=3
HOST_1=10.240.0.13
HOST_2=10.240.0.14
HOST_3=10.240.0.15
etcdctl --endpoints=${HOST_1}:2379,${HOST_2}:2379,${HOST_3}:2379 member list
# remove the member
MEMBER_ID=278c654c9a6dfd3b
etcdctl --endpoints=${HOST_1}:2379,${HOST_2}:2379,${HOST_3}:2379 \
member remove ${MEMBER_ID}
# add a new member (node 4)
export ETCDCTL_API=3
NAME_1=etcd-node-1
NAME_2=etcd-node-2
NAME_4=etcd-node-4
HOST_1=10.240.0.13
HOST_2=10.240.0.14
HOST_4=10.240.0.16 # new member
etcdctl --endpoints=${HOST_1}:2379,${HOST_2}:2379 \
member add ${NAME_4} \
--peer-urls=http://${HOST_4}:2380
```
Next, start the new member with `--initial-cluster-state existing` flag:
```
# [WARNING] If the new member starts from the same disk space,
# make sure to remove the data directory of the old member
#
# restart with 'existing' flag
TOKEN=my-etcd-token-1
CLUSTER_STATE=existing
NAME_1=etcd-node-1
NAME_2=etcd-node-2
NAME_4=etcd-node-4
HOST_1=10.240.0.13
HOST_2=10.240.0.14
HOST_4=10.240.0.16 # new member
CLUSTER=${NAME_1}=http://${HOST_1}:2380,${NAME_2}=http://${HOST_2}:2380,${NAME_4}=http://${HOST_4}:2380
THIS_NAME=${NAME_4}
THIS_IP=${HOST_4}
etcd --data-dir=data.etcd --name ${THIS_NAME} \
--initial-advertise-peer-urls http://${THIS_IP}:2380 \
--listen-peer-urls http://${THIS_IP}:2380 \
--advertise-client-urls http://${THIS_IP}:2379 \
--listen-client-urls http://${THIS_IP}:2379 \
--initial-cluster ${CLUSTER} \
--initial-cluster-state ${CLUSTER_STATE} \
--initial-cluster-token ${TOKEN}
```
## Auth
`auth`,`user`,`role` for authentication:
<img src="https://storage.googleapis.com/etcd/demo/14_etcdctl_auth_2016062301.gif" alt="14_etcdctl_auth_2016062301"/>
```
export ETCDCTL_API=3
ENDPOINTS=localhost:2379
etcdctl --endpoints=${ENDPOINTS} role add root
etcdctl --endpoints=${ENDPOINTS} role grant-permission root readwrite foo
etcdctl --endpoints=${ENDPOINTS} role get root
etcdctl --endpoints=${ENDPOINTS} user add root
etcdctl --endpoints=${ENDPOINTS} user grant-role root root
etcdctl --endpoints=${ENDPOINTS} user get root
etcdctl --endpoints=${ENDPOINTS} auth enable
# now all client requests go through auth
etcdctl --endpoints=${ENDPOINTS} --user=root:123 put foo bar
etcdctl --endpoints=${ENDPOINTS} get foo
etcdctl --endpoints=${ENDPOINTS} --user=root:123 get foo
etcdctl --endpoints=${ENDPOINTS} --user=root:123 get foo1
```

View File

@ -1,168 +0,0 @@
### etcd concurrency API Reference
This is a generated documentation. Please read the proto files for more.
##### service `Lock` (etcdserver/api/v3lock/v3lockpb/v3lock.proto)
The lock service exposes client-side locking facilities as a gRPC interface.
| Method | Request Type | Response Type | Description |
| ------ | ------------ | ------------- | ----------- |
| Lock | LockRequest | LockResponse | Lock acquires a distributed shared lock on a given named lock. On success, it will return a unique key that exists so long as the lock is held by the caller. This key can be used in conjunction with transactions to safely ensure updates to etcd only occur while holding lock ownership. The lock is held until Unlock is called on the key or the lease associate with the owner expires. |
| Unlock | UnlockRequest | UnlockResponse | Unlock takes a key returned by Lock and releases the hold on lock. The next Lock caller waiting for the lock will then be woken up and given ownership of the lock. |
##### message `LockRequest` (etcdserver/api/v3lock/v3lockpb/v3lock.proto)
| Field | Description | Type |
| ----- | ----------- | ---- |
| name | name is the identifier for the distributed shared lock to be acquired. | bytes |
| lease | lease is the ID of the lease that will be attached to ownership of the lock. If the lease expires or is revoked and currently holds the lock, the lock is automatically released. Calls to Lock with the same lease will be treated as a single acquisition; locking twice with the same lease is a no-op. | int64 |
##### message `LockResponse` (etcdserver/api/v3lock/v3lockpb/v3lock.proto)
| Field | Description | Type |
| ----- | ----------- | ---- |
| header | | etcdserverpb.ResponseHeader |
| key | key is a key that will exist on etcd for the duration that the Lock caller owns the lock. Users should not modify this key or the lock may exhibit undefined behavior. | bytes |
##### message `UnlockRequest` (etcdserver/api/v3lock/v3lockpb/v3lock.proto)
| Field | Description | Type |
| ----- | ----------- | ---- |
| key | key is the lock ownership key granted by Lock. | bytes |
##### message `UnlockResponse` (etcdserver/api/v3lock/v3lockpb/v3lock.proto)
| Field | Description | Type |
| ----- | ----------- | ---- |
| header | | etcdserverpb.ResponseHeader |
##### service `Election` (etcdserver/api/v3election/v3electionpb/v3election.proto)
The election service exposes client-side election facilities as a gRPC interface.
| Method | Request Type | Response Type | Description |
| ------ | ------------ | ------------- | ----------- |
| Campaign | CampaignRequest | CampaignResponse | Campaign waits to acquire leadership in an election, returning a LeaderKey representing the leadership if successful. The LeaderKey can then be used to issue new values on the election, transactionally guard API requests on leadership still being held, and resign from the election. |
| Proclaim | ProclaimRequest | ProclaimResponse | Proclaim updates the leader's posted value with a new value. |
| Leader | LeaderRequest | LeaderResponse | Leader returns the current election proclamation, if any. |
| Observe | LeaderRequest | LeaderResponse | Observe streams election proclamations in-order as made by the election's elected leaders. |
| Resign | ResignRequest | ResignResponse | Resign releases election leadership so other campaigners may acquire leadership on the election. |
##### message `CampaignRequest` (etcdserver/api/v3election/v3electionpb/v3election.proto)
| Field | Description | Type |
| ----- | ----------- | ---- |
| name | name is the election's identifier for the campaign. | bytes |
| lease | lease is the ID of the lease attached to leadership of the election. If the lease expires or is revoked before resigning leadership, then the leadership is transferred to the next campaigner, if any. | int64 |
| value | value is the initial proclaimed value set when the campaigner wins the election. | bytes |
##### message `CampaignResponse` (etcdserver/api/v3election/v3electionpb/v3election.proto)
| Field | Description | Type |
| ----- | ----------- | ---- |
| header | | etcdserverpb.ResponseHeader |
| leader | leader describes the resources used for holding leadereship of the election. | LeaderKey |
##### message `LeaderKey` (etcdserver/api/v3election/v3electionpb/v3election.proto)
| Field | Description | Type |
| ----- | ----------- | ---- |
| name | name is the election identifier that correponds to the leadership key. | bytes |
| key | key is an opaque key representing the ownership of the election. If the key is deleted, then leadership is lost. | bytes |
| rev | rev is the creation revision of the key. It can be used to test for ownership of an election during transactions by testing the key's creation revision matches rev. | int64 |
| lease | lease is the lease ID of the election leader. | int64 |
##### message `LeaderRequest` (etcdserver/api/v3election/v3electionpb/v3election.proto)
| Field | Description | Type |
| ----- | ----------- | ---- |
| name | name is the election identifier for the leadership information. | bytes |
##### message `LeaderResponse` (etcdserver/api/v3election/v3electionpb/v3election.proto)
| Field | Description | Type |
| ----- | ----------- | ---- |
| header | | etcdserverpb.ResponseHeader |
| kv | kv is the key-value pair representing the latest leader update. | mvccpb.KeyValue |
##### message `ProclaimRequest` (etcdserver/api/v3election/v3electionpb/v3election.proto)
| Field | Description | Type |
| ----- | ----------- | ---- |
| leader | leader is the leadership hold on the election. | LeaderKey |
| value | value is an update meant to overwrite the leader's current value. | bytes |
##### message `ProclaimResponse` (etcdserver/api/v3election/v3electionpb/v3election.proto)
| Field | Description | Type |
| ----- | ----------- | ---- |
| header | | etcdserverpb.ResponseHeader |
##### message `ResignRequest` (etcdserver/api/v3election/v3electionpb/v3election.proto)
| Field | Description | Type |
| ----- | ----------- | ---- |
| leader | leader is the leadership to relinquish by resignation. | LeaderKey |
##### message `ResignResponse` (etcdserver/api/v3election/v3electionpb/v3election.proto)
| Field | Description | Type |
| ----- | ----------- | ---- |
| header | | etcdserverpb.ResponseHeader |
##### message `Event` (mvcc/mvccpb/kv.proto)
| Field | Description | Type |
| ----- | ----------- | ---- |
| type | type is the kind of event. If type is a PUT, it indicates new data has been stored to the key. If type is a DELETE, it indicates the key was deleted. | EventType |
| kv | kv holds the KeyValue for the event. A PUT event contains current kv pair. A PUT event with kv.Version=1 indicates the creation of a key. A DELETE/EXPIRE event contains the deleted key with its modification revision set to the revision of deletion. | KeyValue |
| prev_kv | prev_kv holds the key-value pair before the event happens. | KeyValue |
##### message `KeyValue` (mvcc/mvccpb/kv.proto)
| Field | Description | Type |
| ----- | ----------- | ---- |
| key | key is the key in bytes. An empty key is not allowed. | bytes |
| create_revision | create_revision is the revision of last creation on this key. | int64 |
| mod_revision | mod_revision is the revision of last modification on this key. | int64 |
| version | version is the version of the key. A deletion resets the version to zero and any modification of the key increases its version. | int64 |
| value | value is the value held by the key, in bytes. | bytes |
| lease | lease is the ID of the lease that attached to key. When the attached lease expires, the key will be deleted. If lease is 0, then no lease is attached to the key. | int64 |

View File

@ -1,137 +0,0 @@
---
title: Why gRPC gateway
---
etcd v3 uses [gRPC][grpc] for its messaging protocol. The etcd project includes a gRPC-based [Go client][go-client] and a command line utility, [etcdctl][etcdctl], for communicating with an etcd cluster through gRPC. For languages with no gRPC support, etcd provides a JSON [gRPC gateway][grpc-gateway]. This gateway serves a RESTful proxy that translates HTTP/JSON requests into gRPC messages.
## Using gRPC gateway
The gateway accepts a [JSON mapping][json-mapping] for etcd's [protocol buffer][api-ref] message definitions. Note that `key` and `value` fields are defined as byte arrays and therefore must be base64 encoded in JSON. The following examples use `curl`, but any HTTP/JSON client should work all the same.
### Notes
gRPC gateway endpoint has changed since etcd v3.3:
- etcd v3.2 or before uses only `[CLIENT-URL]/v3alpha/*`.
- etcd v3.3 uses `[CLIENT-URL]/v3beta/*` while keeping `[CLIENT-URL]/v3alpha/*`.
- etcd v3.4 uses `[CLIENT-URL]/v3/*` while keeping `[CLIENT-URL]/v3beta/*`.
- **`[CLIENT-URL]/v3alpha/*` is deprecated**.
- etcd v3.5 or later uses only `[CLIENT-URL]/v3/*`.
- **`[CLIENT-URL]/v3beta/*` is deprecated**.
gRPC-gateway does not support authentication using TLS Common Name.
### Put and get keys
Use the `/v3/kv/range` and `/v3/kv/put` services to read and write keys:
```bash
<<COMMENT
https://www.base64encode.org/
foo is 'Zm9v' in Base64
bar is 'YmFy'
COMMENT
curl -L http://localhost:2379/v3/kv/put \
-X POST -d '{"key": "Zm9v", "value": "YmFy"}'
# {"header":{"cluster_id":"12585971608760269493","member_id":"13847567121247652255","revision":"2","raft_term":"3"}}
curl -L http://localhost:2379/v3/kv/range \
-X POST -d '{"key": "Zm9v"}'
# {"header":{"cluster_id":"12585971608760269493","member_id":"13847567121247652255","revision":"2","raft_term":"3"},"kvs":[{"key":"Zm9v","create_revision":"2","mod_revision":"2","version":"1","value":"YmFy"}],"count":"1"}
# get all keys prefixed with "foo"
curl -L http://localhost:2379/v3/kv/range \
-X POST -d '{"key": "Zm9v", "range_end": "Zm9w"}'
# {"header":{"cluster_id":"12585971608760269493","member_id":"13847567121247652255","revision":"2","raft_term":"3"},"kvs":[{"key":"Zm9v","create_revision":"2","mod_revision":"2","version":"1","value":"YmFy"}],"count":"1"}
```
### Watch keys
Use the `/v3/watch` service to watch keys:
```bash
curl -N http://localhost:2379/v3/watch \
-X POST -d '{"create_request": {"key":"Zm9v"} }' &
# {"result":{"header":{"cluster_id":"12585971608760269493","member_id":"13847567121247652255","revision":"1","raft_term":"2"},"created":true}}
curl -L http://localhost:2379/v3/kv/put \
-X POST -d '{"key": "Zm9v", "value": "YmFy"}' >/dev/null 2>&1
# {"result":{"header":{"cluster_id":"12585971608760269493","member_id":"13847567121247652255","revision":"2","raft_term":"2"},"events":[{"kv":{"key":"Zm9v","create_revision":"2","mod_revision":"2","version":"1","value":"YmFy"}}]}}
```
### Transactions
Issue a transaction with `/v3/kv/txn`:
```bash
# target CREATE
curl -L http://localhost:2379/v3/kv/txn \
-X POST \
-d '{"compare":[{"target":"CREATE","key":"Zm9v","createRevision":"2"}],"success":[{"requestPut":{"key":"Zm9v","value":"YmFy"}}]}'
# {"header":{"cluster_id":"12585971608760269493","member_id":"13847567121247652255","revision":"3","raft_term":"2"},"succeeded":true,"responses":[{"response_put":{"header":{"revision":"3"}}}]}
```
```bash
# target VERSION
curl -L http://localhost:2379/v3/kv/txn \
-X POST \
-d '{"compare":[{"version":"4","result":"EQUAL","target":"VERSION","key":"Zm9v"}],"success":[{"requestRange":{"key":"Zm9v"}}]}'
# {"header":{"cluster_id":"14841639068965178418","member_id":"10276657743932975437","revision":"6","raft_term":"3"},"succeeded":true,"responses":[{"response_range":{"header":{"revision":"6"},"kvs":[{"key":"Zm9v","create_revision":"2","mod_revision":"6","version":"4","value":"YmF6"}],"count":"1"}}]}
```
### Authentication
Set up authentication with the `/v3/auth` service:
```bash
# create root user
curl -L http://localhost:2379/v3/auth/user/add \
-X POST -d '{"name": "root", "password": "pass"}'
# {"header":{"cluster_id":"14841639068965178418","member_id":"10276657743932975437","revision":"1","raft_term":"2"}}
# create root role
curl -L http://localhost:2379/v3/auth/role/add \
-X POST -d '{"name": "root"}'
# {"header":{"cluster_id":"14841639068965178418","member_id":"10276657743932975437","revision":"1","raft_term":"2"}}
# grant root role
curl -L http://localhost:2379/v3/auth/user/grant \
-X POST -d '{"user": "root", "role": "root"}'
# {"header":{"cluster_id":"14841639068965178418","member_id":"10276657743932975437","revision":"1","raft_term":"2"}}
# enable auth
curl -L http://localhost:2379/v3/auth/enable -X POST -d '{}'
# {"header":{"cluster_id":"14841639068965178418","member_id":"10276657743932975437","revision":"1","raft_term":"2"}}
```
Authenticate with etcd for an authentication token using `/v3/auth/authenticate`:
```bash
# get the auth token for the root user
curl -L http://localhost:2379/v3/auth/authenticate \
-X POST -d '{"name": "root", "password": "pass"}'
# {"header":{"cluster_id":"14841639068965178418","member_id":"10276657743932975437","revision":"1","raft_term":"2"},"token":"sssvIpwfnLAcWAQH.9"}
```
Set the `Authorization` header to the authentication token to fetch a key using authentication credentials:
```bash
curl -L http://localhost:2379/v3/kv/put \
-H 'Authorization : sssvIpwfnLAcWAQH.9' \
-X POST -d '{"key": "Zm9v", "value": "YmFy"}'
# {"header":{"cluster_id":"14841639068965178418","member_id":"10276657743932975437","revision":"2","raft_term":"2"}}
```
## Swagger
Generated [Swagger][swagger] API definitions can be found at [rpc.swagger.json][swagger-doc].
[api-ref]: ./api_reference_v3.md
[go-client]: https://github.com/coreos/etcd/tree/master/clientv3
[etcdctl]: https://github.com/coreos/etcd/tree/master/etcdctl
[grpc]: https://www.grpc.io/
[grpc-gateway]: https://github.com/grpc-ecosystem/grpc-gateway
[json-mapping]: https://developers.google.com/protocol-buffers/docs/proto3#json
[swagger]: http://swagger.io/
[swagger-doc]: apispec/swagger/rpc.swagger.json

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,12 +1,13 @@
{
"swagger": "2.0",
"info": {
"title": "etcdserver/api/v3election/v3electionpb/v3election.proto",
"title": "server/etcdserver/api/v3election/v3electionpb/v3election.proto",
"version": "version not set"
},
"schemes": [
"http",
"https"
"tags": [
{
"name": "Election"
}
],
"consumes": [
"application/json"
@ -18,13 +19,19 @@
"/v3/election/campaign": {
"post": {
"summary": "Campaign waits to acquire leadership in an election, returning a LeaderKey\nrepresenting the leadership if successful. The LeaderKey can then be used\nto issue new values on the election, transactionally guard API requests on\nleadership still being held, and resign from the election.",
"operationId": "Campaign",
"operationId": "Election_Campaign",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v3electionpbCampaignResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
@ -45,13 +52,19 @@
"/v3/election/leader": {
"post": {
"summary": "Leader returns the current election proclamation, if any.",
"operationId": "Leader",
"operationId": "Election_Leader",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v3electionpbLeaderResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
@ -72,12 +85,27 @@
"/v3/election/observe": {
"post": {
"summary": "Observe streams election proclamations in-order as made by the election's\nelected leaders.",
"operationId": "Observe",
"operationId": "Election_Observe",
"responses": {
"200": {
"description": "A successful response.(streaming responses)",
"schema": {
"$ref": "#/x-stream-definitions/v3electionpbLeaderResponse"
"type": "object",
"properties": {
"result": {
"$ref": "#/definitions/v3electionpbLeaderResponse"
},
"error": {
"$ref": "#/definitions/rpcStatus"
}
},
"title": "Stream result of v3electionpbLeaderResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
@ -99,13 +127,19 @@
"/v3/election/proclaim": {
"post": {
"summary": "Proclaim updates the leader's posted value with a new value.",
"operationId": "Proclaim",
"operationId": "Election_Proclaim",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v3electionpbProclaimResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
@ -126,13 +160,19 @@
"/v3/election/resign": {
"post": {
"summary": "Resign releases election leadership so other campaigners may acquire\nleadership on the election.",
"operationId": "Resign",
"operationId": "Election_Resign",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v3electionpbResignResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
@ -168,7 +208,7 @@
"revision": {
"type": "string",
"format": "int64",
"description": "revision is the key-value store revision when the request was applied.\nFor watch progress responses, the header.revision indicates progress. All future events\nrecieved in this stream are guaranteed to have a higher revision number than the\nheader.revision number."
"description": "revision is the key-value store revision when the request was applied, and it's\nunset (so 0) in case of calls not interacting with key-value store.\nFor watch progress responses, the header.revision indicates progress. All future events\nreceived in this stream are guaranteed to have a higher revision number than the\nheader.revision number."
},
"raft_term": {
"type": "string",
@ -215,35 +255,26 @@
"protobufAny": {
"type": "object",
"properties": {
"type_url": {
"@type": {
"type": "string"
},
"value": {
"type": "string",
"format": "byte"
}
}
},
"additionalProperties": {}
},
"runtimeStreamError": {
"rpcStatus": {
"type": "object",
"properties": {
"grpc_code": {
"type": "integer",
"format": "int32"
},
"http_code": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"http_status": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/protobufAny"
}
}
@ -367,19 +398,5 @@
}
}
}
},
"x-stream-definitions": {
"v3electionpbLeaderResponse": {
"type": "object",
"properties": {
"result": {
"$ref": "#/definitions/v3electionpbLeaderResponse"
},
"error": {
"$ref": "#/definitions/runtimeStreamError"
}
},
"title": "Stream result of v3electionpbLeaderResponse"
}
}
}

View File

@ -1,12 +1,13 @@
{
"swagger": "2.0",
"info": {
"title": "etcdserver/api/v3lock/v3lockpb/v3lock.proto",
"title": "server/etcdserver/api/v3lock/v3lockpb/v3lock.proto",
"version": "version not set"
},
"schemes": [
"http",
"https"
"tags": [
{
"name": "Lock"
}
],
"consumes": [
"application/json"
@ -18,13 +19,19 @@
"/v3/lock/lock": {
"post": {
"summary": "Lock acquires a distributed shared lock on a given named lock.\nOn success, it will return a unique key that exists so long as the\nlock is held by the caller. This key can be used in conjunction with\ntransactions to safely ensure updates to etcd only occur while holding\nlock ownership. The lock is held until Unlock is called on the key or the\nlease associate with the owner expires.",
"operationId": "Lock",
"operationId": "Lock_Lock",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v3lockpbLockResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
@ -45,13 +52,19 @@
"/v3/lock/unlock": {
"post": {
"summary": "Unlock takes a key returned by Lock and releases the hold on lock. The\nnext Lock caller waiting for the lock will then be woken up and given\nownership of the lock.",
"operationId": "Unlock",
"operationId": "Lock_Unlock",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v3lockpbUnlockResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
@ -87,7 +100,7 @@
"revision": {
"type": "string",
"format": "int64",
"description": "revision is the key-value store revision when the request was applied.\nFor watch progress responses, the header.revision indicates progress. All future events\nrecieved in this stream are guaranteed to have a higher revision number than the\nheader.revision number."
"description": "revision is the key-value store revision when the request was applied, and it's\nunset (so 0) in case of calls not interacting with key-value store.\nFor watch progress responses, the header.revision indicates progress. All future events\nreceived in this stream are guaranteed to have a higher revision number than the\nheader.revision number."
},
"raft_term": {
"type": "string",
@ -96,6 +109,34 @@
}
}
},
"protobufAny": {
"type": "object",
"properties": {
"@type": {
"type": "string"
}
},
"additionalProperties": {}
},
"rpcStatus": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/protobufAny"
}
}
}
},
"v3lockpbLockRequest": {
"type": "object",
"properties": {

View File

@ -1,9 +0,0 @@
---
title: Experimental APIs and features
---
For the most part, the etcd project is stable, but we are still moving fast! We believe in the release fast philosophy. We want to get early feedback on features still in development and stabilizing. Thus, there are, and will be more, experimental features and APIs. We plan to improve these features based on the early feedback from the community, or abandon them if there is little interest, in the next few releases. Please do not rely on any experimental features or APIs in production environment.
## The current experimental API/features are:
- [KV ordering](https://godoc.org/github.com/etcd-io/etcd/clientv3/ordering) wrapper. When an etcd client switches endpoints, responses to serializable reads may go backward in time if the new endpoint is lagging behind the rest of the cluster. The ordering wrapper caches the current cluster revision from response headers. If a response revision is less than the cached revision, the client selects another endpoint and reissues the read. Enable in grpcproxy with `--experimental-serializable-ordering`.

View File

@ -1,67 +0,0 @@
---
title: gRPC naming and discovery
---
etcd provides a gRPC resolver to support an alternative name system that fetches endpoints from etcd for discovering gRPC services. The underlying mechanism is based on watching updates to keys prefixed with the service name.
## Using etcd discovery with go-grpc
The etcd client provides a gRPC resolver for resolving gRPC endpoints with an etcd backend. The resolver is initialized with an etcd client and given a target for resolution:
```go
import (
"go.etcd.io/etcd/clientv3"
etcdnaming "go.etcd.io/etcd/clientv3/naming"
"google.golang.org/grpc"
)
...
cli, cerr := clientv3.NewFromURL("http://localhost:2379")
r := &etcdnaming.GRPCResolver{Client: cli}
b := grpc.RoundRobin(r)
conn, gerr := grpc.Dial("my-service", grpc.WithBalancer(b), grpc.WithBlock(), ...)
```
## Managing service endpoints
The etcd resolver treats all keys under the prefix of the resolution target following a "/" (e.g., "my-service/") with JSON-encoded go-grpc `naming.Update` values as potential service endpoints. Endpoints are added to the service by creating new keys and removed from the service by deleting keys.
### Adding an endpoint
New endpoints can be added to the service through `etcdctl`:
```sh
ETCDCTL_API=3 etcdctl put my-service/1.2.3.4 '{"Addr":"1.2.3.4","Metadata":"..."}'
```
The etcd client's `GRPCResolver.Update` method can also register new endpoints with a key matching the `Addr`:
```go
r.Update(context.TODO(), "my-service", naming.Update{Op: naming.Add, Addr: "1.2.3.4", Metadata: "..."})
```
### Deleting an endpoint
Hosts can be deleted from the service through `etcdctl`:
```sh
ETCDCTL_API=3 etcdctl del my-service/1.2.3.4
```
The etcd client's `GRPCResolver.Update` method also supports deleting endpoints:
```go
r.Update(context.TODO(), "my-service", naming.Update{Op: naming.Delete, Addr: "1.2.3.4"})
```
### Registering an endpoint with a lease
Registering an endpoint with a lease ensures that if the host can't maintain a keepalive heartbeat (e.g., its machine fails), it will be removed from the service:
```sh
lease=`ETCDCTL_API=3 etcdctl lease grant 5 | cut -f2 -d' '`
ETCDCTL_API=3 etcdctl put --lease=$lease my-service/1.2.3.4 '{"Addr":"1.2.3.4","Metadata":"..."}'
ETCDCTL_API=3 etcdctl lease keep-alive $lease
```

View File

@ -1,499 +0,0 @@
---
title: Interacting with etcd
---
Users mostly interact with etcd by putting or getting the value of a key. This section describes how to do that by using etcdctl, a command line tool for interacting with etcd server. The concepts described here should apply to the gRPC APIs or client library APIs.
The API version used by etcdctl to speak to etcd may be set to version `2` or `3` via the `ETCDCTL_API` environment variable. By default, etcdctl on master (3.4) uses the v3 API and earlier versions (3.3 and earlier) default to the v2 API.
Note that any key that was created using the v2 API will not be able to be queried via the v3 API. A v3 API ```etcdctl get``` of a v2 key will exit with 0 and no key data, this is the expected behaviour.
```bash
export ETCDCTL_API=3
```
## Find versions
etcdctl version and Server API version can be useful in finding the appropriate commands to be used for performing various operations on etcd.
Here is the command to find the versions:
```bash
$ etcdctl version
etcdctl version: 3.1.0-alpha.0+git
API version: 3.1
```
## Write a key
Applications store keys into the etcd cluster by writing to keys. Every stored key is replicated to all etcd cluster members through the Raft protocol to achieve consistency and reliability.
Here is the command to set the value of key `foo` to `bar`:
```bash
$ etcdctl put foo bar
OK
```
Also a key can be set for a specified interval of time by attaching lease to it.
Here is the command to set the value of key `foo1` to `bar1` for 10s.
```bash
$ etcdctl put foo1 bar1 --lease=1234abcd
OK
```
Note: The lease id `1234abcd` in the above command refers to id returned on creating the lease of 10s. This id can then be attached to the key.
## Read keys
Applications can read values of keys from an etcd cluster. Queries may read a single key, or a range of keys.
Suppose the etcd cluster has stored the following keys:
```bash
foo = bar
foo1 = bar1
foo2 = bar2
foo3 = bar3
```
Here is the command to read the value of key `foo`:
```bash
$ etcdctl get foo
foo
bar
```
Here is the command to read the value of key `foo` in hex format:
```bash
$ etcdctl get foo --hex
\x66\x6f\x6f # Key
\x62\x61\x72 # Value
```
Here is the command to read only the value of key `foo`:
```bash
$ etcdctl get foo --print-value-only
bar
```
Here is the command to range over the keys from `foo` to `foo3`:
```bash
$ etcdctl get foo foo3
foo
bar
foo1
bar1
foo2
bar2
```
Note that `foo3` is excluded since the range is over the half-open interval `[foo, foo3)`, excluding `foo3`.
Here is the command to range over all keys prefixed with `foo`:
```bash
$ etcdctl get --prefix foo
foo
bar
foo1
bar1
foo2
bar2
foo3
bar3
```
Here is the command to range over all keys prefixed with `foo`, limiting the number of results to 2:
```bash
$ etcdctl get --prefix --limit=2 foo
foo
bar
foo1
bar1
```
## Read past version of keys
Applications may want to read superseded versions of a key. For example, an application may wish to roll back to an old configuration by accessing an earlier version of a key. Alternatively, an application may want a consistent view over multiple keys through multiple requests by accessing key history.
Since every modification to the etcd cluster key-value store increments the global revision of an etcd cluster, an application can read superseded keys by providing an older etcd revision.
Suppose an etcd cluster already has the following keys:
```bash
foo = bar # revision = 2
foo1 = bar1 # revision = 3
foo = bar_new # revision = 4
foo1 = bar1_new # revision = 5
```
Here are an example to access the past versions of keys:
```bash
$ etcdctl get --prefix foo # access the most recent versions of keys
foo
bar_new
foo1
bar1_new
$ etcdctl get --prefix --rev=4 foo # access the versions of keys at revision 4
foo
bar_new
foo1
bar1
$ etcdctl get --prefix --rev=3 foo # access the versions of keys at revision 3
foo
bar
foo1
bar1
$ etcdctl get --prefix --rev=2 foo # access the versions of keys at revision 2
foo
bar
$ etcdctl get --prefix --rev=1 foo # access the versions of keys at revision 1
```
## Read keys which are greater than or equal to the byte value of the specified key
Applications may want to read keys which are greater than or equal to the byte value of the specified key.
Suppose an etcd cluster already has the following keys:
```bash
a = 123
b = 456
z = 789
```
Here is the command to read keys which are greater than or equal to the byte value of key `b` :
```bash
$ etcdctl get --from-key b
b
456
z
789
```
## Delete keys
Applications can delete a key or a range of keys from an etcd cluster.
Suppose an etcd cluster already has the following keys:
```bash
foo = bar
foo1 = bar1
foo3 = bar3
zoo = val
zoo1 = val1
zoo2 = val2
a = 123
b = 456
z = 789
```
Here is the command to delete key `foo`:
```bash
$ etcdctl del foo
1 # one key is deleted
```
Here is the command to delete keys ranging from `foo` to `foo9`:
```bash
$ etcdctl del foo foo9
2 # two keys are deleted
```
Here is the command to delete key `zoo` with the deleted key value pair returned:
```bash
$ etcdctl del --prev-kv zoo
1 # one key is deleted
zoo # deleted key
val # the value of the deleted key
```
Here is the command to delete keys having prefix as `zoo`:
```bash
$ etcdctl del --prefix zoo
2 # two keys are deleted
```
Here is the command to delete keys which are greater than or equal to the byte value of key `b` :
```bash
$ etcdctl del --from-key b
2 # two keys are deleted
```
## Watch key changes
Applications can watch on a key or a range of keys to monitor for any updates.
Here is the command to watch on key `foo`:
```bash
$ etcdctl watch foo
# in another terminal: etcdctl put foo bar
PUT
foo
bar
```
Here is the command to watch on key `foo` in hex format:
```bash
$ etcdctl watch foo --hex
# in another terminal: etcdctl put foo bar
PUT
\x66\x6f\x6f # Key
\x62\x61\x72 # Value
```
Here is the command to watch on a range key from `foo` to `foo9`:
```bash
$ etcdctl watch foo foo9
# in another terminal: etcdctl put foo bar
PUT
foo
bar
# in another terminal: etcdctl put foo1 bar1
PUT
foo1
bar1
```
Here is the command to watch on keys having prefix `foo`:
```bash
$ etcdctl watch --prefix foo
# in another terminal: etcdctl put foo bar
PUT
foo
bar
# in another terminal: etcdctl put fooz1 barz1
PUT
fooz1
barz1
```
Here is the command to watch on multiple keys `foo` and `zoo`:
```bash
$ etcdctl watch -i
$ watch foo
$ watch zoo
# in another terminal: etcdctl put foo bar
PUT
foo
bar
# in another terminal: etcdctl put zoo val
PUT
zoo
val
```
## Watch historical changes of keys
Applications may want to watch for historical changes of keys in etcd. For example, an application may wish to receive all the modifications of a key; if the application stays connected to etcd, then `watch` is good enough. However, if the application or etcd fails, a change may happen during the failure, and the application will not receive the update in real time. To guarantee the update is delivered, the application must be able to watch for historical changes to keys. To do this, an application can specify a historical revision on a watch, just like reading past version of keys.
Suppose we finished the following sequence of operations:
```bash
$ etcdctl put foo bar # revision = 2
OK
$ etcdctl put foo1 bar1 # revision = 3
OK
$ etcdctl put foo bar_new # revision = 4
OK
$ etcdctl put foo1 bar1_new # revision = 5
OK
```
Here is an example to watch the historical changes:
```bash
# watch for changes on key `foo` since revision 2
$ etcdctl watch --rev=2 foo
PUT
foo
bar
PUT
foo
bar_new
```
```bash
# watch for changes on key `foo` since revision 3
$ etcdctl watch --rev=3 foo
PUT
foo
bar_new
```
Here is an example to watch only from the last historical change:
```bash
# watch for changes on key `foo` and return last revision value along with modified value
$ etcdctl watch --prev-kv foo
# in another terminal: etcdctl put foo bar_latest
PUT
foo # key
bar_new # last value of foo key before modification
foo # key
bar_latest # value of foo key after modification
```
## Watch progress
Applications may want to check the progress of a watch to determine how up-to-date the watch stream is. For example, if a watch is used to update a cache, it can be useful to know if the cache is stale compared to the revision from a quorum read.
Progress requests can be issued using the "progress" command in interactive watch session to ask the etcd server to send a progress notify update in the watch stream:
```bash
$ etcdctl watch -i
$ watch a
$ progress
progress notify: 1
# in another terminal: etcdctl put x 0
# in another terminal: etcdctl put y 1
$ progress
progress notify: 3
```
Note: The revision number in the progress notify response is the revision from the local etcd server node that the watch stream is connected to. If this node is partitioned and not part of quorum, this progress notify revision might be lower than
than the revision returned by a quorum read against a non-partitioned etcd server node.
## Compacted revisions
As we mentioned, etcd keeps revisions so that applications can read past versions of keys. However, to avoid accumulating an unbounded amount of history, it is important to compact past revisions. After compacting, etcd removes historical revisions, releasing resources for future use. All superseded data with revisions before the compacted revision will be unavailable.
Here is the command to compact the revisions:
```bash
$ etcdctl compact 5
compacted revision 5
# any revisions before the compacted one are not accessible
$ etcdctl get --rev=4 foo
Error: rpc error: code = 11 desc = etcdserver: mvcc: required revision has been compacted
```
Note: The current revision of etcd server can be found using get command on any key (existent or non-existent) in json format. Example is shown below for mykey which does not exist in etcd server:
```bash
$ etcdctl get mykey -w=json
{"header":{"cluster_id":14841639068965178418,"member_id":10276657743932975437,"revision":15,"raft_term":4}}
```
## Grant leases
Applications can grant leases for keys from an etcd cluster. When a key is attached to a lease, its lifetime is bound to the lease's lifetime which in turn is governed by a time-to-live (TTL). Each lease has a minimum time-to-live (TTL) value specified by the application at grant time. The lease's actual TTL value is at least the minimum TTL and is chosen by the etcd cluster. Once a lease's TTL elapses, the lease expires and all attached keys are deleted.
Here is the command to grant a lease:
```bash
# grant a lease with 10 second TTL
$ etcdctl lease grant 10
lease 32695410dcc0ca06 granted with TTL(10s)
# attach key foo to lease 32695410dcc0ca06
$ etcdctl put --lease=32695410dcc0ca06 foo bar
OK
```
## Revoke leases
Applications revoke leases by lease ID. Revoking a lease deletes all of its attached keys.
Suppose we finished the following sequence of operations:
```bash
$ etcdctl lease grant 10
lease 32695410dcc0ca06 granted with TTL(10s)
$ etcdctl put --lease=32695410dcc0ca06 foo bar
OK
```
Here is the command to revoke the same lease:
```bash
$ etcdctl lease revoke 32695410dcc0ca06
lease 32695410dcc0ca06 revoked
$ etcdctl get foo
# empty response since foo is deleted due to lease revocation
```
## Keep leases alive
Applications can keep a lease alive by refreshing its TTL so it does not expire.
Suppose we finished the following sequence of operations:
```bash
$ etcdctl lease grant 10
lease 32695410dcc0ca06 granted with TTL(10s)
```
Here is the command to keep the same lease alive:
```bash
$ etcdctl lease keep-alive 32695410dcc0ca06
lease 32695410dcc0ca06 keepalived with TTL(10)
lease 32695410dcc0ca06 keepalived with TTL(10)
lease 32695410dcc0ca06 keepalived with TTL(10)
...
```
## Get lease information
Applications may want to know about lease information, so that they can be renewed or to check if the lease still exists or it has expired. Applications may also want to know the keys to which a particular lease is attached.
Suppose we finished the following sequence of operations:
```bash
# grant a lease with 500 second TTL
$ etcdctl lease grant 500
lease 694d5765fc71500b granted with TTL(500s)
# attach key zoo1 to lease 694d5765fc71500b
$ etcdctl put zoo1 val1 --lease=694d5765fc71500b
OK
# attach key zoo2 to lease 694d5765fc71500b
$ etcdctl put zoo2 val2 --lease=694d5765fc71500b
OK
```
Here is the command to get information about the lease:
```bash
$ etcdctl lease timetolive 694d5765fc71500b
lease 694d5765fc71500b granted with TTL(500s), remaining(258s)
```
Here is the command to get information about the lease along with the keys attached with the lease:
```bash
$ etcdctl lease timetolive --keys 694d5765fc71500b
lease 694d5765fc71500b granted with TTL(500s), remaining(132s), attached keys([zoo2 zoo1])
# if the lease has expired or does not exist it will give the below response:
Error: etcdserver: requested lease not found
```

View File

@ -1,11 +0,0 @@
---
title: System limits
---
## Request size limit
etcd is designed to handle small key value pairs typical for metadata. Larger requests will work, but may increase the latency of other requests. By default, the maximum size of any request is 1.5 MiB. This limit is configurable through `--max-request-bytes` flag for etcd server.
## Storage size limit
The default storage size limit is 2GB, configurable with `--quota-backend-bytes` flag. 8GB is a suggested maximum size for normal environments and etcd warns at startup if the configured value exceeds it.

View File

@ -1,115 +0,0 @@
---
title: Discovery service protocol
---
Discovery service protocol helps new etcd member to discover all other members in cluster bootstrap phase using a shared discovery URL.
Discovery service protocol is _only_ used in cluster bootstrap phase, and cannot be used for runtime reconfiguration or cluster monitoring.
The protocol uses a new discovery token to bootstrap one _unique_ etcd cluster. Remember that one discovery token can represent only one etcd cluster. As long as discovery protocol on this token starts, even if it fails halfway, it must not be used to bootstrap another etcd cluster.
The rest of this article will walk through the discovery process with examples that correspond to a self-hosted discovery cluster. The public discovery service, discovery.etcd.io, functions the same way, but with a layer of polish to abstract away ugly URLs, generate UUIDs automatically, and provide some protections against excessive requests. At its core, the public discovery service still uses an etcd cluster as the data store as described in this document.
## Protocol workflow
The idea of discovery protocol is to use an internal etcd cluster to coordinate bootstrap of a new cluster. First, all new members interact with discovery service and help to generate the expected member list. Then each new member bootstraps its server using this list, which performs the same functionality as -initial-cluster flag.
In the following example workflow, we will list each step of protocol in curl format for ease of understanding.
By convention the etcd discovery protocol uses the key prefix `_etcd/registry`. If `http://example.com` hosts an etcd cluster for discovery service, a full URL to discovery keyspace will be `http://example.com/v2/keys/_etcd/registry`. We will use this as the URL prefix in the example.
### Creating a new discovery token
Generate a unique token that will identify the new cluster. This will be used as a unique prefix in discovery keyspace in the following steps. An easy way to do this is to use `uuidgen`:
```
UUID=$(uuidgen)
```
### Specifying the expected cluster size
The discovery token expects a cluster size that must be specified. The size is used by the discovery service to know when it has found all members that will initially form the cluster.
```
curl -X PUT http://example.com/v2/keys/_etcd/registry/${UUID}/_config/size -d value=${cluster_size}
```
Usually the cluster size is 3, 5 or 7. Check [optimal cluster size][cluster-size] for more details.
### Bringing up etcd processes
Given the discovery URL, use it as `-discovery` flag and bring up etcd processes. Every etcd process will follow this next few steps internally if given a `-discovery` flag.
### Registering itself
The first thing for etcd process is to register itself into the discovery URL as a member. This is done by creating member ID as a key in the discovery URL.
```
curl -X PUT http://example.com/v2/keys/_etcd/registry/${UUID}/${member_id}?prevExist=false -d value="${member_name}=${member_peer_url_1}&${member_name}=${member_peer_url_2}"
```
### Checking the status
It checks the expected cluster size and registration status in discovery URL, and decides what the next action is.
```
curl -X GET http://example.com/v2/keys/_etcd/registry/${UUID}/_config/size
curl -X GET http://example.com/v2/keys/_etcd/registry/${UUID}
```
If registered members are still not enough, it will wait for left members to appear.
If the number of registered members is bigger than the expected size N, it treats the first N registered members as the member list for the cluster. If the member itself is in the member list, the discovery procedure succeeds and it fetches all peers through the member list. If it is not in the member list, the discovery procedure finishes with the failure that the cluster has been full.
In etcd implementation, the member may check the cluster status even before registering itself. So it could fail quickly if the cluster has been full.
### Waiting for all members
The wait process is described in detail in the [etcd API documentation][api].
```
curl -X GET http://example.com/v2/keys/_etcd/registry/${UUID}?wait=true&waitIndex=${current_etcd_index}
```
It keeps waiting until finding all members.
## Public discovery service
CoreOS Inc. hosts a public discovery service at https://discovery.etcd.io/ , which provides some nice features for ease of use.
### Mask key prefix
Public discovery service will redirect `https://discovery.etcd.io/${UUID}` to etcd cluster behind for the key at `/v2/keys/_etcd/registry`. It masks register key prefix for short and readable discovery url.
### Get new token
```
GET /new
Sent query:
size=${cluster_size}
Possible status codes:
200 OK
400 Bad Request
200 Body:
generated discovery url
```
The generation process in the service follows the steps from [Creating a New Discovery Token][new-discovery-token] to [Specifying the Expected Cluster Size][expected-cluster-size].
### Check discovery status
```
GET /${UUID}
```
The status for this discovery token, including the machines that have been registered, can be checked by requesting the value of the UUID.
### Open-source repository
The repository is located at https://github.com/coreos/discovery.etcd.io. It could be used to build a custom discovery service.
[api]: ../v2/api.md#waiting-for-a-change
[cluster-size]: ../v2/admin_guide.md#optimal-cluster-size
[expected-cluster-size]: #specifying-the-expected-cluster-size
[new-discovery-token]: #creating-a-new-discovery-token

View File

@ -1,31 +0,0 @@
---
title: Logging conventions
---
etcd uses the [capnslog][capnslog] library for logging application output categorized into *levels*. A log message's level is determined according to these conventions:
* Error: Data has been lost, a request has failed for a bad reason, or a required resource has been lost
* Examples:
* A failure to allocate disk space for WAL
* Warning: (Hopefully) Temporary conditions that may cause errors, but may work fine. A replica disappearing (that may reconnect) is a warning.
* Examples:
* Failure to send raft message to a remote peer
* Failure to receive heartbeat message within the configured election timeout
* Notice: Normal, but important (uncommon) log information.
* Examples:
* Add a new node into the cluster
* Add a new user into auth subsystem
* Info: Normal, working log information, everything is fine, but helpful notices for auditing or common operations.
* Examples:
* Startup configuration
* Start to do snapshot
* Debug: Everything is still fine, but even common operations may be logged, and less helpful but more quantity of notices.
* Examples:
* Send a normal message to a remote peer
* Write a log entry to disk
[capnslog]: https://github.com/coreos/pkg/tree/master/capnslog

View File

@ -1,162 +0,0 @@
---
title: etcd release guide
---
The guide talks about how to release a new version of etcd.
The procedure includes some manual steps for sanity checking, but it can probably be further scripted. Please keep this document up-to-date if making changes to the release process.
## Release management
etcd community members are assigned to manage the release each etcd major/minor version as well as manage patches
and to each stable release branch. The managers are responsible for communicating the timelines and status of each
release and for ensuring the stability of the release branch.
| Releases | Manager |
| -------- | ------- |
| 3.1 patch (post 3.1.0) | Joe Betz [@jpbetz](https://github.com/jpbetz) |
| 3.2 patch (post 3.2.0) | Joe Betz [@jpbetz](https://github.com/jpbetz) |
| 3.3 patch (post 3.3.0) | Gyuho Lee [@gyuho](https://github.com/gyuho) |
## Prepare release
Set desired version as environment variable for following steps. Here is an example to release 2.3.0:
```
export VERSION=v2.3.0
export PREV_VERSION=v2.2.5
```
All releases version numbers follow the format of [semantic versioning 2.0.0](http://semver.org/).
### Major, minor version release, or its pre-release
- Ensure the relevant milestone on GitHub is complete. All referenced issues should be closed, or moved elsewhere.
- Remove this release from [roadmap](https://github.com/etcd-io/etcd/blob/master/ROADMAP.md), if necessary.
- Ensure the latest upgrade documentation is available.
- Bump [hardcoded MinClusterVerion in the repository](https://github.com/etcd-io/etcd/blob/master/version/version.go#L29), if necessary.
- Add feature capability maps for the new version, if necessary.
### Patch version release
- To request a backport, devlopers submit cherrypick PRs targeting the release branch. The commits should not include merge commits. The commits should be restricted to bug fixes and security patches.
- The cherrypick PRs should target the appropriate release branch (`base:release-<major>-<minor>`). `hack/patch/cherrypick.sh` may be used to automatically generate cherrypick PRs.
- The release patch manager reviews the cherrypick PRs. Please discuss carefully what is backported to the patch release. Each patch release should be strictly better than it's predecessor.
- The release patch manager will cherry-pick these commits starting from the oldest one into stable branch.
## Write release note
- Write introduction for the new release. For example, what major bug we fix, what new features we introduce or what performance improvement we make.
- Put `[GH XXXX]` at the head of change line to reference Pull Request that introduces the change. Moreover, add a link on it to jump to the Pull Request.
- Find PRs with `release-note` label and explain them in `NEWS` file, as a straightforward summary of changes for end-users.
## Tag version
- Bump [hardcoded Version in the repository](https://github.com/etcd-io/etcd/blob/master/version/version.go#L30) to the latest version `${VERSION}`.
- Ensure all tests on CI system are passed.
- Manually check etcd is buildable in Linux, Darwin and Windows.
- Manually check upgrade etcd cluster of previous minor version works well.
- Manually check new features work well.
- Add a signed tag through `git tag -s ${VERSION}`.
- Sanity check tag correctness through `git show tags/$VERSION`.
- Push the tag to GitHub through `git push origin tags/$VERSION`. This assumes `origin` corresponds to "https://github.com/etcd-io/etcd".
## Build release binaries and images
- Ensure `acbuild` is available.
- Ensure `docker` is available.
Run release script in root directory:
```
TAG=gcr.io/etcd-development/etcd ./scripts/release.sh ${VERSION}
```
It generates all release binaries and images under directory ./release.
## Sign binaries, images, and source code
etcd project key must be used to sign the generated binaries and images.`$SUBKEYID` is the key ID of etcd project Yubikey. Connect the key and run `gpg2 --card-status` to get the ID.
The following commands are used for public release sign:
```
cd release
for i in etcd-*{.zip,.tar.gz}; do gpg2 --default-key $SUBKEYID --armor --output ${i}.asc --detach-sign ${i}; done
for i in etcd-*{.zip,.tar.gz}; do gpg2 --verify ${i}.asc ${i}; done
# sign zipped source code files
wget https://github.com/etcd-io/etcd/archive/${VERSION}.zip
gpg2 --armor --default-key $SUBKEYID --output ${VERSION}.zip.asc --detach-sign ${VERSION}.zip
gpg2 --verify ${VERSION}.zip.asc ${VERSION}.zip
wget https://github.com/etcd-io/etcd/archive/${VERSION}.tar.gz
gpg2 --armor --default-key $SUBKEYID --output ${VERSION}.tar.gz.asc --detach-sign ${VERSION}.tar.gz
gpg2 --verify ${VERSION}.tar.gz.asc ${VERSION}.tar.gz
```
The public key for GPG signing can be found at [CoreOS Application Signing Key](https://coreos.com/security/app-signing-key)
## Publish release page in GitHub
- Set release title as the version name.
- Follow the format of previous release pages.
- Attach the generated binaries and signatures.
- Select whether it is a pre-release.
- Publish the release!
## Publish docker image in gcr.io
- Push docker image:
```
gcloud docker -- login -u _json_key -p "$(cat /etc/gcp-key-etcd.json)" https://gcr.io
for TARGET_ARCH in "-arm64" "-ppc64le" ""; do
gcloud docker -- push gcr.io/etcd-development/etcd:${VERSION}${TARGET_ARCH}
done
```
- Add `latest` tag to the new image on [gcr.io](https://console.cloud.google.com/gcr/images/etcd-development/GLOBAL/etcd?project=etcd-development&authuser=1) if this is a stable release.
## Publish docker image in Quay.io
- Build docker images with quay.io:
```
for TARGET_ARCH in "amd64" "arm64" "ppc64le"; do
TAG=quay.io/coreos/etcd GOARCH=${TARGET_ARCH} \
BINARYDIR=release/etcd-${VERSION}-linux-${TARGET_ARCH} \
BUILDDIR=release \
./scripts/build-docker ${VERSION}
done
```
- Push docker image:
```
docker login quay.io
for TARGET_ARCH in "-arm64" "-ppc64le" ""; do
docker push quay.io/coreos/etcd:${VERSION}${TARGET_ARCH}
done
```
- Add `latest` tag to the new image on [quay.io](https://quay.io/repository/coreos/etcd?tag=latest&tab=tags) if this is a stable release.
## Announce to the etcd-dev Googlegroup
- Follow the format of [previous release emails](https://groups.google.com/forum/#!forum/etcd-dev).
- Make sure to include a list of authors that contributed since the previous release - something like the following might be handy:
```
git log ...${PREV_VERSION} --pretty=format:"%an" | sort | uniq | tr '\n' ',' | sed -e 's#,#, #g' -e 's#, $##'
```
- Send email to etcd-dev@googlegroups.com
## Post release
- Create new stable branch through `git push origin ${VERSION_MAJOR}.${VERSION_MINOR}` if this is a major stable release. This assumes `origin` corresponds to "https://github.com/etcd-io/etcd".
- Bump [hardcoded Version in the repository](https://github.com/etcd-io/etcd/blob/master/version/version.go#L30) to the version `${VERSION}+git`.

View File

@ -1,69 +0,0 @@
---
title: Download and build
---
## System requirements
The etcd performance benchmarks run etcd on 8 vCPU, 16GB RAM, 50GB SSD GCE instances, but any relatively modern machine with low latency storage and a few gigabytes of memory should suffice for most use cases. Applications with large v2 data stores will require more memory than a large v3 data store since data is kept in anonymous memory instead of memory mapped from a file. For running etcd on a cloud provider, see the [Example hardware configuration][example-hardware-configurations] documentation.
## Download the pre-built binary
The easiest way to get etcd is to use one of the pre-built release binaries which are available for OSX, Linux, Windows, appc, and Docker. Instructions for using these binaries are on the [GitHub releases page][github-release].
## Build the latest version
For those wanting to try the very latest version, build etcd from the `master` branch. [Go](https://golang.org/) version 1.9+ is required to build the latest version of etcd. To ensure etcd is built against well-tested libraries, etcd vendors its dependencies for official release binaries. However, etcd's vendoring is also optional to avoid potential import conflicts when embedding the etcd server or using the etcd client.
To build `etcd` from the `master` branch without a `GOPATH` using the official `build` script:
```sh
$ git clone https://github.com/etcd-io/etcd.git
$ cd etcd
$ ./build
```
To build a vendored `etcd` from the `master` branch via `go get`:
```sh
# GOPATH should be set
$ echo $GOPATH
/Users/example/go
$ go get -v go.etcd.io/etcd
$ go get -v go.etcd.io/etcd/etcdctl
```
## Test the installation
Check the etcd binary is built correctly by starting etcd and setting a key.
### Starting etcd
If etcd is built without using `go get`, run the following:
```sh
$ ./bin/etcd
```
If etcd is built using `go get`, run the following:
```sh
$ $GOPATH/bin/etcd
```
### Setting a key
Run the following:
```sh
$ ./bin/etcdctl put foo bar
OK
```
(or `$GOPATH/bin/etcdctl put foo bar` if etcdctl was installed with `go get`)
If OK is printed, then etcd is working!
[github-release]: https://github.com/etcd-io/etcd/releases/
[go]: https://golang.org/doc/install
[build-script]: ../build
[cmd-directory]: ../cmd
[example-hardware-configurations]: op-guide/hardware.md#example-hardware-configurations

View File

@ -1,118 +0,0 @@
# Documentation
etcd is a distributed key-value store designed to reliably and quickly preserve and provide access to critical data. It enables reliable distributed coordination through distributed locking, leader elections, and write barriers. An etcd cluster is intended for high availability and permanent data storage and retrieval.
## Getting started
New etcd users and developers should get started by [downloading and building][download_build] etcd. After getting etcd, follow this [quick demo][demo] to see the basics of creating and working with an etcd cluster.
## Developing with etcd
The easiest way to get started using etcd as a distributed key-value store is to [set up a local cluster][local_cluster].
- [Setting up local clusters][local_cluster]
- [Interacting with etcd][interacting]
- gRPC [etcd core][api_ref] and [etcd concurrency][api_concurrency_ref] API references
- [HTTP JSON API through the gRPC gateway][api_grpc_gateway]
- [gRPC naming and discovery][grpc_naming]
- [Client][namespace_client] and [proxy][namespace_proxy] namespacing
- [Embedding etcd][embed_etcd]
- [Experimental features and APIs][experimental]
- [System limits][system-limit]
## Operating etcd clusters
Administrators who need a fault-tolerant etcd cluster for either development or production should begin with a [cluster on multiple machines][clustering].
### Setting up etcd
- [Configuration flags][conf]
- [Multi-member cluster][clustering]
- [gRPC proxy][grpc_proxy]
- [L4 gateway][gateway]
### System configuration
- [Supported systems][supported_platforms]
- [Hardware recommendations][hardware]
- [Performance benchmarking][performance]
- [Tuning][tuning]
### Platform guides
- [Amazon Web Services][aws_platform]
- [Container Linux, systemd][container_linux_platform]
- [FreeBSD][freebsd_platform]
- [Docker container][container_docker]
- [rkt container][container_rkt]
### Security
- [TLS][security]
- [Role-based access control][authentication]
### Maintenance and troubleshooting
- [Frequently asked questions][faq]
- [Monitoring][monitoring]
- [Maintenance][maintenance]
- [Failure modes][failures]
- [Disaster recovery][recovery]
- [Upgrading][upgrading]
## Learning
To learn more about the concepts and internals behind etcd, read the following pages:
- [Why etcd?][why]
- [Understand data model][data_model]
- [Understand APIs][understand_apis]
- [Glossary][glossary]
- Design
- [Auth subsystem][design-auth-v3]
- [Client][design-client]
- [Learner][design-learner]
[api_ref]: dev-guide/api_reference_v3.md
[api_concurrency_ref]: dev-guide/api_concurrency_reference_v3.md
[api_grpc_gateway]: dev-guide/api_grpc_gateway.md
[clustering]: op-guide/clustering.md
[conf]: op-guide/configuration.md
[system-limit]: dev-guide/limit.md
[faq]: faq.md
[why]: learning/why.md
[data_model]: learning/data_model.md
[demo]: demo.md
[download_build]: dl_build.md
[embed_etcd]: https://godoc.org/github.com/etcd-io/etcd/embed
[grpc_naming]: dev-guide/grpc_naming.md
[failures]: op-guide/failures.md
[gateway]: op-guide/gateway.md
[glossary]: learning/glossary.md
[namespace_client]: https://godoc.org/github.com/etcd-io/etcd/clientv3/namespace
[namespace_proxy]: op-guide/grpc_proxy.md#namespacing
[grpc_proxy]: op-guide/grpc_proxy.md
[hardware]: op-guide/hardware.md
[interacting]: dev-guide/interacting_v3.md
[local_cluster]: dev-guide/local_cluster.md
[performance]: op-guide/performance.md
[recovery]: op-guide/recovery.md
[maintenance]: op-guide/maintenance.md
[security]: op-guide/security.md
[monitoring]: op-guide/monitoring.md
[v2_migration]: op-guide/v2-migration.md
[container_rkt]: op-guide/container.md#rkt
[container_docker]: op-guide/container.md#docker
[understand_apis]: learning/api.md
[versioning]: op-guide/versioning.md
[supported_platforms]: op-guide/supported-platform.md
[container_linux_platform]: platforms/container-linux-systemd.md
[freebsd_platform]: platforms/freebsd.md
[aws_platform]: platforms/aws.md
[experimental]: dev-guide/experimental_apis.md
[authentication]: op-guide/authentication.md
[design-auth-v3]: learning/design-auth-v3.md
[design-client]: learning/design-client.md
[design-learner]: learning/design-learner.md
[tuning]: tuning.md
[upgrading]: upgrades/upgrading-etcd.md

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 462 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 287 KiB

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More