create-node error when ~/.tahoe already exists #2088
Labels
No Label
0.2.0
0.3.0
0.4.0
0.5.0
0.5.1
0.6.0
0.6.1
0.7.0
0.8.0
0.9.0
1.0.0
1.1.0
1.10.0
1.10.1
1.10.2
1.10a2
1.11.0
1.12.0
1.12.1
1.13.0
1.14.0
1.15.0
1.15.1
1.2.0
1.3.0
1.4.1
1.5.0
1.6.0
1.6.1
1.7.0
1.7.1
1.7β
1.8.0
1.8.1
1.8.2
1.8.3
1.8β
1.9.0
1.9.0-s3branch
1.9.0a1
1.9.0a2
1.9.0b1
1.9.1
1.9.2
1.9.2a1
LeastAuthority.com automation
blocker
cannot reproduce
cloud-branch
code
code-dirnodes
code-encoding
code-frontend
code-frontend-cli
code-frontend-ftp-sftp
code-frontend-magic-folder
code-frontend-web
code-mutable
code-network
code-nodeadmin
code-peerselection
code-storage
contrib
critical
defect
dev-infrastructure
documentation
duplicate
enhancement
fixed
invalid
major
minor
n/a
normal
operational
packaging
somebody else's problem
supercritical
task
trivial
unknown
was already fixed
website
wontfix
worksforme
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Reference: tahoe-lafs/trac-2024-07-25#2088
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I tried to create a node and it says
so i mkdir'ed a new dir and cd'ed into it, still problem.
sent from the GNU 30th Birthday!
I was watching over jbark55's shoulder, and I could tell that he assumed "
create node
" would create a node in the current working directory.So how can we solve this?
Option (a): Make the error message more explicit. It already has the information in it! But maybe redundantly adding the information would have let jbark55 notice the information in the message, like this:
Note that this kind of redundancy-adding is definitely contrary to the preference for succinctness and non-redundancy that Brian has often expressed in the past, so I would hesitate to do this without some kind of approval from Brian. (Zooko goes and adds
brians-opinion-needed
to this ticket.)}}}
Option (b): stop having a default directory for "
tahoe create-node
"! How often do you want to create a node in a default directory, anyway? I don't like defaults in general, and prefer to require people to specify explicitly what they want, even though that is more verbose and more typing. So in Option (b) it would say:This is also somewhat opposed to the principle that the Brian-in-my-head has of conciseness, so I guess we need the real Brian to come back and weigh in. In my opinion, option (b) is fine and we should do it.
Perhaps we should print the usage message on an error? (This is done just by raising
twisted.python.usage.error
with the desired message, instead of directly printing it and exiting.)I'd be ok with option A (the redundant information approach):
Maybe even modifying that last line to say "Please add '-d OTHERDIR' to use a different directory".
I'm not so keen on option B, because it makes the common case more
verbose, in favor of a less-common case. Most users will only ever
deal with a single node, so using a default location like
~/.tahoe
means less typing. If we removed the default, thenevery single tahoe command they typed would need to specify the
basedir (
tahoe -d BASEDIR ls
, etc). I've watched Zooko bewilling to type that much (dude, try typing just "make".. I bet you
can't do it! :-) your fingers are hardwired to include some timing
commands, redirect stdout to one place, stderr to some other place,
etc), but I'm certainly not, and I don't want to impose that burden
on our users.
Only developers (who launch multiple nodes at once, in
self-contained test grids) are likely to need control over the
basedir, and so it's reasonable for them/us to type more to get
that control.
I'm -0 on printing the usage message on error in this particular
case. Having "default ~/.tahoe" on the screen is good, but I fear
that all that usage text will obscure the "this directory wasn't
empty" message, and will make people think that they made some sort
of syntax error in the arguments, rather than a conceptual error
involving the placement/new-ness of the node directory.
create-node problemto create-node error when ~/.tahoe already exists