Rke: --ssh-agent-auth broke between v0.1.8-rc9 and v0.1.8-rc10

Created on 23 Jul 2018  路  4Comments  路  Source: rancher/rke

Synopsis:
It looks like --ssh-agent-auth broke somewhere between v0.1.8-rc9 and v0.1.8-rc10. Below, I've got the key loaded in my agent, and everything works as expected in rc9. Bump to rc10 and it starts complaining about a file it shouldn't need to check.

RKE version:
v0.1.8-rc10 and up

Docker version: (docker version,docker info preferred)
n/a

Operating system and kernel: (cat /etc/os-release, uname -r preferred)
macOS Sierra 10.12.6 (16G1212)

Type/provider of hosts: (VirtualBox/Bare-metal/AWS/GCE/DO)
ubuntu 16.04 hosts

cluster.yml file:
n/a

Steps to Reproduce:

$ ~/bin/rke_darwin-amd64-v0.1.8-rc10 up --config infra-chd-1/cluster.yml --ssh-agent-auth
INFO[0000] Building Kubernetes cluster                  
INFO[0000] [dialer] Setup tunnel for host [10.12.196.44] 
WARN[0000] Failed to set up SSH tunneling for host [10.12.196.44]: Can't establish dialer connection: Error while reading SSH key file: open /Users/<user>/.ssh/id_rsa: no such file or directory 
INFO[0000] [dialer] Setup tunnel for host [10.12.196.75] 
WARN[0000] Failed to set up SSH tunneling for host [10.12.196.75]: Can't establish dialer connection: Error while reading SSH key file: open /Users/<user>/.ssh/id_rsa: no such file or directory 
INFO[0000] [dialer] Setup tunnel for host [10.12.196.253] 
WARN[0000] Failed to set up SSH tunneling for host [10.12.196.253]: Can't establish dialer connection: Error while reading SSH key file: open /Users/<user>/.ssh/id_rsa: no such file or directory 
WARN[0000] Removing host [10.12.196.44] from node lists 
WARN[0000] Removing host [10.12.196.75] from node lists 
WARN[0000] Removing host [10.12.196.253] from node lists 
FATA[0000] Cluster must have at least one etcd plane host 
$ ~/bin/rke_darwin-amd64-v0.1.8-rc9 up --config infra-chd-1/cluster.yml --ssh-agent-auth
INFO[0000] Building Kubernetes cluster                  
INFO[0000] [dialer] Setup tunnel for host [10.12.196.44] 
INFO[0000] [dialer] Setup tunnel for host [10.12.196.75] 
INFO[0001] [dialer] Setup tunnel for host [10.12.196.253] 
INFO[0002] [state] Found local kube config file, trying to get state from cluster 
INFO[0002] [reconcile] Local config is not vaild, rebuilding admin config 
INFO[0002] [reconcile] Rebuilding and updating local kube config 
INFO[0002] Successfully Deployed local admin kubeconfig at [infra-chd-1/kube_config_cluster.yml] 
INFO[0002] Successfully Deployed local admin kubeconfig at [infra-chd-1/kube_config_cluster.yml] 
INFO[0002] Successfully Deployed local admin kubeconfig at [infra-chd-1/kube_config_cluster.yml] 
INFO[0002] [state] Fetching cluster state from Kubernetes 
...

Results:
--ssh-agent-auth not being honored in versions v0.1.8-rc10 and up.

kinbug

Most helpful comment

v0.1.10-rc2

--ssh-agent-auth works correctly (with key loaded into ssh-agent), and cluster is brought up successfully.

All 4 comments

I had the same problem. I solved it by creating the file id_rsa.

touch ~/.ssh/id_rsa

The same is a temporary arrangement. They should correct the problem, if in the configuration there is 'ssh_agent_auth: true' you must omit the file id_rsa.

Bug introduced in this PR #724

Fixed in https://github.com/rancher/rke/pull/883, tested using the latest master. Works as expected.

v0.1.10-rc2

--ssh-agent-auth works correctly (with key loaded into ssh-agent), and cluster is brought up successfully.

Was this page helpful?
0 / 5 - 0 ratings