Skip to content

turn outbound back into a proxy#526

Merged
hawkw merged 15 commits intomaster-tokio-0.2from
eliza/0.2-outbound
May 26, 2020
Merged

turn outbound back into a proxy#526
hawkw merged 15 commits intomaster-tokio-0.2from
eliza/0.2-outbound

Conversation

@hawkw
Copy link
Contributor

@hawkw hawkw commented May 22, 2020

This branch turns the outbound side of the proxy back into a real proxy,
similarly to what #516 did for the inbound side. Getting outbound to
work again was somewhat more complex, since the outbound side also
requires the load balancer (and, therefore, discovery). In order to get
this all working, it was also necessary to update the
linkerd2-request-filter crate (which was quite trivial), as it's
necessary for the resolver to work, and to make some changes in the
resolver so that all trait bounds were satisfied.

In addition, now that both inbound and outbound work, we're now able
to re-enable a large amount of the integration tests in the
transparency and discovery modules. Some of these tests are still
disabled, as they either depend on service profiles, HTTP upgrades and
orig-proto, or header maniuplation, all of which have yet to be
updated.

Signed-off-by: Eliza Weisman [email protected]

hawkw added 11 commits May 22, 2020 12:04
Signed-off-by: Eliza Weisman <[email protected]>
Signed-off-by: Eliza Weisman <[email protected]>
Signed-off-by: Eliza Weisman <[email protected]>
Signed-off-by: Eliza Weisman <[email protected]>
Signed-off-by: Eliza Weisman <[email protected]>
Signed-off-by: Eliza Weisman <[email protected]>
@hawkw hawkw requested review from a team and olix0r May 22, 2020 19:13
@hawkw hawkw self-assigned this May 22, 2020
@hawkw hawkw requested a review from a team May 22, 2020 23:51
hawkw added 4 commits May 22, 2020 16:51
Signed-off-by: Eliza Weisman <[email protected]>
Signed-off-by: Eliza Weisman <[email protected]>
Signed-off-by: Eliza Weisman <[email protected]>
@hawkw hawkw mentioned this pull request May 26, 2020
Copy link
Contributor

@kleimkuhler kleimkuhler left a comment

Choose a reason for hiding this comment

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

👍

@hawkw hawkw merged commit d31980d into master-tokio-0.2 May 26, 2020
hawkw added a commit that referenced this pull request May 27, 2020
Turns out these _worked_ but i never actually put them back. Whoopsie!

This is necessary for the only integration test that really exercises
reconnects, which relies on these metrics to determine if a connection
exists.

Depends on #526 and will be rebased onto `master-tokio-0.2` when
that branch merges.

Signed-off-by: Eliza Weisman <[email protected]>
hawkw added a commit that referenced this pull request May 27, 2020
This branch updates the `l5d-orig-proto` upgrade/downgrade code to use
`std::future`, and puts it back in the stack.

It turns out that the integration tests that exercise this don't
actually assert that an upgrade is _performed_ when the hint is sent,
just that sending the hint doesn't _break_ proxy-to-proxy traffic (which
is a bummer, but it's hard to assert that in an integration test). So,
those tests were passing before this branch.

However, I validated that the upgrade is performed by checking the logs:

```
[     0.73767491s] DEBUG proxy{test=main:proxy}:outbound:accept{peer.addr=127.0.0.1:60420}:source{target.addr=127.0.0.1:34913}:logical{addr=transparency.test.svc.cluster.local:80}:balance{addr=transparency.test.svc.cluster.local:80}:endpoint{peer.addr=127.0.0.1:34885}: linkerd2_proxy_transport::connect: Connected local.addr=127.0.0.1:50732 keepalive=None
[     0.73871743s] DEBUG proxy{test=main:proxy}:outbound:accept{peer.addr=127.0.0.1:60420}:source{target.addr=127.0.0.1:34913}:logical{addr=transparency.test.svc.cluster.local:80}:balance{addr=transparency.test.svc.cluster.local:80}:endpoint{peer.addr=127.0.0.1:34885}: linkerd2_proxy_transport::metrics: client connection open
[     0.74886384s] DEBUG proxy{test=main:proxy}:outbound:accept{peer.addr=127.0.0.1:60420}:source{target.addr=127.0.0.1:34913}:logical{addr=transparency.test.svc.cluster.local:80}:balance{addr=transparency.test.svc.cluster.local:80}: linkerd2_timeout::failfast: Recovered
[     0.75516939s] DEBUG proxy{test=main:proxy}:outbound:accept{peer.addr=127.0.0.1:60420}:source{target.addr=127.0.0.1:34913}:logical{addr=transparency.test.svc.cluster.local:80}:balance{addr=transparency.test.svc.cluster.local:80}:endpoint{peer.addr=127.0.0.1:34885}: linkerd2_proxy_http::orig_proto: Upgrading request to HTTP2 from HTTP/1.1
[     0.75671201s] DEBUG proxy{test=main:proxy}:outbound:accept{peer.addr=127.0.0.1:60420}:source{target.addr=127.0.0.1:34913}:logical{addr=transparency.test.svc.cluster.local:80}:balance{addr=transparency.test.svc.cluster.local:80}:endpoint{peer.addr=127.0.0.1:34885}: linkerd2_proxy_http::client: method=POST uri=/ version=HTTP/2.0 headers={"l5d-orig-proto": "HTTP/1.1", "host": "transparency.test.svc.cluster.local"}
[     0.77214679s] DEBUG proxy{test=main:proxy}:outbound:accept{peer.addr=127.0.0.1:60420}:source{target.addr=127.0.0.1:34913}:logical{addr=transparency.test.svc.cluster.local:80}:balance{addr=transparency.test.svc.cluster.local:80}: linkerd2_timeout::failfast: Recovered
[     0.143665402s] DEBUG proxy{test=main:proxy}:inbound:accept{peer.addr=127.0.0.1:50732}:source{target.addr=127.0.0.1:39975}:linkerd2_proxy_http::orig_proto: translating HTTP2 to orig-proto: "HTTP/1.1"
```

Depends on #526

Signed-off-by: Eliza Weisman <[email protected]>
@olix0r olix0r deleted the eliza/0.2-outbound branch May 25, 2021 15:49
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