Commit Graph

52 Commits

Author SHA1 Message Date
Andrew Seigner 89deacd8d6
Decrease proxy and web Docker image sizes (#3384)
The `proxy` and `web` Docker images were 161MB and 186MB, respectively.
Most of the space was tools installed into the `linkerd.io/base` image.

Decrease `proxy` and `web` Docker images to 73MB and 90MB, respectively.
Switch these images to be based off of `debian:stretch-20190812-slim`.
Also set `-ldflags "-s -w"` for `proxy-identity` and `web`. Modify
`linkerd.io/base` to also be based off of
`debian:stretch-20190812-slim`, update tag to `2019-09-04.01`.

Fixes #3383

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2019-09-05 11:28:33 -07:00
Oliver Gould 38597083eb
Add bin/git-commit-proxy-version (#3071)
Each time we update the proxy from the linkerd2-proxy repo, we make the
change slightly differently. The bin/git-commit-proxy-version does all the
steps needed to update the proxy version up to and including making a
commit to this repo.

The proxy version is now stored in a .proxy-version file and is
consumed directly by Dockerfile-proxy, which both simplifies the
Dockerfile and the update process.

This script formats commit messages and emits output as follows:

```
commit c05198a851f69bdc7007974a0ef1f4c01c98d0ce (HEAD -> ver/proxy-update)
Author: Oliver Gould <ver@buoyant.io>
Date:   Thu Jul 11 17:23:05 2019 +0000

    proxy: Update to linkerd/linkerd2-proxy#3a3ec3b

    * linkerd/linkerd2-proxy#0cc58cd fallback: Clarify fallback layering (linkerd/linkerd2-proxy#288)
    * linkerd/linkerd2-proxy#b71349a Replace `log` and `env-logger` with `tracing` and `tracing-fmt` (linkerd/linkerd2-proxy#277)
    * linkerd/linkerd2-proxy#3a3ec3b Use a constant-time load balancer (linkerd/linkerd2-proxy#266)

diff --git a/.proxy-version b/.proxy-version
index f81f40de..d7faa12d 100644
--- a/.proxy-version
+++ b/.proxy-version
@@ -1 +1 @@
-05b012d
+3a3ec3b
```
2019-07-11 14:04:46 -07:00
Alex Leong 9a61c2adc2 Bump proxy dep (#3042)
Pick up the following proxy changes:

* Update httparse to v1.3.4
* canonicalize: stop resolving when the receiver is dropped
* router: Remove interval from router eviction

Signed-off-by: Alex Leong <alex@buoyant.io>
2019-07-05 17:17:16 -07:00
Eliza Weisman c849eed4a9
proxy: update to linkerd/linkerd2-proxy#0a7e206 (#3024)
* 0a7e206 Update h2 to v0.1.25 (linkerd2/linkerd2-proxy#282)
* 0e3ef79 Propagate HTTP2 errors from client RST_STREAMs (linkerd2/linkerd2-proxy#281)

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
2019-07-02 16:21:32 -07:00
Alex Leong f90a3c09ed
Bump proxy version to pick up traffic split (#3012)
Signed-off-by: Alex Leong <alex@buoyant.io>
2019-06-28 15:32:14 -07:00
Kevin Leimkuhler 64e666fc11
Bump proxy for edge-19.6.3 (#2986)
* Fixed the proxy rejecting HTTP2 requests that don't have an `:authority`
* Improved idle service eviction to reduce resource consumption for clients
  that send requests to many services

Signed-off-by: Kevin Leimkuhler <kleimkuhler@icloud.com>
2019-06-21 14:50:34 -07:00
Oliver Gould 374a4dbcb1 proxy: update to linkerd/linkerd2-proxy#35df8ab (#2939)
439fbfed Update to rust-1.35.0 (linkerd/linkerd2-proxy#265)
    db26495e Honor `l5d-override-dst` for inbound service profiles (linkerd/linkerd2-proxy#267)
    a476e995 metrics: Include the prefix of a Report in log lines (linkerd/linkerd2-proxy#262)
    1a52a5e6 discovery: Fall back in MakeService, only on InvalidArgument (linkerd/linkerd2-proxy#268)
    35df8ab4 metrics: Classify response errors  (linkerd/linkerd2-proxy#269)
2019-06-13 14:15:19 -07:00
Oliver Gould 39b8942095
proxy: Update to linkerd/linkerd2-proxy#790a86a (#2898)
commit 790a86aa9db463af479647bb91b8b55280d74d4
    Author: Sean McArthur <sean@buoyant.io>
    Date:   Tue Jun 4 20:28:05 2019 -0700

        Update h2 to v0.1.23 (#264)

        - Fixes leaked DATA frames if never polled.

        Signed-off-by: Sean McArthur <sean@buoyant.io>
2019-06-05 08:08:04 -07:00
Oliver Gould 20715da2c9 proxy: Update to linkerd2/linkerd2-proxy#ed32e496 (#2868)
linkerd2/linkerd2-proxy#b3dcc6e0 Use the proxy's log formatting in tests (linkerd2/linkerd2-proxy#258)
    linkerd2/linkerd2-proxy#1c91a398 Rewrite the destination client and remove DNS fallback (linkerd2/linkerd2-proxy#259)
    linkerd2/linkerd2-proxy#ed32e496 Update h2 to v0.1.21 (linkerd2/linkerd2-proxy#261)
2019-05-30 13:01:00 -07:00
Oliver Gould f4da6c228c
Update the proxy to linkerd/linkerd2-proxy#3e0e00c (#2828)
commit b27dfb2d21aa8ca5466ea0edce17d27094ace7c1
Author: Takanori Ishibashi <takanori.1112@gmail.com>
Date:   Wed May 15 05:58:42 2019 +0900

    updaes->updates (#250)

    Signed-off-by: Takanori Ishibashi <takanori.1112@gmail.com>

commit 16441c25a9d423a6ab12b689b830d9ae3798fa00
Author: Eliza Weisman <eliza@buoyant.io>
Date:   Tue May 14 14:40:03 2019 -0700

     Pass router::Config directly to router::Layer (#253)

    Currently, router `layer`s are constructed with a single argument, a
    type implementing `Recognize`. Then, the entire router stack is built
    with a `router::Config`. However, in #248, it became necessary to
    provide the config up front when constructing the `router::layer`, as
    the layer is used in a fallback layer. Rather than providing a separate
    type for a preconfigured layer, @olix0r suggested we simply change all
    router layers to accept the `Config` when they're constructed (see
    https://github.com/linkerd/linkerd2-proxy/pull/248#discussion_r283575008).

    This branch changes `router::Layer` to accept the config up front. The
    `router::Stack` types `make` function now requires no arguments, and the
    implementation of `Service` for `Stack` can be called with any `T` (as
    the target is now ignored).

    Signed-off-by: Eliza Weisman <eliza@buoyant.io>

commit b70c68d4504a362eac6a7828039a2e5c7fcd308a
Author: Eliza Weisman <eliza@buoyant.io>
Date:   Wed May 15 13:14:04 2019 -0700

    Load balancers fall back to ORIG_DST when no endpoints exist (#248)

    Currently, when no endpoints exist in the load balancer for a
    destination, we fail the request. This is because we expect endpoints to
    be discovered by both destination service queries _and_ DNS lookups, so
    if there are no endpoints for a destination, it is assumed to not exist.

    In linkerd/linkerd2#2661, we intend to remove the DNS lookup from the
    proxy and instead fall back to routing requests for which no endpoints
    exist in the destination service to their SO_ORIGINAL_DST IP address.
    This means that the current approach of failing requests when the load
    balancer has no endpoints will no longer work.

    This branch introduces a generic `fallback` layer, which composes a
    primary and secondary service builder into a new layer. The primary
    service can fail requests with an error type that propages the original
    request, allowing the fallback middleware to call the fallback service
    with the same request. Other errors returned by the primary service are
    still propagated upstream.

    In contrast to the approach used in #240, this fallback middleware is
    generic and not tied directly to a load balancer or a router, and can
    be used for other purposes in the future. It relies on the router cache
    eviction added in #247 to drain the router when it is not being used,
    rather than proactively destroying the router when endpoints are
    available for the lb, and re-creating it when they exist again.

    A new trait, `HasEndpointStatus`, is added in order to allow the
    discovery lookup to communicate the "no endpoints" state to the
    balancer. In addition, we add a new `Update::NoEndpoints` variant to
    `proxy::resolve::Update`, so that when the control plane sends a no
    endpoints update, we switch from the balancer to the no endpoints state
    _immediately_, rather than waiting for all the endpoints to be
    individually removed. When the balancer has no endpoints, it fails all
    requests with a fallback error, so that the fallback middleware

    A subsequent PR (#248) will remove the DNS lookups from the discovery
    module.

    Closes #240.

    Signed-off-by: Eliza Weisman <eliza@buoyant.io>

commit 6525b0638ad18e74510f3156269e0613f237e2f5
Author: Zahari Dichev <zaharidichev@gmail.com>
Date:   Wed May 15 23:35:09 2019 +0300

    Allow disabling tap by setting an env var (#252)

    This PR fixes linkerd/linkerd2#2811. Now if
    `LINKERD2_PROXY_TAP_DISABLED` is set, the tap is not served at all. The
    approach taken is that  the `ProxyParts` is changed so the
    `control_listener` is now an `Option` that will be None if tap is
    disabled as this control_listener seems to be exclusively used to serve
    the tap. Feel free to suggest a better approach.

    Signed-off-by: Zahari Dichev <zaharidichev@gmail.com>

commit 91f32db2ea6d74470fd689c713ff87dc7586222d
Author: Zahari Dichev <zaharidichev@gmail.com>
Date:   Thu May 16 00:45:23 2019 +0300

    Assert that outbound TLS works before identity is certified (#251)

    This commit introduces TLS capabilities to the support server as well as
    tests to ensure that outbound TLS works even when there is no verified
    certificate for the proxy yet.

    Fixes linkerd/linkerd2#2599

    Signed-off-by: Zahari Dichev <zaharidichev@gmail.com>

commit 45aadc6b1b28e6daea0c40e694a86ae518887d85
Author: Sean McArthur <sean@buoyant.io>
Date:   Wed May 15 14:25:39 2019 -0700

    Update h2 to v0.1.19

    Includes a couple HPACK fixes

    Signed-off-by: Sean McArthur <sean@buoyant.io>

commit 3e0e00c6dfbf5a9155b887cfd594f611edfc135f
Author: Oliver Gould <ver@buoyant.io>
Date:   Thu May 16 08:11:06 2019 -0700

    Update mio to 0.6.17 (#257)

    To pick up https://github.com/tokio-rs/mio/pull/939
2019-05-16 10:19:17 -07:00
Eliza Weisman 18a6b596ee
proxy: Update to linkerd/linkerd2-proxy#5f89351 (#2814)
commit 5f89351081eff47a4ab8cd88e2e1a69a04f86541
Author: Oliver Gould <ver@buoyant.io>
Date:   Thu May 9 16:39:24 2019 -0700

    Upgrade tower dependencies (#249)

    Tower must be updated in order to pickup tower-rs/tower#281
    to address linkerd/linkerd2#2804.

    This adopts released crates where possible.

commit 5d5eed6f8180b8db4090d995e71fdf7b0890c647
Author: Zahari Dichev <zaharidichev@gmail.com>
Date:   Thu May 9 01:08:34 2019 +0300

    Assert that TLS connection is refused if identity is not certified yet (#243)

    This branch adds tls capability to the support cient used in tests. In addition to that it adds two tests verifying that a TLS connection is refused in case the identity is not certified yet. This attempts to fix #https://github.com/linkerd/linkerd2/issues/2598 and provide facility to write tests for https://github.com/linkerd/linkerd2/issues/2676.

    As these are still some of my first lines of Rust code, it is advised to approach everything with a healthy dose of doubt :)

    Signed-off-by: Zahari Dichev <zaharidichev@gmail.com>

commit 1b9bb3745e44c959d1d41d14fed2b2822c82b5ba
Author: Oliver Gould <ver@buoyant.io>
Date:   Wed May 8 14:28:37 2019 -0700

    Introduce dispatch timeouts around buffers (#246)

    The proxy has several buffers, especially where it routes requests over
    shared stacks. If any of these routes is unavailable, then a request may
    remain buffered indefinitely. Previously, before service profiles were
    introduced, there was a default _response_ timeout that would cause
    these requests to fail; but since this response timeout is now optional
    (and is only applied once the request has been routed within a proxy),
    then we need a new mechanism to prevent requests from getting "stuck".

    This change does the following:
    - all proxied requests are annotated with a dispatch deadline;
    - each time a request is bufered, a timeout is registered.
    - if the timeout fires, the response exception fails, a 503 is returned,
      and the request is dropped.
    - if the request is processed into the inner stack, the timeout is
      ignored.

    The dispatch timeout limits the _time a request is buffered in a proxy_.
    This is distinct from the response timeout, as the server's response may
    naturally be delayed for any number of (non-proxy-related) reasons.

    The `insert_target` module has been generalized to `insert` to support
    setting the DispatchDeadline extension.

    The `buffer` module has been augmented with generic deadline-extraction
    logic.

    The `svc` module now exposes its own builder type that notably adds
    a `buffer_pending` helper. It's helpful to pull a builder type into the
    proxy to assist debugging type errors when modifying stacks.

    Fixes linkerd/linkerd2#2779 linkerd/linkerd2#2795

commit caf899557c3b041190f63544da865396231b3e30
Author: Oliver Gould <ver@buoyant.io>
Date:   Fri May 3 15:55:32 2019 -0700

    router: Fail requests when the route is not ready (#241)

    In linkerd/linkerd2#2779, we plan to expire requests while they are
    buffered. However, the router _implicitly_ buffers requests in the
    executor when the inner service is not ready.

    This change alters the route to wrap all inner layers in a `LoadShed`
    so it can expect all services to `poll_ready()` immediately.

commit 587bad101d9e5daeacb24b6733097c350a798356
Author: Eliza Weisman <eliza@buoyant.io>
Date:   Fri May 3 14:18:08 2019 -0700

    Remove Destination service query concurrency limit (#244)

    Currently, the proxy enforces a limit on the number of concurrent
    queries (i.e., the number of gRPC streams) to the Destination service.
    This limit was added based on information about the behaviour of the
    Destination service that is now known to be incorrect.

    This branch removes the limit on concurrent queries from the proxy's
    `control::destination` module. Although it should now be possible to
    simplify this code as a result of this change, I've refrained from doing
    any major refactoring in this branch --- my intention is to do this
    after the DNS fallback behaviour has also been removed, as together with
    this change, that will result in a _significant_ simplification of the
    module. Additionally, I've removed the tests for the concurrency limit,
    as they are no longer relevant.

    The `LINKERD2_PROXY_DESTINATION_CLIENT_CONCURRENCY_LIMIT`
    environment variable was also removed; this is not a breaking change as
    neither the CLI nor the proxy injector will currently set this env var.

    Signed-off-by: Eliza Weisman <eliza@buoyant.io>

commit cbdf45b44f7e4d852dc0497716062167ab9539fb
Author: Sean McArthur <sean@buoyant.io>
Date:   Thu May 2 11:47:48 2019 -0700

    Remove h2::Error requirement from metrics

    Signed-off-by: Sean McArthur <sean@buoyant.io>

commit 3276949d4608dc4344b7bed3de2fc4b3080c2c6e
Author: Sean McArthur <sean@buoyant.io>
Date:   Thu May 2 09:44:00 2019 -0700

    delete unused proxy::http::metrics::class module

    Signed-off-by: Sean McArthur <sean@buoyant.io>

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
2019-05-10 10:57:30 -07:00
Andrew Seigner 5ece3430eb
Fix proxy build to build go-deps and set version (#2797)
The `docker-build-proxy` script builds `Dockerfile-proxy`. That
Dockerfile depends on a go-deps image, and takes a `LINKERD_VERSION`
arg. The `docker-build-proxy` script was neither ensuring go-deps had
been built, nor setting `LINKERD_VERSION`. The former resulted in the
build failing if go-deps did not exist. The latter resulted in
`dev-undefined` log messages in the `linkerd-proxy` container.

Fix `docker-build-proxy` to ensure go-deps are built, and also set the
`LINKERD_VERSION`. This brings this script more in-line with the other
`docker-build-*` scripts.

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2019-05-07 13:17:18 +02:00
Oliver Gould 3b729ec458
proxy: Update to linkerd/linkerd2-proxy#5018026 (#2777)
commit 073a1beb4a7cd709c6b1eaa56a319c1829a94d11
Author: Sean McArthur <sean@buoyant.io>
Date:   Mon Apr 29 17:54:01 2019 -0700

    tap: remove need to clone Services (#238)

    This refactors the tap system to not require intermediary channels to
    register matches and taps when a request comes through. The Dispatcher
    that used to exist in order to prevent tapping more requests than the
    limit asked for has been removed. In its place is a shared atomic
    counter to keep the count under the limit.

    The resulting behavior should be the same. There should be improved
    performance as tap registration doesn't need go through a second
    channel, and requests don't need to be delayed waiting for the
    dispatcher to be able to process its queue.

    Signed-off-by: Sean McArthur <sean@buoyant.io>

commit 7a3be8c8737188e5debbc465f9a33da0d79b8b80
Author: Zahari Dichev <zaharidichev@gmail.com>
Date:   Wed May 1 01:57:01 2019 +0300

    Replace fixed reconnect backoff with exponential one (#237)

    When reconnecting to a destination, use an exponential, jittered backoff strategy.

    Signed-off-by: Zahari Dichev <zaharidichev@gmail.com>

commit 32b813aad4fe2fcf0252e8c2215d6835101d2337
Author: Oliver Gould <ver@buoyant.io>
Date:   Tue Apr 30 15:58:20 2019 -0700

    Support endpoint weights (#230)

    This change modifies the proxy to honor weights provided by the
    destination service. When the destination service replies with a
    weight, this value is divided by 10,000 to produce a weight on
    [0.0, ~400000.0]. This weight is used by load the load balancer
    to modify load interpretation and therefore request distribution.

    A weight of 0.0 will cause the endpoint's load to be effectively infinite
    so that requests will only be sent to the endpoint when no other endpoints
    exists or when the other endpoints that were considered had 0-weights.

commit 501802671a346250b6dbaae73f29d9be7a4c2086
Author: Sean McArthur <sean@buoyant.io>
Date:   Wed May 1 13:42:38 2019 -0700

    Remove buffers from endpoint stacks (#239)

    Due to the `http::settings::router`, a `buffer` was needed in each
    endpoint stack. This meant that the service was always ready, even if
    the client were falling over (and reconnecting). In turn, this meant
    that the balancer would pick one of these endpoint stacks, because it
    was always ready!

    This change includes a test of a failing endpoint, that the balancer no
    longer assumes it is ready, and has the following functional changes:

    - Removed `http::settings::router`, instead the client HTTP settings are
      detected as part of the `DstAddr`. This means that each balancer only
      has endpoints with the same HTTP settings.
    - Removed `buffer` layer from inside the endpoint stacks.

    Signed-off-by: Sean McArthur <sean@buoyant.io>
2019-05-01 15:00:47 -07:00
Oliver Gould bd4aa58e50 proxy: Upgrade the proxy for tower updates (#2758)
commit 61db2e77a247f7b0235b67581f60e8a92f8543cb
Author: Sean McArthur <sean@seanmonstar.com>
Date:   Tue Apr 23 17:20:43 2019 -0700

    Replace linkerd2-stack with tower-layer (#236)

    Signed-off-by: Sean McArthur <sean@buoyant.io>

commit 2d6c7145cadf709832f3507bcefdaee509ebde81
Author: Sean McArthur <sean@seanmonstar.com>
Date:   Thu Apr 18 12:40:48 2019 -0700

    Add load shedding when over max-in-flight requests. (#225)

    Also adds configuration for inbound and outbound max-in-flight requests.

    Signed-off-by: Sean McArthur <sean@buoyant.io>

commit f4b5cd0b4a25d7d942e018b42af1157ae2e7dbb0
Author: Oliver Gould <ver@buoyant.io>
Date:   Wed Apr 17 13:53:49 2019 -0700

    Upgrade tower (#232)

    This avails the proxy of newer load balancer features, an updated buffer
    implementation, etc.

    The new buffer implementation requires that we implement TypedExecutor
    for our logging executor; and more error types have been made dynamic.
2019-04-26 08:58:24 -05:00
Oliver Gould c8a7c0f57f
Update proxy to fix a connection starvation issue (#2689)
In https://github.com/linkerd/linkerd2-proxy/pull/233, we fixed an issue
in the proxy where, when the proxy performed TLS discovery (on inbound
connections), detection on a slow or idle connection could block all
other connections from being accepted on the listener.

Fixes #2581 #2585 #2630
2019-04-11 13:02:06 -07:00
Kevin Leimkuhler 10f8c786c7
proxy: Bump proxy for edge-19.4.2 (#2654)
This bump pulls in:
  * New proxy tests

Signed-off-by: Kevin Leimkuhler <kevinl@buoyant.io>
2019-04-05 15:50:19 -07:00
Kevin Leimkuhler 1f2401c7a3
proxy: Bump pinned version to f2d907b (#2609)
* proxy: Bump pinned version to f2d907b

This change picks up:
* Added configuration for overriding the connection backoff
* Added configuration for overriding the HTTP/2 stream or connection window size
* Disable potentially info-leaking header

Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com>
2019-04-01 21:31:16 -07:00
Alex Leong 63996e8b8a
Bump proxy version (#2539)
Picks up the following proxy change:

* Add a oneshot to notify the profiles daemon if the stream is dropped

Signed-off-by: Alex Leong <alex@buoyant.io>
2019-03-21 15:17:52 -07:00
Oliver Gould 91c5f07650
proxy: Upgrade to identity-capable proxy (#2524)
The new proxy has changed its configuration as follows:

- `LISTENER` urls are now `LISTEN_ADDR` addresses;
- `CONTROL_URL` is now `DESTINATION_SVC_ADDR`;
- `*_NAMESPACE` vars are no longer needed;
- The `PROXY_ID` is now the `DESTINATION_CONTEXT`;
- The "metrics" port is now the "admin" port, since it serves more than
  just metrics;
- A readiness probe now checks a dedicated /ready endpoint eagerly.

Identity injection is **NOT** configured by this branch.
2019-03-19 14:20:39 -07:00
Kevin Lingerfelt e862e98d1a
Bump proxy to 4ed4dcc (#2494)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2019-03-13 16:57:07 -07:00
Kevin Leimkuhler 4fba211b98
proxy: Bump pinned version to 6d10dd6 (#2448)
This picks up the following:
* [dc00685](https://github.com/linkerd/linkerd2-proxy/commit/dc00685) Increase
  inbound/outbound router capacity
* [6d10dd6](https://github.com/linkerd/linkerd2-proxy/commit/6d10dd6) Set
  `l5d-remote-ip` on inbound requests and outbound responses

Signed-off-by: Kevin Leimkuhler <kevinl@buoyant.io>
2019-03-05 15:09:59 -08:00
Eliza Weisman 9c0537c318 Signed-off-by: Eliza Weisman <eliza@buoyant.io> (#2410)
proxy: bump pinned version to 7e55196

This picks up the following commit:

* 7e55196 Bump tower-grpc (linkerd/linkerd2-proxy#202)

The new `tower-grpc` version (tower-rs/tower-grpc#115) improves the
messages attached to internal gRPC issues. This will aid significantly
in debugging the proxy's gRPC communication with the control plane.
2019-02-27 14:17:17 -08:00
Ivan Sim c5b905281c
Proxy: bump pinned version to 0fe8063 (#2406)
This picks up the following commits:

* 0fe8063 replace `Error::cause` with `Error::source` (#2370) (linkerd/linkerd2-proxy#201)
* 1ea7559 Minor cleanup in the config tests (linkerd/linkerd2-proxy#188)
* d0ef56b Update *ring* to 0.14.6 (linkerd/linkerd2-proxy#197)
* c54377f fs-watch: Use a properly sized buffer for inotify events (linkerd/linkerd2-proxy#195)
* 23e02a6 Update Router to wait for inner poll_ready before calling inner call
* 2de8e9b Update metrics quickcheck to 0.8, and hyper to 0.12.24
* d1bbd4b make: Optionally include debug symbols with builds (linkerd/linkerd2-proxy#193)
* 738a541 Fix compilation warnings in fs-watch (linkerd/linkerd2-proxy#192)
* 6cc7558 Apply rustfmt (linkerd/linkerd2-proxy#191)

Signed-off-by: Ivan Sim <ivan@buoyant.io>
2019-02-27 12:55:01 -08:00
Oliver Gould 8a8ee649c5
proxy: Log canonicalization warnings on only the first error (#2250)
commit 59d00f69653730353ec246b8cb2eb39d80a54d3e
Author: Oliver Gould <ver@buoyant.io>
Date:   Mon Feb 11 10:51:37 2019 -0800

    Log canonicalization warnings on only the first error (#189)

    When a canonicalization task fails to resolve a name, our logging is not
    particularly clear about the current state of the stack. Specifically,
    it's difficult to know whether the stack has resolved the name
    successfully before.

    With this change, canonicalization failures are logged (at warning, not
    error) only when the task has not previously resolved a name.
    Subsequent errors are now logged at the debug level (instead of
    warning).
2019-02-11 12:52:09 -08:00
Kevin Leimkuhler 9cca1df3b6
Proxy: bump pinned version to 7add4fc (#2225)
* Remove destination address from endpoint metric labels
(linkerd/linkerd2#187)
* Set proxy_id in calls to Get and GetProfile (linkerd/linkerd2#183)
* Add l5d-client-id on inbound requests if meshed TLS (linkerd/linkerd2#184)

Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com>
2019-02-07 12:17:51 -08:00
Oliver Gould 44e31f0f67
Configure proxy keepalives via the environment (#2193)
In linkerd/linkerd2-proxy#186, the proxy supports configuration of TCP
keepalive values.

This change sets `LINKERD2_PROXY_INBOUND_ACCEPT_KEEPALIVE` and
`LINKERD2_PROXY_OUTBOUND_CONNECT_KEEPALIVE` to 10s when injecting the
proxy, so that remote connections are configured with a keepalive.

This configuration is NOT yet exposed through the CLI. This may be done
in a followup, if necessary.

Fixes #1949
2019-02-04 16:16:43 -08:00
Eliza Weisman 3a5d506004
proxy: update pinned version to 5b507a9
This picks up the following proxy commits:

* eaabc48 Update tower-grpc
* e9561de Update h2 to 0.1.16
* 28fd5e7 Add Route timeouts (linkerd/linkerd2-proxy#165)
* 5637372 Re-flag tcp_duration tests as flaky
* 20cbd18 Revise several log levels and messages (linkerd/linkerd2-proxy##177)
* ae16978 Remove flakiness from 'profiles' tests
* 49c29cd canonicalize: Only log errors at the WARN level when falling back (linkerd/linkerd2-proxy#174)
* 486dd13 Make outbound router honor `l5d-dst-override` header (linkerd/linkerd2-proxy#173)
* 7adc50d Make timeouts for canonicalization DNS queries tuneable (linkerd/linkerd2-proxy#175)
* 3188179 Try reducing CI flakiness by reducing RUST_TEST_THREADS to 1

Some of these changes will probably need changelog entries:

* Improve logging when rejecting malformed HTTP/2 pseudo-headers
  (carllerche/h2#347)
* Improve logging for gRPC errors (tower-rs/tower-grpc#111)
* Add Route timeouts (linkerd/linkerd2-proxy#165)
* Downgrade several of the noisiest log messages to TRACE
  (linkerd/linkerd2-proxy##177)
* Add an environment variable for configuring the DNS canonicalization
  timeout (linkerd/linkerd2-proxy#175)
* Make outbound router honor `l5d-dst-override` header
  (linkerd/linkerd2-proxy#173)

Perhaps all the logging related changes can be grouped into one
changelog entry, though...

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
2019-01-24 14:46:44 -08:00
Eliza Weisman 53f8bb5a15
proxy: bump pinned version to fix a h2 bug (#2105)
- Update h2 to 0.1.15 (linkerd/linkerd2-proxy#172)

carllerche/h2#338 fixes a deadlock in stream reference counts that could
potentially impact the proxy. linkerd/linkerd2-proxy@6df55c0 updates our 
`h2` dependency to a version which includes this change.

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
2019-01-17 12:17:02 -08:00
Eliza Weisman 717bdc0796
proxy: bump version to fix memory leak
- Update to trust-dns-resolver 0.10.1 (linkerd/linkerd2-proxy#169)

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
2019-01-10 13:08:30 -08:00
Kevin Lingerfelt 20bb1bbc55
Bump pinned proxy version (#2015)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-12-20 12:38:18 -08:00
Eliza Weisman 586e7407c0
proxy: bump version for TLS skipped ports fix (#1989)
* 761a08e Make TLS accept logic compatible with disabled protocol
  detection (linkerd/linkerd2-proxy#158)

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
2018-12-14 13:33:12 -08:00
Oliver Gould f80f3892a0
proxy: bump version for bug fixes (#1935)
* 0065c137 profiles: Drive profile discovery on a daemon task (#156)
* b9ffbb7f Update h2 to v0.1.14
* 3ac6b72c Add basic tap integration tests (#154)
2018-12-05 13:23:26 -08:00
Oliver Gould ffa302eb6a
proxy: Update for debug logging (#1922)
commit 68f42c337f2580f3b33ddab2e01540f6849d0d1a (HEAD -> master, origin/master)
Author: Oliver Gould <ver@buoyant.io>
Date:   Tue Dec 4 07:45:20 2018 -0800

    Log discovery updates in the outbound proxy (#153)

    When debugging issues that users believe is related to discovery, it's
    helpful to get a narrow set of logs out to determine whether the proxy
    is observing discovery updates.

    With this change, a user can inject the proxy with
    ```
    LINKERD2_PROXY_LOG='warn,linkerd2_proxy=info,linkerd2_proxy::app::outbound::discovery=debug'
    ```
    and the proxy's logs will include messages like:

    ```
    DBUG voting-svc.emojivoto.svc.cluster.local:8080 linkerd2_proxy::app::outbound::discovery adding 10.233.70.98:8080
    DBUG voting-svc.emojivoto.svc.cluster.local:8080 linkerd2_proxy::app::outbound::discovery removing 10.233.66.36:8080
    ```

    This change also turns-down some overly chatty INFO logging in main.
2018-12-04 12:13:45 -08:00
Oliver Gould baa7436cc7
Bump the proxy version to fix integration tests (#1914)
A Tap integration test fails and has been fixed by
linkerd/linkerd2-proxy#152.

This change bumps the proxy version to get this change, as well as an
upgrade to the `h2` library for bugfixes.
2018-12-03 16:30:35 -08:00
Oliver Gould 926395f616
tap: Include route labels in tap events (#1902)
This change alters the controller's Tap service to include route labels
when translating tap events, modifies the public API to include route
metadata in responses, and modifies the tap CLI command to include
rt_ labels in tap output (when -o wide is used).
2018-12-03 13:52:47 -08:00
Alex Leong 73836f05cf
Update proxy version and use canonicalized dst (#1866)
The `linkerd` routes command only supports outbound metrics queries (i.e. ones with the `--from` flag).  Inbound queries (i.e. ones without the `--from` flag) never return any metrics.

We update the proxy version and use the new canonicalized form for dst labels to gain support for inbound metrics as well.

Signed-off-by: Alex Leong <alex@buoyant.io>
2018-11-26 17:20:07 -08:00
Dennis Adjei-Baah 214540c823
Add new iptable rule to for outbound traffic (#1863)
When requests from a pod send requests to itself, the proxy properly redirects traffic from the originating container in the pod through the outbound listener of the proxy. Once the request ends on the inbound side of the proxy, it skips the proxy and calls the original container that made the request. This can cause problems for containers that serve HTTP as the proxy naively tries to initiate an HTTP/2 connection to the destination of a request.  (See #1585 for a concrete example)

This PR adds a new iptable rule, coupled with a proxy [change](https://github.com/linkerd/linkerd2-proxy/pull/122) ensure that requests from a that occur in the aforementioned scenario, always redirect to the inbound listener of the proxy first.

fixes #1585

Signed-off-by: Dennis Adjei-Baah <dennis@buoyant.io>
2018-11-15 13:56:45 -08:00
Dennis Adjei-Baah dfaf3b1e1b
bump proxy version to 5e0a15b (#1842)
Signed-off-by: Dennis Adjei-Baah <dennis@buoyant.io>
2018-11-06 13:20:52 -08:00
Oliver Gould 557dca5a56
Upgrade to linkerd/linkerd2-proxy#f97239ba (#1829)
This change updates the proxy version to fix grpc failure
classification, per #1819.
2018-10-30 15:19:01 -07:00
Kevin Lingerfelt 07c861e39f
Revert proxy upgrade (#1818)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-10-26 15:42:37 -07:00
Kevin Lingerfelt c59f43d827
Bump proxy version to latest master (#1815)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-10-26 13:49:03 -07:00
Eliza Weisman d4d4e557e9
Update pinned proxy SHA to latest master (#1754)
This PR updates the proxy SHA the build is pinned. This is in order to
track dependency updates in the proxy for the upcoming edge release.

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
2018-10-10 14:01:36 -07:00
Alex Leong db37c5a007
Pin the proxy version to a SHA (#1746)
Pin the proxy version to a specific SHA instead of floating on latest.  This allows breaking changes in the proxy repo to not break the main Linkerd 2 repo.

Signed-off-by: Alex Leong <alex@buoyant.io>
2018-10-09 14:22:39 -07:00
Kevin Lingerfelt dae86da0e4
Allow docker-build-proxy to override the proxy version (#1324)
* Allow docker-build-proxy to override the proxy version
* Update based on review feedback
* fetch-proxy should return full path to executable

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-07-26 10:10:49 -07:00
Oliver Gould 941cad4a9c
Migrate build infrastructure to linkerd2 (#1298)
This PR begins to migrate Conduit to Linkerd2:
* The proxy has been completely removed from this repo, and is now located at
  github.com/linkerd/linkerd2-proxy.
* A `Dockerfile-proxy` has been added to fetch the most-recently published proxy
  binary from build.l5d.io.
* Proxy-specific protobuf bindings have been moved to
  github.com/linkerd/linkerd2-proxy-api.
* All docker images now use the gcr.io/linkerd-io registry.
* `inject` now uses `LINKERD2_PROXY_` environment variables
* Go paths have been updated to reflect the new (future) repo location.
2018-07-09 15:38:38 -07:00
Oliver Gould e5ad5de975
Reuse the proxy's build stage across CI runs (#891)
The proxy's Dockerfile is split into stages: build and runtime.
The build stage includes all of the intermdiate build information, and
the runtime image discards these layers with a small production-ready
image.

In order to improve docker build times, we can save this build layer to
be reused.

This reduces the docker build of the proxy in CI from 15 minutes to
about 7.5 minutes (when the proxy is not changed).
2018-05-09 09:11:58 -07:00
Oliver Gould 1801118906
Do not run tests in proxy Dockerfile (#882)
The proxy Dockerfile includes test execution. While the intentions of
this are good, it has unintended consequences: we can ship code linked
with test dependencies.

Because we have other means for testing proxy code (cargo, locally; and
CI runs tests outside of Docker), it is fine to remove these tests.
2018-05-01 11:54:02 -07:00
Andrew Seigner 304f4e12dd
Make build scripts location-agnostic (#409)
The build scripts assume they are executed from the root of this repo.
This prevents running scripts from other locations, for example,
`cd web && ../bin/go-run .`.

Modify the build scripts to work regardless of current directory.

Fixes #301

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2018-02-23 10:02:14 -08:00
Oliver Gould 6a0936e699
Remove proxy/Dockerfile-deps (#279)
The current proxy Dockerfile configuration does not cache dependencies
well, which can increase build times substantially.

By carefully splitting proxy/Dockerfile into several stages that mock
parts of the project, dependencies may be built and cached in Docker
such that changes to the proxy only require building the conduit-proxy
crate.

Furthermore, proxy/Dockerfile now runs the proxy's tests before
producing an artifact, unless the ` PROXY_SKIP_TESTS` build-arg is set
and not-empty.

The `PROXY_UNOPTIMIZED` build-arg has been added to support quicker,
debug-friendly builds.
2018-02-06 13:01:38 -08:00
Andrew Seigner 47ec2fb190
Remove DOCKER_FORCE_BUILD, disable symbolic tags (#168)
DOCKER_FORCE_BUILD, combined with symbolic tags, added complexity and
risk of running unintended versions of the code.

This change removes DOCKER_FORCE_BUILD, and sets all Docker tags
programmatically. The decision to pull or build has been moved up the
stack from _docker.sh to the docker-build-* scripts. Workflows that
want to favor docker pulls (like ci), can do so explicitly via
docker-pull.

fixes #141

Signed-off-by: Andrew Seigner <andrew@sig.gy>
2018-01-23 12:02:28 -08:00