Skip to content

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

Closed
Closed
@Cyber-SiKu

Description

@Cyber-SiKu

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions