Security Group patience #189

FinchPowers opened this Issue Dec 17, 2012 · 2 comments


None yet

2 participants


Creating security group @sc-test...
!!! ERROR - InvalidGroup.NotFound: The security group 'sg-12e2d77a' does not exist

We'll need to put some patience there too.

@FinchPowers FinchPowers added a commit to datacratic/StarCluster that referenced this issue Dec 17, 2012
@FinchPowers FinchPowers #189 added patience when creating a security grp a03a6d2
@jtriley jtriley added a commit that closed this issue Dec 29, 2012
@jtriley awsutils: refetch group before calling authorize
In some cases operating on a security group object immediately after
it's been created returns a DNE error due to a race condition in the EC2
API back-end. Updated EasyEC2.create_group to avoid this issue by
waiting until the new group can successfully be refetched via
EasyEC2.get_group_or_none before calling authorize() or returning the
new group to the caller.

closes gh-189
closes gh-190
@jtriley jtriley closed this in a248562 Dec 29, 2012

It's back.

Launching master node (ami: ami-39e97d50, type: t1.micro)...
Creating security group @sc-test...
!!! ERROR - InvalidGroup.NotFound: The security group 'sg-1a141f72' does not exist
Traceback (most recent call last):
File "/home/fmlheureux/workspace/StarCluster/starcluster/", line 257, in main
File "/home/fmlheureux/workspace/StarCluster/starcluster/commands/", line 197, in execute
File "/home/fmlheureux/workspace/StarCluster/starcluster/", line 1572, in start
return self._start(create=create, create_only=create_only)
File "", line 2, in _start
File "/home/fmlheureux/workspace/StarCluster/starcluster/", line 92, in wrap_f
res = func(arg, *kargs)
File "/home/fmlheureux/workspace/StarCluster/starcluster/", line 1587, in _start
File "/home/fmlheureux/workspace/StarCluster/starcluster/", line 1090, in create_cluster
File "/home/fmlheureux/workspace/StarCluster/starcluster/", line 1143, in _create_spot_cluster
File "/home/fmlheureux/workspace/StarCluster/starcluster/", line 824, in create_node
spot_bid=spot_bid, force_flat=force_flat)[0]
File "/home/fmlheureux/workspace/StarCluster/starcluster/", line 856, in create_nodes
cluster_sg =
File "/home/fmlheureux/workspace/StarCluster/starcluster/", line 659, in cluster_group
sg.add_tag(static.VERSION_TAG, str(static.VERSION))
File "/home/fmlheureux/datacratic_starcluster/local/lib/python2.7/site-packages/boto-2.7.0-py2.7.egg/boto/ec2/", line 79, in add_tag
status = self.connection.create_tags([], {key : value})
File "/home/fmlheureux/datacratic_starcluster/local/lib/python2.7/site-packages/boto-2.7.0-py2.7.egg/boto/ec2/", line 3260, in create_tags
return self.get_status('CreateTags', params, verb='POST')
File "/home/fmlheureux/datacratic_starcluster/local/lib/python2.7/site-packages/boto-2.7.0-py2.7.egg/boto/", line 1042, in get_status
raise self.ResponseError(response.status, response.reason, body)
EC2ResponseError: EC2ResponseError: 400 Bad Request
<?xml version="1.0" encoding="UTF-8"?>
InvalidGroup.NotFoundThe security group 'sg-1a141f72' does not exist92c1b816-85d1-49ab-bda2-4b3ddf56f41f


It's now quite clear how it can be possible with the last fix. When I started that cluster, I just had terminated one seconds before. My theory is the following.

  1. delete is called
  2. starting new cluster
  3. create is called
  4. verification works, but because the delete call did not propagated yet
  5. delete propagates
  6. we get the error I just posted because the new create call did not propagate yet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment