Skip to content

Commit

Permalink
add formatting message for zones in ordinals (minio#9596)
Browse files Browse the repository at this point in the history
Unlike the message
> Formatting 2 zone, 1 set(s), 6 drives per set.

It is more readable as ordinal
> Formatting 2nd zone, 1 set(s), 6 drives per set.
  • Loading branch information
harshavardhana authored May 14, 2020
1 parent af03093 commit 9c85928
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cmd/prepare-storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (
"sync"
"time"

"github.com/dustin/go-humanize"
xhttp "github.com/minio/minio/cmd/http"
"github.com/minio/minio/cmd/logger"
"github.com/minio/minio/cmd/rest"
Expand Down Expand Up @@ -247,14 +248,15 @@ func connectLoadInitFormats(retryCount int, firstDisk bool, endpoints Endpoints,

// All disks report unformatted we should initialized everyone.
if shouldInitXLDisks(sErrs) && firstDisk {
logger.Info("Formatting %v zone, %v set(s), %v drives per set.",
zoneCount, setCount, drivesPerSet)
logger.Info("Formatting %s zone, %v set(s), %v drives per set.",
humanize.Ordinal(zoneCount), setCount, drivesPerSet)

// Initialize erasure code format on disks
format, err = initFormatXL(GlobalContext, storageDisks, setCount, drivesPerSet, deploymentID)
if err != nil {
return nil, nil, err
}

// Assign globalDeploymentID on first run for the
// minio server managing the first disk
globalDeploymentID = format.ID
Expand Down

0 comments on commit 9c85928

Please sign in to comment.