This repository was archived by the owner on Aug 22, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +22
-4
lines changed
Expand file tree Collapse file tree 2 files changed +22
-4
lines changed Original file line number Diff line number Diff line change 3232
3333initialize
3434
35+ MAX_EBS_VOLUME_SIZE=$( get_config_value .limits.max_ebs_volume_size)
3536MAX_LOGICAL_VOLUME_SIZE=$( get_config_value .limits.max_logical_volume_size)
3637MAX_EBS_VOLUME_COUNT=$( get_config_value .limits.max_ebs_volume_count)
3738
@@ -120,13 +121,29 @@ calc_new_size() {
120121 local new_size=150
121122
122123 if [ " $num_devices " -ge " 4" ] && [ " $num_devices " -le " 6" ]; then
123- new_size=300
124+ if [ " $MAX_EBS_VOLUME_SIZE " -ge " 299" ]; then
125+ new_size=300
126+ else
127+ new_size=$MAX_EBS_VOLUME_SIZE
128+ fi
124129 elif [ " $num_devices " -gt " 6" ] && [ " $num_devices " -le " 10" ]; then
125- new_size=1000
130+ if [ " $MAX_EBS_VOLUME_SIZE " -ge " 999" ]; then
131+ new_size=1000
132+ else
133+ new_size=$MAX_EBS_VOLUME_SIZE
134+ fi
126135 elif [ " $num_devices " -gt " 10" ]; then
127- new_size=1500
136+ if [ " $MAX_EBS_VOLUME_SIZE " -ge " 1499" ]; then
137+ new_size=1500
138+ else
139+ new_size=$MAX_EBS_VOLUME_SIZE
140+ fi
128141 else
129- new_size=150
142+ if [ " $MAX_EBS_VOLUME_SIZE " -ge " 149" ]; then
143+ new_size=150
144+ else
145+ new_size=$MAX_EBS_VOLUME_SIZE
146+ fi
130147 fi
131148
132149 echo ${new_size}
Original file line number Diff line number Diff line change 1212 },
1313 "detection_interval" : 1 ,
1414 "limits" : {
15+ "max_ebs_volume_size" : 1500 ,
1516 "max_logical_volume_size" : 8000 ,
1617 "max_ebs_volume_count" : 16
1718 },
You can’t perform that action at this time.
0 commit comments