mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-19 10:46:58 +08:00
Merge pull request #5811 from yousong/bugfix/yousong-lbagent
region: lbagents: default to using public type endpoint of influxdb
This commit is contained in:
@@ -31,6 +31,7 @@ import (
|
||||
"yunion.io/x/sqlchemy"
|
||||
|
||||
api "yunion.io/x/onecloud/pkg/apis/compute"
|
||||
identity_apis "yunion.io/x/onecloud/pkg/apis/identity"
|
||||
"yunion.io/x/onecloud/pkg/appsrv"
|
||||
"yunion.io/x/onecloud/pkg/cloudcommon/db"
|
||||
"yunion.io/x/onecloud/pkg/cloudcommon/db/lockman"
|
||||
@@ -548,7 +549,8 @@ func joinPath(ep, path string) string {
|
||||
}
|
||||
|
||||
func (bucket *SBucket) getMoreDetails(out api.BucketDetails) api.BucketDetails {
|
||||
s3gwUrl, _ := auth.GetServiceURL("s3gateway", options.Options.Region, "", "public")
|
||||
s3gwUrl, _ := auth.GetServiceURL("s3gateway", options.Options.Region, "", identity_apis.EndpointInterfacePublic)
|
||||
|
||||
if len(s3gwUrl) > 0 {
|
||||
accessUrls := make([]cloudprovider.SBucketAccessUrl, 0)
|
||||
if bucket.AccessUrls != nil {
|
||||
|
||||
@@ -31,6 +31,7 @@ import (
|
||||
|
||||
"yunion.io/x/onecloud/pkg/apis"
|
||||
api "yunion.io/x/onecloud/pkg/apis/compute"
|
||||
identity_apis "yunion.io/x/onecloud/pkg/apis/identity"
|
||||
"yunion.io/x/onecloud/pkg/cloudcommon/db"
|
||||
"yunion.io/x/onecloud/pkg/cloudcommon/validators"
|
||||
"yunion.io/x/onecloud/pkg/compute/options"
|
||||
@@ -250,7 +251,8 @@ func (p *SLoadbalancerAgentParamsTelegraf) Validate(data *jsonutils.JSONDict) er
|
||||
func (p *SLoadbalancerAgentParamsTelegraf) initDefault(data *jsonutils.JSONDict) {
|
||||
if p.InfluxDbOutputUrl == "" {
|
||||
baseOpts := &options.Options
|
||||
u, _ := auth.GetServiceURL("influxdb", baseOpts.Region, "", "")
|
||||
u, _ := auth.GetServiceURL("influxdb", baseOpts.Region, "",
|
||||
identity_apis.EndpointInterfacePublic)
|
||||
p.InfluxDbOutputUrl = u
|
||||
}
|
||||
if p.HaproxyInputInterval == 0 {
|
||||
|
||||
@@ -21,6 +21,7 @@ import (
|
||||
|
||||
"yunion.io/x/log"
|
||||
|
||||
identity_apis "yunion.io/x/onecloud/pkg/apis/identity"
|
||||
"yunion.io/x/onecloud/pkg/appsrv"
|
||||
"yunion.io/x/onecloud/pkg/image/options"
|
||||
"yunion.io/x/onecloud/pkg/mcclient/auth"
|
||||
@@ -80,7 +81,7 @@ func SeedTorrent(torrentpath string, imageId, format string) error {
|
||||
}
|
||||
|
||||
func seedTorrent(torrentpath string, imageId, format string) error {
|
||||
url, err := auth.GetServiceURL("image", options.Options.Region, "", "public")
|
||||
url, err := auth.GetServiceURL("image", options.Options.Region, "", identity_apis.EndpointInterfacePublic)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user