Opened 5 months ago

Last modified 2 days ago

#29024 merge_ready task

Add pluggable-transport support to Chutney

Reported by: nickm Owned by: nickm
Priority: Medium Milestone: Tor: 0.4.2.x-final
Component: Core Tor/Chutney Version:
Severity: Normal Keywords: tor-pt, 041-accepted-20190115, network-team-roadmap-2019-Q1Q2, tor-ci, 041-deferred-20190530
Cc: teor, cohosh, phw Actual Points: 1
Parent ID: #29267 Points: 2
Reviewer: teor Sponsor: Sponsor19

Description

We need to make PTs in general, and Snowflake in particular, more reliable and well-tested. On way to do that is with realistic integration tests, using Chutney.

Child Tickets

TicketStatusOwnerSummaryComponent
#30459closednickmLet chutney tell Tor whether a network is supportedCore Tor/Chutney

Change History (27)

comment:1 Changed 5 months ago by gaba

Keywords: tor-pt added

comment:2 Changed 5 months ago by teor

Keywords: 041-proposed-on-roadmap added

Let's review these tickets at the next meeting using our 041-proposed process.
They're on the roadmap, so the review should focus on ticket size and team capacity (and sponsor expectations).

comment:3 Changed 5 months ago by teor

Points: 2

comment:4 Changed 5 months ago by teor

I am interested in doing this ticket in February, or if I take a break from PrivCount in January. I can also work with someone else to make it happen. (Or review their changes.)

comment:5 Changed 5 months ago by teor

Keywords: 041-accepted-20190115 added; 041-proposed-on-roadmap removed

This PT ticket is on the roadmap, we accepted its points estimate in the meeting without discussion.

comment:6 Changed 3 months ago by cohosh

Cc: cohosh added

I put together some very fast and simple integration tests for Snowflake specifically, just to be able to quickly check whether or not our changes to snowflake break anything that will show up in the logs: https://github.com/cohosh/snowbox/commit/c05b1d8eefac3f8acb7a87413cf7d7364d6ab5cb

This was written to run in the Docker-based snowflake test environment, which could potentially be used for CI (and would work quite well with gitlab if we more the repo there).

It's very simple right now: it runs each piece of Snowflake in a docker container and greps the logs for common error messages. Pull requests, advice, or examples of similar tests done for little-t-tor are welcome :)

Last edited 3 months ago by cohosh (previous) (diff)

comment:7 Changed 3 months ago by teor

Keywords: network-team-roadmap-2019-Q1Q2 added

These chutney tickets are on the network team roadmap, or they are required for tickets that are on the network team roadmap.

comment:8 Changed 5 weeks ago by phw

Cc: phw added

comment:9 Changed 5 weeks ago by nickm

Status: I have chutney testing obfs2 via obfs4proxy in a branch called chutney-obfs4.

This is not yet ready for primetime. For example, it cannot test stuff like obfs4 that requires that the bridge be launched before the client is configured, since chutney currently wants to write every torrc before it starts up every tor.

comment:10 Changed 5 weeks ago by nickm

Actual Points: 1
Status: newneeds_review

My branch chutney-obfs4 now supports obfs4 as well. PR at https://github.com/torproject/chutney/pull/29 .

There will be some followup work here to improve test-network.sh, to document all of this better, and to support more PTs, and to make it work with #30459.

To start this network yourself, run these:

# configure and launch everything except the bridge client
CHUTNEY_CONFIG_PHASE=1 ./chutney configure networks/bridges-obfs4
CHUTNEY_LAUNCH_PHASE=1 ./chutney start networks/bridges-obfs4
# wait a moment for the PT to launch
sleep 2
# configure and launch the bridge client.  
CHUTNEY_CONFIG_PHASE=2 ./chutney configure networks/bridges-obfs4
CHUTNEY_LAUNCH_PHASE=2 ./chutney start networks/bridges-obfs4

As noted above, this happens in two phases because the bridge line can't be constructed until the bridge and its PT are running.

comment:11 Changed 5 weeks ago by nickm

Owner: set to nickm
Status: needs_reviewaccepted

comment:12 Changed 5 weeks ago by nickm

Status: acceptedneeds_review

comment:13 Changed 4 weeks ago by nickm

Keywords: tor-ci added

