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

ProxyCommand support #227

Merged
merged 2 commits into from
Feb 22, 2018
Merged

ProxyCommand support #227

merged 2 commits into from
Feb 22, 2018

Conversation

cbeckr
Copy link
Contributor

@cbeckr cbeckr commented Dec 10, 2017

This adds basic support for connecting via jump hosts.

@cbeckr cbeckr requested a review from a team December 10, 2017 19:06
@cbeckr cbeckr force-pushed the proxy_command branch 2 times, most recently from b5ee7c9 to 025894b Compare December 10, 2017 19:22
cbeckr added a commit to mes/inspec that referenced this pull request Dec 10, 2017
NOTE This is just a simple wrapper which relies on the underlying support being added to train: inspec/train#227

Signed-off-by: Christian Becker <[email protected]>
…dy and Train::Transports::WinRM.wait_until_ready

Signed-off-by: Christian Becker <[email protected]>
Signed-off-by: Christian Becker <[email protected]>
@jquick
Copy link
Contributor

jquick commented Dec 14, 2017

@cbeckr - Thank you so much for your first contribution! Welcome to the family :)

This looks great and I will test it out soon and get back to you!

Copy link
Contributor

@jquick jquick left a comment

Choose a reason for hiding this comment

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

Great work on this. Just a minor potential caching issue.

@@ -113,7 +114,7 @@ def wait_until_ready
message: "Waiting for SSH service on #{@hostname}:#{@port}, " \
"retrying in #{delay} seconds",
)
execute(PING_COMMAND.dup)
run_command(PING_COMMAND.dup)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we want to use the run_command_via_connection here instead. The run_command has the potential for caching which could cause unexpected results.

@@ -80,7 +80,7 @@ def wait_until_ready
retry_limit: @max_wait_until_ready / delay,
retry_delay: delay,
)
execute(PING_COMMAND.dup)
run_command(PING_COMMAND.dup)
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above, I think it would be safer to run_command_via_connection

@jquick
Copy link
Contributor

jquick commented Feb 13, 2018

I think this looks good for now, I plan on updating all the "wait_until_ready" flags as its like this on other transports also.

@jquick jquick merged commit 8c7f50c into inspec:master Feb 22, 2018
cbeckr added a commit to mes/inspec that referenced this pull request Feb 25, 2018
NOTE This is just a simple wrapper which relies on the underlying support being added to train: inspec/train#227

Signed-off-by: Christian Becker <[email protected]>
jquick pushed a commit to inspec/inspec that referenced this pull request Mar 22, 2018
NOTE This is just a simple wrapper which relies on the underlying support being added to train: inspec/train#227

Signed-off-by: Christian Becker <[email protected]>
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.

2 participants