diff --git a/pkg/compute/service/influxdb.go b/pkg/compute/service/influxdb.go index b40b840480..352c7f3366 100644 --- a/pkg/compute/service/influxdb.go +++ b/pkg/compute/service/influxdb.go @@ -23,7 +23,7 @@ import ( ) func setInfluxdbRetentionPolicy() error { - urls, err := auth.GetServiceURLs("influxdb", options.Options.Region, "", "internal") + urls, err := auth.GetServiceURLs("influxdb", options.Options.Region, "", "") if err != nil { return err } diff --git a/pkg/hostman/storageman/imagecache_local.go b/pkg/hostman/storageman/imagecache_local.go index cf7037d901..08f90843e7 100644 --- a/pkg/hostman/storageman/imagecache_local.go +++ b/pkg/hostman/storageman/imagecache_local.go @@ -174,7 +174,7 @@ func (l *SLocalImageCache) prepare(ctx context.Context, zone, srcUrl, format str l.consumerCount++ return true, true } - url, err := auth.GetServiceURL("image", "", zone, "public") + url, err := auth.GetServiceURL("image", "", zone, "") if err != nil { log.Errorf("Failed to acquire image %s", err) return false, true diff --git a/pkg/mcclient/auth/auth.go b/pkg/mcclient/auth/auth.go index 08c8812a57..5e637ca48b 100644 --- a/pkg/mcclient/auth/auth.go +++ b/pkg/mcclient/auth/auth.go @@ -210,10 +210,16 @@ func (a *authManager) reAuth() { } func (a *authManager) GetServiceURL(service, region, zone, endpointType string) (string, error) { + if endpointType == "" && globalEndpointType != "" { + endpointType = globalEndpointType + } return a.adminCredential.GetServiceURL(service, region, zone, endpointType) } func (a *authManager) GetServiceURLs(service, region, zone, endpointType string) ([]string, error) { + if endpointType == "" && globalEndpointType != "" { + endpointType = globalEndpointType + } return a.adminCredential.GetServiceURLs(service, region, zone, endpointType) }