Merge pull request #8907 from sharifelgamal/external-ssh

respect native-ssh flag
pull/9157/head
Thomas Strömberg 2020-09-01 22:37:37 -07:00 committed by GitHub
commit d66a8e68c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 7 deletions

View File

@ -273,17 +273,17 @@ func provisionWithDriver(cmd *cobra.Command, ds registry.DriverState, existing *
}
}
mRunner, preExists, mAPI, host, err := node.Provision(&cc, &n, true, viper.GetBool(deleteOnFailure))
if err != nil {
return node.Starter{}, err
}
if viper.GetBool(nativeSSH) {
ssh.SetDefaultClient(ssh.Native)
} else {
ssh.SetDefaultClient(ssh.External)
}
mRunner, preExists, mAPI, host, err := node.Provision(&cc, &n, true, viper.GetBool(deleteOnFailure))
if err != nil {
return node.Starter{}, err
}
return node.Starter{
Runner: mRunner,
PreExists: preExists,

View File

@ -42,14 +42,14 @@ func CreateSSHShell(api libmachine.API, cc config.ClusterConfig, n config.Node,
return errors.Errorf("%q is not running", machineName)
}
client, err := host.CreateSSHClient()
if native {
ssh.SetDefaultClient(ssh.Native)
} else {
ssh.SetDefaultClient(ssh.External)
}
client, err := host.CreateSSHClient()
if err != nil {
return errors.Wrap(err, "Creating ssh client")
}