Introduction of subplatform around 18.5 broke ConfigDrive
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| cloud-init |
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) on 2019-11-04
- Chad Smith: Approve on 2019-11-04
-
Diff: 84 lines (+22/-7)2 files modifiedcloudinit/sources/DataSourceConfigDrive.py (+3/-3)
tests/unittests/test_datasource/test_configdrive.py (+19/-4)
NoRefill (david-kindred) wrote : | #1 |
NoRefill (david-kindred) wrote : | #2 |
This is the result of running "cloud-init collect-logs" from the failed container.
description: | updated |
Changed in cloud-init: | |
status: | New → Triaged |
NoRefill (david-kindred) wrote : | #3 |
Just wondering if the priority on this can be bumped. This was released into an Ubuntu 18.04.3 LTS release and broke compatibility. There is a simple patch attached.
Thanks.
Chad Smith (chad.smith) wrote : | #4 |
Hi David,
Thanks for this patch suggestion and yes we'd like to prioritize this fix as soon as possible. Would you be able to sign the CLA and put a branch proposal up with your patch suggestion plus the following unit test I've added?
CLA signup page https:/
I've reviewed your branch and added a unit test to cover this change here
https:/
Once you confirm signing the CLA for this code contribution we can immediately include you changeset in cloud-init.
To submit a branch for inclusion in cloud-init https:/
Also, don't hesitate to join us in #cloud-init channel on FreeNode with any questions and we'll get you fast-tracked through your initial cloud-init contribution. Again, thanks for making cloud-init great!
If you don't have an IRC client, opening this link in a browser will let you easily join and chat in our developer channel https:/
Changed in cloud-init: | |
status: | Triaged → In Progress |
assignee: | nobody → Chad Smith (chad.smith) |
This bug is fixed with commit 15fa1546 to cloud-init on branch master.
To view that commit see the following URL:
https:/
Changed in cloud-init: | |
status: | In Progress → Fix Committed |
This bug is believed to be fixed in cloud-init in version 19.2-79. If this is still a problem for you, please make a comment and set the state back to New
Thank you.
Changed in cloud-init: | |
status: | Fix Committed → Fix Released |
This is the patch diff that makes cloud-init 19.2 work for me.