Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use integer comparisons instead of string comparisons in autoscaler config validation #46097

Merged
merged 1 commit into from
May 19, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions cluster/gce/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1203,14 +1203,14 @@ function create-cluster-autoscaler-mig-config() {

# Each MIG must have at least one node, so the min number of nodes
# must be greater or equal to the number of migs.
if [[ ${AUTOSCALER_MIN_NODES} < ${NUM_MIGS} ]]; then
if [[ ${AUTOSCALER_MIN_NODES} -lt ${NUM_MIGS} ]]; then
echo "AUTOSCALER_MIN_NODES must be greater or equal ${NUM_MIGS}"
exit 2
fi

# Each MIG must have at least one node, so the min number of nodes
# must be greater or equal to the number of migs.
if [[ ${AUTOSCALER_MAX_NODES} < ${NUM_MIGS} ]]; then
if [[ ${AUTOSCALER_MAX_NODES} -lt ${NUM_MIGS} ]]; then
echo "AUTOSCALER_MAX_NODES must be greater or equal ${NUM_MIGS}"
exit 2
fi
Expand Down