From 43bb829edcf5372b61c3a011c571d69b2d8c4d2e Mon Sep 17 00:00:00 2001 From: wanyaoqi <18528551+wanyaoqi@users.noreply.github.com> Date: Wed, 4 Feb 2026 19:33:28 +0800 Subject: [PATCH] fix(glance): set s3 bucket name before s3 init check (#24236) --- pkg/image/service/service.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkg/image/service/service.go b/pkg/image/service/service.go index 2a0bdbe654..f559ad1970 100644 --- a/pkg/image/service/service.go +++ b/pkg/image/service/service.go @@ -140,6 +140,11 @@ func StartService() { } go func() { + if options.Options.S3BucketName == "" { + options.Options.S3BucketName = DEFAULT_IMAGE_S3_BUCKET + log.Infof("Set s3 bucket name to %s", options.Options.S3BucketName) + } + if options.Options.HasValidS3Options() { initS3() } @@ -199,9 +204,6 @@ func initS3() { } url = prefix + url } - if options.Options.S3BucketName == "" { - options.Options.S3BucketName = DEFAULT_IMAGE_S3_BUCKET - } err := s3.Init( url,