Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Patience added when creating placement groups

  • Loading branch information...
commit ce802347222a0f23de71a1e35004ac8c5f60b416 1 parent e140f89
@FinchPowers FinchPowers authored
Showing with 17 additions and 0 deletions.
  1. +17 −0 starcluster/awsutils.py
View
17 starcluster/awsutils.py
@@ -278,6 +278,23 @@ def create_placement_group(self, name):
(name, success))
raise exception.AWSError(
"failed to create placement group '%s'" % name)
+
+ found = False
+ counter = 1
+ while not found:
+ #wait for it to propagate within EC2
+ pgs = self.conn.get_all_placement_groups()
+ for pg in pgs:
+ if pg.name == name:
+ found = True
+ break
+ #not found
+ if counter % 10 == 0:
+ log.info("Still waiting for placement group " + name)
+ log.debug(name + ": Placement group not propagated, sleeping")
+ time.sleep(1)
+ counter += 1
+
return self.get_placement_group(name)
def get_placement_groups(self, filters=None):
Please sign in to comment.
Something went wrong with that request. Please try again.