mirror of
https://github.com/minio/minio.git
synced 2025-04-05 04:10:28 -04:00
add a message of removal for gateway and hide the command (#15965)
This commit is contained in:
parent
71954faa3a
commit
6e4acf0504
@ -131,6 +131,7 @@ func newApp(name string) *cli.App {
|
|||||||
|
|
||||||
// Register all commands.
|
// Register all commands.
|
||||||
registerCommand(serverCmd)
|
registerCommand(serverCmd)
|
||||||
|
registerCommand(gatewayCmd) // hidden kept for guiding users.
|
||||||
|
|
||||||
// Set up app.
|
// Set up app.
|
||||||
cli.HelpFlag = cli.BoolFlag{
|
cli.HelpFlag = cli.BoolFlag{
|
||||||
|
@ -157,9 +157,17 @@ func connectLoadInitFormats(verboseLogging bool, firstDisk bool, endpoints Endpo
|
|||||||
for i, err := range errs {
|
for i, err := range errs {
|
||||||
if err != nil && !errors.Is(err, errXLBackend) {
|
if err != nil && !errors.Is(err, errXLBackend) {
|
||||||
if errors.Is(err, errDiskNotFound) && verboseLogging {
|
if errors.Is(err, errDiskNotFound) && verboseLogging {
|
||||||
logger.Error("Unable to connect to %s: %v", endpoints[i], isServerResolvable(endpoints[i], time.Second))
|
if globalEndpoints.NEndpoints() > 1 {
|
||||||
|
logger.Error("Unable to connect to %s: %v", endpoints[i], isServerResolvable(endpoints[i], time.Second))
|
||||||
|
} else {
|
||||||
|
logger.Fatal(err, "Unable to connect to %s: %v", endpoints[i], isServerResolvable(endpoints[i], time.Second))
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
logger.Error("Unable to use the drive %s: %v", endpoints[i], err)
|
if globalEndpoints.NEndpoints() > 1 {
|
||||||
|
logger.Error("Unable to use the drive %s: %v", endpoints[i], err)
|
||||||
|
} else {
|
||||||
|
logger.Fatal(errInvalidArgument, "Unable to use the drive %s: %v", endpoints[i], err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -93,6 +93,20 @@ var ServerFlags = []cli.Flag{
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var gatewayCmd = cli.Command{
|
||||||
|
Name: "gateway",
|
||||||
|
Usage: "start object storage gateway",
|
||||||
|
Hidden: true,
|
||||||
|
Flags: append(ServerFlags, GlobalFlags...),
|
||||||
|
HideHelpCommand: true,
|
||||||
|
Action: gatewayMain,
|
||||||
|
}
|
||||||
|
|
||||||
|
func gatewayMain(ctx *cli.Context) error {
|
||||||
|
logger.Fatal(errInvalidArgument, "Gateway is deprecated, To continue to use Gateway please use releases no later than 'RELEASE.2022-10-24T18-35-07Z'. We recommend all our users to migrate from gateway mode to server mode. Please read https://blog.min.io/deprecation-of-the-minio-gateway/")
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
var serverCmd = cli.Command{
|
var serverCmd = cli.Command{
|
||||||
Name: "server",
|
Name: "server",
|
||||||
Usage: "start object storage server",
|
Usage: "start object storage server",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user