-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
[Etcd downgrade] Add http handler to enable downgrade info communication between each member #12099
Conversation
236a54d
to
bda541e
Compare
etcdserver/server.go
Outdated
v := semver.Must(semver.NewVersion(targetVersion)) | ||
if isMatchedVersions(s.getLogger(), v, getVersions(s.getLogger(), s.cluster, s.id, s.peerRt)) { | ||
lg.Info("the cluster has been downgraded", zap.String("cluster-version", targetVersion)) | ||
if _, err := s.downgradeCancel(context.Background()); err != nil { |
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.
Is it safe to block forever with background context? If that's the case, can we comment?
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.
Changed to use context with timeout.
bda541e
to
c69041d
Compare
Codecov Report
@@ Coverage Diff @@
## master #12099 +/- ##
==========================================
- Coverage 64.08% 63.93% -0.16%
==========================================
Files 403 403
Lines 37384 37509 +125
==========================================
+ Hits 23959 23981 +22
- Misses 11902 12003 +101
- Partials 1523 1525 +2
Continue to review full report at Codecov.
|
c69041d
to
f8798c8
Compare
@YoyinZyc Can we check test failures https://semaphoreci.com/etcd-io/etcd/branches/pull-request-12099/builds/4? |
I think the failed test |
Friendly ping @gyuho |
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.
@YoyinZyc Sorry for delay.
Just minor nits and rebase please.
Then, we should be able to merge.
Thanks!
f8798c8
to
df6dbbb
Compare
@YoyinZyc Can we resolve conflicts and look into test failures? |
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.
Please resolve git conflicts and look into test failures. Otherwise, LGTM.
…nitor to server to monitor downgrade status.
df6dbbb
to
3e8ffc7
Compare
@gyuho I increased the dialTimeout period for TestIssue6361 then it passed. As for the Travis failure, it passed on locally on my side. |
Codecov Report
@@ Coverage Diff @@
## master #12099 +/- ##
==========================================
+ Coverage 63.32% 63.44% +0.11%
==========================================
Files 448 448
Lines 62342 62466 +124
==========================================
+ Hits 39479 39632 +153
+ Misses 18303 18268 -35
- Partials 4560 4566 +6
Continue to review full report at Codecov.
|
5th step of #11716
This http handler has similar functionality with other handlers like version handler. It is used to communicate with peers in the cluster about the downgrade enabled status and decide the downgrade enabled status of the cluster.
If all members in the cluster have downgraded to target version, the server will send internal downgrade cancel request to finish downgrade.
@gyuho @jingyih PTAL.Thanks! :)