mirror of https://github.com/minio/minio.git
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.
|
||||
registerCommand(serverCmd)
|
||||
registerCommand(gatewayCmd) // hidden kept for guiding users.
|
||||
|
||||
// Set up app.
|
||||
cli.HelpFlag = cli.BoolFlag{
|
||||
|
|
|
@ -157,9 +157,17 @@ func connectLoadInitFormats(verboseLogging bool, firstDisk bool, endpoints Endpo
|
|||
for i, err := range errs {
|
||||
if err != nil && !errors.Is(err, errXLBackend) {
|
||||
if errors.Is(err, errDiskNotFound) && verboseLogging {
|
||||
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 {
|
||||
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{
|
||||
Name: "server",
|
||||
Usage: "start object storage server",
|
||||
|
|
Loading…
Reference in New Issue