Skip to content

Commit 00b537a

Browse files
author
Dougal Ballantyne
committed
prepping 0.0.8
1 parent 0d61420 commit 00b537a

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed

cli/cfncluster/cfncluster.py

+21-3
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,16 @@ def get_ec2_instances(stack, config):
141141
temp_resources = []
142142

143143
while True:
144-
resources = cfnconn.describe_stack_resources(stack)
144+
try:
145+
resources = cfnconn.describe_stack_resources(stack)
146+
except boto.exception.BotoServerError as e:
147+
if e.message.endswith("does not exist"):
148+
#sys.stdout.write('\r\n')
149+
print e.message
150+
sys.stdout.flush()
151+
sys.exit(0)
152+
else:
153+
raise e
145154
temp_resources.extend(resources)
146155
if not resources.next_token:
147156
break
@@ -165,7 +174,16 @@ def get_asg_instances(stack, config):
165174
temp_resources = []
166175

167176
while True:
168-
resources = cfnconn.describe_stack_resources(stack)
177+
try:
178+
resources = cfnconn.describe_stack_resources(stack)
179+
except boto.exception.BotoServerError as e:
180+
if e.message.endswith("does not exist"):
181+
#sys.stdout.write('\r\n')
182+
print e.message
183+
sys.stdout.flush()
184+
sys.exit(0)
185+
else:
186+
raise e
169187
temp_resources.extend(resources)
170188
if not resources.next_token:
171189
break
@@ -207,7 +225,7 @@ def status(args):
207225
sys.stdout.write('\rStatus: %s' % status)
208226
sys.stdout.flush()
209227
if not args.nowait:
210-
while ((status != 'CREATE_COMPLETE') and (status != 'UPDATE_COMPLETE')):
228+
while ((status != 'CREATE_COMPLETE') and (status != 'UPDATE_COMPLETE') and (status != 'ROLLBACK_COMPLETE')):
211229
time.sleep(5)
212230
status = cfnconn.describe_stacks(stack)[0].stack_status
213231
events = cfnconn.describe_stack_events(stack)[0]

cli/cfncluster/examples/config

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Default cluster config section.
44
cluster_template = default
55
# Check for updates
6-
update_check = false
6+
update_check = true
77

88
[aws]
99
# This is the AWS credentials section (required).

0 commit comments

Comments
 (0)