From f7ed9a75baf5b8626f52fcacfca007035fdf4fa5 Mon Sep 17 00:00:00 2001 From: Allan Roger Reid Date: Wed, 10 Apr 2024 09:34:59 -0700 Subject: [PATCH] Allow specifying the local server with env variable _MINIO_SERVER_LOCAL (#19453) * Allow specifying the local server, with env variable _MINIO_SERVER_LOCAL, in systems where the hostname cannot be resolved to local IP * Limit scope of the _MINIO_SERVER_LOCAL solution to only containerized implementations --- cmd/endpoint.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/endpoint.go b/cmd/endpoint.go index c2f397aa0..fa56ffc81 100644 --- a/cmd/endpoint.go +++ b/cmd/endpoint.go @@ -807,7 +807,7 @@ func (p PoolEndpointList) UpdateIsLocal() error { continue } - if endpoint.Host == "" { + if endpoint.Host == "" || (orchestrated && env.Get("_MINIO_SERVER_LOCAL", "") == endpoint.Host) { if !foundLocal { foundLocal = true }