NoCloud data in kernel commandline not parsing multiple keys

Bug #2028562 reported by James Falcon
8
This bug affects 1 person
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://10.1.1.2:8888/;h=ncn-s001

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/python3.6/site-packages/cloudinit/cmd/main.py", line 766, in status_wrapper
[ 39.881829] cloud-init[3154]: ret = functor(name, args)
[ 39.901820] cloud-init[3154]: File "/usr/lib/python3.6/site-packages/cloudinit/cmd/main.py", line 384, in main_init
[ 39.921828] cloud-init[3154]: init.fetch(existing=existing)
[ 39.937825] cloud-init[3154]: File "/usr/lib/python3.6/site-packages/cloudinit/stages.py", line 443, in fetch
[ 39.957823] cloud-init[3154]: return self._get_data_source(existing=existing)
[ 39.977823] cloud-init[3154]: File "/usr/lib/python3.6/site-packages/cloudinit/stages.py", line 341, in _get_data_source
[ 39.997823] cloud-init[3154]: self.reporter,
[ 40.013821] cloud-init[3154]: File "/usr/lib/python3.6/site-packages/cloudinit/sources/__init__.py", line 1005, in find_source
[ 40.033840] cloud-init[3154]: ds_list = list_sources(cfg_list, ds_deps, pkg_list)
[ 40.049839] cloud-init[3154]: File "/usr/lib/python3.6/site-packages/cloudinit/sources/__init__.py", line 1053, in list_sources
[ 40.069834] cloud-init[3154]: ds_name, pkg_list, ["get_datasource_list"]
[ 40.085829] cloud-init[3154]: File "/usr/lib/python3.6/site-packages/cloudinit/importer.py", line 70, in find_module
[ 40.105831] cloud-init[3154]: if not importlib.util.find_spec(full_path):
[ 40.121839] cloud-init[3154]: File "/usr/lib64/python3.6/importlib/util.py", line 88, in find_spec
[ 40.141927] cloud-init[3154]: parent = __import__(parent_name, fromlist=['__path__'])
[ 40.157838] cloud-init[3154]: ModuleNotFoundError: No module named 'DataSourcenocloud-net;s=http://10'

[Test Case]
* Boot a VM with kernel command-line set to "ds=nocloud-net;s=http://host-ip/;h=hostname
* Verify no traceback has been produced in /var/log/cloud-init.log
* Verify DataSourceNoCloud is correctly detected in /var/log/cloud-init.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://github.com/canonical/cloud-init/issues/4271
Upstream fix: https://github.com/canonical/cloud-init/pull/4273

James Falcon (falcojr)
description: updated
James Falcon (falcojr)
description: updated
James Falcon (falcojr)
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 23.3~4ga31370af-0ubuntu1

---------------
cloud-init (23.3~4ga31370af-0ubuntu1) mantic; urgency=medium

  * Upstream snapshot based on upstream/main at a31370af.
    - Bugs fixed in this snapshot: (LP: #1923363, #2028562, #2028784)
  * d/cloud-init.maintscript: Remove the unused hook-network-manager
    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

Changed in cloud-init (Ubuntu Mantic):
status: New → Fix Released
James Falcon (falcojr)
description: updated
description: updated
Revision history for this message
Chris Halse Rogers (raof) wrote : Please test proposed package

Hello James, or anyone else affected,

Accepted cloud-init into lunar-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/23.2.2-0ubuntu0~23.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-lunar to verification-done-lunar. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-lunar. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in cloud-init (Ubuntu Lunar):
status: New → Fix Committed
tags: added: verification-needed verification-needed-lunar
Revision history for this message
Chris Halse Rogers (raof) wrote :

Hello James, or anyone else affected,

Accepted cloud-init into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/23.2.2-0ubuntu0~22.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in cloud-init (Ubuntu Jammy):
status: New → Fix Committed
tags: added: verification-needed-jammy
Changed in cloud-init (Ubuntu Focal):
status: New → Fix Committed
tags: added: verification-needed-focal
Revision history for this message
Chris Halse Rogers (raof) wrote :

Hello James, or anyone else affected,

Accepted cloud-init into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/23.2.2-0ubuntu0~20.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
James Falcon (falcojr) wrote :

Attached is the verification of Lunar, Jammy, and Focal

James Falcon (falcojr)
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
Revision history for this message
Andreas Hasenack (ahasenack) wrote : Update Released

The verification of the Stable Release Update for cloud-init has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 23.2.2-0ubuntu0~23.04.1

---------------
cloud-init (23.2.2-0ubuntu0~23.04.1) lunar; urgency=medium

  * Upstream snapshot based on 23.2.2.
    List of changes from upstream can be found at
    https://raw.githubusercontent.com/canonical/cloud-init/23.2.2/ChangeLog
    - Bugs fixed in this snapshot: (LP: #2028562, #2028784)

 -- Alberto Contreras <email address hidden> Tue, 01 Aug 2023 14:12:28 +0200

Changed in cloud-init (Ubuntu Lunar):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 23.2.2-0ubuntu0~22.04.1

---------------
cloud-init (23.2.2-0ubuntu0~22.04.1) jammy; urgency=medium

  * Upstream snapshot based on 23.2.2.
    List of changes from upstream can be found at
    https://raw.githubusercontent.com/canonical/cloud-init/23.2.2/ChangeLog
    - Bugs fixed in this snapshot: (LP: #2028562, #2028784)

 -- Alberto Contreras <email address hidden> Tue, 01 Aug 2023 14:16:07 +0200

Changed in cloud-init (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 23.2.2-0ubuntu0~20.04.1

---------------
cloud-init (23.2.2-0ubuntu0~20.04.1) focal; urgency=medium

  * Upstream snapshot based on 23.2.2.
    List of changes from upstream can be found at
    https://raw.githubusercontent.com/canonical/cloud-init/23.2.2/ChangeLog
    - Bugs fixed in this snapshot: (LP: #2028562, #2028784)

 -- Alberto Contreras <email address hidden> Tue, 01 Aug 2023 14:18:47 +0200

Changed in cloud-init (Ubuntu Focal):
status: Fix Committed → Fix Released
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.