[Bug 509562] Re: euca-bundle-image returns Odd-length string error
Scott Moser
smoser at canonical.com
Fri Sep 17 17:39:19 BST 2010
The problem was that the euca2ools/__init__.py was doing:
iv = (hex(BN.rand(16 * 8,top=0)))[2:34]
then
unhexlify(iv)
But BN.rand(16*8) is not guaranteed to return a number that is
represented by 32 hex digits. I suspect that the .replace('L','c') was
added to get around this issue. By specifying 'top=0' in the BN.rand
call, we guarantee that the number will have the top bit set.
I've ran the following snippet past i=40,000,000 . Without the fix in
place I never saw it run past 1000.
while True:
i=i+1
try:
uh = unhexlify((hex(BN.rand(16 * 8,top=0)))[2:34])
except KeyboardInterrupt:
print "tried %i times, no failures yet" % i
except:
print "found failure, i=%s, iv=%s len=(%s)" % (i,iv,len(iv))
sys.exit(1)
--
euca-bundle-image returns Odd-length string error
https://bugs.launchpad.net/bugs/509562
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to eucalyptus in ubuntu.
More information about the Ubuntu-server-bugs
mailing list