Skip to content

Use pebble-challtestrv cmd, letsencrypt/challtestsrv package. - #3980

Merged
cpu merged 6 commits into
masterfrom
cpu-pebble-challtestsrv-updated
Dec 12, 2018
Merged

cpu merged 6 commits into
masterfrom
cpu-pebble-challtestsrv-updated

Conversation

@cpu

@cpu cpu commented Dec 11, 2018 •

Copy link
Copy Markdown
Contributor

Now that Pebble has a pebble-challtestsrv we can remove the challtestrv package and associated command from Boulder. I switched CI to use pebble-challtestsrv. Notably this means that we have to add our expected mock data using the HTTP management interface. The Boulder-tools images are regenerated to include the pebble-challtestsrv command.

Using this approach also allows separating the TLS-ALPN-01 and HTTPS HTTP-01 challenges by binding each challenge type in the pebble-challtestsrv to different interfaces both using the same VA
HTTPS port. Mock DNS directs the VA to the correct interface.

The load-generator command that was previously using the challtestsrv package from Boulder is updated to use a vendored copy of the new github.org/letsencrypt/challtestsrv package.

Vendored dependencies change in two ways:

  1. Gomock is updated to the latest release (matching what the Bouldertools image provides)
  2. A couple of new subpackages in golang.org/x/net/ are added by way of transitive dependency through the challtestsrv package.

Unit tests are confirmed to pass for gomock:

~/go/src/github.com/golang/mock/gomock$ git log --pretty=format:'%h' -n 1
51421b9
~/go/src/github.com/golang/mock/gomock$ go test ./...
ok    github.com/golang/mock/gomock 0.002s
?     github.com/golang/mock/gomock/internal/mock_matcher [no test files]

For /x/net all tests pass except two /x/net/icmp TestDiag.go test cases
that we have agreed are OK to ignore.

Resolves #3962 and #3951

Now that Pebble has a `pebble-challtestsrv` we can remove the
`challtestrv` package and associated command from Boulder. I switched
CI to use `pebble-challtestsrv`. Notably this means that we have to add
our expected mock data using the HTTP management interface. The
Boulder-tools images are regenerated to include the
`pebble-challtestsrv` command.

Using this approach also allows separating the TLS-ALPN-01 and HTTPS
HTTP-01 challenges by binding each challenge type in the
`pebble-challtestsrv` to different interfaces both using the same VA
HTTPS port. Mock DNS directs the VA to the correct interface.

The load-generator command that was previously using the `challtestsrv`
package from Boulder is updated to use a vendored copy of the new
`github.org/letsencrypt/challtestsrv` package.
@cpu cpu self-assigned this Dec 11, 2018
@cpu
cpu requested a review from a team as a code owner December 11, 2018 17:27
@cpu cpu mentioned this pull request Dec 11, 2018
@rolandshoemaker

Copy link
Copy Markdown
Contributor

Godep import order and generated mocks seem rather unhappy.

@cpu

cpu commented Dec 11, 2018

Copy link
Copy Markdown
Contributor Author

Godep import order and generated mocks seem rather unhappy.

Blech. Will investigate later today.

Daniel added 3 commits December 11, 2018 13:25
The new boulder-tools images pulled in an updated gomock version.
Without regenerating these mocked resources there is a diff detected in
CI.
@cpu

cpu commented Dec 11, 2018

Copy link
Copy Markdown
Contributor Author

CI on this branch is jammed up from a Travis outage ⌛ 👀

@cpu

cpu commented Dec 12, 2018

Copy link
Copy Markdown
Contributor Author

Note: CI is passing now but I haven't included unit tests results for the updated golang.org/x/net dep. I've been able to get all tests to pass except for golang.org/x/net/icmp's TestDiag which produces:

--- FAIL: TestDiag (0.22s)
    --- FAIL: TestDiag/Ping/NonPrivileged (0.22s)
        diag_test.go:39: you may need to adjust the net.ipv4.ping_group_range kernel state
        diag_test.go:68: write udp [::]:2006->[2607:f8b0:4020:807::200e]:0: sendto: network is unreachable
FAIL
FAIL	golang.org/x/net/icmp	0.274s

As prompted I've updated the net.ipv4.ping_group_range but the test still fails. I'll investigate deeper.

@cpu

cpu commented Dec 12, 2018

Copy link
Copy Markdown
Contributor Author

Some progress... I tried running the tests on a clean VM with IPv6 enabled, as the root user and the TestDiag/Ping/NonPrivileged test now passes but a different test fails 😓

--- FAIL: TestDiag (2.76s)
    --- FAIL: TestDiag/Probe/Privileged (2.64s)
        diag_test.go:144: got &{Type:echo Code:0 Checksum:23734 Body:0xc00012a4e0} from 127.0.0.1; want echo reply or extended echo reply
        diag_test.go:144: got &{Type:destination unreachable Code:1 Checksum:22106 Body:0xc00012a8a0} from 2001:4860:1:1::262; want echo reply or extended echo reply
FAIL
FAIL	golang.org/x/net/icmp	2.797s

Type:destination unreachable

Seems like a similar case as the other test. Frustrating!

@jsha jsha left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just the one small typo; otherwise looks good!

Comment thread test/startservers.py
[4431, 'boulder-wfe2 --config %s' % os.path.join(default_config_dir, "wfe2.json")],
[4000, 'boulder-wfe --config %s' % os.path.join(default_config_dir, "wfe.json")],
[6000, './bin/gsb-test-srv -apikey my-voice-is-my-passport'],
# NOTE(@cpu): We specify explicit bind addresses for -https01 and

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# NOTE(@cpu): We specify explicit bind addresses for -https01 and
# NOTE(@cpu): We specify explicit bind addresses for -http01 and

@cpu cpu Dec 12, 2018 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case it isn't a typo. There are -http01 and -https01 args for the challtestsrv. One for the HTTP interface, one for HTTPS.

Overall the names of the pebble-challtestsrv CLI args could probably be updated to be clearer (e.g. -dns01 is used for both ACME DNS-01 TXTs and more broadly for mock DNS) but that would be an issue to address in Pebble & update here.

Does that make sense?

@cpu

cpu commented Dec 12, 2018

Copy link
Copy Markdown
Contributor Author

After discussion with @jsha and @rolandshoemaker and another failure to get the /x/net/icmp tests to run cleanly on a fresh Linux host we've concluded its OK to ignore the two test failures in that dep update and to merge this as-is with our own tests passing.

@cpu
cpu merged commit 893e845 into master Dec 12, 2018
@cpu
cpu deleted the cpu-pebble-challtestsrv-updated branch December 12, 2018 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants