fix(region): disk througput sync (#25017)

This commit is contained in:
屈轩
2026-06-13 11:54:43 +08:00
committed by GitHub
parent 6126af72d4
commit bf919b8f7a
8 changed files with 21 additions and 4 deletions
+1 -1
View File
@@ -108,7 +108,7 @@ require (
k8s.io/cri-api v0.28.15
k8s.io/klog/v2 v2.90.1
moul.io/http2curl/v2 v2.3.0
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20260609055727-275f3963d64c
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20260613033805-ca0f41989760
yunion.io/x/executor v0.0.0-20260312022053-f538abd2b005
yunion.io/x/jsonutils v1.0.1-0.20250507052344-1abcf4f443b1
yunion.io/x/log v1.0.1-0.20240305175729-7cf2d6cd5a91
+2 -2
View File
@@ -1785,8 +1785,8 @@ sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo=
sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8=
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20260609055727-275f3963d64c h1:XucESU4LflBCCvfiW89YcdG58a0KQ9KPJK/ucFsQcww=
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20260609055727-275f3963d64c/go.mod h1:TbMuTWxcTdyL2Usn+WQdIw0jdlBYO66SzPRY8LZ3Wj0=
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20260613033805-ca0f41989760 h1:2C7wz33wPgvtqBHA9BwrmLRLDPZc9ZGVLrLL0r1A7eo=
yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20260613033805-ca0f41989760/go.mod h1:TbMuTWxcTdyL2Usn+WQdIw0jdlBYO66SzPRY8LZ3Wj0=
yunion.io/x/executor v0.0.0-20260312022053-f538abd2b005 h1:3sWwcjGXGjG9mLBWa7AyLq+QSi0udTAx21pfVQRFMBE=
yunion.io/x/executor v0.0.0-20260312022053-f538abd2b005/go.mod h1:Uxuou9WQIeJXNpy7t2fPLL0BYLvLiMvGQwY7Qc6aSws=
yunion.io/x/jsonutils v0.0.0-20190625054549-a964e1e8a051/go.mod h1:4N0/RVzsYL3kH3WE/H1BjUQdFiWu50JGCFQuuy+Z634=
+4
View File
@@ -1966,6 +1966,9 @@ func (self *SDisk) syncWithCloudDisk(ctx context.Context, userCred mcclient.Toke
if iops := extDisk.GetIops(); iops > 0 {
self.Iops = iops
}
if tp := extDisk.GetThroughput(); tp > 0 {
self.Throughput = tp
}
if extDisk.GetIsAutoDelete() {
self.AutoDelete = true
}
@@ -2047,6 +2050,7 @@ func (manager *SDiskManager) newFromCloudDisk(ctx context.Context, userCred mccl
disk.StorageId = storage.Id
disk.Iops = extDisk.GetIops()
disk.Throughput = extDisk.GetThroughput()
disk.DiskFormat = extDisk.GetDiskFormat()
disk.DiskSize = extDisk.GetDiskSizeMB()
disk.AutoDelete = extDisk.GetIsAutoDelete()
+1 -1
View File
@@ -2603,7 +2603,7 @@ sigs.k8s.io/structured-merge-diff/v4/value
# sigs.k8s.io/yaml v1.3.0
## explicit; go 1.12
sigs.k8s.io/yaml
# yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20260609055727-275f3963d64c
# yunion.io/x/cloudmux v0.3.10-0-alpha.1.0.20260613033805-ca0f41989760
## explicit; go 1.24
yunion.io/x/cloudmux/pkg/apis
yunion.io/x/cloudmux/pkg/apis/billing
+1
View File
@@ -584,6 +584,7 @@ type ICloudDisk interface {
GetFsFormat() string
GetIsNonPersistent() bool
GetIops() int
GetThroughput() int
GetDriver() string
GetCacheMode() string
+4
View File
@@ -78,6 +78,10 @@ func (self *SDisk) GetIops() int {
return self.Iops
}
func (self *SDisk) GetThroughput() int {
return self.Throughput
}
func (self *SDisk) GetGlobalId() string {
return self.VolumeId
}
+4
View File
@@ -46,3 +46,7 @@ func (disk *SDisk) ChangeStorage(ctx context.Context, opts *cloudprovider.Change
func (disk *SDisk) GetDeviceName() string {
return ""
}
func (disk *SDisk) GetThroughput() int {
return 0
}
+4
View File
@@ -143,3 +143,7 @@ func (disk *SDisk) ChangeStorage(ctx context.Context, opts *cloudprovider.Change
func (disk *SDisk) GetDeviceName() string {
return ""
}
func (disk *SDisk) GetThroughput() int {
return 0
}