Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds failfast mode for unroutable requests. #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

stevej
Copy link

@stevej stevej commented Apr 10, 2017

  • Fixes Issue Improve namerd and bad path error handling #26.
  • Adds a failfast mode for currently unroutable requests.
  • Adds an integration test for failfast mode.
  • Adds a mock namerd.
  • Adds a mock static webserver.
  • Improves some comments.

Problem:
If a request coming through is unroutable (e.g. if no routable path is given) then linkerd-tcp hangs.

Solution:
Add a failfast mode that immediately drops unroutable requests.

@stevej
Copy link
Author

stevej commented Apr 10, 2017

Should I take this opportunity to bump linkerd-tcp to 0.0.3?

@klingerf
Copy link
Member

@stevej re: linkerd-tcp-0.0.3, I think we should do another release soon too, but was thinking we could have a separate branch to update CHANGES.md once we're ready to release. So for now I'd vote to leave it as is.

@stevej stevej force-pushed the stevej/issue_26 branch 2 times, most recently from c23d894 to caefde3 Compare April 12, 2017 17:28
* Fixes Issue #26
* Adds a failfast mode for currently unroutable requests.
* Adds an integration test failfast.
* Adds a mock namerd.
* Adds a mock static webserver.
* Improves some comments.
@klingerf
Copy link
Member

I gave this branch a try and was able to successfully reproduce the fail fast behavior that's intended. I ran into a separate issue thought that seems potentially related.

I started by configuring linkerd-tcp with a path that's resolvable using namerd's dtab, and verified that I could successfully proxy an HTTP request through linkerd-tcp.

After making the initial successful request, I used namerctl to change the the dtab in namerd so that the path was no longer resolvable. After that, I made a second request to linkerd-tcp, which failed. In the linkerd-tcp logs, I see:

ERROR:linkerd_tcp::app         : sink error
thread 'admin' panicked at 'could not run admin: Error { repr: Kind(Other) }', /Users/rustbuild/src/rust-buildbot/slave/stable-dist-rustc-mac/build/src/libcore/result.rs:868
note: Run with `RUST_BACKTRACE=1` for a backtrace.

After that I made a third request to linkerd-tcp, which causes the process to panic and exit with status code 101. In the linkerd-tcp logs, I see:

INFO :tacho::recorder : dropping metrics
thread 'main' panicked at 'could not run proxies: Error { repr: Custom(Custom { kind: Other, error: SendError("...") }) }', /Users/rustbuild/src/rust-buildbot/slave/stable-dist-rustc-mac/build/src/libcore/result.rs:868

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants