mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-05-06 21:52:54 +08:00
fix(region): vendor update (#22467)
This commit is contained in:
3
.github/pull_request_template.md
vendored
3
.github/pull_request_template.md
vendored
@@ -13,8 +13,7 @@ If no, just write "NONE".
|
||||
If don't know, write "UNKNOWN", and let the reviewer decide.
|
||||
|
||||
If yes, write the release branches name in the below format and submit the related cherry-pick PR:
|
||||
- release/3.7
|
||||
- release/3.6
|
||||
- release/3.11
|
||||
|
||||
Take a look at "https://www.cloudpods.org/en/docs/contribute/contrib/" to learn how to submit a cherry-pick PR.
|
||||
-->
|
||||
|
||||
2
go.mod
2
go.mod
@@ -93,7 +93,7 @@ require (
|
||||
k8s.io/cri-api v0.22.17
|
||||
k8s.io/klog/v2 v2.20.0
|
||||
moul.io/http2curl/v2 v2.3.0
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20250427034358-3bc982fdaa5f
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20250427071042-3ec467b38f4d
|
||||
yunion.io/x/executor v0.0.0-20241205080005-48f5b1212256
|
||||
yunion.io/x/jsonutils v1.0.1-0.20250406102002-98c9140a9edd
|
||||
yunion.io/x/log v1.0.1-0.20240305175729-7cf2d6cd5a91
|
||||
|
||||
4
go.sum
4
go.sum
@@ -1376,8 +1376,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.20250427034358-3bc982fdaa5f h1:UTu9vgKhS8pmLbmkNmAhLWOAPmje3Sp65BOC7LGxITc=
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20250427034358-3bc982fdaa5f/go.mod h1:FXxAEbdNfWXX9gjME3K2nJhkydHY5EKEUZb+RLEzVwQ=
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20250427071042-3ec467b38f4d h1:RnK6jhPwXRkQUDRL96YV7qeKbGq5zSZ2SQ/T6Jur574=
|
||||
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20250427071042-3ec467b38f4d/go.mod h1:FXxAEbdNfWXX9gjME3K2nJhkydHY5EKEUZb+RLEzVwQ=
|
||||
yunion.io/x/executor v0.0.0-20241205080005-48f5b1212256 h1:kLKQ6zbgPDQflRwoHFAjxNChcbhXIFgsUVLkJwiXu/8=
|
||||
yunion.io/x/executor v0.0.0-20241205080005-48f5b1212256/go.mod h1:Uxuou9WQIeJXNpy7t2fPLL0BYLvLiMvGQwY7Qc6aSws=
|
||||
yunion.io/x/jsonutils v0.0.0-20190625054549-a964e1e8a051/go.mod h1:4N0/RVzsYL3kH3WE/H1BjUQdFiWu50JGCFQuuy+Z634=
|
||||
|
||||
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
@@ -1785,7 +1785,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.20250427034358-3bc982fdaa5f
|
||||
# yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20250427071042-3ec467b38f4d
|
||||
## explicit; go 1.21
|
||||
yunion.io/x/cloudmux/pkg/apis
|
||||
yunion.io/x/cloudmux/pkg/apis/billing
|
||||
|
||||
12
vendor/yunion.io/x/cloudmux/pkg/multicloud/aliyun/instance.go
generated
vendored
12
vendor/yunion.io/x/cloudmux/pkg/multicloud/aliyun/instance.go
generated
vendored
@@ -1027,7 +1027,17 @@ func (region *SRegion) ModifyInstanceChargeType(vmId string, billingType string)
|
||||
Count: 1,
|
||||
Unit: billing.BillingCycleMonth,
|
||||
}
|
||||
region.SetInstanceAutoRenew(vmId, cycle)
|
||||
err = cloudprovider.Wait(time.Second*10, time.Minute*3, func() (bool, error) {
|
||||
err = region.SetInstanceAutoRenew(vmId, cycle)
|
||||
if err != nil {
|
||||
log.Errorf("set auto renew for instance %s error: %v", vmId, err)
|
||||
return false, nil
|
||||
}
|
||||
return true, nil
|
||||
})
|
||||
if err != nil {
|
||||
log.Errorf("set auto renew for %s error: %v", vmId, err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
18
vendor/yunion.io/x/cloudmux/pkg/multicloud/esxi/host.go
generated
vendored
18
vendor/yunion.io/x/cloudmux/pkg/multicloud/esxi/host.go
generated
vendored
@@ -390,20 +390,24 @@ func mask2len(mask string) int8 {
|
||||
}
|
||||
|
||||
func (host *SHost) isVnicAdmin(nic types.HostVirtualNic) bool {
|
||||
return host.isIpAdmin(nic.Spec.Ip.IpAddress)
|
||||
}
|
||||
|
||||
func (host *SHost) isIpAdmin(ip string) bool {
|
||||
if len(host.masterIp) > 0 {
|
||||
if host.masterIp == nic.Spec.Ip.IpAddress {
|
||||
if host.masterIp == ip {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
exist, err := host.manager.IsHostIpExists(nic.Spec.Ip.IpAddress)
|
||||
exist, err := host.manager.IsHostIpExists(ip)
|
||||
if err != nil {
|
||||
log.Errorf("IsHostIpExists %s fail %s", nic.Spec.Ip.IpAddress, err)
|
||||
log.Errorf("IsHostIpExists %s fail %s", ip, err)
|
||||
return false
|
||||
}
|
||||
if exist {
|
||||
host.masterIp = nic.Spec.Ip.IpAddress
|
||||
host.masterIp = ip
|
||||
return true
|
||||
}
|
||||
return false
|
||||
@@ -444,15 +448,11 @@ func (host *SHost) fetchNicInfo(debug bool) []sHostNicInfo {
|
||||
}
|
||||
|
||||
for _, nic := range vnics {
|
||||
gateway := ""
|
||||
if nic.Spec.IpRouteSpec != nil && nic.Spec.IpRouteSpec.IpRouteConfig.GetHostIpRouteConfig() != nil {
|
||||
gateway = nic.Spec.IpRouteSpec.IpRouteConfig.GetHostIpRouteConfig().DefaultGateway
|
||||
}
|
||||
// log.Debugf("vnic %d: %s %#v", i, jsonutils.Marshal(nic), nic)
|
||||
mac := netutils.FormatMacAddr(nic.Spec.Mac)
|
||||
pnic := findHostNicByMac(nicInfoList, mac)
|
||||
if pnic != nil {
|
||||
if len(pnic.IpAddr) > 0 && len(gateway) == 0 {
|
||||
if len(pnic.IpAddr) > 0 && host.isIpAdmin(pnic.IpAddr) {
|
||||
continue
|
||||
}
|
||||
// findMaster = true
|
||||
|
||||
2
vendor/yunion.io/x/cloudmux/pkg/multicloud/esxi/mobase.go
generated
vendored
2
vendor/yunion.io/x/cloudmux/pkg/multicloud/esxi/mobase.go
generated
vendored
@@ -83,7 +83,7 @@ func (self *SManagedObject) fetchPath() []string {
|
||||
func (self *SManagedObject) GetPath() []string {
|
||||
if self.path == nil {
|
||||
self.path = self.fetchPath()
|
||||
log.Errorf("fetch path: %s", self.path)
|
||||
log.Debugf("fetch path: %s", self.path)
|
||||
}
|
||||
return self.path
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user