Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS race conditions in creating/using resources with vpc.py create_iam_profile() #53

Open
dougtoppin opened this issue May 26, 2016 · 0 comments

Comments

@dougtoppin
Copy link
Contributor

I've bumped into another AWS race condition associated with creating the vpc and related resources (train -vk). This is in vpc.py create_iam_profile()

I added a 5 second sleep between each operation and it solved the issue.
I will work up a better approach and eventual PR but just wanted to pass this along.

The error looks like this:

dtoppintest1-dtoppintest1:us-east-1:~$ train -vk
Creating AWS VPC ...
Creating IAM Profile: dtoppintest1-dtoppintest1 ...
Traceback (most recent call last):
  File "/home/train/bin/train", line 111, in <module>
    process()
  File "/home/train/bin/train", line 74, in process
    vpc.create_vpc()
  File "/home/train/train/vpc/vpc.py", line 462, in create_vpc
    create_iam_profile()
  File "/home/train/train/vpc/vpc.py", line 265, in create_iam_profile
    instance_profile = conn.create_instance_profile(IAM_PROFILE)
  File "/usr/local/lib/python2.7/site-packages/boto/iam/connection.py", line 1103,
    in create_instance_profile
    return self.get_response('CreateInstanceProfile', params)
  File "/usr/local/lib/python2.7/site-packages/boto/iam/connection.py", line 85, in get_response
    response = self.make_request(action, params, path, verb)
  File "/usr/local/lib/python2.7/site-packages/boto/connection.py", line 1116, in make_request
    return self._mexe(http_request)
  File "/usr/local/lib/python2.7/site-packages/boto/connection.py", line 1030, in _mexe
    raise ex
socket.gaierror: [Errno -2] Name or service not known
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant