tahoe create-node writes tcp=tor even for i2p #2860

Closed
opened 2016-12-29 20:10:11 +00:00 by dawuud · 4 comments
dawuud commented 2016-12-29 20:10:11 +00:00
Owner

str4d has found that even without txtorcon installed you can trigger a bug where configuring a storage node via the CLI doesn't work as expected:

tahoe create-node --hide-ip --listen=i2p

tahoe create-client --hide-ip --introducer=i2p:...

these two commands result in the tahoe.cfg being written with:

[connections]
tcp=tor

the subsequent tahoe start command will of course fail.

str4d has found that even without txtorcon installed you can trigger a bug where configuring a storage node via the CLI doesn't work as expected: ``` tahoe create-node --hide-ip --listen=i2p tahoe create-client --hide-ip --introducer=i2p:... ``` these two commands result in the tahoe.cfg being written with: ``` [connections] tcp=tor ``` the subsequent tahoe start command will of course fail.
tahoe-lafs added the
unknown
normal
defect
1.12.0
labels 2016-12-29 20:10:11 +00:00
tahoe-lafs added this to the undecided milestone 2016-12-29 20:10:11 +00:00
tahoe-lafs added
code-nodeadmin
and removed
unknown
labels 2016-12-29 20:12:44 +00:00
tahoe-lafs modified the milestone from undecided to 1.12.1 2016-12-29 20:12:44 +00:00
warner commented 2016-12-29 20:16:51 +00:00
Author
Owner

oh, yeah, create_node.py write_node_config() is Tor-centric here:

    if config["hide-ip"]:
        c.write("[connections]\n")
        c.write("tcp = tor\n")
        c.write("\n")

Earlier (in _CreateBaseOptions.postOptions) we allow either tor or i2p to satisfy --hide-ip.

What if we change that tcp=tor clause to try tor_provider._import_txtorcon(), and if that fails, write out tcp=none ? We can't write out tcp=i2p because I2P doesn't let you connect to normal TCP hints.

oh, yeah, `create_node.py` `write_node_config()` is Tor-centric here: ``` if config["hide-ip"]: c.write("[connections]\n") c.write("tcp = tor\n") c.write("\n") ``` Earlier (in `_CreateBaseOptions.postOptions`) we allow either tor or i2p to satisfy `--hide-ip`. What if we change that tcp=tor clause to try `tor_provider._import_txtorcon()`, and if that fails, write out `tcp=none` ? We can't write out `tcp=i2p` because I2P doesn't let you connect to normal TCP hints.
str4d commented 2016-12-30 16:46:43 +00:00
Author
Owner

That to me seems like a sensible default. Perhaps also the create-node command should print which option it has taken, so the user knows to edit it if they want the other option? Then again, it appears very near the top of tahoe.cfg so it's not hard to spot later.

That to me seems like a sensible default. Perhaps also the `create-node` command should print which option it has taken, so the user knows to edit it if they want the other option? Then again, it appears very near the top of `tahoe.cfg` so it's not hard to spot later.
dawuud commented 2017-01-09 16:27:32 +00:00
Author
Owner
ok i've attempted the fix that warner mentions: <https://github.com/tahoe-lafs/tahoe-lafs/pull/392> <https://github.com/david415/tahoe-lafs/tree/2860.fix_i2p_create_node.0>
Brian Warner <warner@lothar.com> commented 2017-01-11 00:35:09 +00:00
Author
Owner

In 5e1d464/trunk:

Merge branch PR392

closes #392
closes ticket:2860
In [5e1d464/trunk](/tahoe-lafs/trac-2024-07-25/commit/5e1d464a65b58b9d5d9964d99e56713e1a591c08): ``` Merge branch PR392 closes #392 closes ticket:2860 ```
tahoe-lafs added the
fixed
label 2017-01-11 00:35:09 +00:00
Brian Warner <warner@lothar.com> closed this issue 2017-01-11 00:35:09 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

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