Introduction of subplatform around 18.5 broke ConfigDrive
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Fix Released
|
Undecided
|
Chad Smith |
Bug Description
I create custom LXD images from Ubuntu minimal images for an OpenStack environment based on LXD containers and the images I created worked on Ubuntu 18.04 hosts until around the cloud-init v18.5 release where subplatform was introduced. My images produced this error:
Traceback (most recent call last):
File "/usr/lib/
if s.update_
File "/usr/lib/
result = self.get_data()
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
'subplatform': self.subplatform}}
File "/usr/lib/
self.
File "/usr/lib/
return '%s (%s)' % (subplatform_type, self.source)
This code uses and if/elif which leaves subplatform_type undefined on my image. I don't have any idea what this is supposed to be, but looking at other DataSources, they use an if/else so that subplatform_type is alway defined. The diff that makes this work for me and works like other DataSources is attached.
Related branches
- Server Team CI bot: Approve (continuous-integration)
- Chad Smith: Approve
-
Diff: 84 lines (+22/-7)2 files modifiedcloudinit/sources/DataSourceConfigDrive.py (+3/-3)
tests/unittests/test_datasource/test_configdrive.py (+19/-4)
Changed in cloud-init: | |
status: | New → Triaged |
This is the patch diff that makes cloud-init 19.2 work for me.