J. David Lowe
e27effa250
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
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2021-06-04 15:34:22 -07:00
Gyuho Lee
abe57c1aed
Merge pull request #13085 from gyuho/c
...
[backport 3.5] etcdserver: don't activate alarm w/missing AlarmType
2021-06-04 15:12:28 -07:00
J. David Lowe
ae194c1470
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 14:21:04 -07:00
Sam Batschelet
ab20aa29a0
version: 3.5.0-rc.0
...
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
v3.5.0-rc.0
tests/v3.5.0-rc.0
etcdctl/v3.5.0-rc.0
etcdutl/v3.5.0-rc.0
server/v3.5.0-rc.0
client/v3.5.0-rc.0
client/v2.305.0-rc.0
client/pkg/v3.5.0-rc.0
raft/v3.5.0-rc.0
pkg/v3.5.0-rc.0
api/v3.5.0-rc.0
2021-06-03 21:39:37 -04:00
Gyuho Lee
a6b37e2642
Merge pull request #13081 from wilsonwang371/20210603-backport13075
...
backport-3.5: server: skip unnecessary sprintf which executes proto.Size()
2021-06-03 13:53:49 -07:00
Wilson Wang
4563cebaa4
server: skip unnecessary sprintf which executes proto.Size()
...
(cherry picked from commit 11edc76b15f0a1b8a3cf7e2d91f59978b93407b5)
2021-06-03 13:21:23 -07:00
Sam Batschelet
3a82198773
Merge pull request #13079 from ptabor/20210604-deps-3.5
...
backport-3.5: Update of dependencies:zap, bbolt, grpc, ...
2021-06-03 12:18:27 -04:00
Piotr Tabor
a5523be415
Update of dependencies:
...
- zap-1.17.0
- bbolt-1.3.6
- grpc -1.38
- github.com/coreos/go-systemd/v22 v22.3.2
- github.com/google/btree v1.0.1
- github.com/json-iterator/go v1.1.11
2021-06-03 15:19:33 +02:00
Piotr Tabor
fea5ace182
Merge pull request #13064 from serathius/v3.5-limit
...
Backport #13060 to release-3.5
2021-06-01 17:18:47 +02:00
Marek Siarkowicz
9a18742bd7
etcdserver: Fix invalid count returned on Range with Limit
2021-06-01 16:12:53 +02:00
Sam Batschelet
6cd7c02873
Merge pull request #13055 from ptabor/20210528-beckport-integration-fixes
2021-05-30 16:35:15 -04:00
Piotr Tabor
3f13d3a2d5
integration.BeforeTest can be run without leak-detection.
2021-05-28 10:01:36 +02:00
Gyuho Lee
7b244ae558
Merge pull request #13043 from ptabor/cherry-picks-3.5
...
backport-3.5: Expose clientv3.CreateDefaultZapLoggerConfig
2021-05-26 10:06:36 -07:00
Piotr Tabor
4af7fc393c
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-26 12:52:46 +02:00
Sam Batschelet
b3f16d6691
version: 3.5.0-beta.4
...
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
v3.5.0-beta.4
tests/v3.5.0-beta.4
etcdctl/v3.5.0-beta.4
etcdutl/v3.5.0-beta.4
server/v3.5.0-beta.4
client/v3.5.0-beta.4
client/v2.305.0-beta.4
client/pkg/v3.5.0-beta.4
raft/v3.5.0-beta.4
pkg/v3.5.0-beta.4
api/v3.5.0-beta.4
2021-05-25 20:48:48 -04:00
Gyuho Lee
16214c3443
Merge pull request #13037 from ptabor/cherry-picks-3.5
...
Backport-3.5: seq reset + bucket as object
2021-05-25 01:27:48 -07:00
Piotr Tabor
e6baf6d751
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-25 09:22:25 +02:00
Piotr Tabor
8bddbdc1d6
Rename seq to bucket2seq.
2021-05-25 09:21:07 +02:00
Piotr Tabor
d3b3228c1f
Minor formatting fix on top of https://github.com/etcd-io/etcd/pull/12568
2021-05-25 09:21:07 +02:00
mlmhl
261f8b1daf
backend: set seq flag for each bucket buffer
2021-05-25 09:21:06 +02:00
Gyuho Lee
dd22bd747e
Merge pull request #13036 from gyuho/cherry-pick
...
[release-3.5] server: set multiple concurrentReadTx instances share one txReadBuffer.
2021-05-24 18:00:09 -07:00
Wilson Wang
7a7d6f94a7
server: set multiple concurrentReadTx instances share one txReadBuffer.
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2021-05-24 16:59:42 -07:00
Gyuho Lee
c0d1450b45
Merge pull request #13003 from gyuho/cherry-pick
...
[backport release-3.5] applyV2 should reapply on backend only once
2021-05-18 23:50:10 -07:00
Piotr Tabor
c4ebac0c57
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 23:16:59 -07:00
Sam Batschelet
379c361bc6
version: 3.5.0-beta.3
...
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
v3.5.0-beta.3
tests/v3.5.0-beta.3
etcdctl/v3.5.0-beta.3
etcdutl/v3.5.0-beta.3
server/v3.5.0-beta.3
client/v3.5.0-beta.3
client/v2.305.0-beta.3
client/pkg/v3.5.0-beta.3
raft/v3.5.0-beta.3
pkg/v3.5.0-beta.3
api/v3.5.0-beta.3
2021-05-18 09:44:35 -04:00
Sam Batschelet
163d9fd6f4
Merge pull request #12998 from hexfusion/cp-12997
...
Manual cherry pick of #12997
2021-05-18 08:20:41 -04:00
Sam Batschelet
d06c97209c
scripts: add missing etcdutl to release pipeline
...
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2021-05-18 07:57:27 -04:00
Sam Batschelet
1a8a063a31
version: 3.5.0-beta.2
...
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
v3.5.0-beta.2
tests/v3.5.0-beta.2
etcdctl/v3.5.0-beta.2
etcdutl/v3.5.0-beta.2
server/v3.5.0-beta.2
client/v3.5.0-beta.2
client/v2.305.0-beta.2
client/pkg/v3.5.0-beta.2
raft/v3.5.0-beta.2
pkg/v3.5.0-beta.2
api/v3.5.0-beta.2
2021-05-18 06:32:19 -04:00
Sam Batschelet
e46bcb5ad9
version: 3.5.0-beta.1
...
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
v3.5.0-beta.1
2021-05-17 21:50:03 -04:00
Sam Batschelet
535a9447ce
Merge pull request #12990 from gyuho/backport
...
release-3.5: backport set version panic fix, ARM64 tests
2021-05-17 17:12:47 -04:00
Gyuho Lee
84d9187dbf
github/workflow: run arm64 tests for all branches startin from 3.5
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2021-05-17 13:52:11 -07:00
Chao Chen
2042d2abc4
use v2 api to update cluster version
2021-05-17 13:50:38 -07:00
Sam Batschelet
cf54fab42f
version: v3.5.0-beta.0
...
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
v3.5.0-beta.0
2021-05-17 13:29:57 -04:00
Sam Batschelet
c49444d5d0
*: Remove Changelog
...
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2021-05-17 13:15:29 -04:00
Piotr Tabor
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
Piotr Tabor
3f7a038656
Fixed documentation and scripts.
2021-05-17 11:54:03 +02:00
Piotr Tabor
949c1c224b
Updated changelog.
2021-05-17 11:54:03 +02:00
Piotr Tabor
d99d0df5a5
Adding etcdutl test coverage.
2021-05-17 11:54:03 +02:00
Piotr Tabor
b6a8ae8372
add etcdutl version
. make it cov-tests compatible.
2021-05-17 11:54:03 +02:00
Piotr Tabor
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
Piotr Tabor
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
Piotr Tabor
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
Piotr Tabor
f82b5cb776
Bring back original NewZapCoreLoggerBuilder api. ( #12973 )
...
The funcion signature has been changed in:
eafbc8c57efc716644c328f63677ca7eadeebdfe .
Instead we should have added new method `NewZapLoggerBuilder()`.
2021-05-16 10:26:10 -07:00
Piotr Tabor
9501e8e874
Merge pull request #12980 from aaronjheng/typo
...
Fix typo in CHANGELOG
2021-05-16 16:18:46 +02:00
Aaron Jheng
549a0f656f
docs: Fix typo in CHANGELOG
2021-05-16 21:44:57 +08:00
Piotr Tabor
adcf580137
Merge pull request #12976 from ptabor/20210516-fix-coverage
...
Fix coverage tests
2021-05-16 15:27:38 +02:00
Piotr Tabor
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
Piotr Tabor
c7a76470d5
Fix path to the coverage folder for e2e tests.
2021-05-16 09:49:50 +02:00
Piotr Tabor
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
Patrice Chalin
bca0717f28
Rename master to main in README and other *.md files ( #12977 )
2021-05-15 23:46:05 -07:00