remove auto-port warning for console-address (#15260)

This commit is contained in:
Harshavardhana 2022-07-08 13:36:41 -07:00 committed by GitHub
parent c2ddcb3b40
commit 913e977c8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 2 additions and 14 deletions

View File

@ -430,7 +430,6 @@ func handleCommonCmdArgs(ctx *cli.Context) {
if err != nil { if err != nil {
logger.FatalIf(err, "Unable to get free port for console on the host") logger.FatalIf(err, "Unable to get free port for console on the host")
} }
globalMinioConsolePortAuto = true
consoleAddr = net.JoinHostPort("", p.String()) consoleAddr = net.JoinHostPort("", p.String())
} }

View File

@ -48,12 +48,6 @@ func printGatewayStartupMessage(apiEndPoints []string, backendType string) {
// Prints documentation message. // Prints documentation message.
printObjectAPIMsg() printObjectAPIMsg()
if globalMinioConsolePortAuto && globalBrowserEnabled {
msg := fmt.Sprintf("\nWARNING: Console endpoint is listening on a dynamic port (%s), please use --console-address \":PORT\" to choose a static port.",
globalMinioConsolePort)
logger.Info(color.RedBold(msg))
}
} }
// Prints common server startup message. Prints credential, region and browser access. // Prints common server startup message. Prints credential, region and browser access.

View File

@ -173,9 +173,8 @@ var (
globalMinioAddr = "" globalMinioAddr = ""
// MinIO default port, can be changed through command line. // MinIO default port, can be changed through command line.
globalMinioPort = GlobalMinioDefaultPort globalMinioPort = GlobalMinioDefaultPort
globalMinioConsolePort = "13333" globalMinioConsolePort = "13333"
globalMinioConsolePortAuto = false
// Holds the host that was passed using --address // Holds the host that was passed using --address
globalMinioHost = "" globalMinioHost = ""

View File

@ -142,10 +142,6 @@ func printServerCommonMsg(apiEndpoints []string) {
} }
printEventNotifiers() printEventNotifiers()
if globalMinioConsolePortAuto && globalBrowserEnabled {
logger.Info(color.RedBold("\nWARNING: Console endpoint is listening on a dynamic port (%s), please use --console-address \":PORT\" to choose a static port.",
globalMinioConsolePort))
}
if globalBrowserEnabled { if globalBrowserEnabled {
consoleEndpointStr := strings.Join(stripStandardPorts(getConsoleEndpoints(), globalMinioConsoleHost), " ") consoleEndpointStr := strings.Join(stripStandardPorts(getConsoleEndpoints(), globalMinioConsoleHost), " ")
logger.Info(color.Blue("Console: ") + color.Bold(fmt.Sprintf("%s ", consoleEndpointStr))) logger.Info(color.Blue("Console: ") + color.Bold(fmt.Sprintf("%s ", consoleEndpointStr)))