comment:14 Changed 2 weeks ago by nickm

Keywords: 041-deferred-20190530 added

Marking these tickets as deferred from 041.

comment:15 Changed 2 weeks ago by nickm

Milestone: Tor: 0.4.1.x-finalTor: 0.4.2.x-final

comment:16 in reply to:  10 ; Changed 7 days ago by teor

Status: needs_reviewneeds_revision

Replying to nickm:

My branch chutney-obfs4 now supports obfs4 as well. PR at https://github.com/torproject/chutney/pull/29 .

Looks good to me, I had a few minor comments and questions.
I haven't run it yet.

There will be some followup work here to improve test-network.sh, to document all of this better, and to support more PTs, and to make it work with #30459.

Did you want to make those changes in this ticket, or open another ticket?

To start this network yourself, run these:

# configure and launch everything except the bridge client
CHUTNEY_CONFIG_PHASE=1 ./chutney configure networks/bridges-obfs4
CHUTNEY_LAUNCH_PHASE=1 ./chutney start networks/bridges-obfs4
# wait a moment for the PT to launch
sleep 2
# configure and launch the bridge client.  
CHUTNEY_CONFIG_PHASE=2 ./chutney configure networks/bridges-obfs4
CHUTNEY_LAUNCH_PHASE=2 ./chutney start networks/bridges-obfs4

As noted above, this happens in two phases because the bridge line can't be constructed until the bridge and its PT are running.

I wonder if we could expose a better interface to two-phase launches. I guess we can do that in test-network.sh.

comment:17 in reply to:  16 Changed 6 days ago by nickm

Replying to teor:

Replying to nickm:

[...]

There will be some followup work here to improve test-network.sh, to document all of this better, and to support more PTs, and to make it work with #30459.

Did you want to make those changes in this ticket, or open another ticket?

Let's open new tickets for those.

comment:18 in reply to:  16 ; Changed 6 days ago by nickm

Replying to teor:

Replying to nickm:

My branch chutney-obfs4 now supports obfs4 as well. PR at https://github.com/torproject/chutney/pull/29 .

Looks good to me, I had a few minor comments and questions.
I haven't run it yet.

I only saw one comment on the branch; I made a corresponding change, but I don't know if I missed something?

comment:19 Changed 6 days ago by nickm

Status: needs_revisionneeds_review

comment:20 in reply to:  18 Changed 6 days ago by teor

Replying to nickm:

Replying to teor:

Replying to nickm:

My branch chutney-obfs4 now supports obfs4 as well. PR at https://github.com/torproject/chutney/pull/29 .

Looks good to me, I had a few minor comments and questions.
I haven't run it yet.

I only saw one comment on the branch; I made a corresponding change, but I don't know if I missed something?

I don't think so, I think I wrote the rest of my comments in this ticket.

I didn't notice until now, but this change breaks both bridge jobs in the chutney CI:
https://travis-ci.org/torproject/chutney/builds/543863234

I'd like to make sure there is CI for these pluggable transports, I think the best way to do that is adding them to the bridge jobs. I'll try to do that later today.

There will be some followup work here to improve test-network.sh, to document all of this better, and to support more PTs, and to make it work with #30459.

Once we get pluggable transports into test-network.sh, let's think about how to test pluggable transports in Tor's CI, or in the PT CIs.

comment:21 Changed 5 days ago by nickm

I've made a change to fix that formatting error; should be pretty simple. Let's see if there are any other errors.

comment:22 Changed 5 days ago by teor

The CI failed because 0.3.4 no longer exists, and the tests fail on 0.2.9 (which is installed when 0.3.4 is not available).
We have an open ticket to remove 0.3.4 from chutney's CI.

comment:23 Changed 5 days ago by teor

I expect CI to fail on obsolete Tor versions due to #30826.

comment:24 Changed 3 days ago by teor

I opened #30884, #30885, and #30886 for follow up.

comment:25 Changed 3 days ago by teor

Reviewer: teor

comment:26 Changed 2 days ago by teor

Parent ID: #29267

comment:27 Changed 2 days ago by teor

Status: needs_reviewmerge_ready

Now that we have follow-up tickets, this is ready for merge.
(It doesn't break existing CI, which is good enough for an initial merge.)

Note: See TracTickets for help on using tickets.