diff options
author | Michael Gundlach <michael.gundlach@rackspace.com> | 2010-10-12 18:27:59 -0400 |
---|---|---|
committer | Michael Gundlach <michael.gundlach@rackspace.com> | 2010-10-12 18:27:59 -0400 |
commit | aa92c017ab91d7fb0ec9c2cd5fd420e625ce2dbd (patch) | |
tree | cb912bfa62fbd9023d87a8e41657a746e13d4e61 /nova/utils.py | |
parent | f97ef73699e060a21ef8e64966f2429ff3dec237 (diff) | |
download | nova-aa92c017ab91d7fb0ec9c2cd5fd420e625ce2dbd.tar.gz nova-aa92c017ab91d7fb0ec9c2cd5fd420e625ce2dbd.tar.xz nova-aa92c017ab91d7fb0ec9c2cd5fd420e625ce2dbd.zip |
Revert 64 bit storage and use 32 bit again. I didn't notice that we verify that randomly created uids don't already exist in the DB, so the chance of collision isn't really an issue until we get to tens of thousands of machines. Even then we should only expect a few retries before finding a free ID.
Diffstat (limited to 'nova/utils.py')
-rw-r--r-- | nova/utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/utils.py b/nova/utils.py index 12afd388f..10b27ffec 100644 --- a/nova/utils.py +++ b/nova/utils.py @@ -128,7 +128,7 @@ def runthis(prompt, cmd, check_exit_code = True): def generate_uid(topic, size=8): if topic == "i": # Instances have integer internal ids. - return random.randint(0, 2**64-1) + return random.randint(0, 2**32-1) else: characters = '01234567890abcdefghijklmnopqrstuvwxyz' choices = [random.choice(characters) for x in xrange(size)] |