Commit 918945ac authored by Bozhidar Zhelev's avatar Bozhidar Zhelev

Merge branch 'master' of

parents b8b7d9fe 4173320f
......@@ -125,9 +125,20 @@ class ASG():"No output from instance yet. Trying again in 10 seconds.")
# Wait for remaining instances (if any) to come up too
while len(self.asgs_healthy_instances(inactive_asg)) < scale_to['desired']:
# Gets the actual configured sizes of the inactive ASG
inactive_asg_size = self.get_current_scale(inactive_asg)"'{}' sizes currently set to (min: {}, max: {}, desired: {})".format(inactive_asg, inactive_asg_size['min'], inactive_asg_size['max'], inactive_asg_size['desired']))
# Wait for remaining instances (if any) to come up too (up to 10 minutes = 300 attempts + 1 sec sleep on each attempt)
attempts = 0
max_attempts = 300
while len(self.asgs_healthy_instances(inactive_asg)) < inactive_asg_size['desired'] and attempts != max_attempts:"Waiting for all instances to be healthy ...")
attempts += 1
if attempts == max_attempts:"Max timeout reached without success... Exiting!")
raise exceptions.AkinakaLoggingError"ASG fully healthy. Logging new ASG name to \"inactive_asg.txt\"")
open("inactive_asg.txt", "w").write(inactive_asg)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment