mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix: remove default values from cmtbound columns (#22157)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
This commit is contained in:
@@ -137,7 +137,7 @@ type SHost struct {
|
||||
// 预留CPU大小
|
||||
CpuReserved int `nullable:"true" default:"0" list:"domain" update:"domain" create:"domain_optional"`
|
||||
// CPU超分比
|
||||
CpuCmtbound float32 `nullable:"true" default:"8" list:"domain" create:"domain_optional"`
|
||||
CpuCmtbound float32 `nullable:"true" list:"domain" create:"domain_optional"`
|
||||
// CPUMicrocode
|
||||
CpuMicrocode string `width:"64" charset:"ascii" nullable:"true" get:"domain" update:"domain" create:"domain_optional"`
|
||||
// CPU架构
|
||||
@@ -148,7 +148,7 @@ type SHost struct {
|
||||
// 预留内存大小
|
||||
MemReserved int `nullable:"true" default:"0" list:"domain" update:"domain" create:"domain_optional"`
|
||||
// 内存超分比
|
||||
MemCmtbound float32 `nullable:"true" default:"1" list:"domain" create:"domain_optional"`
|
||||
MemCmtbound float32 `nullable:"true" list:"domain" create:"domain_optional"`
|
||||
// 页大小
|
||||
PageSizeKB int `nullable:"false" default:"4" list:"domain" update:"domain" create:"domain_optional"`
|
||||
EnableNumaAllocate bool `nullable:"true" default:"false" list:"domain" update:"domain" create:"domain_optional"`
|
||||
|
||||
@@ -88,7 +88,7 @@ type SStorage struct {
|
||||
// example: ssd
|
||||
MediumType string `width:"32" charset:"ascii" nullable:"false" list:"user" update:"domain" create:"domain_required"`
|
||||
// 超售比
|
||||
Cmtbound float32 `nullable:"true" default:"1" list:"domain"`
|
||||
Cmtbound float32 `nullable:"true" list:"domain"`
|
||||
// 存储配置信息
|
||||
StorageConf jsonutils.JSONObject `nullable:"true" get:"domain" list:"domain" update:"domain"`
|
||||
|
||||
@@ -734,9 +734,9 @@ func (self *SStorage) GetUsedCapacity(isReady tristate.TriState) int64 {
|
||||
}
|
||||
}
|
||||
|
||||
func (self *SStorage) GetOvercommitBound() float32 {
|
||||
if self.Cmtbound > 0 {
|
||||
return self.Cmtbound
|
||||
func (storage *SStorage) GetOvercommitBound() float32 {
|
||||
if storage.Cmtbound > 0 {
|
||||
return storage.Cmtbound
|
||||
} else {
|
||||
return options.Options.DefaultStorageOvercommitBound
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user