There are no APT sources configured in /etc/apt/sources.list or /etc/apt/sources.list.d.

Bug #2062561 reported by Chris Johnston
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Landscape Client
Fix Committed
Critical
Mitch Burton
landscape-client (Ubuntu)
Fix Released
Critical
Mitch Burton

Bug Description

[ Impact ]

 * 24.04 changed apt sources to deb822 format. This causes landscape-client's
   package-reporter to report errors to landscape-server, specifically "There
   are no APT sources configured in /etc/apt/sources.list or
   /etc/apt/sources.list.d". This error doesn't block package reporting, but it
   does impact reporting of configured APT sources.

 * This affects all releases with deb822 sources - noble onward - and so should
   be applied to noble

 * The patch turns on deb822 support only if it is available to preserve
   backward compat

[ Test Plan ]

 * Reproducing the bug should requires registering a client with a Landscape
   Server

sudo apt install landscape-client
sudo landscape-config # progress through the wizard

 * After some time, server should report "1 computer is having issues reporting
   packages" in the alerts panel in the top right.

 * Navigating to /account/<account_name>/computers/?criteria=alert:package-reporter
   lists the registered computer.

 * Clicking the alert in the alerts panel shows the registered computer in the
   list, along with Error output "There are no APT sources configured in
   /etc/apt/sources.list or /etc/apt/sources.list.d."

[ Where problems could occur ]

 * Reporting on non-deb822 *.list sources could break, alone or when present in
   combination with deb822 sources.

 * Landscape package activities: install, remove, upgrade could fail or could
   fail to report packages after they complete.

 * This is a change to landscape/lib, which is also used in landscape-sysinfo,
   part of motd. If it breaks, it could cause issues in the login MOTD.

[ Other Info ]

 * Landscape server can still instruct the client to write non-deb822 sources,
   this fix only targets reporting of deb822 sources, not configuration of
   sources.

=== ORIGINAL BUG REPORT FOLLOWS ===

It looks like 24.04 is changing how apt sources work..

$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=23.10
DISTRIB_CODENAME=mantic
DISTRIB_DESCRIPTION="Ubuntu 23.10"
$ cat /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu mantic restricted main multiverse universe
# deb-src http://archive.ubuntu.com/ubuntu mantic restricted main multiverse universe
deb http://archive.ubuntu.com/ubuntu mantic-updates restricted main multiverse universe
# deb-src http://archive.ubuntu.com/ubuntu mantic-updates restricted main multiverse universe
deb http://archive.ubuntu.com/ubuntu mantic-security restricted main multiverse universe
# deb-src http://archive.ubuntu.com/ubuntu mantic-security restricted main multiverse universe
deb http://archive.ubuntu.com/ubuntu mantic-backports restricted main multiverse universe
# deb-src http://archive.ubuntu.com/ubuntu mantic-backports restricted main multiverse universe

$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=24.04
DISTRIB_CODENAME=noble
DISTRIB_DESCRIPTION="Ubuntu Noble Numbat (development branch)"
$ cat /etc/apt/sources.list
# Ubuntu sources have moved to /etc/apt/sources.list.d/ubuntu.sources
$ cat /etc/apt/sources.list.d/ubuntu.sources
Types: deb
URIs: http://archive.ubuntu.com/ubuntu/
Suites: noble noble-updates noble-backports
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

Types: deb
URIs: http://archive.ubuntu.com/ubuntu/
Suites: noble-security
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

With this, Landscape is now reporting an alert "Package reporting issues":

There are no APT sources configured in /etc/apt/sources.list or /etc/apt/sources.list.d.

Related branches

Changed in landscape-client:
assignee: nobody → Mitch Burton (mitchburton)
Changed in landscape-client (Ubuntu):
assignee: nobody → Mitch Burton (mitchburton)
Revision history for this message
Mitch Burton (mitchburton) wrote :

I'm not seeing the "Package reporting issues" error against the Production SaaS Landscape. This is on noble

ubuntu@new-hippo:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=24.04
DISTRIB_CODENAME=noble
DISTRIB_DESCRIPTION="Ubuntu Noble Numbat (development branch)"

Using version 24.02-0ubuntu4 of landscape-client. Can you give me more information?
Which Landscape server version are you registering the client against?
Anything interesting in /var/log/landscape/package-reporter.log?

Changed in landscape-client:
status: New → Incomplete
Changed in landscape-client (Ubuntu):
status: New → Incomplete
Changed in landscape-client:
importance: Undecided → Critical
Revision history for this message
Mitch Burton (mitchburton) wrote :

Despite not seeing the error right away, I am able to, from additional info provided by Chris, track it to its source, which is a lack of deb822 source-handling in landscape-client.

This is pretty easy to fix, the dependency landscape-client uses to collect source/channel info has a flag for this, so we just need to start using it, and obviously test it thoroughly.

Working on that.

Changed in landscape-client:
status: Incomplete → Confirmed
Changed in landscape-client (Ubuntu):
status: Incomplete → Confirmed
Changed in landscape-client:
status: Confirmed → In Progress
Changed in landscape-client (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
Mitch Burton (mitchburton) wrote :
Changed in landscape-client (Ubuntu):
importance: Undecided → Critical
Changed in landscape-client:
status: In Progress → Fix Committed
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package landscape-client - 24.02-0ubuntu5

---------------
landscape-client (24.02-0ubuntu5) noble; urgency=medium

  * d/p/2062561-fix-deb822-sources.patch: fix to include deb822 formatted
    sources when collecting source channels (LP: #2062561)

 -- Austin Nhung <email address hidden> Mon, 22 Apr 2024 15:42:34 -0600

Changed in landscape-client (Ubuntu):
status: In Progress → 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.