[Openstack] Cross-zone instance identifiers in EC2 API - Is it worth the effort?

Ed Leafe ed.leafe at rackspace.com
Fri Jul 8 13:09:35 UTC 2011


On Jul 8, 2011, at 8:02 AM, Soren Hansen wrote:

>> The code to use the first 8 chars of the UUID in the ec2 id was created and working well, but discarded in favor of a more limited approach.
> 
> Why?

	It was felt that using UUIDs as the unique identifier only at zone boundaries, and integer IDs as the unique identifier within a zone would be less risky a change. I felt that the inconsistency was a greater risk, but was overruled.

>> The only issue was the increased likelihood of a duplicate ec2 id, as we'd be limited to only 4 billion of them or so. I thought that it would be fairly straightforward to add code to detect such dupes, and re-generate a new UUID for the instance in that event.
>> 
> How would that work? The frontend gets a reqeust for a new instance,
> it sends it on to the backend that starts handling the request and
> sends back the ID. What then? Either the backend would need to be
> changed to wait for an "yes, I accept this UUID" from the frontend,
> which is unfortunate, or the frontend would have to get the response
> back, go "hm, this collides with an existing ID. Cancel the request,
> and start over." In the latter case, a cost has already been incurred
> by starting up and immediately shutting down the instance.


	No, it would work more like: a new instance is requested, and the host selected. A candidate UUID would be generated and checked for "first 8" uniqueness (I had already added a db method to locate by the first 8 chars of a UUID across nested zones). When an acceptable UUID was generated, it would be passed to the selected host along with the create request. The instance would only have to be created once.



-- Ed Leafe

This email may include confidential information. If you received it in error, please delete it.





More information about the Openstack mailing list