DataSourceEc2 does not implement get_public_ssh_keys
Bug #1077875 reported by
Tomas Karasek
This bug report is a duplicate of:
Bug #1068801: Metadata lazy loaded (even when disabled).
Edit
Remove
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_
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?
To post a comment you must log in.
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. LazyLoadMetadat a 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?