summaryrefslogtreecommitdiff
path: root/heat/scaling
diff options
context:
space:
mode:
authorZane Bitter <zbitter@redhat.com>2015-08-28 12:11:38 -0400
committerSteve Baker <sbaker@redhat.com>2015-09-07 08:38:13 +1200
commita08262a6b78bc8f9bf46f3fc1b8fbd90a9209499 (patch)
tree75fc203bb9ded7673e02dcfbc268cb0fbbbbef83 /heat/scaling
parent661122c256fa2dc3df7594c9f9151ac2ace3a1b3 (diff)
downloadheat-a08262a6b78bc8f9bf46f3fc1b8fbd90a9209499.tar.gz
Start scaling down in an InstanceGroup rolling update ASAP
When the effective batch size is reduced due to a dwindling number of resources we need to update, we may be able to reduce the size of the group prior to the final batch without violating the minimum number of members we are required to keep in service. This change ensures that any excess nodes are removed as soon as possible. Change-Id: Ic7b9544825a92b8720dcff15fe581038dff43582 Partially-Implements: blueprint scaling-group-common
Diffstat (limited to 'heat/scaling')
-rw-r--r--heat/scaling/rolling_update.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/heat/scaling/rolling_update.py b/heat/scaling/rolling_update.py
index d1305df27..7dec0fd21 100644
--- a/heat/scaling/rolling_update.py
+++ b/heat/scaling/rolling_update.py
@@ -41,10 +41,8 @@ def next_batch(targ_capacity, curr_capacity, num_up_to_date, batch_size,
if num_up_to_date >= efft_min_sz:
new_capacity = targ_capacity
- elif num_up_to_date == 0:
+ else:
new_capacity = max(targ_capacity - efft_bat_sz,
efft_min_sz) + efft_bat_sz
- else:
- new_capacity = curr_capacity
return new_capacity, efft_bat_sz