diff --git a/cmd/admin-bucket-quota.go b/cmd/admin-bucket-quota.go index de8a949d..626dd524 100644 --- a/cmd/admin-bucket-quota.go +++ b/cmd/admin-bucket-quota.go @@ -81,24 +81,24 @@ var adminBucketQuotaCmd = cli.Command{ Flags: append(adminQuotaFlags, globalFlags...), CustomHelpTemplate: `NAME: {{.HelpName}} - {{.Usage}} - + USAGE: {{.HelpName}} TARGET [--fifo QUOTA | --hard QUOTA | --clear] - + QUOTA quota accepts human-readable case-insensitive number suffixes such as "k", "m", "g" and "t" referring to the metric units KB, MB, GB and TB respectively. Adding an "i" to these prefixes, uses the IEC units, so that "gi" refers to "gibibyte" or "GiB". A "b" at the end is also accepted. Without suffixes the unit is bytes. - + FLAGS: {{range .VisibleFlags}}{{.}} {{end}} EXAMPLES: 1. Display bucket quota configured for "mybucket" on MinIO. {{.Prompt}} {{.HelpName}} myminio/mybucket - + 2. Set FIFO quota for a bucket "mybucket" on MinIO. {{.Prompt}} {{.HelpName}} myminio/mybucket --fifo 10GB @@ -113,7 +113,7 @@ EXAMPLES: // checkAdminBucketQuotaSyntax - validate all the passed arguments func checkAdminBucketQuotaSyntax(ctx *cli.Context) { if len(ctx.Args()) == 0 || len(ctx.Args()) > 1 { - cli.ShowCommandHelpAndExit(ctx, "quota", 1) // last argument is exit code + cli.ShowCommandHelpAndExit(ctx, ctx.Command.Name, 1) // last argument is exit code } if ctx.IsSet("hard") && ctx.IsSet("fifo") { diff --git a/cmd/admin-bucket-remote-add.go b/cmd/admin-bucket-remote-add.go index 529ec6bd..9c5ae2ab 100644 --- a/cmd/admin-bucket-remote-add.go +++ b/cmd/admin-bucket-remote-add.go @@ -91,7 +91,7 @@ EXAMPLES: func checkAdminBucketRemoteAddSyntax(ctx *cli.Context) { argsNr := len(ctx.Args()) if argsNr < 2 { - cli.ShowCommandHelpAndExit(ctx, "add", 1) // last argument is exit code + cli.ShowCommandHelpAndExit(ctx, ctx.Command.Name, 1) // last argument is exit code } if argsNr > 2 { fatalIf(errInvalidArgument().Trace(ctx.Args().Tail()...), @@ -215,11 +215,11 @@ func mainAdminBucketRemoteAdd(ctx *cli.Context) error { sourceBucket, bktTarget := fetchRemoteTarget(ctx) arn, e := client.SetRemoteTarget(globalContext, sourceBucket, bktTarget) if e != nil { - fatalIf(probe.NewError(e), "Cannot add new Remote target") + fatalIf(probe.NewError(e).Trace(args...), "Unable to configure remote target") } printMsg(RemoteMessage{ - op: "add", + op: ctx.Command.Name, TargetURL: bktTarget.URL(), TargetBucket: bktTarget.TargetBucket, AccessKey: bktTarget.Credentials.AccessKey, diff --git a/cmd/admin-bucket-remote-ls.go b/cmd/admin-bucket-remote-ls.go index c2424bdd..8fb58f4f 100644 --- a/cmd/admin-bucket-remote-ls.go +++ b/cmd/admin-bucket-remote-ls.go @@ -63,7 +63,7 @@ EXAMPLES: // checkAdminBucketRemoteListSyntax - validate all the passed arguments func checkAdminBucketRemoteListSyntax(ctx *cli.Context) { if len(ctx.Args()) != 1 { - cli.ShowCommandHelpAndExit(ctx, "ls", 1) // last argument is exit code + cli.ShowCommandHelpAndExit(ctx, ctx.Command.Name, 1) // last argument is exit code } } @@ -73,7 +73,7 @@ func mainAdminBucketRemoteList(ctx *cli.Context) error { // Additional command specific theme customization. console.SetColor("RemoteListMessage", color.New(color.Bold, color.FgHiGreen)) - console.SetColor("RemoteListEmpty", color.New(color.FgRed)) + console.SetColor("RemoteListEmpty", color.New(color.FgYellow)) console.SetColor("SourceBucket", color.New(color.FgYellow)) console.SetColor("TargetBucket", color.New(color.FgYellow)) console.SetColor("TargetURL", color.New(color.FgHiWhite)) @@ -88,14 +88,13 @@ func mainAdminBucketRemoteList(ctx *cli.Context) error { // Create a new MinIO Admin Client client, err := newAdminClient(aliasedURL) fatalIf(err, "Unable to initialize admin connection.") - svcType := ctx.String("service") - targets, e := client.ListRemoteTargets(globalContext, sourceBucket, svcType) - fatalIf(probe.NewError(e).Trace(args...), "Cannot list remote target(s)") - printRemotes(aliasedURL, targets) + targets, e := client.ListRemoteTargets(globalContext, sourceBucket, ctx.String("service")) + fatalIf(probe.NewError(e).Trace(args...), "Unable to list remote target") + printRemotes(ctx, aliasedURL, targets) return nil } -func printRemotes(urlStr string, targets []madmin.BucketTarget) { +func printRemotes(ctx *cli.Context, urlStr string, targets []madmin.BucketTarget) { maxURLLen := 10 maxTgtLen := 6 @@ -103,7 +102,7 @@ func printRemotes(urlStr string, targets []madmin.BucketTarget) { if !globalJSON { if len(targets) == 0 { - console.Print(console.Colorize("RemoteListEmpty", fmt.Sprintf("No remote targets found for`%s`. \n", urlStr))) + console.Print(console.Colorize("RemoteListEmpty", fmt.Sprintf("No remote targets found for `%s`. \n", urlStr))) return } for _, t := range targets { @@ -139,7 +138,7 @@ func printRemotes(urlStr string, targets []madmin.BucketTarget) { } printMsg(RemoteMessage{ - op: "ls", + op: ctx.Command.Name, AccessKey: target.Credentials.AccessKey, TargetBucket: target.TargetBucket, TargetURL: targetURL, diff --git a/cmd/admin-bucket-remote-rm.go b/cmd/admin-bucket-remote-rm.go index cf220143..66b07603 100644 --- a/cmd/admin-bucket-remote-rm.go +++ b/cmd/admin-bucket-remote-rm.go @@ -47,7 +47,7 @@ FLAGS: EXAMPLES: 1. Remove existing remote target with arn "arn:minio:replication:us-west-1:993bc6b6-accd-45e3-884f-5f3e652aed2a:dest1" for bucket srcbucket on MinIO server. - {{.Prompt}} {{.HelpName}} myminio/srcbucket --arn "arn:minio:replication:us-west-1:993bc6b6-accd-45e3-884f-5f3e652aed2a:dest1" + {{.Prompt}} {{.HelpName}} myminio/srcbucket --arn "arn:minio:replication:us-west-1:993bc6b6-accd-45e3-884f-5f3e652aed2a:dest1" `, } @@ -55,7 +55,7 @@ EXAMPLES: func checkAdminBucketRemoteRemoveSyntax(ctx *cli.Context) { if len(ctx.Args()) != 1 { - cli.ShowCommandHelpAndExit(ctx, "rm", 1) // last argument is exit code + cli.ShowCommandHelpAndExit(ctx, ctx.Command.Name, 1) // last argument is exit code } } @@ -70,19 +70,19 @@ func mainAdminBucketRemoteRemove(ctx *cli.Context) error { aliasedURL := args.Get(0) // Create a new MinIO Admin Client client, cerr := newAdminClient(aliasedURL) - fatalIf(cerr, "Unable to initialize admin connection.") + fatalIf(cerr.Trace(aliasedURL), "Unable to initialize admin connection.") _, sourceBucket := url2Alias(args[0]) if sourceBucket == "" { fatalIf(errInvalidArgument(), "Source bucket not specified in `"+args[0]+"`.") } arn := ctx.String("arn") if arn == "" { - fatalIf(errInvalidArgument(), "Arn needs to be specified.") + fatalIf(errInvalidArgument(), "ARN needs to be specified.") } - fatalIf(probe.NewError(client.RemoveRemoteTarget(globalContext, sourceBucket, arn)).Trace(args...), "Cannot remove Remote target") + fatalIf(probe.NewError(client.RemoveRemoteTarget(globalContext, sourceBucket, arn)).Trace(args...), "Unable to remove remote target") printMsg(RemoteMessage{ - op: "rm", + op: ctx.Command.Name, SourceBucket: sourceBucket, RemoteARN: arn, }) diff --git a/cmd/admin-config-export.go b/cmd/admin-config-export.go index a5ea30f3..a6d3873c 100644 --- a/cmd/admin-config-export.go +++ b/cmd/admin-config-export.go @@ -84,7 +84,7 @@ func mainAdminConfigExport(ctx *cli.Context) error { // Call get config API buf, e := client.GetConfig(globalContext) - fatalIf(probe.NewError(e), "Cannot get server config") + fatalIf(probe.NewError(e), "Unable to get server config") // Print printMsg(configExportMessage{ diff --git a/cmd/admin-config-get.go b/cmd/admin-config-get.go index 7d113f8d..d6a0a949 100644 --- a/cmd/admin-config-get.go +++ b/cmd/admin-config-get.go @@ -96,7 +96,7 @@ func mainAdminConfigGet(ctx *cli.Context) error { if len(ctx.Args()) == 1 { // Call get config API hr, e := client.HelpConfigKV(globalContext, "", "", false) - fatalIf(probe.NewError(e), "Cannot get help for the sub-system") + fatalIf(probe.NewError(e), "Unable to get help for the sub-system") // Print printMsg(configHelpMessage{ @@ -109,7 +109,7 @@ func mainAdminConfigGet(ctx *cli.Context) error { // Call get config API buf, e := client.GetConfigKV(globalContext, strings.Join(args.Tail(), " ")) - fatalIf(probe.NewError(e), "Cannot get server '%s' config", args.Tail()) + fatalIf(probe.NewError(e), "Unable to get server '%s' config", args.Tail()) // Print printMsg(configGetMessage{ diff --git a/cmd/admin-config-help.go b/cmd/admin-config-help.go index f890262d..f3958c66 100644 --- a/cmd/admin-config-help.go +++ b/cmd/admin-config-help.go @@ -66,7 +66,7 @@ func (u configHelpMessage) String() string { } else { e = HelpEnvTemplate.Execute(w, u.Value) } - fatalIf(probe.NewError(e), "Cannot initialize template writer") + fatalIf(probe.NewError(e), "Unable to initialize template writer") w.Flush() diff --git a/cmd/admin-config-history.go b/cmd/admin-config-history.go index 1e767aa0..da4d6e0e 100644 --- a/cmd/admin-config-history.go +++ b/cmd/admin-config-history.go @@ -89,7 +89,7 @@ func (u configHistoryMessage) String() string { var s strings.Builder w := tabwriter.NewWriter(&s, 1, 8, 2, ' ', 0) e := HistoryTemplate.Execute(w, u.Entries) - fatalIf(probe.NewError(e), "Cannot initialize template writer") + fatalIf(probe.NewError(e), "Unable to initialize template writer") w.Flush() return s.String() @@ -127,7 +127,7 @@ func mainAdminConfigHistory(ctx *cli.Context) error { fatalIf(err, "Unable to initialize admin connection.") if ctx.IsSet("clear") { - fatalIf(probe.NewError(client.ClearConfigHistoryKV(globalContext, "all")), "Cannot clear server configuration.") + fatalIf(probe.NewError(client.ClearConfigHistoryKV(globalContext, "all")), "Unable to clear server configuration.") // Print printMsg(configHistoryMessage{}) @@ -135,7 +135,7 @@ func mainAdminConfigHistory(ctx *cli.Context) error { } chEntries, e := client.ListConfigHistoryKV(globalContext, ctx.Int("count")) - fatalIf(probe.NewError(e), "Cannot list server history configuration.") + fatalIf(probe.NewError(e), "Unable to list server history configuration.") hentries := make([]historyEntry, len(chEntries)) for i, chEntry := range chEntries { diff --git a/cmd/admin-config-import.go b/cmd/admin-config-import.go index 93253c1c..2e284be3 100644 --- a/cmd/admin-config-import.go +++ b/cmd/admin-config-import.go @@ -96,7 +96,7 @@ func mainAdminConfigImport(ctx *cli.Context) error { fatalIf(err, "Unable to initialize admin connection.") // Call set config API - fatalIf(probe.NewError(client.SetConfig(globalContext, os.Stdin)), "Cannot set server config") + fatalIf(probe.NewError(client.SetConfig(globalContext, os.Stdin)), "Unable to set server config") // Print printMsg(configImportMessage{ diff --git a/cmd/admin-config-reset.go b/cmd/admin-config-reset.go index c41c3ce8..34642a9d 100644 --- a/cmd/admin-config-reset.go +++ b/cmd/admin-config-reset.go @@ -108,7 +108,7 @@ func mainAdminConfigReset(ctx *cli.Context) error { if len(ctx.Args()) == 1 { // Call get config API hr, e := client.HelpConfigKV(globalContext, "", "", ctx.IsSet("env")) - fatalIf(probe.NewError(e), "Cannot get help for the sub-system") + fatalIf(probe.NewError(e), "Unable to get help for the sub-system") // Print printMsg(configHelpMessage{ @@ -122,7 +122,7 @@ func mainAdminConfigReset(ctx *cli.Context) error { // Call reset config API input := strings.Join(args.Tail(), " ") fatalIf(probe.NewError(client.DelConfigKV(globalContext, input)), - "Cannot reset '%s' on the server", input) + "Unable to reset '%s' on the server", input) // Print set config result printMsg(configResetMessage{ diff --git a/cmd/admin-config-restore.go b/cmd/admin-config-restore.go index a14af902..0d898d1d 100644 --- a/cmd/admin-config-restore.go +++ b/cmd/admin-config-restore.go @@ -94,7 +94,7 @@ func mainAdminConfigRestore(ctx *cli.Context) error { fatalIf(err, "Unable to initialize admin connection.") // Call get config API - fatalIf(probe.NewError(client.RestoreConfigHistoryKV(globalContext, args.Get(1))), "Cannot restore server configuration.") + fatalIf(probe.NewError(client.RestoreConfigHistoryKV(globalContext, args.Get(1))), "Unable to restore server configuration.") // Print printMsg(configRestoreMessage{ diff --git a/cmd/admin-config-set.go b/cmd/admin-config-set.go index 02d9636a..0a113c2f 100644 --- a/cmd/admin-config-set.go +++ b/cmd/admin-config-set.go @@ -106,7 +106,7 @@ func mainAdminConfigSet(ctx *cli.Context) error { if !strings.Contains(input, madmin.KvSeparator) { // Call get config API hr, e := client.HelpConfigKV(globalContext, args.Get(1), args.Get(2), ctx.IsSet("env")) - fatalIf(probe.NewError(e), "Cannot get help for the sub-system") + fatalIf(probe.NewError(e), "Unable to get help for the sub-system") // Print printMsg(configHelpMessage{ @@ -120,7 +120,7 @@ func mainAdminConfigSet(ctx *cli.Context) error { // Call set config API fatalIf(probe.NewError(client.SetConfigKV(globalContext, input)), - "Cannot set '%s' to server", input) + "Unable to set '%s' to server", input) // Print set config result printMsg(configSetMessage{ diff --git a/cmd/admin-console.go b/cmd/admin-console.go index cdabe97f..dfaa3e6e 100644 --- a/cmd/admin-console.go +++ b/cmd/admin-console.go @@ -192,7 +192,7 @@ func mainAdminConsole(ctx *cli.Context) error { // Create a new MinIO Admin Client client, err := newAdminClient(aliasedURL) if err != nil { - fatalIf(err.Trace(aliasedURL), "Cannot initialize admin client.") + fatalIf(err.Trace(aliasedURL), "Unable to initialize admin client.") return nil } @@ -203,7 +203,7 @@ func mainAdminConsole(ctx *cli.Context) error { logCh := client.GetLogs(ctxt, node, limit, logType) for logInfo := range logCh { if logInfo.Err != nil { - fatalIf(probe.NewError(logInfo.Err), "Cannot listen to console logs") + fatalIf(probe.NewError(logInfo.Err), "Unable to listen to console logs") } // drop nodeName from output if specified as cli arg if node != "" { diff --git a/cmd/admin-group-add.go b/cmd/admin-group-add.go index 91c8af1f..273a98aa 100644 --- a/cmd/admin-group-add.go +++ b/cmd/admin-group-add.go @@ -131,7 +131,7 @@ func mainAdminGroupAdd(ctx *cli.Context) error { Members: members, IsRemove: false, } - fatalIf(probe.NewError(client.UpdateGroupMembers(globalContext, gAddRemove)).Trace(args...), "Cannot add new group") + fatalIf(probe.NewError(client.UpdateGroupMembers(globalContext, gAddRemove)).Trace(args...), "Unable to add new group") printMsg(groupMessage{ op: "add", diff --git a/cmd/admin-heal.go b/cmd/admin-heal.go index be9bf880..b50ab320 100644 --- a/cmd/admin-heal.go +++ b/cmd/admin-heal.go @@ -38,34 +38,34 @@ const ( var adminHealFlags = []cli.Flag{ cli.StringFlag{ Name: "scan", - Usage: "select the healing scan mode (normal/deep)", + Usage: "[DEPRECATED] select the healing scan mode (normal/deep)", Value: scanNormalMode, }, cli.BoolFlag{ Name: "recursive, r", - Usage: "heal recursively", + Usage: "[DEPRECATED] heal recursively", }, cli.BoolFlag{ Name: "dry-run, n", - Usage: "only inspect data, but do not mutate", + Usage: "[DEPRECATED] only inspect data, but do not mutate", }, cli.BoolFlag{ Name: "force-start, f", - Usage: "force start a new heal sequence", + Usage: "[DEPRECATED] force start a new heal sequence", }, cli.BoolFlag{ Name: "force-stop, s", - Usage: "force stop a running heal sequence", + Usage: "[DEPRECATED] force stop a running heal sequence", }, cli.BoolFlag{ Name: "remove", - Usage: "remove dangling objects in heal sequence", + Usage: "[DEPRECATED] remove dangling objects in heal sequence", }, } var adminHealCmd = cli.Command{ Name: "heal", - Usage: "heal disks, buckets and objects on MinIO server", + Usage: "[DEPRECATED] heal disks, buckets and objects on MinIO server", Action: mainAdminHeal, Before: setGlobalsFromContext, Flags: append(adminHealFlags, globalFlags...), @@ -84,29 +84,7 @@ SCAN MODES: deep : Heal objects which are missing or with silent data corruption on one or more disks. EXAMPLES: - 1. To format newly replaced disks in a MinIO server with alias 'myminio' - {{.Prompt}} {{.HelpName}} myminio - - 2. Heal 'testbucket' in a MinIO server with alias 'myminio' - {{.Prompt}} {{.HelpName}} myminio/testbucket/ - - 3. Heal all objects under 'dir' prefix - {{.Prompt}} {{.HelpName}} --recursive myminio/testbucket/dir/ - - 4. Issue a dry-run heal operation to inspect objects health but not heal them - {{.Prompt}} {{.HelpName}} --dry-run myminio - - 5. Issue a dry-run heal operation to inspect objects health under 'dir' prefix - {{.Prompt}} {{.HelpName}} --recursive --dry-run myminio/testbucket/dir/ - - 6. Force start a running heal sequence (meaning it will force kill the running heal sequence and start a new one) - {{.Prompt}} {{.HelpName}} --force-start myminio/testbucket/dir/ - - 7. Force stop a running heal sequence (meaning it will force kill the running heal sequence) - {{.Prompt}} {{.HelpName}} --force-stop myminio/testbucket/dir/ - - 8. Issue a dry-run heal operation to inspect objects health under 'dir' prefix - {{.Prompt}} {{.HelpName}} --dry-run myminio/testbucket/dir/ + DEPRECATED `, } @@ -207,7 +185,7 @@ func mainAdminHeal(ctx *cli.Context) error { // Create a new MinIO Admin Client client, err := newAdminClient(aliasedURL) if err != nil { - fatalIf(err.Trace(aliasedURL), "Cannot initialize admin client.") + fatalIf(err.Trace(aliasedURL), "Unable to initialize admin client.") return nil } diff --git a/cmd/admin-info.go b/cmd/admin-info.go index 557391a5..b3ea25a9 100644 --- a/cmd/admin-info.go +++ b/cmd/admin-info.go @@ -78,12 +78,12 @@ type clusterStruct struct { func (u clusterStruct) String() (msg string) { // Check cluster level "Status" field for error if u.Status == "error" { - fatal(probe.NewError(errors.New(u.Error)), "Cannot get service status") + fatal(probe.NewError(errors.New(u.Error)), "Unable to get service status") } // If nothing has been collected, error out if u.Info.Servers == nil { - fatal(probe.NewError(errors.New("Cannot get service status")), "") + fatal(probe.NewError(errors.New("Unable to get service status")), "") } // Initialization diff --git a/cmd/admin-kms-key-status.go b/cmd/admin-kms-key-status.go index 2970834e..c02ec29e 100644 --- a/cmd/admin-kms-key-status.go +++ b/cmd/admin-kms-key-status.go @@ -54,7 +54,7 @@ func mainAdminKMSKeyStatus(ctx *cli.Context) error { } client, err := newAdminClient(ctx.Args().Get(0)) - fatalIf(err, "Cannot get a configured admin connection.") + fatalIf(err, "Unable to get a configured admin connection.") var keyID string if len(ctx.Args()) == 2 { diff --git a/cmd/admin-policy-info.go b/cmd/admin-policy-info.go index 3851c9e8..ee5badba 100644 --- a/cmd/admin-policy-info.go +++ b/cmd/admin-policy-info.go @@ -73,7 +73,7 @@ func mainAdminPolicyInfo(ctx *cli.Context) error { fatalIf(err, "Unable to initialize admin connection") policies, e := client.ListCannedPolicies(globalContext) - fatalIf(probe.NewError(e).Trace(args...), "Cannot list policy") + fatalIf(probe.NewError(e).Trace(args...), "Unable to list policy") iamp, ok := policies[policyName] if ok { diff --git a/cmd/admin-policy-list.go b/cmd/admin-policy-list.go index 1cc979ee..4979da43 100644 --- a/cmd/admin-policy-list.go +++ b/cmd/admin-policy-list.go @@ -67,7 +67,7 @@ func mainAdminPolicyList(ctx *cli.Context) error { fatalIf(err, "Unable to initialize admin connection.") policies, e := client.ListCannedPolicies(globalContext) - fatalIf(probe.NewError(e).Trace(args...), "Cannot list policy") + fatalIf(probe.NewError(e).Trace(args...), "Unable to list policy") for k := range policies { printMsg(userPolicyMessage{ diff --git a/cmd/admin-policy-remove.go b/cmd/admin-policy-remove.go index d9f237e9..27c865e0 100644 --- a/cmd/admin-policy-remove.go +++ b/cmd/admin-policy-remove.go @@ -68,7 +68,7 @@ func mainAdminPolicyRemove(ctx *cli.Context) error { client, err := newAdminClient(aliasedURL) fatalIf(err, "Unable to initialize admin connection.") - fatalIf(probe.NewError(client.RemoveCannedPolicy(globalContext, args.Get(1))).Trace(args...), "Cannot remove policy") + fatalIf(probe.NewError(client.RemoveCannedPolicy(globalContext, args.Get(1))).Trace(args...), "Unable to remove policy") printMsg(userPolicyMessage{ op: "remove", diff --git a/cmd/admin-policy-set.go b/cmd/admin-policy-set.go index b9f51e47..e6429c16 100644 --- a/cmd/admin-policy-set.go +++ b/cmd/admin-policy-set.go @@ -113,7 +113,7 @@ func mainAdminPolicySet(ctx *cli.Context) error { IsGroup: isGroup, }) } else { - fatalIf(probe.NewError(e), "Cannot set the policy") + fatalIf(probe.NewError(e), "Unable to set the policy") } return nil } diff --git a/cmd/admin-profile-start.go b/cmd/admin-profile-start.go index fa33499e..646394ea 100644 --- a/cmd/admin-profile-start.go +++ b/cmd/admin-profile-start.go @@ -109,7 +109,7 @@ func mainAdminProfileStart(ctx *cli.Context) error { // Create a new MinIO Admin Client client, err := newAdminClient(aliasedURL) if err != nil { - fatalIf(err.Trace(aliasedURL), "Cannot initialize admin client.") + fatalIf(err.Trace(aliasedURL), "Unable to initialize admin client.") return nil } diff --git a/cmd/admin-profile-stop.go b/cmd/admin-profile-stop.go index 1a839f26..f94f9e72 100644 --- a/cmd/admin-profile-stop.go +++ b/cmd/admin-profile-stop.go @@ -94,7 +94,7 @@ func mainAdminProfileStop(ctx *cli.Context) error { // Create a new MinIO Admin Client client, err := newAdminClient(aliasedURL) if err != nil { - fatalIf(err.Trace(aliasedURL), "Cannot initialize admin client.") + fatalIf(err.Trace(aliasedURL), "Unable to initialize admin client.") return nil } diff --git a/cmd/admin-service-restart.go b/cmd/admin-service-restart.go index 349213a0..65e7c120 100644 --- a/cmd/admin-service-restart.go +++ b/cmd/admin-service-restart.go @@ -113,7 +113,7 @@ func mainAdminServiceRestart(ctx *cli.Context) error { fatalIf(err, "Unable to initialize admin connection.") // Restart the specified MinIO server - fatalIf(probe.NewError(client.ServiceRestart(globalContext)), "Cannot restart the server.") + fatalIf(probe.NewError(client.ServiceRestart(globalContext)), "Unable to restart the server.") // Success.. printMsg(serviceRestartCommand{Status: "success", ServerURL: aliasedURL}) diff --git a/cmd/admin-top-locks.go b/cmd/admin-top-locks.go index d96e4085..b40ba92d 100644 --- a/cmd/admin-top-locks.go +++ b/cmd/admin-top-locks.go @@ -113,7 +113,7 @@ func mainAdminTopLocks(ctx *cli.Context) error { // Call top locks API entries, e := client.TopLocks(globalContext) - fatalIf(probe.NewError(e), "Cannot get server locks list.") + fatalIf(probe.NewError(e), "Unable to get server locks list.") console.SetColor("StaleLock", color.New(color.FgRed, color.Bold)) console.SetColor("Lock", color.New(color.FgBlue, color.Bold)) diff --git a/cmd/admin-trace.go b/cmd/admin-trace.go index 212e0606..7830f3e7 100644 --- a/cmd/admin-trace.go +++ b/cmd/admin-trace.go @@ -115,7 +115,7 @@ func mainAdminTrace(ctx *cli.Context) error { // Create a new MinIO Admin Client client, err := newAdminClient(aliasedURL) if err != nil { - fatalIf(err.Trace(aliasedURL), "Cannot initialize admin client.") + fatalIf(err.Trace(aliasedURL), "Unable to initialize admin client.") return nil } @@ -126,7 +126,7 @@ func mainAdminTrace(ctx *cli.Context) error { traceCh := client.ServiceTrace(ctxt, all, errfltr) for traceInfo := range traceCh { if traceInfo.Err != nil { - fatalIf(probe.NewError(traceInfo.Err), "Cannot listen to http trace") + fatalIf(probe.NewError(traceInfo.Err), "Unable to listen to http trace") } if verbose { printMsg(traceMessage{traceInfo}) diff --git a/cmd/admin-user-add.go b/cmd/admin-user-add.go index 4dceccfc..c9afa884 100644 --- a/cmd/admin-user-add.go +++ b/cmd/admin-user-add.go @@ -180,7 +180,7 @@ func mainAdminUserAdd(ctx *cli.Context) error { client, err := newAdminClient(aliasedURL) fatalIf(err, "Unable to initialize admin connection.") - fatalIf(probe.NewError(client.AddUser(globalContext, accessKey, secretKey)).Trace(args...), "Cannot add new user") + fatalIf(probe.NewError(client.AddUser(globalContext, accessKey, secretKey)).Trace(args...), "Unable to add new user") printMsg(userMessage{ op: "add", diff --git a/cmd/admin-user-disable.go b/cmd/admin-user-disable.go index 6a70315c..bf30c0d4 100644 --- a/cmd/admin-user-disable.go +++ b/cmd/admin-user-disable.go @@ -67,7 +67,7 @@ func mainAdminUserDisable(ctx *cli.Context) error { fatalIf(err, "Unable to initialize admin connection.") e := client.SetUserStatus(globalContext, args.Get(1), madmin.AccountDisabled) - fatalIf(probe.NewError(e).Trace(args...), "Cannot disable user") + fatalIf(probe.NewError(e).Trace(args...), "Unable to disable user") printMsg(userMessage{ op: "disable", diff --git a/cmd/admin-user-enable.go b/cmd/admin-user-enable.go index 637c958c..b37ee605 100644 --- a/cmd/admin-user-enable.go +++ b/cmd/admin-user-enable.go @@ -67,7 +67,7 @@ func mainAdminUserEnable(ctx *cli.Context) error { fatalIf(err, "Unable to initialize admin connection.") e := client.SetUserStatus(globalContext, args.Get(1), madmin.AccountEnabled) - fatalIf(probe.NewError(e).Trace(args...), "Cannot enable user") + fatalIf(probe.NewError(e).Trace(args...), "Unable to enable user") printMsg(userMessage{ op: "enable", diff --git a/cmd/admin-user-info.go b/cmd/admin-user-info.go index b432aeca..09a55bd8 100644 --- a/cmd/admin-user-info.go +++ b/cmd/admin-user-info.go @@ -66,7 +66,7 @@ func mainAdminUserInfo(ctx *cli.Context) error { fatalIf(err, "Unable to initialize admin connection.") user, e := client.GetUserInfo(globalContext, args.Get(1)) - fatalIf(probe.NewError(e).Trace(args...), "Cannot get user info") + fatalIf(probe.NewError(e).Trace(args...), "Unable to get user info") printMsg(userMessage{ op: "info", diff --git a/cmd/admin-user-list.go b/cmd/admin-user-list.go index 5e2dc39e..f962a881 100644 --- a/cmd/admin-user-list.go +++ b/cmd/admin-user-list.go @@ -70,7 +70,7 @@ func mainAdminUserList(ctx *cli.Context) error { fatalIf(err, "Unable to initialize admin connection.") users, e := client.ListUsers(globalContext) - fatalIf(probe.NewError(e).Trace(args...), "Cannot list user") + fatalIf(probe.NewError(e).Trace(args...), "Unable to list user") for k, v := range users { printMsg(userMessage{ diff --git a/cmd/admin-user-remove.go b/cmd/admin-user-remove.go index f40a13ea..308d2dc4 100644 --- a/cmd/admin-user-remove.go +++ b/cmd/admin-user-remove.go @@ -66,7 +66,7 @@ func mainAdminUserRemove(ctx *cli.Context) error { fatalIf(err, "Unable to initialize admin connection.") e := client.RemoveUser(globalContext, args.Get(1)) - fatalIf(probe.NewError(e).Trace(args...), "Cannot remove %s", args.Get(1)) + fatalIf(probe.NewError(e).Trace(args...), "Unable to remove %s", args.Get(1)) printMsg(userMessage{ op: "remove", diff --git a/cmd/bucket-lock.go b/cmd/bucket-lock.go index a1edb330..00fcfca1 100644 --- a/cmd/bucket-lock.go +++ b/cmd/bucket-lock.go @@ -88,17 +88,17 @@ func (m lockCmdMessage) JSON() string { func lock(urlStr string, mode minio.RetentionMode, validity uint64, unit minio.ValidityUnit, op string) error { client, err := newClient(urlStr) if err != nil { - fatalIf(err.Trace(), "Cannot parse the provided url.") + fatalIf(err.Trace(), "Unable to parse the provided url.") } ctx, cancelLock := context.WithCancel(globalContext) defer cancelLock() if op == "clear" || mode != "" { err = client.SetObjectLockConfig(ctx, mode, validity, unit) - fatalIf(err, "Cannot enable object lock configuration on the specified bucket.") + fatalIf(err, "Unable to enable object lock configuration on the specified bucket.") } else { mode, validity, unit, err = client.GetObjectLockConfig(ctx) - fatalIf(err, "Cannot get object lock configuration on the specified bucket.") + fatalIf(err, "Unable to get object lock configuration on the specified bucket.") } printMsg(lockCmdMessage{ diff --git a/cmd/encrypt-clear.go b/cmd/encrypt-clear.go index a34637f5..2a847f1b 100644 --- a/cmd/encrypt-clear.go +++ b/cmd/encrypt-clear.go @@ -86,7 +86,7 @@ func mainEncryptClear(cliCtx *cli.Context) error { // Create a new Client client, err := newClient(aliasedURL) fatalIf(err, "Unable to initialize connection.") - fatalIf(client.DeleteEncryption(ctx), "Cannot clear auto encryption configuration") + fatalIf(client.DeleteEncryption(ctx), "Unable to clear auto encryption configuration") printMsg(encryptClearMessage{ Op: "clear", Status: "success", diff --git a/cmd/encrypt-info.go b/cmd/encrypt-info.go index fa1e2c6a..a0fd8cf5 100644 --- a/cmd/encrypt-info.go +++ b/cmd/encrypt-info.go @@ -102,7 +102,7 @@ func mainEncryptInfo(cliCtx *cli.Context) error { client, err := newClient(aliasedURL) fatalIf(err, "Unable to initialize connection.") algorithm, keyID, e := client.GetEncryption(ctx) - fatalIf(e, "Cannot get encryption info") + fatalIf(e, "Unable to get encryption info") msg := encryptInfoMessage{ Op: "info", Status: "success", diff --git a/cmd/encrypt-set.go b/cmd/encrypt-set.go index dc6e8d99..ddbfddb2 100644 --- a/cmd/encrypt-set.go +++ b/cmd/encrypt-set.go @@ -105,7 +105,7 @@ func mainEncryptSet(cliCtx *cli.Context) error { if algorithm != "sse-s3" && algorithm != "sse-kms" { fatalIf(probe.NewError(fmt.Errorf("Unknown argument `%s` passed", algorithm)), "Invalid encryption algorithm") } - fatalIf(client.SetEncryption(ctx, algorithm, keyID), "Cannot enable auto encryption") + fatalIf(client.SetEncryption(ctx, algorithm, keyID), "Unable to enable auto encryption") msg := encryptSetMessage{ Op: "set", Status: "success", diff --git a/cmd/event-add.go b/cmd/event-add.go index cbf7f6f5..d3c5879f 100644 --- a/cmd/event-add.go +++ b/cmd/event-add.go @@ -124,7 +124,7 @@ func mainEventAdd(cliCtx *cli.Context) error { client, err := newClient(path) if err != nil { - fatalIf(err.Trace(), "Cannot parse the provided url.") + fatalIf(err.Trace(), "Unable to parse the provided url.") } s3Client, ok := client.(*S3Client) @@ -133,7 +133,7 @@ func mainEventAdd(cliCtx *cli.Context) error { } err = s3Client.AddNotificationConfig(ctx, arn, event, prefix, suffix, ignoreExisting) - fatalIf(err, "Cannot enable notification on the specified bucket.") + fatalIf(err, "Unable to enable notification on the specified bucket.") printMsg(eventAddMessage{ ARN: arn, Event: event, diff --git a/cmd/event-list.go b/cmd/event-list.go index dda60b85..585c6fe5 100644 --- a/cmd/event-list.go +++ b/cmd/event-list.go @@ -116,7 +116,7 @@ func mainEventList(cliCtx *cli.Context) error { client, err := newClient(path) if err != nil { - fatalIf(err.Trace(), "Cannot parse the provided url.") + fatalIf(err.Trace(), "Unable to parse the provided url.") } s3Client, ok := client.(*S3Client) @@ -125,7 +125,7 @@ func mainEventList(cliCtx *cli.Context) error { } configs, err := s3Client.ListNotificationConfigs(ctx, arn) - fatalIf(err, "Cannot list notifications on the specified bucket.") + fatalIf(err, "Unable to list notifications on the specified bucket.") for _, config := range configs { printMsg(eventListMessage{ diff --git a/cmd/event-remove.go b/cmd/event-remove.go index 9a8c2155..80a9f501 100644 --- a/cmd/event-remove.go +++ b/cmd/event-remove.go @@ -119,7 +119,7 @@ func mainEventRemove(cliCtx *cli.Context) error { client, err := newClient(path) if err != nil { - fatalIf(err.Trace(), "Cannot parse the provided url.") + fatalIf(err.Trace(), "Unable to parse the provided url.") } s3Client, ok := client.(*S3Client) @@ -134,7 +134,7 @@ func mainEventRemove(cliCtx *cli.Context) error { err = s3Client.RemoveNotificationConfig(ctx, arn, event, prefix, suffix) if err != nil { - fatalIf(err, "Cannot disable notification on the specified bucket.") + fatalIf(err, "Unable to disable notification on the specified bucket.") } printMsg(eventRemoveMessage{ARN: arn}) diff --git a/cmd/find.go b/cmd/find.go index 99a2231d..f56e92df 100644 --- a/cmd/find.go +++ b/cmd/find.go @@ -142,7 +142,7 @@ func watchFind(ctxCtx context.Context, ctx *findContext) { Events: []string{"put"}, } watchObj, err := ctx.clnt.Watch(ctxCtx, options) - fatalIf(err.Trace(ctx.targetAlias), "Cannot watch with given options.") + fatalIf(err.Trace(ctx.targetAlias), "Unable to watch with given options.") // Loop until user CTRL-C the command line. for { diff --git a/cmd/legalhold-main.go b/cmd/legalhold-main.go index 47eb0724..ae6fa67d 100644 --- a/cmd/legalhold-main.go +++ b/cmd/legalhold-main.go @@ -73,7 +73,7 @@ type legalHoldCmdMessage struct { // Colorized message for console printing. func (l legalHoldCmdMessage) String() string { if l.Err != nil { - return console.Colorize("LegalHoldMessageFailure", "Cannot set object legal hold status `"+l.URLPath+"`. "+l.Err.Error()) + return console.Colorize("LegalHoldMessageFailure", "Unable to set object legal hold status `"+l.URLPath+"`. "+l.Err.Error()) } return console.Colorize("LegalHoldSuccess", fmt.Sprintf("Object legal hold successfully set for `%s`.", l.URLPath)) } @@ -92,7 +92,7 @@ func setLegalHold(urlStr string, lhold minio.LegalHoldStatus, isRecursive bool) clnt, err := newClient(urlStr) if err != nil { - fatalIf(err.Trace(), "Cannot parse the provided url.") + fatalIf(err.Trace(), "Unable to parse the provided url.") } if !isRecursive { err = clnt.PutObjectLegalHold(ctx, lhold) diff --git a/cmd/mv-main.go b/cmd/mv-main.go index 64ad4b87..4a42bbd9 100644 --- a/cmd/mv-main.go +++ b/cmd/mv-main.go @@ -301,7 +301,7 @@ func mainMove(cliCtx *cli.Context) error { for _, urlStr := range cliCtx.Args() { client, err := newClient(urlStr) if err != nil { - fatalIf(err.Trace(), "Cannot parse the provided url.") + fatalIf(err.Trace(), "Unable to parse the provided url.") } if s3Client, ok := client.(*S3Client); ok { diff --git a/cmd/policy-main.go b/cmd/policy-main.go index 8baac7d1..46be77e8 100644 --- a/cmd/policy-main.go +++ b/cmd/policy-main.go @@ -464,7 +464,7 @@ func runPolicyCmd(args cli.Args) { policyJSON := map[string]interface{}{} if policyStr != "" { e := json.Unmarshal([]byte(policyStr), &policyJSON) - fatalIf(probe.NewError(e), "Cannot unmarshal custom policy file.") + fatalIf(probe.NewError(e), "Unable to unmarshal custom policy file.") } printMsg(policyMessage{ Status: "success", diff --git a/cmd/replicate-rm.go b/cmd/replicate-rm.go index b95e7228..ce6a873d 100644 --- a/cmd/replicate-rm.go +++ b/cmd/replicate-rm.go @@ -136,7 +136,7 @@ func mainReplicateRemove(cliCtx *cli.Context) error { rmForce := cliCtx.Bool("force") ruleID := cliCtx.String("id") if rmAll && rmForce { - fatalIf(client.RemoveReplication(ctx), "Cannot remove replication configuration") + fatalIf(client.RemoveReplication(ctx), "Unable to remove replication configuration") } else { opts := replication.Options{ ID: ruleID, diff --git a/cmd/retention-main.go b/cmd/retention-main.go index 8ea0a716..63c6e972 100644 --- a/cmd/retention-main.go +++ b/cmd/retention-main.go @@ -85,7 +85,7 @@ type retentionCmdMessage struct { // Colorized message for console printing. func (m retentionCmdMessage) String() string { if m.Err != nil { - return console.Colorize("RetentionMessageFailure", fmt.Sprintf("Cannot set object retention on `%s`: %s", m.URLPath, m.Err)) + return console.Colorize("RetentionMessageFailure", fmt.Sprintf("Unable to set object retention on `%s`: %s", m.URLPath, m.Err)) } return console.Colorize("RetentionSuccess", fmt.Sprintf("Object retention successfully set for `%s`", m.URLPath)) } @@ -122,7 +122,7 @@ func setRetention(urlStr string, mode minio.RetentionMode, validity uint64, unit clnt, err := newClient(urlStr) if err != nil { - fatalIf(err.Trace(), "Cannot parse the provided url.") + fatalIf(err.Trace(), "Unable to parse the provided url.") } // Quit early if urlStr does not point to an S3 server diff --git a/cmd/version-enable.go b/cmd/version-enable.go index f452402f..a213684d 100644 --- a/cmd/version-enable.go +++ b/cmd/version-enable.go @@ -90,7 +90,7 @@ func mainVersionEnable(cliCtx *cli.Context) error { // Create a new Client client, err := newClient(aliasedURL) fatalIf(err, "Unable to initialize connection.") - fatalIf(client.SetVersion(ctx, "enable"), "Cannot enable versioning") + fatalIf(client.SetVersion(ctx, "enable"), "Unable to enable versioning") printMsg(versionEnableMessage{ Op: "enable", Status: "success", diff --git a/cmd/version-info.go b/cmd/version-info.go index d62adba8..bea4d542 100644 --- a/cmd/version-info.go +++ b/cmd/version-info.go @@ -99,7 +99,7 @@ func mainVersionInfo(cliCtx *cli.Context) error { client, err := newClient(aliasedURL) fatalIf(err, "Unable to initialize connection.") vConfig, e := client.GetVersion(ctx) - fatalIf(e, "Cannot get versioning info") + fatalIf(e, "Unable to get versioning info") vMsg := versioningInfoMessage{ Op: "info", Status: "success", diff --git a/cmd/version-suspend.go b/cmd/version-suspend.go index 9c64e931..a55a5bf8 100644 --- a/cmd/version-suspend.go +++ b/cmd/version-suspend.go @@ -90,7 +90,7 @@ func mainVersionSuspend(cliCtx *cli.Context) error { // Create a new Client client, err := newClient(aliasedURL) fatalIf(err, "Unable to initialize connection.") - fatalIf(client.SetVersion(ctx, "suspend"), "Cannot suspend versioning") + fatalIf(client.SetVersion(ctx, "suspend"), "Unable to suspend versioning") printMsg(versionSuspendMessage{ Op: "suspend", Status: "success", diff --git a/cmd/watch-main.go b/cmd/watch-main.go index 5f10037c..777d2c16 100644 --- a/cmd/watch-main.go +++ b/cmd/watch-main.go @@ -148,7 +148,7 @@ func mainWatch(cliCtx *cli.Context) error { s3Client, pErr := newClient(path) if pErr != nil { - fatalIf(pErr.Trace(), "Cannot parse the provided url.") + fatalIf(pErr.Trace(), "Unable to parse the provided url.") } options := WatchOptions{ @@ -163,7 +163,7 @@ func mainWatch(cliCtx *cli.Context) error { // Start watching on events wo, err := s3Client.Watch(ctx, options) - fatalIf(err, "Cannot watch on the specified bucket.") + fatalIf(err, "Unable to watch on the specified bucket.") // Initialize.. waitgroup to track the go-routine. var wg sync.WaitGroup diff --git a/docs/minio-admin-complete-guide.md b/docs/minio-admin-complete-guide.md index c5f40ce8..3044edd9 100644 --- a/docs/minio-admin-complete-guide.md +++ b/docs/minio-admin-complete-guide.md @@ -154,7 +154,6 @@ You may add shell aliases for info, healing. ``` alias minfo='mc admin info' -alias mheal='mc admin heal' ``` ## 6. Global Options @@ -321,7 +320,7 @@ mc admin update play Server `play` updated successfully from RELEASE.2019-08-14T20-49-49Z to RELEASE.2019-08-21T19-59-10Z ``` -#### Steps to update MinIO using a private mirror +#### Steps to update MinIO using a private mirror For using `update` command with private mirror server, you need to mirror the directory structure on `https://dl.minio.io/server/minio/release/linux-amd64/` on your private mirror server and then provide: ``` @@ -630,51 +629,7 @@ mc admin config set myminio < /tmp/my-serverconfig ### Command `heal` - Heal disks, buckets and objects on MinIO server -`heal` command heals disks, missing buckets, objects on MinIO server. NOTE: This command is only applicable for MinIO erasure coded setup (standalone and distributed). - -The server already has a light background process to heal disks, buckets and objects when necessary. However, it does not detect some types of data corruption, especially the ones that rarely happen, such as silent data corruption. In that case, you need, once a while, to manually run the heal command providing this flag: `--scan deep`. - -To show the status of the background healing process, just type the following command: `mc admin heal your-alias`. - -To scan and heal everything, type: `mc admin heal -r your-alias`. - -``` -NAME: - mc admin heal - heal disks, buckets and objects on MinIO server - -FLAGS: - --scan value select the healing scan mode (normal/deep) (default: "normal") - --recursive, -r heal recursively - --dry-run, -n only inspect data, but do not mutate - --force-start, -f force start a new heal sequence - --force-stop, -s force stop a running heal sequence - --remove remove dangling objects in heal sequence - --help, -h show help -``` - -*Example: Heal MinIO cluster after replacing a fresh disk, recursively heal all buckets and objects, where 'myminio' is the MinIO server alias.* - -``` -mc admin heal -r myminio -``` - -*Example: Heal MinIO cluster on a specific bucket recursively, where 'myminio' is the MinIO server alias.* - -``` -mc admin heal -r myminio/mybucket -``` - -*Example: Heal MinIO cluster on a specific object prefix recursively, where 'myminio' is the MinIO server alias.* - -``` -mc admin heal -r myminio/mybucket/myobjectprefix -``` - -*Example: Show the status of the self-healing process in a MinIO cluster.* - -``` -mc admin heal myminio/ -``` +Healing is automatic on server side which runs on a continuous basis on a low priority thread, `mc admin heal` is deprecated and will be removed in future. ### Command `profile` - generate profile data for debugging purposes