Skip to content
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]: check-server #2355

Closed
Cyber-SiKu opened this issue Mar 30, 2023 · 8 comments
Closed

[curve/toos-v2]: check-server #2355

Cyber-SiKu opened this issue Mar 30, 2023 · 8 comments
Labels
assigned enhancement improve feature good first issue Good for newcomers

Comments

@Cyber-SiKu
Copy link
Contributor

Is your feature request related to a problem? (你需要的功能是否与某个问题有关?)

we'd like to support bs check server command in curve tool

  • The implementation of the old tool is here:
    int CopysetCheck::CheckServer() {
    std::vector<std::string> unhealthyCs;
    int res = 0;
    if (FLAGS_serverId > 0) {
    res = core_->CheckCopysetsOnServer(FLAGS_serverId, &unhealthyCs);
    } else {
    res = core_->CheckCopysetsOnServer(FLAGS_serverIp, &unhealthyCs);
    }
    if (res == 0) {
    std::cout << "Server is healthy!" << std::endl;
    } else {
    std::cout << "Server is not healthy!" << std::endl;
    }
    PrintStatistic();
    if (FLAGS_detail) {
    PrintDetail();
    std::ostream_iterator<std::string> out(std::cout, ", ");
    std::cout << "unhealthy chunkserver list (total: "
    << unhealthyCs.size() <<"): {";
    std::copy(unhealthyCs.begin(), unhealthyCs.end(), out);
    std::cout << "}" << std::endl;
    }
    return res;
    }
  • The old command input and out put:
curve_ops_tool check-server

-------
output:
Server is healthy!
total copysets: ***, unhealthy copysets: ***, unhealthy_ratio: ***%

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 (更多上下文/截图)

@zhanghuidinah
Copy link
Member

@pengpengSir
Copy link
Contributor

i'm going to take this one.

@Cyber-SiKu
Copy link
Contributor Author

pengpengSir

done

@pengpengSir
Copy link
Contributor

thanks!

@Cyber-SiKu
Copy link
Contributor Author

@pengpengSir Have you encountered any difficulties?

@pengpengSir
Copy link
Contributor

@Cyber-SiKu Still working on it, almost done, just take a break last week.

@caoxianfei1
Copy link
Contributor

caoxianfei1 commented Jun 28, 2023

@pengpengSir go on? I see the PR has been stagnant for a long time.

@caoxianfei1
Copy link
Contributor

The issue is closed because the relative pr #2646 has been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assigned enhancement improve feature good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

6 participants