-
Notifications
You must be signed in to change notification settings - Fork 9.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update ValidateConfigurationChange to nil check for v2store #15905
Conversation
5953ee8
to
f41ed2e
Compare
c31ae34
to
338f747
Compare
server/config/v2_deprecation.go
Outdated
V2_DEPR_2_GONE = V2DeprecationEnum("gone") | ||
|
||
//TODO geetasg does thie default need to change |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By implementing v2snapshots from v3 membership data, you basically implement the write-only-drop-data
.
I would be for totally implementing this control flags as it gives false information on what is really supported.
Maybe we should improve documentation and explain:
- etcd v3.4.X - supports both v2, and v3 API.
- etcd v3.5.X - supports v3 api by default, v2 API needs to be separably enabled.
- etcd v3.6.X - supports only v3 api, v2 API is not enabled and any v2 data will be purged.
Note; upgrading from v3.5 to v3.6 and then downgrading back to v3.5 will be supported, but v2 data will be lost. cc @ptabor @ahrtr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sg. I will change the default to write-only-drop-data and update the docs when ready.
var removedMap map[types.ID]bool | ||
membersMap, removedMap = c.be.MustReadMembersFromBackend() | ||
if !shouldApplyV3 { | ||
//TODO geetasg - RaftCluster purely based on backend cannot validate an entry older than ci |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean by validate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a test failure on validation which looked like was due to trying to validate using 'future' info. Ref:https://github.com/etcd-io/etcd/pull/15905/files#diff-164b95d19232df0c51cd511fe4ca61de738660fc11db6ddcdafa0ec5f5c80a35R1978
I will revisit to add a test for that code path once it is better understood.
|
||
/* | ||
covered by TestV2DeprecationSnapshotMatches | ||
// TestMembershipStore tests code path used by snapshot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the plan with this test? Having both e2e and unit test is ok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had added this test to simulate 3.5 style recovery. But now it is getting in the way of removing SetStore (and v2store from RaftCluster). I am investigating modification to the test or will remove it.
zap.String("path", MemberStoreKey(id)), | ||
zap.Error(err), | ||
) | ||
if !strings.Contains(err.Error(), "Key not found") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What other errors we expect now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so far only found this one ("key not found") that needs to be absorbed - because we start with empty store now. I will keep an eye out for any other failures that can be expected.
server/etcdserver/server.go
Outdated
@@ -1104,6 +1097,14 @@ func verifySnapshotIndex(snapshot raftpb.Snapshot, cindex uint64) { | |||
}) | |||
} | |||
|
|||
func verifyConsistentIndexIsLatest(snapshot raftpb.Snapshot, cindex uint64) { | |||
verify.Verify(func() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice
Link to #12913 |
Notes - removing v2store from etcdserver is causing following test to fail. Debugging in progress. Test from - To repro failure - Currently backed out the checkin to not use v2store and v2applier. It will be reintroduced once above failure is fixed. If anyone has any insight on why this test would fail due to v2store removal, please drop a note here. This is manually reproducible. If we run 3.6 (with dropped v2 applier) along with one or more 3.5 members, the 3.6 members will not show the clienturl for 3.5 members. This seems to be because the 3.5 members are using v2 applier to get the client urls updated. Code link -https://github.com/etcd-io/etcd/blob/release-3.5/server/etcdserver/server.go#L2041 Stack trace of the affected path from experiment -
@serathius looks like some form of v2 applier will need to be there to handle the publish req from 3.5. can you please comment? thx |
1a25de7
to
3e725ac
Compare
Part of v2 deprecation changes
Please read https://github.com/etcd-io/etcd/blob/main/CONTRIBUTING.md#contribution-flow.