Merge pull request #15942 from ioito/hotfix/qx-aws-s3-upload

fix(region): aws s3 upload failed
This commit is contained in:
Zexi Li
2023-02-14 18:03:46 +08:00
committed by GitHub
5 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -81,7 +81,7 @@ require (
k8s.io/client-go v0.19.3
k8s.io/cluster-bootstrap v0.19.3
moul.io/http2curl/v2 v2.3.0
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20230214035626-b21c5c4aeb73
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20230214091640-428e1d10455b
yunion.io/x/executor v0.0.0-20211018100936-39a2cd966656
yunion.io/x/jsonutils v1.0.1-0.20220819091305-3bab322ab4fd
yunion.io/x/log v1.0.0
+2 -2
View File
@@ -1158,8 +1158,8 @@ sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q=
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20230214035626-b21c5c4aeb73 h1:YB51ifEQQ17JsLGVVcUYKJjZ6AJ0GFuzkB4siXGvRAc=
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20230214035626-b21c5c4aeb73/go.mod h1:yEMFtIKPyIdIfPzsw7oTcH41JXc8G5StUAQw3ZoGj5I=
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20230214091640-428e1d10455b h1:9PLPqwmPvneJsh9KCNWzj7DK6jHMSex9GRjKRoCyJXE=
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20230214091640-428e1d10455b/go.mod h1:yEMFtIKPyIdIfPzsw7oTcH41JXc8G5StUAQw3ZoGj5I=
yunion.io/x/executor v0.0.0-20211018100936-39a2cd966656 h1:0zlZD5uhZoIHgLVAWCz2aHaYk2ZrNsACCYD7R6EIBII=
yunion.io/x/executor v0.0.0-20211018100936-39a2cd966656/go.mod h1:Uxuou9WQIeJXNpy7t2fPLL0BYLvLiMvGQwY7Qc6aSws=
yunion.io/x/jsonutils v0.0.0-20190625054549-a964e1e8a051/go.mod h1:4N0/RVzsYL3kH3WE/H1BjUQdFiWu50JGCFQuuy+Z634=
+1 -1
View File
@@ -1439,7 +1439,7 @@ sigs.k8s.io/structured-merge-diff/v4/value
# sigs.k8s.io/yaml v1.2.0
## explicit; go 1.12
sigs.k8s.io/yaml
# yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20230214035626-b21c5c4aeb73
# yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20230214091640-428e1d10455b
## explicit; go 1.18
yunion.io/x/cloudmux/pkg/apis
yunion.io/x/cloudmux/pkg/apis/billing
+1 -1
View File
@@ -244,7 +244,7 @@ func (client *SAwsClient) getAwsSession(regionId string, assumeRole bool) (*sess
transport, _ := httpClient.Transport.(*http.Transport)
httpClient.Transport = cloudprovider.GetCheckTransport(transport, func(req *http.Request) (func(resp *http.Response), error) {
var action string
if req.ContentLength > 0 {
if req.ContentLength > 0 && !strings.Contains(req.URL.Host, ".s3.") {
body, err := ioutil.ReadAll(req.Body)
if err != nil {
return nil, errors.Wrapf(err, "ioutil.ReadAll")
+1 -1
View File
@@ -183,7 +183,7 @@ func (self *SHuaweiClient) getDefaultClient() *http.Client {
}
if self.cpcfg.ReadOnly {
// get or metric skip read only check
if req.Method == "GET" || strings.HasPrefix(req.URL.Path, "https://ces") {
if req.Method == "GET" || strings.HasPrefix(req.URL.Host, "ces") {
return respCheck, nil
}
return nil, errors.Wrapf(cloudprovider.ErrAccountReadOnly, "%s %s", req.Method, req.URL.Path)