Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.

feature:Use etcd to manager supernode ha cluster(HA first part) #694

Closed
wants to merge 1 commit into from

Conversation

yunfeiyanggzq
Copy link
Member

@yunfeiyanggzq yunfeiyanggzq commented Jul 19, 2019

Signed-off-by: yunfeiyangbuaa [email protected]

Ⅰ. Describe what this PR did

to implement supernode ha,we use etcd to manager supernode ha cluster,every supernode should connects etcd and send suopernode information to etcd.other supernode will gets this information from etcd.supernode's on and off will be notified to other supernode.supernode will register a supernode peer when it find a new supernode is on in this cluster

Ⅱ. Does this pull request fix one issue?

Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

my pr will be submitted as follows

  • implement a ha_mgr to implement active/standby switch-----done
  • add a cmd config to config ha ,use ha_mgr to change supernode status between active and standby
  • add new interface to ha_mgr(active supernode send a copy of all the dfget's request to satndby supernode to implement state synchronization )
  • modify dfget's code(dfget can go on it's work after the active supernode is off)
  • implement the vip

@codecov-io
Copy link

codecov-io commented Jul 19, 2019

Codecov Report

Merging #694 into master will decrease coverage by 0.07%.
The diff coverage is 28.57%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #694      +/-   ##
==========================================
- Coverage   39.64%   39.57%   -0.08%     
==========================================
  Files         109      109              
  Lines        6432     6459      +27     
==========================================
+ Hits         2550     2556       +6     
- Misses       3674     3692      +18     
- Partials      208      211       +3
Impacted Files Coverage Δ
supernode/config/config.go 51.56% <15.78%> (-15.11%) ⬇️
supernode/server/server.go 41.37% <50%> (+0.63%) ⬆️
supernode/daemon/mgr/peer/manager.go 77.41% <60%> (-1.24%) ⬇️
supernode/daemon/mgr/scheduler/manager.go 24.06% <0%> (-0.76%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7d6bdc2...3e4d461. Read the comment docs.

@yunfeiyanggzq yunfeiyanggzq force-pushed the switch branch 3 times, most recently from a42664a to 3a94b63 Compare July 19, 2019 04:02
@yunfeiyanggzq yunfeiyanggzq changed the title feature:implement supernode status switch feature:implement supernode status switch(ha_mgr) Jul 20, 2019
@yunfeiyanggzq yunfeiyanggzq force-pushed the switch branch 4 times, most recently from 3e1c2c4 to 2cf0ec8 Compare July 22, 2019 02:03
supernode/daemon/mgr/ha/etcd_tool.go Outdated Show resolved Hide resolved
supernode/daemon/mgr/ha/tool.go Outdated Show resolved Hide resolved
@starnop
Copy link
Contributor

starnop commented Jul 25, 2019

Could you please add a simple usage document? THX.

supernode/daemon/mgr/ha/etcd_tool.go Outdated Show resolved Hide resolved
supernode/daemon/mgr/ha/etcd_tool.go Outdated Show resolved Hide resolved
supernode/daemon/mgr/ha/etcd_tool.go Show resolved Hide resolved
supernode/daemon/mgr/ha/etcd_tool.go Outdated Show resolved Hide resolved
supernode/daemon/mgr/ha/etcd_tool.go Outdated Show resolved Hide resolved
supernode/daemon/mgr/ha/etcd_tool.go Show resolved Hide resolved
supernode/daemon/mgr/ha/etcd_tool.go Outdated Show resolved Hide resolved
supernode/daemon/mgr/ha/manager.go Outdated Show resolved Hide resolved
supernode/daemon/mgr/ha/manager.go Outdated Show resolved Hide resolved
supernode/daemon/mgr/ha/manager.go Outdated Show resolved Hide resolved
@starnop
Copy link
Contributor

starnop commented Jul 25, 2019

In addition, we should follow the following conventions when recording a log:

  • record the key info that represents who is performing the operation
  • use success to do something or failed to do something log format

@yunfeiyanggzq yunfeiyanggzq force-pushed the switch branch 2 times, most recently from f00a01a to 0b3e60e Compare July 26, 2019 10:15
Copy link
Member Author

@yunfeiyanggzq yunfeiyanggzq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add a simple usage document? THX.

I will add a usage document in next pr, because user can use hr in cli config

@jim3ma
Copy link
Member

jim3ma commented Jun 15, 2020

@yunfeiyanggzq how about implement supernode manager and supernode locator with etcd ?

@pouchrobot
Copy link
Collaborator

ping @yunfeiyanggzq
Conflict happens after merging a previous commit.
Please rebase the branch against master and push it back again. Thanks a lot.

@starnop
Copy link
Contributor

starnop commented Jun 15, 2020

@yunfeiyanggzq how about implement supernode manager and supernode locator with etcd ?

👍 also cc/ @lowzj

sungjunyoung pushed a commit to sungjunyoung/Dragonfly that referenced this pull request May 8, 2022
* feat: add manager client list scheduler interface

Signed-off-by: Gaius <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants