aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_ec_rebuild.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/shell/command_ec_rebuild.go')
-rw-r--r--weed/shell/command_ec_rebuild.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/weed/shell/command_ec_rebuild.go b/weed/shell/command_ec_rebuild.go
index f0b6b5261..bef56d191 100644
--- a/weed/shell/command_ec_rebuild.go
+++ b/weed/shell/command_ec_rebuild.go
@@ -28,7 +28,7 @@ func (c *commandEcRebuild) Name() string {
func (c *commandEcRebuild) Help() string {
return `find and rebuild missing ec shards among volume servers
- ec.rebuild [-c EACH_COLLECTION|<collection_name>] [-force]
+ ec.rebuild [-c EACH_COLLECTION|<collection_name>] [-apply]
Algorithm:
@@ -63,11 +63,15 @@ func (c *commandEcRebuild) Do(args []string, commandEnv *CommandEnv, writer io.W
fixCommand := flag.NewFlagSet(c.Name(), flag.ContinueOnError)
collection := fixCommand.String("collection", "EACH_COLLECTION", "collection name, or \"EACH_COLLECTION\" for each collection")
- applyChanges := fixCommand.Bool("force", false, "apply the changes")
+ applyChanges := fixCommand.Bool("apply", false, "apply the changes")
+ // TODO: remove this alias
+ applyChangesAlias := fixCommand.Bool("force", false, "apply the changes (alias for -apply)")
if err = fixCommand.Parse(args); err != nil {
return nil
}
- infoAboutSimulationMode(writer, *applyChanges, "-force")
+
+ handleDeprecatedForceFlag(writer, fixCommand, applyChangesAlias, applyChanges)
+ infoAboutSimulationMode(writer, *applyChanges, "-apply")
if err = commandEnv.confirmIsLocked(args); err != nil {
return