688 Commits

Author SHA1 Message Date
Marek Siarkowicz
db06a4ab28 server: Move wal bootstrap up the hierarchy 2021-09-20 12:04:44 +02:00
Marek Siarkowicz
aa0c050003 etcdserver: Add more hierarchy bootstap introducing a separate storage bootstrap step 2021-09-20 12:01:45 +02:00
Marek Siarkowicz
6c8a4fdcc5 server: Rename bootstrappedWal variables to bwal to separate it from wal package 2021-09-20 11:01:26 +02:00
Marek Siarkowicz
79f6faa5c7 Apply suggestions from code review
Co-authored-by: Lili Cosic <cosiclili@gmail.com>
2021-09-10 10:16:48 +02:00
Marek Siarkowicz
66d05e5496 Try updating storage version immidietly after cluster version is set 2021-09-10 10:16:48 +02:00
Marek Siarkowicz
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
Marek Siarkowicz
0d15ff57e6 server: Implement schema migrations 2021-09-10 10:16:48 +02:00
Marek Siarkowicz
9d81dde082 server: Extract notifier struct 2021-09-10 10:16:48 +02:00
Piotr Tabor
af22382777
Merge pull request #13321 from patrocinio/main
Fix a few typos
2021-09-08 09:48:33 +02:00
Hitoshi Mitake
a08cc733bb
Merge pull request #13308 from mitake/auth-old-rev 2021-09-07 23:25:12 +09:00
Sahdev Zala
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
Hitoshi Mitake
2a750a8dba *: implement a retry logic for auth old revision in the client 2021-09-05 01:13:52 +09:00
Eduardo Patrocinio
87f1dc7e40 Fix a few typos 2021-09-03 16:09:09 -04:00
ben1009
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
Sam Batschelet
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
Lili Cosic
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
Sahdev Zala
6a32bbad75
Merge pull request #13239 from sakateka/zap_raft
etcdserver: add zap.AddCallerSkip in NewRaftLoggerZap
2021-08-21 14:11:05 -04:00
Sahdev Zala
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
Manuel Rüger
c9b4c866ce Cleanup remaining TODOs for/past 3.5 release 2021-08-06 13:29:25 +02:00
Piotr Tabor
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
Marek Siarkowicz
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
Marek Siarkowicz
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
Piotr Tabor
1e46145b29
Merge pull request #13268 from serathius/storage-min
Move storage bootstrap dependencies to storage package
2021-08-03 17:28:36 +02:00
Sahdev Zala
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
Marek Siarkowicz
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
Marek Siarkowicz
23b742cfd3 server: Remove Quota direct dependency on EtcdServer 2021-08-03 12:48:41 +02:00
Marek Siarkowicz
44b8ae145b etcdserver: Move datadir and wal to storage package 2021-08-03 12:47:37 +02:00
Haimantika Mitra
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
Sahdev Zala
2526463e44
Merge pull request #13236 from roytman/expensiveRequest
etcdserver: configure "expensive" requests duration
2021-08-02 09:33:43 -04:00
yuzhiquan
90773edb10 remove always true in if statement 2021-07-29 14:33:10 +08:00
Sahdev Zala
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
tangcong
8a3c43827b fix self-signed-cert-validity parameter cannot be specified in the config file 2021-07-29 00:13:13 +08:00
yuzhiquan
2a5dd39d79 invaild args 2021-07-28 11:39:54 +08:00
Alexey Roytman
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
Sergey Kacheev
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
Marek Siarkowicz
bc16461995 server: Use zaptest in bucket tests and move backendMock to separate file 2021-07-20 18:12:02 +02:00
Marek Siarkowicz
a0554a6bd3 etcdserver: Create AuthBackend interface 2021-07-20 18:09:53 +02:00
Marek Siarkowicz
6cd3633543 etcdserver: Rename membershipStore to membershipBackend 2021-07-20 17:56:52 +02:00
Marek Siarkowicz
2f31cc3fbc etcdserver: Create AlarmBackend interface 2021-07-20 17:53:44 +02:00
Marek Siarkowicz
a97e48e08d Cleanup references to bucket module 2021-07-20 17:50:47 +02:00
Marek Siarkowicz
f6534f1e92 server: Move setting storage version to schema 2021-07-12 15:37:21 +02:00
Marek Siarkowicz
5b6f4579fb server: Rename buckets to schema 2021-07-12 15:37:21 +02:00
Marek Siarkowicz
5e40a8b00c server: Create storage package and move mvcc files to it 2021-07-12 15:37:21 +02:00
Marek Siarkowicz
ef6c276fae etcdserver: Move server bootstraping to one file 2021-07-12 15:37:21 +02:00
Hitoshi Mitake
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
Sahdev Zala
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
Marek Siarkowicz
9824cc96ed etcdserver: Fix typos in bootstrap 2021-07-08 13:37:19 +02:00
Marek Siarkowicz
e1fa356fac etcdserver: Refactor standalone boostrap 2021-07-08 13:34:31 +02:00
Marek Siarkowicz
244e5c2cce etcdserver: Unify memory storage boostrap 2021-07-07 23:36:37 +02:00