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

finish issue #2355 #2462

Closed
wants to merge 2 commits into from
Closed

finish issue #2355 #2462

wants to merge 2 commits into from

Conversation

pengpengSir
Copy link
Contributor

What problem does this PR solve?

Issue Number: #2355

Problem Summary: support check server command

What is changed and how it works?

What's Changed:
add /tools-v2/pkg/cli/command/curvebs/check/server.go
add /tools-v2/pkg/cli/command/curvebs/check/get_copyset_ids.go
modify /tools-v2/pkg/cli/command/curvebs/check/check.go
modify /tools-v2/pkg/cli/bs.go
modify /tools-v2/internal/utils/row.go

How it Works:

Usage:  curve bs check server [flags]

check all copysets infomation on server

Flags:
  -c, --conf string           config file (default is $HOME/.curve/curve.yaml or /etc/curve/curve.yaml)
  -f, --format string         output format (json|plain) (default "plain")
  -h, --help                  print help
      --mdsaddr string        mds address, should be like 127.0.0.1:6700,127.0.0.1:6701,127.0.0.1:6702
      --port int              port
      --rpcretrytimes int32   rpc retry times (default 1)
      --rpctimeout duration   rpc timeout (default 10s)
      --serverid int          server id
      --serverip string       server ip
      --showerror             display all errors in command
      --verbose               show some log

Examples:
$ curve bs check server

command result

+--------+-----------+-------+-------------------------+-------------------------+
| SERVER |    IP     | TOTAL | UNHEALTHY COPYSET COUNT | UNHEALTHY COPYSET RATIO |
+--------+-----------+-------+-------------------------+-------------------------+
| 1      | 127.0.0.1 | 100   | 0                       | 0                       |
+--------+-----------+-------+-------------------------+-------------------------+

Side effects(Breaking backward compatibility? Performance regression?):

Check List

  • Relevant documentation/comments is changed or added
  • I acknowledge that all my contributions will be made under the project's license

pengpengSir and others added 2 commits May 8, 2023 08:06
Signed-off-by: pengpengSir <82749014+pengpengSir@users.noreply.github.com>
@pengpengSir pengpengSir closed this May 8, 2023
@pengpengSir pengpengSir deleted the main branch May 8, 2023 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant