-
Notifications
You must be signed in to change notification settings - Fork 0
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
Downgrade poc #6
base: master
Are you sure you want to change the base?
Conversation
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.
Did a quick pass on API changes and proto changes:)
// DowngradeValidate requests validation of the downgrade request | ||
DowngradeValidate(ctx context.Context, version string) (*DowngradeResponse, error) | ||
|
||
// DowngradeEnable requests to downgrade the current cluster version to target version. |
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.
Let's elaborate the behavior of these user facing APIs. As an example: https://github.com/etcd-io/etcd/blob/d05459ed5b30f231246be5378ef05d45a79894ea/clientv3/watch.go#L72:2
etcdserver/api/membership/cluster.go
Outdated
@@ -59,6 +59,16 @@ type RaftCluster struct { | |||
// removed contains the ids of removed members in the cluster. | |||
// removed id cannot be reused. | |||
removed map[types.ID]bool | |||
|
|||
downgrade *Downgrade |
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.
downgradeInfo
?
raft/raftpb/raft.proto
Outdated
@@ -118,6 +118,7 @@ enum ConfChangeType { | |||
ConfChangeRemoveNode = 1; | |||
ConfChangeUpdateNode = 2; | |||
ConfChangeAddLearnerNode = 3; | |||
ConfChangeDowngrade = 4; |
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 don't think Downgrade is config change from Raft's perspective, because it is not changing Raft's cluster configuration. Can we add a new type in https://github.com/etcd-io/etcd/blob/master/etcdserver/etcdserverpb/raft_internal.proto
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 am thinking something generic, so later if we have similar needs to add more cluster info, we can reuse the same type.
etcdserver/api/cluster.go
Outdated
@@ -25,6 +25,8 @@ import ( | |||
type Cluster interface { | |||
// ID returns the cluster ID | |||
ID() types.ID | |||
// LocalID returns the local server ID | |||
LocalID() types.ID |
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.
My impression is that this is also a v2 interface. If we need to add more APIs, we might want to create a new interface. See my later comments in etcdhttp/peer.go
etcdserver/api/etcdhttp/peer.go
Outdated
) | ||
|
||
// NewPeerHandler generates an http.Handler to handle etcd peer requests. | ||
func NewPeerHandler(lg *zap.Logger, s etcdserver.ServerPeer) http.Handler { | ||
return newPeerHandler(lg, s, s.RaftHandler(), s.LeaseHandler()) | ||
} | ||
|
||
func newPeerHandler(lg *zap.Logger, s etcdserver.Server, raftHandler http.Handler, leaseHandler http.Handler) http.Handler { | ||
func newPeerHandler(lg *zap.Logger, s etcdserver.ServerPeer, raftHandler http.Handler, leaseHandler http.Handler) http.Handler { |
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.
Maybe create a new interface ServerDowngradable
instead of modifying the existing Cluster interface?
Add v3.4.3 and fix v3.4.2 release date. Fixes # 11353
CHANGELOG: Add v3.4.3
6ce8fa9
to
2891693
Compare
It now points to our domain instead of the Github page.
Documentation: changed ETCD manager URL
mvcc: add "etcd_mvcc_put_size_in_bytes" metrics
docs: Update the raft usage by adding Hyperledger project
4aedcad
to
2caeb11
Compare
e2e: only expect cluster's major version is > 3 in release upgrade test
CHANGELOG: update from PR etcd-io#11374
…tart e2e: add cluster version test with rolling start servers
etcdmain: remove duplicate codes.
mvcc/kvstore:fixcompactbug
CHANGELOG: update from PR 11403
…ointer auth: fix user.Options nil pointer
scripts/build-binary: Added s390x support for binary release
CHANGELOG-3.5: update for etcd-io#11427
CHANGELOG: Add etcd-io#11418 to changelog-3.4, changelog-3.5
… restore from snapshot
…ng server and modify compatibility check when new member joins in an existing cluster; add http handler to get downgrade enabled status
…nterRPC and fieldsPrinter for downgrade
…luster. It is used when adding a new member to an downgrading cluster. The new member should match the downgrade target version.
…interface ServerPeerHTTP to wrap up ServerPeer.
…de; remove new-added plog
2caeb11
to
22ddb23
Compare
@jingyih Please have a look.