https://rancher.com/ logo
Title
a

able-dream-65187

05/18/2022, 5:24 PM
Hello, I’ve been handed the new requirement of updating all our virtual machines to ubuntu 22.04 lts. I’m trying to create a new k8s cluster via rancher/vSphere like normal, but I can’t get my ubuntu 22 template to provision. I’ve gotten past quite a few hurdles with it, and it’s really close, but is now failing here:
2022/05/18 14:43:19 [INFO] [node-controller-rancher-machine] Docker is up and running!
2022/05/18 14:43:19 [INFO] [node-controller-rancher-machine] (staging-worker-5) Closing plugin on server side
2022/05/18 14:43:19 [INFO] [node-controller-rancher-machine] (flag-lookup) Closing plugin on server side
2022/05/18 14:43:20 [INFO] Generating and uploading node config staging-worker-5
2022/05/18 14:43:20 [ERROR] [node] enqueing node pool c-b87mv:np-7wt7s
2022/05/18 14:43:20 [ERROR] error syncing 'c-b87mv/m-vglz6': handler node-controller: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
I’ve googled around, and I can’t find much about this error, so I’m hoping someone can help me out, thanks in advance.
m

miniature-megabyte-23048

05/18/2022, 5:44 PM
how did you make the 22.04 template you're cloning from? it reads like cloud-init isn't running and the ssh connection isn't being established because the user/key wasn't injected on the downstream node
a

able-dream-65187

05/18/2022, 5:47 PM
I originally had the
waiting for ssh to become available
issue, but I got past that by adding this line to `/etc/cloud/cloud.cfg.d/99-installer.cfg`:
datasource_list: [ "NoCloud", "VMwareGuestInfo" ]
And I ran these commands as suggested by a bug report I found on github:
rm -fr /var/lib/cloud/instances/
rm -fr /var/lib/cloud/instance 
rm -f /etc/machine-id /var/lib/dbus/machine-id
truncate -s 0 /etc/machine-id
ln -s /etc/machine-id /var/lib/dbus/machine-id
Huzzah!! I figured it out. Ubuntu server 22.04 lts (specifically its sshd version) doesn’t allow
ssh-rsa
by default. I had to modify my ssh config to allow it.
m

miniature-megabyte-23048

05/18/2022, 9:12 PM
boom!
glad you found it
in other news... maybe we should be upgrading machine's key encrpytion?
a

able-dream-65187

05/18/2022, 9:13 PM
Thanks, and thanks for the help. Yeah probably time to upgrade the encryption. I’m not on the newest rancher version, so I haven’t looked to see if that’s something that has already been fixed.
In the end, the 3 things I had to modify to get ubuntu 22.04 lts working were: 1. Mess with cloud-init to get ssh working 2. Pre-install docker and skip that part during provisioning (my version of Rancher was trying to install a version that isn’t in 22's manifest) 3. Modify sshd to accept
ssh-rsa