[Bug 2039113] Re: snap "core" is not removable: snap is used by the model (and ubuntu-advantage-tools used to install it by default on all installs)

Dimitri John Ledkov 2039113 at bugs.launchpad.net
Fri Jan 19 16:26:43 UTC 2024


** Information type changed from Public to Public Security

** Changed in: snapd (Ubuntu)
    Milestone: None => ubuntu-24.04

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to ubuntu-release-upgrader in
Ubuntu.
https://bugs.launchpad.net/bugs/2039113

Title:
  snap "core" is not removable: snap is used by the model (and ubuntu-
  advantage-tools used to install it by default on all installs)

Status in Canonical Livepatch Client:
  Fix Released
Status in snapd package in Ubuntu:
  New
Status in ubuntu-advantage-tools package in Ubuntu:
  Invalid
Status in ubuntu-release-upgrader package in Ubuntu:
  Invalid

Bug description:
  ubuntu-advantage-tools installs "core" snap even though canonical-
  livepatch snap exists for every base

  it seems like instead of installing core22/stable on jammy systems, it
  installs latest/stable with core snap base, making core snap
  uninstallable.

  I will try to reproduce this, but this is off.

  Jammy+ systems, must not have core snap as unremovable anymore.

  canonical-livepatch-client in latest/stable got updated to use
  base:core22, however all systems that tracked that channel in October
  2023 are now polluted with irremovable core snap.

  [Testcase]

  snap install canonical-livepatch-client
  snap refresh --channel core/stable canonical-livepatch-client (installs core snap as revision 246 is base:core)
  snap refresh --channel latest/stable
  snap remove core (impossible)
  (refresh to core18/stable, core20/stable latest/stable to get rid of old revisions that use core)

  $ grep -h '^base:' /snap/*/*/snap/snapcraft.yaml  | sort -u
  base: bare
  base: core18
  base: core20
  base: core22

  $ snap remove core
  error: cannot remove "core": snap "core" is not removable: snap is used by the model

  Potentially on my system previous revisions of the snap still hold
  back core snap being installed.

  === summary
  snapd: once core snap is installed, it can never be removed

  canonical-livepatch-client: does not provide base:bare build, nor does
  the default track point to most current base (today "base:core22");
  nor do latest/stable/ubuntu-MM.YY branches exist that use matching
  base (i.e. latest/stable/ubuntu-22.04 publishes the core22/stable snap
  revisions)

  ubuntu-advantage-tools: installs default track livepatch-client, which
  doesn't match a given LTS release

  ubuntu-release-upgrader: doens't currently switch canonical-livepatch-
  client to use modern/matching base snap track.

  ===

  ProblemType: Bug
  DistroRelease: Ubuntu 22.04
  Package: ubuntu-advantage-tools 29.4~22.04
  ProcVersionSignature: Ubuntu 6.2.0-34.34~22.04.1-generic 6.2.16
  Uname: Linux 6.2.0-34-generic x86_64
  NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
  ApportVersion: 2.20.11-0ubuntu82.5
  Architecture: amd64
  CasperMD5CheckResult: pass
  CurrentDesktop: ubuntu:GNOME
  Date: Thu Oct 12 00:22:38 2023
  InstallationDate: Installed on 2023-04-28 (166 days ago)
  InstallationMedia: Ubuntu 22.04.2 LTS "Jammy Jellyfish" - Release amd64 (20230223)
  SourcePackage: ubuntu-advantage-tools
  UpgradeStatus: No upgrade log present (probably fresh install)
  cloud-id.txt-error: Invalid command specified 'cloud-id'.
  uaclient.conf:
   contract_url: https://contracts.canonical.com
   log_level: debug

To manage notifications about this bug go to:
https://bugs.launchpad.net/canonical-livepatch-client/+bug/2039113/+subscriptions




More information about the foundations-bugs mailing list