canonical / cloud-init

Official upstream for the cloud-init: cloud instance initialization
https://cloud-init.io/
Other
3k stars 885 forks source link

CloudStack sshkey reset #2537

Open ubuntu-server-builder opened 1 year ago

ubuntu-server-builder commented 1 year ago

This bug was originally filed in Launchpad as LP: #1440265

Launchpad details
affected_projects = ['cloud-init (Ubuntu)']
assignee = None
assignee_name = None
date_closed = None
date_created = 2015-04-04T00:42:58.929206+00:00
date_fix_committed = None
date_fix_released = None
id = 1440265
importance = medium
is_complete = False
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1440265
milestone = None
owner = pdion891
owner_name = pdion891
private = False
status = confirmed
submitter = pdion891
submitter_name = pdion891
tags = ['cloudstack']
duplicates = []

Launchpad user pdion891(pdion891) wrote on 2015-04-04T00:42:58.929206+00:00

CloudStack provide capability to reset SSH keys for an existing VM with the API: resetSSHKeyForVirtualMachine [1]

creating an Instance with SSHkey currently work with cloud-init. But, CloudStack have the capability to reset it, the VM must be shutdown, sshkey replaced then the vm restart, current cloud-init does not update the user sshkey using the new one available from the dhcp server.

tested with cloud-init-0.7.7

current method to mitigate this behavior is to use cloudstack scripts into the /var/lib/cloud/scripts/per-boot/ which does not benefit from cloud-init configuration capabilities.

[1] http://cloudstack.apache.org/docs/api/apidocs-4.5/root_admin/resetSSHKeyForVirtualMachine.html

ubuntu-server-builder commented 1 year ago

Launchpad user Launchpad Janitor(janitor) wrote on 2015-11-18T06:19:29.940311+00:00

Status changed to 'Confirmed' because the bug affects multiple users.

ubuntu-server-builder commented 1 year ago

Launchpad user pdion891(pdion891) wrote on 2017-04-20T13:58:21.941947+00:00

Is there a way to replicate the set-password behavior configuration like:

cloud_config_modules:
 - [ set-passwords, always ]