Opened at 2016-04-08T08:10:53Z
Last modified at 2016-10-09T06:11:26Z
#2773 closed task
`tahoe create-node` should require `--location`, and not autodetect — at Initial Version
Reported by: | warner | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 1.12.0 |
Component: | code-nodeadmin | Version: | 1.11.0 |
Keywords: | Cc: | ||
Launchpad Bug: |
Description
This splits out the most user-visible aspect of #2491. The create-node commands that create listening nodes should always be told what hostname or IP address(es) to advertise, rather than guessing by using IP-address autodetection functions.
That means the following commands should require a --location= argument:
- create-node (when storage service is enabled)
- create-introducer
- create-key-generator
- create-stats-gatherer
These commands should also accept (but not require) a --port= argument, which says what port the server should listen on. These will be endpoint descriptors, so things like tcp:12345. Both location and port get written into tahoe.cfg. Unlike --location=, --port= is not mandatory, and the code should pick something sensible if it isn't provided.
I'm undecided on what exactly counts as "sensible". One option is just to allocate a free one inside create-node (different for each server). Another is for use to choose a port number for Tahoe servers to listen on (now, in this ticket, maybe register it with IANA or something), and let the option default to that. A third is a hybrid: attempt to listen on the default port during create-node and record that (in tahoe.cfg) if that succeeds, but if it's already claimed by some other process, allocate and record a random one.
Note: if the server is using a Tor "onion service", then the user should not be obligated to figure this out: the --tor option should provision and register the XYZ.onion location automatically. So --location= and --port= should *not* be required (and in fact should probably be rejected) if --tor is active.
But for plain TCP locations, the server should stop trying to figure it out on its own, and have the node-constructing command get this information from the user.