Skip to content

Commit 8b394bf

Browse files
committed
issue-11979 - disabled EC2 metadata service queries to prevent MinIO timeouts in client_manager and object_store
Signed-off-by: Helber Belmiro <[email protected]>
1 parent 9f8b884 commit 8b394bf

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

backend/src/apiserver/client_manager/client_manager.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,6 +1026,11 @@ func buildBlobStorageConfig(ctx context.Context, k8sClient kubernetes.Interface)
10261026
os.Setenv("AWS_REGION", "us-east-1")
10271027
}
10281028

1029+
// Disable EC2 metadata service queries to prevent MinIO initialization timeouts
1030+
// This prevents AWS SDK from trying to contact 169.254.169.254 which can hang for 5-10 seconds
1031+
// Helber - I'm not sure this is needed
1032+
os.Setenv("AWS_EC2_METADATA_DISABLED", "true")
1033+
10291034
// Build configuration for s3 compatible storage (including MinIO)
10301035
var scheme string
10311036
var queryString string

backend/src/v2/objectstore/object_store.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,12 @@ func createS3BucketSession(ctx context.Context, namespace string, sessionInfo *S
258258
if err != nil {
259259
return nil, err
260260
}
261+
262+
// Disable EC2 metadata service queries to prevent MinIO initialization timeouts
263+
// This prevents AWS SDK from trying to contact 169.254.169.254 which can hang for 5-10 seconds
264+
// Helber - I'm not sure this is needed
265+
os.Setenv("AWS_EC2_METADATA_DISABLED", "true")
266+
261267
s3Config, err := config.LoadDefaultConfig(ctx,
262268
config.WithRetryer(func() aws.Retryer {
263269
// Use standard retry logic with exponential backoff for transient S3 connection failures.

0 commit comments

Comments
 (0)