noble: deb822 format support of /etc/apt/sources.list.d/ubuntu.sources instead of /etc/apt/sources.list

Bug #2048129 reported by Chad Smith
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
livecd-rootfs (Ubuntu)
Fix Released
Undecided
Julian Andres Klode

Bug Description

In ubuntu noble and later, cloud-init 24.1 based releases will automatically remove /etc/apt/sources.list and emit a warning log in cloud-init.log (and cloud-init status exit 2) if it finds in in images during first boot in favor of writing deb822 formatted /etc/apt/sources.list.d/ubuntu.sources files.

If livecd-rootfs is manipulating /etc/apt/sources.list in images which have cloud-init enabled, expect that this file will be removed by cloud-init on first boot and any tooling checking for cloud-init status will see a warning exit code.

The non-zero exit code (2) indicating a warning condition when removing /etc/apt/sources.list in cloud-init
is enough to break CI/CD tooling for scripts which rely on cloud-init status --wait exit codes.

Note: the behavior of cloud-init on mantic and earlier is to overwrite /etc/apt/sources.list on first boot which does This behavior of preferring unifed apt sources in /etc/apt/source.list will be retained on by cloud-init on earlier ubuntu releases even when 24.1 SRUs to stable releases

Also there is preinstalled image support in livecd-rootfs where cloud-init may not be enabled. It would be good to understand the implications if preinstall images migrate to /etc/apt/sources.list.d/ubuntu.sources instead of /etc/apt/sources.list. Be aware that images which contain duplicated sources defined /etc/apt/sources.list and /etc/apt/sources.list.d/ubuntu.sources would also generate warnings from apt like
LP: #2045086

Related branches

Steve Langasek (vorlon)
tags: added: foundations-todo
Changed in livecd-rootfs (Ubuntu):
assignee: nobody → Julian Andres Klode (juliank)
milestone: none → ubuntu-24.04-feature-freeze
Changed in livecd-rootfs (Ubuntu):
status: New → In Progress
Changed in livecd-rootfs (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package livecd-rootfs - 24.04.32

---------------
livecd-rootfs (24.04.32) noble; urgency=medium

  * Switch from sources.list to ubuntu.sources (LP: #2048129)
  * Setup preinstalled pool in preinstalled-pool.sources

 -- Julian Andres Klode <email address hidden> Mon, 12 Feb 2024 21:55:42 +0100

Changed in livecd-rootfs (Ubuntu):
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.