I tested the package cloud-init 0.7.5-0ubuntu1.23 from trusty-proposed and confirm it works as expected.
# TEST KEYS $ cat googlekeys test:ssh-rsa AAAA[...]+1LRl [email protected] ubuntu:ssh-rsa AAAA[...]+2LRl [email protected] cloudinit:ssh-rsa AAAA[...]+3LRl test # CREATE THE INSTANCE $ gcloud compute instances create ubuntu1404cloudinittest --image-family ubuntu-1404-lts --image-project ubuntu-os-cloud --metadata-from-file =ssh-keys=googlekeys --metadata=block-project-ssh-keys=True --zone us- central1-a # BEFORE THE UPDATE $ gcloud compute --project "ubuntu-os-support" ssh --zone "us- central1-a" ubuntu1404cloudinittest $ sudo cat /home/ubuntu/.ssh/authorized_keys ssh-rsa AAAA[...]+fVtBKqZ fubar@famine # Added by Google ssh-rsa AAAA[...]+2LRl [email protected] # AFTER THE UPDATE $ sudo sh -c 'echo deb http://us-central1.gce.archive.ubuntu.com/ubuntu/ trusty-proposed main restricted universe multiverse >> /etc/apt/sources.list' $ sudo apt update $ sudo apt install cloud-init [...] Setting up cloud-init (0.7.5-0ubuntu1.23) ... [...] $ sudo sh -c 'cat /dev/null > /home/ubuntu/.ssh/authorized_keys' $ sudo rm -rf /var/lib/cloud/instance* $ sudo reboot $ gcloud compute --project "ubuntu-os-support" ssh --zone "us- central1-a" ubuntu1404cloudinittest $ sudo cat /home/ubuntu/.ssh/authorized_keys ssh-rsa AAAA[...]+2LRl [email protected] ssh-rsa AAAA[...]+3LRl test # Added by Google ssh-rsa AAAA[...]+2LRl [email protected] cloud-init now works the same way as Ubuntu 16.04 does. Thanks! Bonus test: I tested that oslogin also works well: $ gcloud compute instances add-metadata ubuntu1404cloudinittest --metadata enable-oslogin=TRUE --zone "us-central1-a" Updated [https://www.googleapis.com/compute/v1/projects/ubuntu-os-support/zones/us-central1-a/instances/ubuntu1404cloudinittest]. $ gcloud compute --project "ubuntu-os-support" ssh --zone "us-central1-a" ubuntu1404cloudinittest [...] Welcome to Ubuntu 14.04.5 LTS (GNU/Linux 4.4.0-137-generic x86_64) [...] ** Tags removed: verification-needed-trusty ** Tags added: verification-done-trusty -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1781039 Title: GCE cloudinit and ubuntu keys from metadata to ubuntu authorized_keys To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1781039/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
