-
-
Notifications
You must be signed in to change notification settings - Fork 745
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
Correctly use port specified in the SSH config file in the remote SSH runner #4661
Conversation
one is provided in the SSH config and it doesn't match a default port. Part of #4660.
We now only support Paramiko based remote runner. Fabric one has been removed and deprecated a long time ago.
port for indiviual entries) and don't default port to 22 in the runner metadata to avoid issues with default values.
I made a change so we don't include a default value for the This is the same approach we use for other default values which can also be read from the config (username, port, etc.) and it's more robust since it means it covers and works correctly in all the scenarios. |
@@ -6,8 +6,7 @@ | |||
runner_parameters: | |||
bastion_host: | |||
description: 'The host SSH connections will be proxied through. Note: This connection | |||
is made using the same parameters as the final connection, and is only used |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This description was old and out of date since we don't use fabric runner for a long time anymore.
This pull request updates / fixes remote command and script runner to correctly use SSH port specified in the SSH config file if a non-default port is specified in the SSH config file and if SSH config file functionality is enabled (
ssh_runner.use_ssh_config
st2.conf config option is set toTrue
).NOTE: Due to the way of how we specify and handle default parameter values in the runner metadata file, this change is not 100% ideal, but it should cover most scenarios (Current code make it impossible to distinguish if a default parameter value is used or if user specified a value which matches a default value. Changing this would be more involved and also involves other parameters).
Resolves #4660.