Skip to content

Commit 23d3c6d

Browse files
committed
feat(setting): remove ValueIntRangeMaximum of v2-data-engine-guaranteed-instance-manager-cpu
Longhorn 10662 Signed-off-by: Derek Su <[email protected]>
1 parent c396e03 commit 23d3c6d

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

types/setting.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -1379,7 +1379,7 @@ var (
13791379
Description: "Number of millicpus on each node to be reserved for each instance manager pod when the V2 Data Engine is enabled. The Storage Performance Development Kit (SPDK) target daemon within each instance manager pod uses 1 or multiple CPU cores. Configuring a minimum CPU usage value is essential for maintaining engine and replica stability, especially during periods of high node workload. \n\n" +
13801380
"WARNING: \n\n" +
13811381
" - Value 0 means unsetting CPU requests for instance manager pods for v2 data engine. \n\n" +
1382-
" - This integer value is range from 1000 to 8000. \n\n" +
1382+
" - The smallest acceptable integer value is 1000. \n\n" +
13831383
" - After this setting is changed, the v2 instance manager pod using this global setting will be automatically restarted without instances running on the v2 instance manager. \n\n",
13841384
Category: SettingCategoryDangerZone,
13851385
Type: SettingTypeInt,
@@ -1388,7 +1388,6 @@ var (
13881388
Default: "1250",
13891389
ValueIntRange: map[string]int{
13901390
ValueIntRangeMinimum: 1000,
1391-
ValueIntRangeMaximum: 8000,
13921391
},
13931392
}
13941393

types/types.go

+2-3
Original file line numberDiff line numberDiff line change
@@ -1208,9 +1208,8 @@ func ValidateCPUReservationValues(settingName SettingName, instanceManagerCPUStr
12081208
switch settingName {
12091209
case SettingNameGuaranteedInstanceManagerCPU, SettingNameV2DataEngineGuaranteedInstanceManagerCPU:
12101210
isUnderLimit := instanceManagerCPU < valueIntRange[ValueIntRangeMinimum]
1211-
isOverLimit := instanceManagerCPU > valueIntRange[ValueIntRangeMaximum]
1212-
if isUnderLimit || isOverLimit {
1213-
return fmt.Errorf("invalid requested instance manager CPUs. Valid instance manager CPU range between %v - %v millicpu", valueIntRange[ValueIntRangeMinimum], valueIntRange[ValueIntRangeMaximum])
1211+
if isUnderLimit {
1212+
return fmt.Errorf("invalid requested instance manager CPUs. Valid instance manager CPU range is larger than %v millicpu", valueIntRange[ValueIntRangeMinimum])
12141213
}
12151214
}
12161215
return nil

0 commit comments

Comments
 (0)