[tahoe-dev] [tahoe-lafs] #1310: If --node-url is present then --node-directory is mostly but not entirely ignored.
tahoe-lafs
trac at tahoe-lafs.org
Fri Jan 21 17:41:41 UTC 2011
#1310: If --node-url is present then --node-directory is mostly but not entirely
ignored.
-----------------------------------+----------------------------------------
Reporter: zooko | Owner: warner
Type: defect | Status: reopened
Priority: major | Milestone: undecided
Component: code-frontend-cli | Version: 1.8.1
Resolution: | Keywords: usability
Launchpad Bug: |
-----------------------------------+----------------------------------------
Comment (by warner):
CLI tools look in {{{--node-directory}}} for things that are generated
by:
* the tahoe client node, to help the CLI tools find the node
* the CLI tools themselves, that they want to retrieve later
At present, the only from-node-to-CLI things are {{{node.url}}}, to find
the webapi port. In the future, I'm considering adding a few more files,
starting with a {{{$NODEDIR/private/control.key}}} which would help a
{{{tahoe webopen --control-panel}}} derive a secret URL that points to
node-control functions, outside the scope of any particular filecap.
Another possibility is an {{{accounting.secret}}}, which would let the
CLI tools create webapi URLs that include authority to use space on a
grid (rather than the ambient authority that currently grants storage
rights to anyone who can talk to the webapi port). Also,
{{{$NODEDIR/private/control.furl}}} could be used by CLI commands that
wanted foolscap-based access (which would be easier for some purposes
than HTTP-based access).
The set of from-CLI-to-CLI things in there currently includes:
* {{{private/aliases}}}: allows "tahoe ls home:" instead of "tahoe ls
URI:DIR2:blahblahblahblahblah"
* {{{private/backupdb.sqlite}}}: used by 'tahoe backup', potentially
'tahoe cp'
I named it {{{--node-directory}}} because you can set it equal to a
tahoe client node's base directory (which is what I usually mean by
"$NODEDIR") and then the CLI tool will correctly find everything it
needs to work without any extra effort on your part (and the secret
things that it writes will go into a well-named directory that's already
{{{chmod go-rwx}}}). And, because {{{--node-directory}}} is consistent
across all tahoe commands, including {{{tahoe create-node}}} and
{{{tahoe start}}}. So you could make a one-line shell script which did
{{{tahoe --node-directory=~/.other $*}}} named {{{othertahoe}}} and use
that for everything and it would Just Work (well, if we fixed the option
parser to look for {{{--node-directory}}} before the command instead of
after).
I've gotta run, I'll come back to this ticket later to chime in about
the proposal. At first glance, {{{--cli-directory}}} does sound more
accurate, but I think the parallelism of {{{--node-directory}}}
everywhere is valuable.
--
Ticket URL: <http://tahoe-lafs.org/trac/tahoe-lafs/ticket/1310#comment:6>
tahoe-lafs <http://tahoe-lafs.org>
secure decentralized storage
More information about the tahoe-dev
mailing list