#542 closed defect (fixed)

key-generator dones't work anymore

Reported by: warner Owned by: somebody
Priority: major Milestone: 1.3.0
Component: code Version: 1.2.0
Keywords: Cc:
Launchpad Bug:

Description

Jan-Benedict Glaw noticed that the key-generator no longer works:

% ./bin/tahoe create-key-generator -C kg
% ./bin/tahoe start -C kg

  File "tahoe-key-generator.tac", line 7, in <module>
    k = key_generator.KeyGeneratorService(2048)
  File "src/allmydata/key_generator.py", line 82, in __init__
    self.tub = foolscap.Tub(certFile=os.path.join(self.basedir, 'key_generator.pem'))
  File "/usr/lib/python2.5/posixpath.py", line 62, in join
    elif path == '' or path.endswith('/'):
exceptions.AttributeError: 'int' object has no attribute 'endswith'

Looks like the .tac file is being created with an obsolete key-length argument, which is being interpreted as a basedir.

Change History (3)

comment:1 Changed at 2008-12-01T13:16:46Z by zooko

Do we need it? If we don't, then let's remove it rather than leave it there, broken, so that its presence won't waste the time of people like Jan-Benedict.

comment:2 Changed at 2008-12-01T22:45:10Z by warner

Yes, we do. We don't have DSA keys yet, and we haven't done anything to speed up RSA key generation for a long time. As best I can tell, the prodnet key generator was using 10-20% of a core in september (before the number dropped to zero, possible because it was somehow broken, or not started), which is time that would have to be spent (blocking) in the webapi node if there were no helper.

It would be nice to be able to provide a more objective argument. We don't have any automated client-experience instrumentation: if we did, we could turn the helper on and off and then watch how long a typical user must wait to create a directory with and without it, and then say "to save each user an average of 1.5 seconds per directory creation, it is worth having this code in place, and fixing it". As it stands, I can only claim that it is likely to save each user an average of 700ms (the SSK-creation time as measured by http://allmydata.org/tahoe-figleaf-graph/hanford.allmydata.com-tahoe_speedstats_SSK_creation.html), and therefore is worth having this code in place and fixing it.

Note that the prodnet key generator is still working because its .tac file was created before this bug was introduced.

When we get DSA dirnodes, I'll be happy to rip out the key-generator.

comment:3 Changed at 2008-12-01T23:48:24Z by warner

  • Milestone changed from undecided to 1.3.0
  • Resolution set to fixed
  • Status changed from new to closed

Fixed, in 71c62f8fcb823eb5.

Note: See TracTickets for help on using tickets.