users: stanza doesn't install Ec2 SSH key for user

Bug #1168431 reported by Steven Hardy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Expired
Medium
Unassigned

Bug Description

Related to bug 1100920, when you use the "old" users syntax, SSH keys for the user are installed, but if you use the "new" style users stanza, then they are not:

E.g:

user: bob

works OK (with the fix for #1100920, tested at rev 809)

However this does not (creates the user, but does not create/update the .ssh/authorized_keys):

users:
 - bob

Note I'm testing on openstack, and I want the key provided by the nova Ec2 metadata (DataSourceEc2) to be installed for the specified user.

I'm testing on Fedora, which has a default_user defined in /etc/cloud/cloud.cfg (attached) - this seems related, since the default ec2-user user is always installed (with .ssh/authorized_keys correctly populated), but the definition of a default user by the distribution seems to break the config I'm providing via nova.

AFAICS this is due to apply_credentials only being called for the default user, returned from ds.extract_default:

http://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/view/head:/cloudinit/config/cc_ssh.py#L110

Revision history for this message
Steven Hardy (shardy) wrote :
Scott Moser (smoser)
Changed in cloud-init:
status: New → Confirmed
importance: Undecided → Medium
Scott Moser (smoser)
description: updated
Revision history for this message
James Falcon (falcojr) wrote :
Changed in cloud-init:
status: Confirmed → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.