Rke: Unable to perform `rke up` with ssh_key_path field

Created on 25 Mar 2018  路  6Comments  路  Source: rancher/rke

RKE version:

v0.1.3-rc4

Docker version: (docker version,docker info preferred)

Client:
 Version:   18.03.0-ce
 API version:   1.37
 Go version:    go1.9.4
 Git commit:    0520e24
 Built: Wed Mar 21 23:10:01 2018
 OS/Arch:   linux/amd64
 Experimental:  false
 Orchestrator:  swarm

Server:
 Engine:
  Version:  18.03.0-ce
  API version:  1.37 (minimum version 1.12)
  Go version:   go1.9.4
  Git commit:   0520e24
  Built:    Wed Mar 21 23:08:31 2018
  OS/Arch:  linux/amd64
  Experimental: false

Operating system and kernel: (cat /etc/os-release, uname -r preferred)

Ubuntu 16.04

17.4.0

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

AWS

cluster.yml file:

nodes:
  - address: 10.0.1.10
    user: ubuntu
    role: [controlplane]
    ssh_key_path: ~/.ssh/my-key.pem
  - address: 10.0.1.11
    user: ubuntu
    role: [worker]
    ssh_key_path: ~/.ssh/my-key.pem
  - address: 10.0.1.12
    user: ubuntu
    role: [etcd]
    ssh_key_path: ~/.ssh/my-key.pem

Steps to Reproduce:

run rke up --config path/to/cluster.yaml

Results:

The ssh key is not found, with these error logs for each of the hosts:

INFO[0000] [dialer] Setup tunnel for host [10.0.1.10]  
WARN[0000] Failed to set up SSH tunneling for host [10.0.1.10]: Can't retrieve Docker Info: error during connect: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.24/info: Failed to dial ssh using address [10.0.1.10:22]: Error configuring SSH: ssh: no key found 

The key at ~/.ssh/my-key.pem does exist, and making the paths to them absolute does not help things. Adding the literal ssh_key field to the cluster.yml does work.

Looking through the code a bit, it appears the the following function may be swallowing an error of some kind:
https://github.com/rancher/rke/blob/486cea84646d1608a3548d61d7caa385308f7a8b/hosts/tunnel.go#L123-L129

Still though, I'm not able to get that field working.

All 6 comments

@kujenga i am not able to reproduce this problem at all:

my cluster config:

> cat test.yml 
---
nodes:
  - address: x.x.x.x
    user: ubuntu
    role:
    - controlplane
    - etcd
    - worker
    ssh_key_path: ~/.ssh/my-key.pem
> ./rke up --config test.yml  
INFO[0000] Building Kubernetes cluster                  
INFO[0000] [dialer] Setup tunnel for host [x.x.x.x] 
INFO[0002] [network] Deploying port listener containers
....



md5-73ac133acfe02302023a54d1a4b75453



> ls ~/.ssh/my-key.pem 
/home/hussein/.ssh/my-key.pem

Interesting, @galal-hussein what version of rke are you using?

Is this resolved or still experiencing it @kujenga ?

I have not had much time to re-visit this issue recently, but no, it has not been resolved.

@kujenga Please re-try with the latest RKE CLI v0.1.6 and if you are still facing issues, please re-open.

Still facing this issue #639

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hyahm picture hyahm  路  3Comments

randrewedwards picture randrewedwards  路  3Comments

dan-evolvere picture dan-evolvere  路  3Comments

de13 picture de13  路  4Comments

rstpv picture rstpv  路  4Comments