-
Notifications
You must be signed in to change notification settings - Fork 522
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
[curve/toos-v2]: add snapshot-clone-status #2346
Comments
|
@Cyber-SiKu I am interested in this task, please assign it to me, thanks. |
welcome! |
@Cyber-SiKu When I tried to understand this task, I found that this task is similar to the implementation of the But I have a little doubt about the implementation of In tools-v1: there need 3 rpcs to get status(in
But this is different in tools-v2. There are only 2 rpcs in tools-v2(in
This 2 rpcs in tools-v2 is the same as the first two rpcs in tools-v1. I would like to ask why it can be done like this (get rid of the tail rpc)? |
GetCurrentMds curve/src/tools/mds_client.cpp Lines 973 to 990 in 4e73df5
GetMdsOnlineStatus curve/src/tools/mds_client.cpp Lines 901 to 925 in 4e73df5
It can be found that both are essentially obtaining metirc to judge the status of the server.It's just that v1 still needs to judge whether the dummyport is consistent with the configuration file. |
Got it! Based on forementioned reasons, we also can implement There are the corresponding metric strings I found about snapshot. I don't know if that's right? STATUS_SUBURI = "/vars/snapshotcloneserver_status"
VERSION_SUBURI = "/vars/curve_version" |
It should be like this, you can refer to the old code. It seems that there are differences in versions |
Well, I also have a question that how can I test it?
Do I need do more action about snapshot deployment to get correct result as following:
|
Currently snapshot-related commands cannot use the cluster deployed by curveadm palygroud (there is no s3, so there is no snapshot). kind: curvebs
global:
...
s3.nos_address: <> // ip:9000 is the ip and port number deployed by minio
s3.snapshot_bucket_name: <> // created bucket name
s3.ak: <> // ak minioadmin
s3.sk: <> //sk minioadmin
...
chunkserver_services:
config:
...
copiesets: 100
chunkfilepool.enable_get_chunk_from_pool: false
deploy:
- host: ${target}
- host: ${target}
- host: ${target}
... |
目前snapshot 相关的命令不能使用 curveadm palygroud 部署的集群(没有s3,所以没有snapshot). kind: curvebs
global:
... ...
s3.nos_address: <> // ip:9000 为minio部署的ip和端口号
s3.snapshot_bucket_name: <> // 创建的桶名
s3.ak: <> // ak minioadmin
s3.sk: <> //sk minioadmin
... ...
chunkserver_services:
config:
... ...
copysets: 100
chunkfilepool.enable_get_chunk_from_pool: false
deploy:
- host: ${target}
- host: ${target}
- host: ${target}
... ... |
It seems that both addr and dummyaddr should be given by user(or file). curve/src/tools/mds_client.cpp Lines 37 to 77 in 4e73df5
in tools-v1(snapshot): curve/src/tools/snapshot_clone_client.cpp Lines 28 to 42 in 4e73df5
in tools-v2(mds): curve/tools-v2/pkg/config/bs.go Lines 195 to 211 in 4e73df5
I guess that the strings is from user input or config file like template.yaml: curve/tools-v2/pkg/config/template.yaml Lines 21 to 23 in 4e73df5
How can i get the addr and dummy in snapshot tools-v2 implement?(add two kv pairs about snapshot in template.yaml?) |
Yes, and you can refer to etcd or mds to obtain the relevant configuration process, which can be read from the configuration file or specified by flag. |
Is your feature request related to a problem? (你需要的功能是否与某个问题有关?)
we'd like to support
bs status snapshot
command in curve toolcurve/src/tools/status_tool.cpp
Lines 658 to 685 in 8d6caf7
Refer to tool develop guide to get start, and paste the result of the command in pr.
Build compilation environment:https://github.com/opencurve/curve/blob/master/docs/cn/build_and_run.md
Describe the solution you'd like (描述你期望的解决方法)
Add subcommand clinet to curve bs list.
Describe alternatives you've considered (描述你想到的折衷方案)
Additional context/screenshots (更多上下文/截图)
The text was updated successfully, but these errors were encountered: