-
Notifications
You must be signed in to change notification settings - Fork 525
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 recover volume #2918
[feat]tools-v2: add bs recover volume #2918
Conversation
Signed-off-by: kevin <[email protected]>
Signed-off-by: kevin <[email protected]>
01f9ac1
to
b7587a6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update the README.md about the new command.
You should post the sample output of the command in description of pr.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This command is a middle command. You can add sub command in middle command. You can refer to tools-v2/pkg/cli/command/curvebs/update/update.go.
"github.com/opencurve/curve/tools-v2/proto/proto/nameserver2" | ||
) | ||
|
||
type RecoverCertainFileRpc struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Named the same as RPC
config.AddRpcRetryTimesFlag(recoverCommand.Cmd) | ||
config.AddBsMdsFlagOption(recoverCommand.Cmd) | ||
config.AddBsPathRequiredFlag(recoverCommand.Cmd) | ||
config.AddBsUserOptionFlag(recoverCommand.Cmd) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be required
config.AddBsMdsFlagOption(recoverCommand.Cmd) | ||
config.AddBsPathRequiredFlag(recoverCommand.Cmd) | ||
config.AddBsUserOptionFlag(recoverCommand.Cmd) | ||
config.AddBsPasswordOptionFlag(recoverCommand.Cmd) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
flag fileid
should be added
okay, thanks a lot for your advice, I'll fix it in the next few days. |
What problem does this PR solve?
Issue Number: #2588
Problem Summary: Add a feature that can recover the specified volume from the RecycleBin.
What is changed and how it works?
What's Changed: add recover directory, and inside of it is a volume sub-directory, and two files: recover.go, file.go.
How it Works: recover.go act as an entry, while file.go call the Rpc function to execute the actual recover action.
Side effects(Breaking backward compatibility? Performance regression?):
Check List