Skip to content

Commit 18802f1

Browse files
committed
ignore shutting-down
1 parent f2a5b9f commit 18802f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ec2/spark_ec2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ def get_instances(group_names):
627627
reservations = conn.get_all_reservations(
628628
filters={"instance.group-name": group_names})
629629
instances = itertools.chain.from_iterable(r.instances for r in reservations)
630-
return [i for i in instances if i.state != "terminated"]
630+
return [i for i in instances if i.state not in ["shutting-down", "terminated"]]
631631

632632
master_instances = get_instances([cluster_name + "-master"])
633633
slave_instances = get_instances([cluster_name + "-slaves"])

0 commit comments

Comments
 (0)