diff options
author | Michael Gundlach <michael.gundlach@rackspace.com> | 2010-10-12 22:43:37 +0000 |
---|---|---|
committer | Tarmac <> | 2010-10-12 22:43:37 +0000 |
commit | d0a55238fdf64a8da51ea1fe328a1a3dc3d17dc7 (patch) | |
tree | aca86d69fe0bce270c9e7b8e1dc6113db380544b /nova/utils.py | |
parent | 8896e712e90330ae42c13367fd79b1a18b56c0a0 (diff) | |
parent | aa92c017ab91d7fb0ec9c2cd5fd420e625ce2dbd (diff) | |
download | nova-d0a55238fdf64a8da51ea1fe328a1a3dc3d17dc7.tar.gz nova-d0a55238fdf64a8da51ea1fe328a1a3dc3d17dc7.tar.xz nova-d0a55238fdf64a8da51ea1fe328a1a3dc3d17dc7.zip |
Revert the conversion to 64-bit ints stored in a PickleType column, because PickleType is incompatible with having a unique constraint.
We moved away from 32 bit ints because of the chance of collision. It turns out the existing code already checked for collisions and retried, so this wasn't an issue.
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)] |