#2860 closed defect (fixed)

tahoe create-node writes tcp=tor even for i2p

Reported by: dawuud Owned by: Brian Warner <warner@…>
Priority: normal Milestone: 1.12.1
Component: code-nodeadmin Version: 1.12.0
Keywords: i2p cli config Cc:
Launchpad Bug:

Description (last modified by warner)

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.

Change History (5)

comment:1 Changed at 2016-12-29T20:12:44Z by warner

  • Component changed from unknown to code-nodeadmin
  • Description modified (diff)
  • Milestone changed from undecided to 1.12.1

comment:2 Changed at 2016-12-29T20:16:51Z by warner

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.

comment:3 Changed at 2016-12-30T16:46:43Z by str4d

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.

comment:5 Changed at 2017-01-11T00:35:09Z by Brian Warner <warner@…>

  • Owner set to Brian Warner <warner@…>
  • Resolution set to fixed
  • Status changed from new to closed

In 5e1d464/trunk:

Merge branch PR392

closes #392
closes ticket:2860

Note: See TracTickets for help on using tickets.