unable to ssh to user using google driver with newer machine images
When trying to upgrade our images of Ubuntu 16.04 with docker-machine in our Gitlab Runner environment we were experiencing issues where the instances were failing to provision. In looking into this, I discovered that the docker-user was getting rejected when it was attempting to log into ssh.
- Working image with existing code:
ubuntu-1604-xenial-v20161130
- Failing image:
ubuntu-1604-xenial-v20210928
In digging into this further it appears that Google deprecated sshKeys
in metadata and client a while back in favor of ssh-keys
so the user was no longer being created. In addition to that, the newer images no longer were using the older google_daemon.
To get this working, I modified the existing sshKeys
to ssh-keys
on the google driver. As cloud-init was not creating the docker-user by default, I found if I leveraged the ubuntu user (--google-username "ubuntu")
, it would add the key to authorized_keys and provision the node correctly.
This change also allowed me to leverage the latest 20.04 image without issues with the v14.6.0 runner.
Is this something we could update to allow continuing support on Google Cloud?