'private/' subdir of BASEDIR should be created during 'tahoe create-alias' and friends #1333

Open
opened 2011-01-20 03:32:33 +00:00 by warner · 6 comments

user 'munderwo' on the IRC channel noticed an exception when they manually deleted their ~/.tahoe directory, then re-created it, then ran tahoe create-alias. It complained that the ~/.tahoe/private directory did not exist, which trying to write aliases.tmp.

I suspect that we create this directory during tahoe create-client, but then assume that it exists later. Instead, if tahoe create-alias notices that it is missing, it should just re-mkdir it.

user 'munderwo' on the IRC channel noticed an exception when they manually deleted their `~/.tahoe` directory, then re-created it, then ran `tahoe create-alias`. It complained that the `~/.tahoe/private` directory did not exist, which trying to write `aliases.tmp`. I suspect that we create this directory during `tahoe create-client`, but then assume that it exists later. Instead, if `tahoe create-alias` notices that it is missing, it should just re-mkdir it.
warner added the
code-nodeadmin
minor
defect
1.8.1
labels 2011-01-20 03:32:33 +00:00
warner added this to the undecided milestone 2011-01-20 03:32:33 +00:00
Author

discussing this on IRC just now, we agreed that both create-alias and add-alias are allowed to require the pre-existence of NODEDIR and NODEDIR/node.url, but both should os.mkdir(NODEDIR/private) when necessary.

It'd be polite if both commands, when faced with a missing NODEDIR or NODEDIR/node.url, were to tell the user (in the error message) that they should create them, rather than throwing a weird exception that's hard to understand. But that's not strictly necessary to resolve this ticket.

The main code changes will go into src/allmydata/scripts/tahoe_add_alias.py. The unit test should probably be added to the end of CreateAlias.test_create in source:src/allmydata/test/test_cli.py , and should clobber private/ and then re-run tahoe create-alias and verify the results (by reading the alias file). It might be a good idea to test add-alias too, which is a bit easier (it doesn't need to talk to an actual node).

discussing this on IRC just now, we agreed that both `create-alias` and `add-alias` are allowed to require the pre-existence of `NODEDIR` and `NODEDIR/node.url`, but both should `os.mkdir(NODEDIR/private)` when necessary. It'd be polite if both commands, when faced with a missing NODEDIR or NODEDIR/node.url, were to tell the user (in the error message) that they should create them, rather than throwing a weird exception that's hard to understand. But that's not strictly necessary to resolve this ticket. The main code changes will go into `src/allmydata/scripts/tahoe_add_alias.py`. The unit test should probably be added to the end of `CreateAlias.test_create` in source:src/allmydata/test/test_cli.py , and should clobber `private/` and then re-run `tahoe create-alias` and verify the results (by reading the alias file). It might be a good idea to test `add-alias` too, which is a bit easier (it doesn't need to talk to an actual node).
Lcstyle commented 2014-09-27 02:14:14 +00:00
Owner

If the issue is still present, I think I can tackle this one, please assign.

If the issue is still present, I think I can tackle this one, please assign.
tahoe-lafs modified the milestone from undecided to 1.12.0 2014-09-27 03:20:26 +00:00
Author

Milestone renamed

Milestone renamed
warner modified the milestone from 1.12.0 to 1.13.0 2016-03-22 05:02:25 +00:00
Author

renaming milestone

renaming milestone
warner modified the milestone from 1.13.0 to 1.14.0 2016-06-28 18:17:14 +00:00

Moving open issues out of closed milestones.

Moving open issues out of closed milestones.
exarkun modified the milestone from 1.14.0 to 1.15.0 2020-06-30 14:45:13 +00:00
Owner

Ticket retargeted after milestone closed

Ticket retargeted after milestone closed
meejah modified the milestone from 1.15.0 to soon 2021-03-30 18:40:19 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: tahoe-lafs/trac-2024-07-25#1333
No description provided.