openstack team mailing list archive
-
openstack team
-
Mailing list archive
-
Message #03030
Re: Cross-zone instance identifiers in EC2 API - Is it worth the effort?
2011/7/8 Ed Leafe <ed.leafe@xxxxxxxxxxxxx>:
> On Jul 7, 2011, at 11:46 AM, Trey Morris wrote:
>> If I had to choose between dropping or truncating UUIDs and failing feature parity with the ec2 api, i'd go with the latter. Pros and cons for UUIDs have already been discussed and decisions made. The EC2 api shouldn't get in the way. A translation layer to sit in between the EC2 and OS APIs would solve this issue without revisiting the UUID argument.
> 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?
> 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.
Also, if instances had already been created through the OpenStack API
and were being queried through the EC2 API, there's no guarantee that
colliding ID's don't already exist. In that case, you need to figure
how to try to make sure that a request asking for that particular ID
always gives a response corresponding to the same actual instance.
This sounds crappy for a distributed system. If you want to perform
the collision check even for intances created through the OpenStack
API, then the reasons for choosing UUID's to begin with are moot.
--
Soren Hansen | http://linux2go.dk/
Ubuntu Developer | http://www.ubuntu.com/
OpenStack Developer | http://www.openstack.org/
Follow ups
References