Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.9.0
-
None
-
None
Description
When EC2ComputeService.createNodesInGroup method is called it tries to apply tags immediately after instance creation. This results in InvalidInstanceID.NotFound sometimes. This is because of eventual consistency in Amazon APIs as documented at https://docs.aws.amazon.com/AWSEC2/latest/APIReference/query-api-troubleshooting.html :
The following are examples of error codes you may encounter as a result of eventual consistency.
- InvalidInstanceID.NotFound
If you successfully run the RunInstances command, and then immediately run another command using the instance ID that was provided in the response of RunInstances, it may return an InvalidInstanceID.NotFound error. This does not mean the instance does not exist.
A similar issue was reported and fixed in Apache Spark at https://github.com/apache/spark/pull/3986. It was resolved by putting some wait between create instance and tagging code. I think same may be needed here. I am using jclouds 1.9.0 and couldn't see any changes that address this issue in latest code.