Compare commits
6 Commits
RELEASE.20
...
RELEASE.20
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
61a7434379 | ||
|
|
09f5e29327 | ||
|
|
29edb4ccfe | ||
|
|
197d6fb644 | ||
|
|
d4e565e595 | ||
|
|
1fce2b180f |
27
cmd/main.go
27
cmd/main.go
@@ -20,6 +20,7 @@ package cmd
|
|||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"runtime"
|
||||||
"sort"
|
"sort"
|
||||||
|
|
||||||
"github.com/minio/cli"
|
"github.com/minio/cli"
|
||||||
@@ -68,6 +69,11 @@ var GlobalFlags = []cli.Flag{
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var versionFlag = cli.BoolFlag{
|
||||||
|
Name: "version, v",
|
||||||
|
Usage: "print version information",
|
||||||
|
}
|
||||||
|
|
||||||
// Help template for minio.
|
// Help template for minio.
|
||||||
var minioHelpTemplate = `NAME:
|
var minioHelpTemplate = `NAME:
|
||||||
{{.Name}} - {{.Usage}}
|
{{.Name}} - {{.Usage}}
|
||||||
@@ -132,14 +138,19 @@ func newApp(name string) *cli.App {
|
|||||||
Usage: "show help",
|
Usage: "show help",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
topLevelFlags := make([]cli.Flag, len(GlobalFlags)+1)
|
||||||
|
copy(topLevelFlags, GlobalFlags)
|
||||||
|
topLevelFlags[len(GlobalFlags)] = versionFlag
|
||||||
|
|
||||||
app := cli.NewApp()
|
app := cli.NewApp()
|
||||||
app.Name = name
|
app.Name = name
|
||||||
app.Author = "MinIO, Inc."
|
app.Author = "MinIO, Inc."
|
||||||
app.Version = ReleaseTag
|
app.Action = versionAndHelpAction
|
||||||
app.Usage = "High Performance Object Storage"
|
app.Usage = "High Performance Object Storage"
|
||||||
app.Description = `Build high performance data infrastructure for machine learning, analytics and application data workloads with MinIO`
|
app.Description = `Build high performance data infrastructure for machine learning, analytics and application data workloads with MinIO`
|
||||||
app.Flags = GlobalFlags
|
app.Flags = topLevelFlags
|
||||||
app.HideHelpCommand = true // Hide `help, h` command, we already have `minio --help`.
|
app.HideHelpCommand = true // Hide `help, h` command, we already have `minio --help`.
|
||||||
|
app.HideVersion = true
|
||||||
app.Commands = commands
|
app.Commands = commands
|
||||||
app.CustomAppHelpTemplate = minioHelpTemplate
|
app.CustomAppHelpTemplate = minioHelpTemplate
|
||||||
app.CommandNotFound = func(ctx *cli.Context, command string) {
|
app.CommandNotFound = func(ctx *cli.Context, command string) {
|
||||||
@@ -159,6 +170,18 @@ func newApp(name string) *cli.App {
|
|||||||
return app
|
return app
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func versionAndHelpAction(ctx *cli.Context) {
|
||||||
|
if ctx.IsSet("version") {
|
||||||
|
console.Printf("%s version %s\n", ctx.App.Name, ReleaseTag)
|
||||||
|
console.Printf("commit: %s\n", CommitID)
|
||||||
|
console.Printf("go version: %s\n", runtime.Version())
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
cli.ShowAppHelpAndExit(ctx, 1)
|
||||||
|
}
|
||||||
|
|
||||||
// Main main for minio server.
|
// Main main for minio server.
|
||||||
func Main(args []string) {
|
func Main(args []string) {
|
||||||
// Set the minio app name.
|
// Set the minio app name.
|
||||||
|
|||||||
@@ -3991,14 +3991,21 @@ func (c *SiteReplicationSys) healBucketReplicationConfig(ctx context.Context, ob
|
|||||||
}
|
}
|
||||||
rcfg, _, err := globalBucketMetadataSys.GetReplicationConfig(ctx, bucket)
|
rcfg, _, err := globalBucketMetadataSys.GetReplicationConfig(ctx, bucket)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
_, ok := err.(BucketReplicationConfigNotFound)
|
||||||
|
if !ok {
|
||||||
|
return err
|
||||||
|
}
|
||||||
replMismatch = true
|
replMismatch = true
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate remote targets on current cluster for this bucket
|
if rcfg != nil {
|
||||||
_, apiErr := validateReplicationDestination(ctx, bucket, rcfg, false)
|
// validate remote targets on current cluster for this bucket
|
||||||
if apiErr != noError {
|
_, apiErr := validateReplicationDestination(ctx, bucket, rcfg, false)
|
||||||
replMismatch = true
|
if apiErr != noError {
|
||||||
|
replMismatch = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if replMismatch {
|
if replMismatch {
|
||||||
err := c.PeerBucketConfigureReplHandler(ctx, bucket)
|
err := c.PeerBucketConfigureReplHandler(ctx, bucket)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -1067,10 +1067,13 @@ func waitForHTTPStream(respBody io.ReadCloser, w io.Writer) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
length := binary.LittleEndian.Uint32(tmp[:])
|
length := binary.LittleEndian.Uint32(tmp[:])
|
||||||
_, err = io.CopyBuffer(w, io.LimitReader(respBody, int64(length)), buf)
|
n, err := io.CopyBuffer(w, io.LimitReader(respBody, int64(length)), buf)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
if n != int64(length) {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
continue
|
continue
|
||||||
case 32:
|
case 32:
|
||||||
continue
|
continue
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ version: '3.7'
|
|||||||
|
|
||||||
# Settings and configurations that are common for all containers
|
# Settings and configurations that are common for all containers
|
||||||
x-minio-common: &minio-common
|
x-minio-common: &minio-common
|
||||||
image: quay.io/minio/minio:RELEASE.2022-05-26T05-48-41Z
|
image: quay.io/minio/minio:RELEASE.2022-06-02T16-16-26Z
|
||||||
command: server --console-address ":9001" http://minio{1...4}/data{1...2}
|
command: server --console-address ":9001" http://minio{1...4}/data{1...2}
|
||||||
expose:
|
expose:
|
||||||
- "9000"
|
- "9000"
|
||||||
|
|||||||
2
go.mod
2
go.mod
@@ -43,7 +43,7 @@ require (
|
|||||||
github.com/lib/pq v1.10.4
|
github.com/lib/pq v1.10.4
|
||||||
github.com/miekg/dns v1.1.48
|
github.com/miekg/dns v1.1.48
|
||||||
github.com/minio/cli v1.22.0
|
github.com/minio/cli v1.22.0
|
||||||
github.com/minio/console v0.17.2
|
github.com/minio/console v0.18.0
|
||||||
github.com/minio/csvparser v1.0.0
|
github.com/minio/csvparser v1.0.0
|
||||||
github.com/minio/dperf v0.3.6
|
github.com/minio/dperf v0.3.6
|
||||||
github.com/minio/highwayhash v1.0.2
|
github.com/minio/highwayhash v1.0.2
|
||||||
|
|||||||
4
go.sum
4
go.sum
@@ -611,8 +611,8 @@ github.com/minio/cli v1.22.0 h1:VTQm7lmXm3quxO917X3p+el1l0Ca5X3S4PM2ruUYO68=
|
|||||||
github.com/minio/cli v1.22.0/go.mod h1:bYxnK0uS629N3Bq+AOZZ+6lwF77Sodk4+UL9vNuXhOY=
|
github.com/minio/cli v1.22.0/go.mod h1:bYxnK0uS629N3Bq+AOZZ+6lwF77Sodk4+UL9vNuXhOY=
|
||||||
github.com/minio/colorjson v1.0.2 h1:Em3IM68MTm3h+Oxa0nxrV9VQqDgbxvC5iq5A+pqzDeI=
|
github.com/minio/colorjson v1.0.2 h1:Em3IM68MTm3h+Oxa0nxrV9VQqDgbxvC5iq5A+pqzDeI=
|
||||||
github.com/minio/colorjson v1.0.2/go.mod h1:JWxcL2n8T8JVf+NY6awl6kn5nK49aAzHOeQEM33dL0k=
|
github.com/minio/colorjson v1.0.2/go.mod h1:JWxcL2n8T8JVf+NY6awl6kn5nK49aAzHOeQEM33dL0k=
|
||||||
github.com/minio/console v0.17.2 h1:1S6yYqWAEumwyUiHZM/GGYuzmePes4tsXYzQPqVNr7Y=
|
github.com/minio/console v0.18.0 h1:6SDDYDBqwGPhw930yTSlYWWLoH9Qj/O1mKTXBG51MhM=
|
||||||
github.com/minio/console v0.17.2/go.mod h1:yfF8zcgJtD+KPPFHHD1PMpFbhMnQRY8C7jmsrHBdoRU=
|
github.com/minio/console v0.18.0/go.mod h1:yfF8zcgJtD+KPPFHHD1PMpFbhMnQRY8C7jmsrHBdoRU=
|
||||||
github.com/minio/csvparser v1.0.0 h1:xJEHcYK8ZAjeW4hNV9Zu30u+/2o4UyPnYgyjWp8b7ZU=
|
github.com/minio/csvparser v1.0.0 h1:xJEHcYK8ZAjeW4hNV9Zu30u+/2o4UyPnYgyjWp8b7ZU=
|
||||||
github.com/minio/csvparser v1.0.0/go.mod h1:lKXskSLzPgC5WQyzP7maKH7Sl1cqvANXo9YCto8zbtM=
|
github.com/minio/csvparser v1.0.0/go.mod h1:lKXskSLzPgC5WQyzP7maKH7Sl1cqvANXo9YCto8zbtM=
|
||||||
github.com/minio/dperf v0.3.6 h1:EAe/OEEuFRGRbcGsfV0+2KsQkrmTvh51UOoCd/h4DDI=
|
github.com/minio/dperf v0.3.6 h1:EAe/OEEuFRGRbcGsfV0+2KsQkrmTvh51UOoCd/h4DDI=
|
||||||
|
|||||||
Reference in New Issue
Block a user