Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Add support for SSH sock proxying to scheduler #1456

Merged
merged 4 commits into from
Sep 29, 2016

Conversation

billonahill
Copy link
Contributor

In #1412 we ran into a need for socks proxying from the scheduler to TMaster. This patch fixes that by creating two tunneling approaches: port forwarding (existing behavior required for ZK since ZK client doesn't support proxies) and sock proxy (preferred approach for tunneling HTTP).

The previous tunneling approach was written specifically for ZK. This pulls the tunneling configs out of ZK and into it's own config loader that can be used by state manager, scheduler, etc. See NetworkUtils and ShellUtils for the bulk of the changes.

Also removed a few occurances of verbose flags, which were not used and should be replaces by the logging level controls that now handle that.

Related to #1292.

@billonahill billonahill added this to the 0.14.4 milestone Sep 29, 2016
@billonahill billonahill self-assigned this Sep 29, 2016

# SSH tunnel host
heron.scheduler.tunnel.host: "my.tunnel.host"
Copy link
Contributor

Choose a reason for hiding this comment

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

Add a new line at the end?

heron.statemgr.tunnel.verify.count: 10

# SSH tunnel host
heron.statemgr.tunnel.host: "my.tunnel.host"
Copy link
Contributor

Choose a reason for hiding this comment

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

Add a new line at the end?

private NetworkUtils() {
}

public static class TunnelConfig {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we make it separate class or a nested class?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I could go either way on this. I made it an inner class since it's tightly couple to, and only intended for, NetworkUtils but if we think it should stand on it's own I'm ok with it.

@maosongfu
Copy link
Contributor

looks good to me. 👍

@billonahill billonahill merged commit fbf403c into apache:master Sep 29, 2016
@billonahill billonahill deleted the billg/tunneling branch September 29, 2016 22:39
nicknezis pushed a commit that referenced this pull request Sep 14, 2020

* Add newlines at the end of configs

* Fix unit test
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants