diff --git a/cmd/admin-replicate-status.go b/cmd/admin-replicate-status.go index ec160189..ab915af3 100644 --- a/cmd/admin-replicate-status.go +++ b/cmd/admin-replicate-status.go @@ -21,12 +21,15 @@ import ( "fmt" "sort" "strings" + "time" + humanize "github.com/dustin/go-humanize" "github.com/fatih/color" "github.com/minio/cli" json "github.com/minio/colorjson" "github.com/minio/madmin-go/v3" "github.com/minio/mc/pkg/probe" + "github.com/minio/minio-go/v7/pkg/replication" "github.com/minio/pkg/console" ) @@ -122,7 +125,9 @@ func (i srStatus) JSON() string { func (i srStatus) String() string { var messages []string - + ms := i.Metrics + q := i.Metrics.Queued + w := i.Metrics.ActiveWorkers // Color palette initialization console.SetColor("Summary", color.New(color.FgWhite, color.Bold)) console.SetColor("SummaryHdr", color.New(color.FgCyan, color.Bold)) @@ -174,7 +179,7 @@ func (i srStatus) String() string { ss := ssMap[dID] switch { case !ss.HasBucket: - details = append(details, fmt.Sprintf("%s Bucket", blankCell)) + details = append(details, fmt.Sprintf("%s ", blankCell)) case ss.OLockConfigMismatch, ss.PolicyMismatch, ss.QuotaCfgMismatch, ss.ReplicationCfgMismatch, ss.TagMismatch: details = append(details, fmt.Sprintf("%s in-sync", crossTickCell)) default: @@ -212,7 +217,7 @@ func (i srStatus) String() string { ss := ssMap[dID] switch { case !ss.HasPolicy: - details = append(details, fmt.Sprintf("%s Policy", blankCell)) + details = append(details, blankCell) case ss.PolicyMismatch: details = append(details, fmt.Sprintf("%s in-sync", crossTickCell)) default: @@ -319,7 +324,86 @@ func (i srStatus) String() string { messages = append(messages, i.getGroupStatusSummary(siteNames, nameIDMap, "Group")...) } + if i.opts.Metrics { + uiFn := func(theme string) func(string) string { + return func(s string) string { + return console.Colorize(theme, s) + } + } + singleTgt := len(ms.Metrics) == 1 + maxui := uiFn("Peak") + avgui := uiFn("Avg") + valueui := uiFn("Value") + messages = append(messages, + console.Colorize("SummaryHdr", "Object replication status:")) + messages = append(messages, console.Colorize("UptimeStr", fmt.Sprintf("Replication status since %s", uiFn("Uptime")(humanize.RelTime(time.Now(), time.Now().Add(time.Duration(ms.Uptime)*time.Second), "", "ago"))))) + // for queue stats + coloredDot := console.Colorize("qStatusOK", dot) + if q.Curr.Count > q.Avg.Count { + coloredDot = console.Colorize("qStatusWarn", dot) + } + + var replicatedCount, replicatedSize int64 + for _, m := range ms.Metrics { + nodeName := m.Endpoint + nodeui := uiFn(getNodeTheme(nodeName)) + messages = append(messages, nodeui(nodeName)) + messages = append(messages, fmt.Sprintf("Replicated: %s objects (%s)", humanize.Comma(int64(m.ReplicatedCount)), valueui(humanize.IBytes(uint64(m.ReplicatedSize))))) + + if singleTgt { // for single target - combine summary section into the target section + messages = append(messages, fmt.Sprintf("Received: %s objects (%s)", humanize.Comma(int64(ms.ReplicaCount)), humanize.IBytes(uint64(ms.ReplicaSize)))) + messages = append(messages, fmt.Sprintf("Queued: %s %s objects, (%s) (%s: %s objects, %s; %s: %s objects, %s)", coloredDot, humanize.Comma(int64(q.Curr.Count)), valueui(humanize.IBytes(uint64(q.Curr.Bytes))), avgui("avg"), + humanize.Comma(int64(q.Avg.Count)), valueui(humanize.IBytes(uint64(q.Avg.Bytes))), maxui("max"), + humanize.Comma(int64(q.Max.Count)), valueui(humanize.IBytes(uint64(q.Max.Bytes))))) + messages = append(messages, fmt.Sprintf("Workers: %s (%s: %s; %s %s) ", humanize.Comma(int64(w.Curr)), avgui("avg"), humanize.Comma(int64(w.Avg)), maxui("max"), humanize.Comma(int64(w.Max)))) + } else { + replicatedCount += m.ReplicatedCount + replicatedSize += m.ReplicatedSize + } + + if m.XferStats != nil { + tgtXfer, ok := m.XferStats[replication.Total] + if ok { + messages = append(messages, fmt.Sprintf("Transfer Rate: %s/s (avg: %s/s; max %s/s)", valueui(humanize.Bytes(uint64(tgtXfer.CurrRate))), valueui(humanize.Bytes(uint64(tgtXfer.AvgRate))), valueui(humanize.Bytes(uint64(tgtXfer.PeakRate))))) + messages = append(messages, fmt.Sprintf("Latency: %s (avg: %s; max %s)", valueui(m.Latency.Curr.Round(time.Millisecond).String()), valueui(m.Latency.Avg.Round(time.Millisecond).String()), valueui(m.Latency.Max.Round(time.Millisecond).String()))) + } + } + + healthDot := console.Colorize("online", dot) + if !m.Online { + healthDot = console.Colorize("offline", dot) + } + currDowntime := time.Duration(0) + if !m.Online && !m.LastOnline.IsZero() { + currDowntime = UTCNow().Sub(m.LastOnline) + } + // normalize because total downtime is calculated at server side at heartbeat interval, may be slightly behind + totalDowntime := m.TotalDowntime + if currDowntime > totalDowntime { + totalDowntime = currDowntime + } + var linkStatus string + if m.Online { + linkStatus = healthDot + fmt.Sprintf(" online (total downtime: %s)", timeDurationToHumanizedDuration(totalDowntime).String()) + } else { + linkStatus = healthDot + fmt.Sprintf(" offline %s (total downtime: %s)", timeDurationToHumanizedDuration(currDowntime).String(), valueui(timeDurationToHumanizedDuration(totalDowntime).String())) + } + messages = append(messages, fmt.Sprintf("Link: %s", linkStatus)) + messages = append(messages, fmt.Sprintf("Errors: %s in last 1 minute; %s in last 1hr; %s since uptime", valueui(humanize.Comma(int64(m.Failed.LastMinute.Count))), valueui(humanize.Comma(int64(m.Failed.LastHour.Count))), valueui(humanize.Comma(int64(m.Failed.Totals.Count))))) + messages = append(messages, "") + } + if !singleTgt { + messages = append(messages, + console.Colorize("SummaryHdr", "Summary:")) + messages = append(messages, fmt.Sprintf("Replicated: %s objects (%s)", humanize.Comma(int64(replicatedCount)), valueui(humanize.IBytes(uint64(replicatedSize))))) + messages = append(messages, fmt.Sprintf("Queued: %s %s objects, (%s) (%s: %s objects, %s; %s: %s objects, %s)", coloredDot, humanize.Comma(int64(q.Curr.Count)), valueui(humanize.IBytes(uint64(q.Curr.Bytes))), avgui("avg"), + humanize.Comma(int64(q.Avg.Count)), valueui(humanize.IBytes(uint64(q.Avg.Bytes))), maxui("max"), + humanize.Comma(int64(q.Max.Count)), valueui(humanize.IBytes(uint64(q.Max.Bytes))))) + + messages = append(messages, fmt.Sprintf("Received: %s objects (%s)", humanize.Comma(int64(ms.ReplicaCount)), humanize.IBytes(uint64(ms.ReplicaSize)))) + } + } return console.Colorize("UserMessage", strings.Join(messages, "\n")) } @@ -443,6 +527,7 @@ func (i srStatus) getBucketStatusSummary(siteNames []string, nameIDMap map[strin } } messages = append(messages, rows...) + return messages } @@ -646,6 +731,7 @@ func srStatusOpts(ctx *cli.Context) (opts madmin.SRStatusOptions) { opts.Users = true opts.Groups = true opts.Policies = true + opts.Metrics = true return } opts.Buckets = ctx.Bool("buckets") @@ -691,6 +777,23 @@ func mainAdminReplicationStatus(ctx *cli.Context) error { console.SetColor("UserMessage", color.New(color.FgGreen)) console.SetColor("WarningMessage", color.New(color.FgYellow)) + for _, c := range colors { + console.SetColor(fmt.Sprintf("Node%d", c), color.New(c, color.Bold)) + } + console.SetColor("Replicated", color.New(color.FgCyan)) + console.SetColor("In-Queue", color.New(color.Bold, color.FgYellow)) + console.SetColor("Avg", color.New(color.FgCyan)) + console.SetColor("Peak", color.New(color.FgYellow)) + console.SetColor("Value", color.New(color.FgWhite, color.Bold)) + + console.SetColor("Current", color.New(color.FgCyan)) + console.SetColor("Uptime", color.New(color.Bold, color.FgWhite)) + console.SetColor("UptimeStr", color.New(color.FgHiWhite)) + + console.SetColor("qStatusWarn", color.New(color.FgYellow, color.Bold)) + console.SetColor("qStatusOK", color.New(color.FgGreen, color.Bold)) + console.SetColor("online", color.New(color.FgGreen, color.Bold)) + console.SetColor("offline", color.New(color.FgRed, color.Bold)) // Get the alias parameter from cli args := ctx.Args() diff --git a/cmd/client-fs.go b/cmd/client-fs.go index 175fb8c2..3fb097bd 100644 --- a/cmd/client-fs.go +++ b/cmd/client-fs.go @@ -1404,8 +1404,8 @@ func (f *fsClient) RemoveReplication(_ context.Context) *probe.Error { } // GetReplicationMetrics - Get replication metrics for a given bucket, not implemented. -func (f *fsClient) GetReplicationMetrics(_ context.Context) (replication.Metrics, *probe.Error) { - return replication.Metrics{}, probe.NewError(APINotImplemented{ +func (f *fsClient) GetReplicationMetrics(_ context.Context) (replication.MetricsV2, *probe.Error) { + return replication.MetricsV2{}, probe.NewError(APINotImplemented{ API: "GetReplicationMetrics", APIType: "filesystem", }) diff --git a/cmd/client-s3.go b/cmd/client-s3.go index bca872f9..0bb765eb 100644 --- a/cmd/client-s3.go +++ b/cmd/client-s3.go @@ -2759,15 +2759,15 @@ func (c *S3Client) SetReplication(ctx context.Context, cfg *replication.Config, } // GetReplicationMetrics - Get replication metrics for a given bucket. -func (c *S3Client) GetReplicationMetrics(ctx context.Context) (replication.Metrics, *probe.Error) { +func (c *S3Client) GetReplicationMetrics(ctx context.Context) (replication.MetricsV2, *probe.Error) { bucket, _ := c.url2BucketAndObject() if bucket == "" { - return replication.Metrics{}, probe.NewError(BucketNameEmpty{}) + return replication.MetricsV2{}, probe.NewError(BucketNameEmpty{}) } - metrics, e := c.api.GetBucketReplicationMetrics(ctx, bucket) + metrics, e := c.api.GetBucketReplicationMetricsV2(ctx, bucket) if e != nil { - return replication.Metrics{}, probe.NewError(e) + return replication.MetricsV2{}, probe.NewError(e) } return metrics, nil } diff --git a/cmd/client.go b/cmd/client.go index 9dc2a53a..0fa9671c 100644 --- a/cmd/client.go +++ b/cmd/client.go @@ -162,7 +162,7 @@ type Client interface { GetReplication(ctx context.Context) (replication.Config, *probe.Error) SetReplication(ctx context.Context, cfg *replication.Config, opts replication.Options) *probe.Error RemoveReplication(ctx context.Context) *probe.Error - GetReplicationMetrics(ctx context.Context) (replication.Metrics, *probe.Error) + GetReplicationMetrics(ctx context.Context) (replication.MetricsV2, *probe.Error) ResetReplication(ctx context.Context, before time.Duration, arn string) (replication.ResyncTargetsInfo, *probe.Error) ReplicationResyncStatus(ctx context.Context, arn string) (rinfo replication.ResyncTargetsInfo, err *probe.Error) diff --git a/cmd/replicate-backlog.go b/cmd/replicate-backlog.go index 2a9923f3..78e76c2d 100644 --- a/cmd/replicate-backlog.go +++ b/cmd/replicate-backlog.go @@ -95,6 +95,27 @@ func checkReplicateBacklogSyntax(ctx *cli.Context) { } } +type replicateMRFMessage struct { + Op string `json:"op"` + Status string `json:"status"` + madmin.ReplicationMRF +} + +func (m replicateMRFMessage) JSON() string { + m.Status = "success" + jsonMessageBytes, e := json.MarshalIndent(m, "", " ") + fatalIf(probe.NewError(e), "Unable to marshal into JSON.") + return string(jsonMessageBytes) +} + +func (m replicateMRFMessage) String() string { + return console.Colorize("", newPrettyTable(" | ", + Field{getNodeTheme(m.ReplicationMRF.NodeName), len(m.ReplicationMRF.NodeName) + 3}, + Field{"Count", 7}, + Field{"Object", -1}, + ).buildRow(m.ReplicationMRF.NodeName, fmt.Sprintf("Retry=%d", m.ReplicationMRF.RetryCount), fmt.Sprintf("%s (%s)", m.ReplicationMRF.Object, m.ReplicationMRF.VersionID))) +} + type replicateBacklogMessage struct { Op string `json:"op"` Diff madmin.DiffInfo `json:"diff,omitempty"` diff --git a/cmd/replicate-status.go b/cmd/replicate-status.go index 997a7900..0f228304 100644 --- a/cmd/replicate-status.go +++ b/cmd/replicate-status.go @@ -23,6 +23,8 @@ import ( "hash/fnv" "math" "sort" + "strings" + "time" humanize "github.com/dustin/go-humanize" "github.com/fatih/color" @@ -32,6 +34,7 @@ import ( "github.com/minio/mc/pkg/probe" "github.com/minio/minio-go/v7/pkg/replication" "github.com/minio/pkg/console" + "github.com/olekukonko/tablewriter" ) var replicateStatusFlags = []cli.Flag{ @@ -40,6 +43,10 @@ var replicateStatusFlags = []cli.Flag{ Usage: "show most recent failures for one or more nodes. Valid values are 'all', or node name", Value: "all", }, + cli.BoolFlag{ + Name: "nodes,n", + Usage: "show replication speed for all nodes", + }, } var replicateStatusCmd = cli.Command{ @@ -60,10 +67,10 @@ FLAGS: {{end}} EXAMPLES: 1. Get server side replication metrics for bucket "mybucket" for alias "myminio". - {{.Prompt}} {{.HelpName}} myminio/mybucket + {{.Prompt}} {{.HelpName}} myminio/mybucket - 2. Get most recent replication failures for bucket "mybucket" for alias "myminio". - {{.Prompt}} {{.HelpName}} --backlog "all" myminio/mybucket + 2. Get replication speed across nodes for bucket "mybucket" for alias "myminio". + {{.Prompt}} {{.HelpName}} --nodes myminio/mybucket `, } @@ -75,12 +82,12 @@ func checkReplicateStatusSyntax(ctx *cli.Context) { } type replicateStatusMessage struct { - Op string `json:"op"` - URL string `json:"url"` - Status string `json:"status"` - ReplicationStatus replication.Metrics `json:"replicationStatus"` - Targets []madmin.BucketTarget `json:"remoteTargets"` - cfg replication.Config `json:"-"` + Op string `json:"op"` + URL string `json:"url"` + Status string `json:"status"` + Metrics replication.MetricsV2 `json:"replicationstats"` + Targets []madmin.BucketTarget `json:"remoteTargets"` + cfg replication.Config `json:"-"` } func (s replicateStatusMessage) JSON() string { @@ -91,23 +98,22 @@ func (s replicateStatusMessage) JSON() string { } func (s replicateStatusMessage) String() string { - if s.ReplicationStatus.FailedSize == 0 && - s.ReplicationStatus.ReplicaSize == 0 && - s.ReplicationStatus.ReplicatedSize == 0 { - return "Replication status not available." + q := s.Metrics.QueueStats + rs := s.Metrics.CurrentStats + + if s.cfg.Empty() { + return "Replication is not configured." } - coloredDot := console.Colorize("Headers", dot) - - maxLen := 15 - var contents [][]string var ( - failCount = s.ReplicationStatus.FailedCount - failedSz = s.ReplicationStatus.FailedSize - replSz = s.ReplicationStatus.ReplicatedSize - replicaSz = s.ReplicationStatus.ReplicaSize + replSz = rs.ReplicatedSize + replCount = rs.ReplicatedCount + replicaCount = rs.ReplicaCount + replicaSz = rs.ReplicaSize + failed = rs.Errors + qs = q.QStats() ) - for arn, st := range s.ReplicationStatus.Stats { // Remove stale ARNs from stats + for arn, st := range rs.Stats { // Remove stale ARNs from stats staleARN := true for _, r := range s.cfg.Rules { if r.Destination.Bucket == arn { @@ -116,79 +122,61 @@ func (s replicateStatusMessage) String() string { } } if staleARN { - failCount -= st.FailedCount - failedSz -= st.FailedSize - replicaSz -= st.ReplicaSize replSz -= st.ReplicatedSize + replCount -= int64(st.ReplicatedCount) } } // normalize stats, avoid negative values - failCount = uint64(math.Max(float64(failCount), 0)) - failedSz = uint64(math.Max(float64(failedSz), 0)) - replicaSz = uint64(math.Max(float64(replicaSz), 0)) replSz = uint64(math.Max(float64(replSz), 0)) - - var rows string - arntheme := []string{"Headers"} - theme := []string{"Failed", "Replicated", "Replica"} - contents = append(contents, []string{"Failed", humanize.IBytes(failedSz), humanize.Comma(int64(failCount))}) - contents = append(contents, []string{"Replicated", humanize.IBytes(replSz), ""}) - contents = append(contents, []string{"Replica", humanize.IBytes(replicaSz), ""}) - var th string - - r := console.Colorize("THeaderBold", newPrettyTable(" | ", - Field{"Summary", 95}, - ).buildRow("Summary: ")) - rows += r - rows += "\n" - hIdx := 0 - for i, row := range contents { - if i%3 == 0 { - if hIdx > 0 { - rows += "\n" - } - hIdx++ - rows += console.Colorize("TgtHeaders", newPrettyTable(" | ", - Field{"Status", 21}, - Field{"Size", maxLen}, - Field{"Count", maxLen}, - ).buildRow("Replication Status ", "Size (Bytes)", "Count")) - rows += "\n" - } - - idx := i % 3 - th = theme[idx] - r := console.Colorize(th, newPrettyTable(" | ", - Field{"Status", 21}, - Field{"Size", maxLen}, - Field{"Count", maxLen}, - ).buildRow(" "+row[0], row[1], row[2])+"\n") - rows += r + if replCount < 0 { + replCount = 0 } + // for queue stats + qtots := rs.QStats + coloredDot := console.Colorize("qStatusOK", dot) + if qtots.Curr.Count > qtots.Avg.Count { + coloredDot = console.Colorize("qStatusWarn", dot) + } + var sb strings.Builder - tgtDetails := make(map[string][][]string) + // Set table header + table := tablewriter.NewWriter(&sb) + table.SetAutoWrapText(false) + table.SetHeaderAlignment(tablewriter.ALIGN_LEFT) + table.SetAlignment(tablewriter.ALIGN_LEFT) + table.SetRowLine(false) + table.SetBorder(false) + table.SetTablePadding("\t") // pad with tabs + + uiFn := func(theme string) func(string) string { + return func(s string) string { + return console.Colorize(theme, s) + } + } + titleui := uiFn("title") + valueui := uiFn("value") + hdrui := uiFn("THeaderBold") + keyui := uiFn("key") + maxui := uiFn("Peak") + avgui := uiFn("Avg") + + addRowF := func(format string, vals ...interface{}) { + s := fmt.Sprintf(format, vals...) + table.Append([]string{s}) + } var arns []string - for arn, st := range s.ReplicationStatus.Stats { - var tgtDetail [][]string - tgtDetail = append(tgtDetail, []string{"Failed", humanize.IBytes(st.FailedSize), humanize.Comma(int64(st.FailedCount))}) - tgtDetail = append(tgtDetail, []string{"Replicated", humanize.IBytes(st.ReplicatedSize), ""}) - tgtDetails[arn] = tgtDetail + for arn := range rs.Stats { arns = append(arns, arn) } sort.Strings(arns) - if len(arns) > 0 { - rows += "\n" - r := console.Colorize("THeaderBold", newPrettyTable(" | ", - Field{"Target statuses", 120}, - ).buildRow("Remote Target Statuses: ")) - rows += r - rows += "\n" - } + addRowF(titleui("Replication status since %s"), humanize.RelTime(time.Now(), time.Now().Add(time.Duration(s.Metrics.Uptime)*time.Second), "", "ago")) + singleTgt := len(arns) == 1 + staleARN := false for i, arn := range arns { - if i > 0 { - rows += "\n" + if i > 0 && !staleARN { + addRowF("\n") } - staleARN := true + staleARN = true for _, r := range s.cfg.Rules { if r.Destination.Bucket == arn { staleARN = false @@ -199,98 +187,119 @@ func (s replicateStatusMessage) String() string { continue // skip historic metrics for deleted targets } var ep string + var tgt madmin.BucketTarget for _, t := range s.Targets { if t.Arn == arn { ep = t.Endpoint + tgt = t break } } - th = arntheme[0] - var hdrStr, hdrDet string - hdrStr = ep - if hdrStr != "" { - hdrDet = console.Colorize("Values", arn) - } else { - hdrStr = arn + nodeName := ep + if nodeName == "" { + nodeName = arn } - r := console.Colorize(th, newPrettyTable(" | ", - Field{"Ep", 100}, - ).buildRow(fmt.Sprintf("%s %s", coloredDot, hdrStr))) - rows += r - rows += "\n" - if hdrDet != "" { - r = console.Colorize("THeader", newPrettyTable(" | ", - Field{"Arn", 100}, - ).buildRow(" "+"ARN: "+hdrDet)) - rows += r - rows += "\n" - bwStat, ok := s.ReplicationStatus.Stats[arn] - if ok { - limit := "N/A" // N/A means cluster bandwidth is not configured - current := "N/A" // N/A means there is - if bwStat.CurrentBandwidthInBytesPerSecond > 0 { - current = humanize.Bytes(uint64(bwStat.CurrentBandwidthInBytesPerSecond * 8)) - current = fmt.Sprintf("%sb/s", current[:len(current)-1]) - } - if bwStat.BandWidthLimitInBytesPerSecond > 0 { - limit = humanize.Bytes(uint64(bwStat.BandWidthLimitInBytesPerSecond * 8)) - limit = fmt.Sprintf("%sb/s", limit[:len(limit)-1]) - } - r = console.Colorize("THeaderBold", newPrettyTable("", - Field{"B/w limit Hdr", 80}, - ).buildRow(" Configured Max Bandwidth (Bps): "+console.Colorize("Values", limit))) - rows += r - rows += "\n" - r = console.Colorize("THeaderBold", newPrettyTable("", - Field{"B/w limit Hdr", 80}, - ).buildRow(" Current Bandwidth (Bps): "+console.Colorize("Values", current))) - rows += r - } - rows += "\n" + nodeui := uiFn(getNodeTheme(nodeName)) + currDowntime := time.Duration(0) + if !tgt.Online && !tgt.LastOnline.IsZero() { + currDowntime = UTCNow().Sub(tgt.LastOnline) } - rows += console.Colorize("TgtHeaders", newPrettyTable(" | ", - Field{"Status", 21}, - Field{"Size", maxLen}, - Field{"Count", maxLen}, - ).buildRow("Replication Status ", "Size (Bytes)", "Count")) - rows += "\n" - - tgtDetail, ok := tgtDetails[arn] + // normalize because total downtime is calculated at server side at heartbeat interval, may be slightly behind + totalDowntime := tgt.TotalDowntime + if currDowntime > totalDowntime { + totalDowntime = currDowntime + } + nodeStr := nodeui(nodeName) + addRowF(nodeui(nodeStr)) + stat, ok := rs.Stats[arn] if ok { - for i, row := range tgtDetail { - idx := i % 2 - th = theme[idx] - r := console.Colorize(th, newPrettyTable(" | ", - Field{"Status", 21}, - Field{"Size", maxLen}, - Field{"Count", maxLen}, - ).buildRow(" "+row[0], row[1], row[2])+"\n") - rows += r - } + addRowF(titleui("Replicated: ")+humanize.Comma(int64(stat.ReplicatedCount))+keyui(" objects")+" (%s", valueui(humanize.IBytes(stat.ReplicatedSize))+")") } + healthDot := console.Colorize("online", dot) + if !tgt.Online { + healthDot = console.Colorize("offline", dot) + } + + var linkStatus string + if tgt.Online { + linkStatus = healthDot + fmt.Sprintf(" online (total downtime: %s)", valueui(timeDurationToHumanizedDuration(totalDowntime).String())) + } else { + linkStatus = healthDot + fmt.Sprintf(" offline %s (total downtime: %s)", valueui(timeDurationToHumanizedDuration(currDowntime).String()), valueui(timeDurationToHumanizedDuration(totalDowntime).String())) + } + if singleTgt { // for single target - combine summary section into the target section + addRowF(titleui("Queued: ") + coloredDot + " " + humanize.Comma(int64(qtots.Curr.Count)) + keyui(" objects, ") + valueui(humanize.IBytes(uint64(qtots.Curr.Bytes))) + + " (" + avgui("avg") + ": " + humanize.Comma(int64(qtots.Avg.Count)) + keyui(" objects, ") + valueui(humanize.IBytes(uint64(qtots.Avg.Bytes))) + + " ; " + maxui("max:") + " " + humanize.Comma(int64(qtots.Max.Count)) + keyui(" objects, ") + valueui(humanize.IBytes(uint64(qtots.Max.Bytes))) + ")") + addRowF(titleui("Workers: ") + valueui(humanize.Comma(int64(qs.Workers.Curr))) + avgui(" (avg: ") + humanize.Comma(int64(qs.Workers.Avg)) + maxui("; max: ") + humanize.Comma(int64(qs.Workers.Max)) + ")") + } + tgtXfer := qs.TgtXferStats[arn][replication.Total] + addRowF(titleui("Transfer Rate: ")+"%s/s ("+keyui("avg: ")+"%s/s"+keyui("; max: ")+"%s/s", valueui(humanize.Bytes(uint64(tgtXfer.CurrRate))), valueui(humanize.Bytes(uint64(tgtXfer.AvgRate))), valueui(humanize.Bytes(uint64(tgtXfer.PeakRate)))) + addRowF(titleui("Latency: ")+"%s ("+keyui("avg: ")+"%s"+keyui("; max: ")+"%s)", valueui(tgt.Latency.Curr.Round(time.Millisecond).String()), valueui(tgt.Latency.Avg.Round(time.Millisecond).String()), valueui(tgt.Latency.Max.Round(time.Millisecond).String())) + + addRowF(titleui("Link: %s"), linkStatus) + addRowF(titleui("Errors: ")+"%s in last 1 minute; %s in last 1hr; %s since uptime", valueui(humanize.Comma(int64(stat.Failed.LastMinute.Count))), valueui(humanize.Comma(int64(stat.Failed.LastHour.Count))), valueui(humanize.Comma(int64(stat.Failed.Totals.Count)))) + + bwStat, ok := rs.Stats[arn] + if ok && bwStat.BandWidthLimitInBytesPerSecond > 0 { + limit := "N/A" // N/A means cluster bandwidth is not configured + current := "N/A" // N/A means cluster bandwidth is not configured + if bwStat.CurrentBandwidthInBytesPerSecond > 0 { + current = humanize.Bytes(uint64(bwStat.CurrentBandwidthInBytesPerSecond * 8)) + current = fmt.Sprintf("%sb/s", current[:len(current)-1]) + } + if bwStat.BandWidthLimitInBytesPerSecond > 0 { + limit = humanize.Bytes(uint64(bwStat.BandWidthLimitInBytesPerSecond * 8)) + limit = fmt.Sprintf("%sb/s", limit[:len(limit)-1]) + } + addRowF(titleui("Configured Max Bandwidth (Bps): ")+"%s"+titleui(" Current Bandwidth (Bps): ")+"%s", valueui(limit), valueui(current)) + } + } - return console.Colorize("replicateStatusMessage", rows) + if !singleTgt { + xfer := qs.XferStats[replication.Total] + addRowF(hdrui("\nSummary:")) + addRowF(titleui("Replicated: ")+humanize.Comma(int64(replCount))+keyui(" objects")+" (%s", valueui(humanize.IBytes(replSz))+")") + addRowF(titleui("Queued: ") + coloredDot + " " + humanize.Comma(int64(qtots.Curr.Count)) + keyui(" objects, ") + valueui(humanize.IBytes(uint64(qtots.Curr.Bytes))) + + " (" + avgui("avg") + ": " + humanize.Comma(int64(qtots.Avg.Count)) + keyui(" objects, ") + valueui(humanize.IBytes(uint64(qtots.Avg.Bytes))) + + " ; " + maxui("max:") + " " + humanize.Comma(int64(qtots.Max.Count)) + keyui(" objects, ") + valueui(humanize.IBytes(uint64(qtots.Max.Bytes))) + ")") + addRowF(titleui("Workers: ") + valueui(humanize.Comma(int64(qs.Workers.Curr))) + avgui(" (avg: ") + humanize.Comma(int64(qs.Workers.Avg)) + maxui("; max: ") + humanize.Comma(int64(qs.Workers.Max)) + ")") + addRowF(titleui("Received: ")+"%s"+keyui(" objects")+" (%s)", humanize.Comma(int64(replicaCount)), valueui(humanize.IBytes(uint64(replicaSz)))) + addRowF(titleui("Transfer Rate: ")+"%s/s"+avgui(" (avg: ")+"%s/s"+maxui("; max: ")+"%s/s)", valueui(humanize.Bytes(uint64(xfer.CurrRate))), valueui(humanize.Bytes(uint64(xfer.AvgRate))), valueui(humanize.Bytes(uint64(xfer.PeakRate)))) + addRowF(titleui("Errors: ")+"%s in last 1 minute; %s in last 1hr; %s since uptime", valueui(humanize.Comma(int64(failed.LastMinute.Count))), valueui(humanize.Comma(int64(failed.LastHour.Count))), valueui(humanize.Comma(int64(failed.Totals.Count)))) + } + + table.Render() + return sb.String() } func mainReplicateStatus(cliCtx *cli.Context) error { ctx, cancelReplicateStatus := context.WithCancel(globalContext) defer cancelReplicateStatus() - console.SetColor("THeader", color.New(color.FgWhite)) - - console.SetColor("Headers", color.New(color.Bold, color.FgGreen)) - console.SetColor("Values", color.New(color.FgGreen)) - console.SetColor("THeaderBold", color.New(color.FgWhite)) - - console.SetColor("TgtHeaders", color.New(color.Bold, color.FgCyan)) + console.SetColor("title", color.New(color.FgCyan)) + console.SetColor("value", color.New(color.FgWhite, color.Bold)) + console.SetColor("key", color.New(color.FgWhite)) + console.SetColor("THeaderBold", color.New(color.Bold, color.FgWhite)) console.SetColor("Replica", color.New(color.FgCyan)) console.SetColor("Failed", color.New(color.Bold, color.FgRed)) - console.SetColor("Object", color.New(color.FgWhite)) - console.SetColor("Count", color.New(color.FgWhite)) for _, c := range colors { console.SetColor(fmt.Sprintf("Node%d", c), color.New(c)) } + console.SetColor("Replicated", color.New(color.FgCyan)) + console.SetColor("In-Queue", color.New(color.Bold, color.FgYellow)) + console.SetColor("Avg", color.New(color.FgCyan)) + console.SetColor("Peak", color.New(color.FgYellow)) + console.SetColor("Current", color.New(color.FgCyan)) + console.SetColor("Uptime", color.New(color.FgWhite)) + console.SetColor("qStatusWarn", color.New(color.FgYellow, color.Bold)) + console.SetColor("qStatusOK", color.New(color.FgGreen, color.Bold)) + console.SetColor("online", color.New(color.FgGreen, color.Bold)) + console.SetColor("offline", color.New(color.FgRed, color.Bold)) + + for _, c := range colors { + console.SetColor(fmt.Sprintf("Node%d", c), color.New(color.Bold, c)) + } checkReplicateStatusSyntax(cliCtx) // Get the alias parameter from cli @@ -304,20 +313,6 @@ func mainReplicateStatus(cliCtx *cli.Context) error { fatalIf(cerr, "Unable to initialize admin connection.") _, sourceBucket := url2Alias(args[0]) - if cliCtx.IsSet("backlog") { - mrfCh := admClient.BucketReplicationMRF(ctx, sourceBucket, cliCtx.String("backlog")) - for mrf := range mrfCh { - if mrf.Err != "" { - fatalIf(probe.NewError(fmt.Errorf("%s", mrf.Err)), "Unable to fetch replication backlog.") - } - printMsg(replicateMRFMessage{ - Op: cliCtx.Command.Name, - Status: "success", - ReplicationMRF: mrf, - }) - } - return nil - } replicateStatus, err := client.GetReplicationMetrics(ctx) fatalIf(err.Trace(args...), "Unable to get replication status") targets, e := admClient.ListRemoteTargets(globalContext, sourceBucket, "") @@ -325,36 +320,88 @@ func mainReplicateStatus(cliCtx *cli.Context) error { cfg, err := client.GetReplication(ctx) fatalIf(err.Trace(args...), "Unable to fetch replication configuration.") + if cliCtx.IsSet("nodes") { + printMsg(replicateXferMessage{ + Op: cliCtx.Command.Name, + Status: "success", + ReplQueueStats: replicateStatus.QueueStats, + }) + return nil + } + printMsg(replicateStatusMessage{ - Op: cliCtx.Command.Name, - URL: aliasedURL, - ReplicationStatus: replicateStatus, - Targets: targets, - cfg: cfg, + Op: cliCtx.Command.Name, + URL: aliasedURL, + Metrics: replicateStatus, + Targets: targets, + cfg: cfg, }) return nil } -type replicateMRFMessage struct { +type replicateXferMessage struct { Op string `json:"op"` Status string `json:"status"` - madmin.ReplicationMRF + replication.ReplQueueStats } -func (m replicateMRFMessage) JSON() string { +func (m replicateXferMessage) JSON() string { m.Status = "success" jsonMessageBytes, e := json.MarshalIndent(m, "", " ") fatalIf(probe.NewError(e), "Unable to marshal into JSON.") return string(jsonMessageBytes) } -func (m replicateMRFMessage) String() string { - return console.Colorize("", newPrettyTable(" | ", - Field{getNodeTheme(m.ReplicationMRF.NodeName), len(m.ReplicationMRF.NodeName) + 3}, - Field{"Count", 7}, - Field{"Object", -1}, - ).buildRow(m.ReplicationMRF.NodeName, fmt.Sprintf("Retry=%d", m.ReplicationMRF.RetryCount), fmt.Sprintf("%s (%s)", m.ReplicationMRF.Object, m.ReplicationMRF.VersionID))) +func (m replicateXferMessage) String() string { + var rows []string + maxLen := 0 + + for _, rqs := range m.ReplQueueStats.Nodes { + if len(rqs.NodeName) > maxLen { + maxLen = len(rqs.NodeName) + } + lrgX := rqs.XferStats[replication.Large] + smlX := rqs.XferStats[replication.Small] + rows = append(rows, console.Colorize("", newPrettyTable(" | ", + Field{getNodeTheme(rqs.NodeName), len(rqs.NodeName) + 3}, + Field{"Uptime:", 15}, + Field{"Lbl", 25}, + Field{"Avg", 12}, + Field{"Peak", 12}, + Field{"Current", 12}, + Field{"Workers", 10}, + ).buildRow(rqs.NodeName, humanize.RelTime(time.Now(), time.Now().Add(time.Duration(rqs.Uptime)*time.Second), "", ""), "Large Objects (>=128 MiB)", fmt.Sprintf("%s/s", humanize.Bytes(uint64(lrgX.AvgRate))), fmt.Sprintf("%s/s", humanize.Bytes(uint64(lrgX.PeakRate))), fmt.Sprintf("%s/s", humanize.Bytes(uint64(lrgX.CurrRate))), fmt.Sprintf("%d", int(rqs.Workers.Avg))))) + + rows = append(rows, console.Colorize("", newPrettyTable(" | ", + Field{getNodeTheme(rqs.NodeName), len(rqs.NodeName) + 3}, + Field{"Uptime:", 15}, + Field{"Lbl", 25}, + Field{"Avg", 12}, + Field{"Peak", 12}, + Field{"Current", 12}, + Field{"Workers", 10}, + ).buildRow(rqs.NodeName, humanize.RelTime(time.Now(), time.Now().Add(time.Duration(rqs.Uptime)*time.Second), "", ""), "Small Objects (<128 MiB)", fmt.Sprintf("%s/s", humanize.Bytes(uint64(smlX.AvgRate))), fmt.Sprintf("%s/s", humanize.Bytes(uint64(smlX.PeakRate))), fmt.Sprintf("%s/s", humanize.Bytes(uint64(smlX.CurrRate))), fmt.Sprintf("%d", int(rqs.Workers.Avg))))) + } + + hdrSlc := []string{ + console.Colorize("THeaderBold", newPrettyTable(" | ", + Field{"", maxLen + 3}, + Field{"Uptime:", 15}, + Field{"Lbl", 25}, + Field{"XferRate", 42}, + Field{"Workers", 12}).buildRow("Node Name", "Uptime", "Label", " Transfer Rate ", "Workers")), + console.Colorize("THeaderBold", newPrettyTable(" | ", + Field{"", maxLen + 3}, + Field{"Uptime:", 15}, + Field{"Lbl", 25}, + Field{"Avg", 12}, + Field{"Peak", 12}, + Field{"Current", 12}, + Field{"Workers", 10}).buildRow("", "", "", "Avg", "Peak", "Current", "")), + } + + return strings.Join(append(hdrSlc, rows...), "\n") } // colorize node name diff --git a/go.mod b/go.mod index f9e35118..cc8dbf0a 100644 --- a/go.mod +++ b/go.mod @@ -20,7 +20,7 @@ require ( github.com/minio/colorjson v1.0.5 github.com/minio/filepath v1.0.0 github.com/minio/md5-simd v1.1.2 // indirect - github.com/minio/minio-go/v7 v7.0.61 + github.com/minio/minio-go/v7 v7.0.63 github.com/minio/pkg v1.7.5 github.com/minio/selfupdate v0.6.0 github.com/minio/sha256-simd v1.0.1 @@ -33,9 +33,9 @@ require ( github.com/rs/xid v1.5.0 github.com/shirou/gopsutil/v3 v3.23.7 github.com/tidwall/gjson v1.15.0 - golang.org/x/crypto v0.11.0 // indirect - golang.org/x/net v0.12.0 - golang.org/x/text v0.11.0 + golang.org/x/crypto v0.12.0 // indirect + golang.org/x/net v0.14.0 + golang.org/x/text v0.12.0 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c gopkg.in/h2non/filetype.v1 v1.0.5 gopkg.in/yaml.v2 v2.4.0 @@ -47,13 +47,13 @@ require ( github.com/gdamore/tcell/v2 v2.6.0 github.com/golang-jwt/jwt/v4 v4.5.0 github.com/juju/ratelimit v1.0.2 - github.com/minio/madmin-go/v3 v3.0.11 + github.com/minio/madmin-go/v3 v3.0.17 github.com/muesli/reflow v0.3.0 github.com/navidys/tvxwidgets v0.3.0 github.com/olekukonko/tablewriter v0.0.5 github.com/prometheus/client_model v0.4.0 github.com/rivo/tview v0.0.0-20230621164836-6cc0565babaf - golang.org/x/term v0.10.0 + golang.org/x/term v0.11.0 ) require ( @@ -122,7 +122,7 @@ require ( go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.24.0 // indirect golang.org/x/sync v0.3.0 // indirect - golang.org/x/sys v0.10.0 + golang.org/x/sys v0.11.0 google.golang.org/genproto v0.0.0-20230731193218-e0aa005b6bdf // indirect google.golang.org/grpc v1.57.0 // indirect google.golang.org/protobuf v1.31.0 // indirect diff --git a/go.sum b/go.sum index a62c7ecd..1509f1a7 100644 --- a/go.sum +++ b/go.sum @@ -135,12 +135,12 @@ github.com/minio/colorjson v1.0.5 h1:P//d521blE5cKDF5YvsHcpqb9TE8IwCdliSv1naPsgk github.com/minio/colorjson v1.0.5/go.mod h1:Oq6oB83q+sL08u9wx68+91ELf0nV5G4c6l9pQcH5ElI= github.com/minio/filepath v1.0.0 h1:fvkJu1+6X+ECRA6G3+JJETj4QeAYO9sV43I79H8ubDY= github.com/minio/filepath v1.0.0/go.mod h1:/nRZA2ldl5z6jT9/KQuvZcQlxZIMQoFFQPvEXx9T/Bw= -github.com/minio/madmin-go/v3 v3.0.11 h1:7QrZkgbQ5+qTKGy6Nok2A8OgLAcn/lcMYYuSgiZrgBE= -github.com/minio/madmin-go/v3 v3.0.11/go.mod h1:DMXyWO670OXwZNN0v4ZrEodl9oLOcaPJIZhpoHpu7aw= +github.com/minio/madmin-go/v3 v3.0.17 h1:fm3TIMK7hxCpgztO2GHN6Lxq66zYPWlmrS8M9YWvoSE= +github.com/minio/madmin-go/v3 v3.0.17/go.mod h1:B2EgtEGrfWx+AkXv+OAcS6IHwoIJcd1p75QfDPSPd6Q= github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM= -github.com/minio/minio-go/v7 v7.0.61 h1:87c+x8J3jxQ5VUGimV9oHdpjsAvy3fhneEBKuoKEVUI= -github.com/minio/minio-go/v7 v7.0.61/go.mod h1:BTu8FcrEw+HidY0zd/0eny43QnVNkXRPXrLXFuQBHXg= +github.com/minio/minio-go/v7 v7.0.63 h1:GbZ2oCvaUdgT5640WJOpyDhhDxvknAJU2/T3yurwcbQ= +github.com/minio/minio-go/v7 v7.0.63/go.mod h1:Q6X7Qjb7WMhvG65qKf4gUgA5XaiSox74kR1uAEjxRS4= github.com/minio/mux v1.9.0 h1:dWafQFyEfGhJvK6AwLOt83bIG5bxKxKJnKMCi0XAaoA= github.com/minio/mux v1.9.0/go.mod h1:1pAare17ZRL5GpmNL+9YmqHoWnLmMZF9C/ioUCfy0BQ= github.com/minio/pkg v1.7.5 h1:UOUJjewE5zoaDPlCMJtNx/swc1jT1ZR+IajT7hrLd44= @@ -270,8 +270,8 @@ golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWP golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211209193657-4570a0811e8b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= -golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= -golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= +golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= +golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= @@ -287,8 +287,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= -golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= +golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -321,16 +321,17 @@ golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= -golang.org/x/term v0.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= -golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= +golang.org/x/term v0.11.0 h1:F9tnn/DA/Im8nCwm+fX+1/eBwi4qFjRT++MhtVC4ZX0= +golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -338,8 +339,8 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= -golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= +golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=