Description
The EC2 driver automatically creates tags for new nodes in create_node(). Rarely, this can fail with an InvalidInstanceID.NotFound error from EC2. This error bubbles up to the create_node caller and prevents the new node information from being returned.
I've seen similar issues before on EC2 when doing a instance query right after a launch. The new node isn't always included in the result, perhaps due to some caching or data propagation issue. I suspect the same thing is happening in the tag creation API. Perhaps the ex_create_tags calls could be wrapped in a try/except with this error logged and ignored.
Here is a stack trace:
File "/home/cc/app-venv/lib/python2.6/site-packages/apache_libcloud-0.5.2-py2.6.egg/libcloud/
compute/drivers/ec2.py", line 862, in create_node self.ex_create_tags(node=node, tags=tags)
File "/home/cc/app-venv/lib/python2.6/site-packages/apache_libcloud-0.5.2-py2.6.egg/libcloud/
compute/drivers/ec2.py", line 672, in ex_create_tags
params=params.copy()).object File "/home/cc/app-venv/lib/python2.6/site-packages/apache_libcloud-0.5.2-py2.6.egg/libcloud/
common/base.py", line 397, in request
response = self.responseCls(self.connection.getresponse())
File "/home/cc/app-venv/lib/python2.6/site-packages/apache_libcloud-0.5.2-py2.6.egg/libcloud/
common/base.py", line 48, in _init_ raise Exception(self.parse_error())
Exception: InvalidInstanceID.NotFound: The instance ID 'i-55c02c12' does not exist
Note that the instance was in fact started.
I also captured the libcloud request/response log and can provide that if needed.