DataSourceEc2 does not implement get_public_ssh_keys

Bug #1077875 reported by Tomas Karasek
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
New
Undecided
Unassigned

Bug Description

Hi,
I noticed cloudinit 0.7.0 in our deployment of OpenStack is not downloading public keys from the keypairs from the cloud controller over the EC2 api.

As that's a task of the ssh cloudconfig plugin I went through it and noticed it indeed tries to get the keys from the datasource:
keys = cloud.get_public_ssh_keys()

The cloud method only calls get_public_ssh_keys of the datasource and DataSourceEc2 does not implement one so the dummy moethod from the parent class is called.

So the public keys from keypairs of users are not downloaded.

Is this a bug? Or is there a reason for this?

Tags: ec2 ssh
Revision history for this message
Tomas Karasek (tomas-karasek) wrote :

hi, more investigation showed me that the def get_public_ssh_keys(self) is indeed implemented in DataSource class in sources/__init__.py. However, the "isinstance" test for self.metadata['public-keys'] doesn't work as expected. It seems it's because self.metadata is instance of boto.utils.LazyLoadMetadata and the value on 'public-keys' is not evaluated.

when putting "print self.metadata['public-keys']" before the isinstance checks, the public key is properly downloaded.

Is this addressed in some bug or fix yet?

Revision history for this message
Scott Moser (smoser) wrote :

Hi, Tomas, thanks for opening this bug. It is a known issue, filed originally under bug bug 1077875.

Could you please report in bug 1077875 what version of boto you're using, and what distro/release you saw this on (ie, was it on Ubuntu 12.10?).

Revision history for this message
Scott Moser (smoser) wrote :

Bah. the other bug is bug 1068801.

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.