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

[feat]tools-v2: add bs list may-broken-vol #2518

Merged
merged 1 commit into from
Jun 14, 2023

Conversation

baytan0720
Copy link
Member

What problem does this PR solve?

Issue Number: #2356

Problem Summary:

What is changed and how it works?

What's Changed:
add tools-v2/pkg/cli/command/curvebs/list/chunkserver/offline_chunkserver.go
add tools-v2/pkg/cli/command/curvebs/list/may-broken-vol/may-broken-vol.go
modify tools-v2/pkg/cli/command/curvebs/list/list.go

How it Works:

Usage:

$curve bs list may-broken-vol --help
Usage:  curve bs list may-broken-vol [flags]

list all volumes on majority offline copysets

Flags:
  -f, --format string         output format (json|plain) (default "plain")
      --mdsaddr string        mds address, should be like 127.0.0.1:6700,127.0.0.1:6701,127.0.0.1:6702
      --rpcretrytimes int32   rpc retry times (default 1)
      --rpctimeout duration   rpc timeout (default 10s)

Global Flags:
  -c, --conf string   config file (default is $HOME/.curve/curve.yaml or /etc/curve/curve.yaml)
  -h, --help          print help
      --showerror     display all errors in command
      --verbose       show some log

Examples:
$ curve bs list may-broken-vol

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

@baytan0720
Copy link
Member Author

cicheck

@baytan0720 baytan0720 force-pushed the list_may_broken_vol branch 2 times, most recently from de04bdb to 613bfa0 Compare June 7, 2023 08:42
@baytan0720
Copy link
Member Author

baytan0720 commented Jun 7, 2023

cicheck

@Cyber-SiKu
Copy link
Contributor

When I run it on a normal cluster, the command seems to go into an infinite loop.

@baytan0720
Copy link
Member Author

When I run it on a normal cluster, the command seems to go into an infinite loop.

fix

@baytan0720
Copy link
Member Author

cicheck

}

func (mCmd *MayBrokenVolCommand) RunCommand(cmd *cobra.Command, args []string) error {
if len(mCmd.Rpc) == 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

If not, suggest adding some output.

@baytan0720
Copy link
Member Author

cicheck

Signed-off-by: baytan0720 <baytan2@hotmail.com>
@baytan0720
Copy link
Member Author

cicheck

@Cyber-SiKu
Copy link
Contributor

cicheck

@baytan0720
Copy link
Member Author

cicheck

@Cyber-SiKu Cyber-SiKu merged commit 83ee153 into opencurve:master Jun 14, 2023
3 checks passed
@baytan0720 baytan0720 deleted the list_may_broken_vol branch June 16, 2023 07:34
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.

None yet

3 participants