NoCloud data in kernel commandline not parsing multiple keys
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Unassigned | ||
Jammy |
Fix Released
|
Undecided
|
Unassigned | ||
Lunar |
Fix Released
|
Undecided
|
Unassigned | ||
Mantic |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
=== Begin SRU Template ===
[Impact]
23.2's refactoring of kernel command line handling introduced a regression such that only a single datasource key is handled, rather than the multiple keys that worked before. When multiple keys are specified, the datasource handling code will now Traceback and not detect the datasource. For example, with the following:
ds=nocloud-net;s=http://
The local-hostname (h) key would never get processed, the following is generated:
[ 39.825817] cloud-init[3154]: Traceback (most recent call last):
[ 39.861830] cloud-init[3154]: File "/usr/lib/
[ 39.881829] cloud-init[3154]: ret = functor(name, args)
[ 39.901820] cloud-init[3154]: File "/usr/lib/
[ 39.921828] cloud-init[3154]: init.fetch(
[ 39.937825] cloud-init[3154]: File "/usr/lib/
[ 39.957823] cloud-init[3154]: return self._get_
[ 39.977823] cloud-init[3154]: File "/usr/lib/
[ 39.997823] cloud-init[3154]: self.reporter,
[ 40.013821] cloud-init[3154]: File "/usr/lib/
[ 40.033840] cloud-init[3154]: ds_list = list_sources(
[ 40.049839] cloud-init[3154]: File "/usr/lib/
[ 40.069834] cloud-init[3154]: ds_name, pkg_list, ["get_datasourc
[ 40.085829] cloud-init[3154]: File "/usr/lib/
[ 40.105831] cloud-init[3154]: if not importlib.
[ 40.121839] cloud-init[3154]: File "/usr/lib64/
[ 40.141927] cloud-init[3154]: parent = __import_
[ 40.157838] cloud-init[3154]: ModuleNotFoundE
[Test Case]
* Boot a VM with kernel command-line set to "ds=nocloud-net;s=http://
* Verify no traceback has been produced in /var/log/
* Verify DataSourceNoCloud is correctly detected in /var/log/
* Verify the seed url is contacted
* Verify the local-hostname is set correctly
[Regression Potential]
If there are other ways we can be mis-parsing the command line, then cloud-init won't receive them properly.
[Other Info]
Upstream bug: https:/
Upstream fix: https:/
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
tags: |
added: verification-done-focal verification-done-jammy verification-done-lunar removed: verification-needed verification-needed-focal verification-needed-jammy verification-needed-lunar |
tags: | added: verification-done |
This bug was fixed in the package cloud-init - 23.3~4ga31370af -0ubuntu1
--------------- f-0ubuntu1) mantic; urgency=medium
cloud-init (23.3~4ga31370a
* Upstream snapshot based on upstream/main at a31370af. init.maintscrip t: Remove the unused hook-network- manager
- Bugs fixed in this snapshot: (LP: #1923363, #2028562, #2028784)
* d/cloud-
conffile. (LP: #2027861)
* d/control: Add python3-passlib as needed for testing
-- James Falcon <email address hidden> Mon, 31 Jul 2023 11:38:42 -0500