6c2f5dc78a
Merge pull request #13405 from serathius/downgrade-b
...
Implement single node downgrades
2021-10-29 23:22:10 +02:00
9d47a97b0b
server: Remove lock from adapter to avoid deadlock
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
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
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
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
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
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
90932324b1
client: Add grpc authority header integration tests
2021-09-29 12:42:16 +02: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
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
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
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
9d81dde082
server: Extract notifier struct
2021-09-10 10:16:48 +02:00
af22382777
Merge pull request #13321 from patrocinio/main
...
Fix a few typos
2021-09-08 09:48:33 +02: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
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
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
2526463e44
Merge pull request #13236 from roytman/expensiveRequest
...
etcdserver: configure "expensive" requests duration
2021-08-02 09:33:43 -04:00