[Bug 1785096] Re: dist-upgrader should clean up downloaded debs

Brian Murray brian at ubuntu.com
Mon Aug 6 19:33:30 UTC 2018


I tested an upgrade from Ubuntu 16.04 to Ubuntu 18.04 today using the
dist-upgrader from -proposed (manually downloaded and extracted b/c you
can't use do-release -p and -d) before the upgrade I had installed an
updated version of snapd so /var/cache/apt/archives was 14 MB. After the
upgrade it was still 14 MB indicating that the debs downloaded for the
upgrade had been removed from disk.

bdmurray at clean-xenial-amd64:~/u-r-u$ du -sh /var/cache/apt/archives
du: cannot read directory '/var/cache/apt/archives/partial': Permission denied
14M     /var/cache/apt/archives
bdmurray at clean-xenial-amd64:~/u-r-u$ ls -lh /var/cache/apt/archives/
total 14M
-rw-r----- 1 root root    0 Jul 19  2016 lock
drwx------ 2 _apt root 4.0K Aug  6 11:22 partial
-rw-r--r-- 1 root root 1.7K Jul 19 03:58 snap-confine_2.34.2_amd64.deb
-rw-r--r-- 1 root root  14M Jul 19 03:58 snapd_2.34.2_amd64.deb
-rw-r--r-- 1 root root 1.6K Jul 19 03:58 ubuntu-core-launcher_2.34.2_amd64.deb

Setting to verification-done.

** Tags removed: verification-needed verification-needed-bionic
** Tags added: verification-done verification-done-bionic

-- 
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/1785096

Title:
  dist-upgrader should clean up downloaded debs

Status in ubuntu-release-upgrader package in Ubuntu:
  Fix Released
Status in ubuntu-release-upgrader source package in Bionic:
  Fix Committed

Bug description:
  During the release upgrade process packages for the new release are
  downloaded to the apt configuration "Dir::Cache::archives" (usually
  /var/cache/apt/archives/), but those are not removed from disk until
  some time later. With the dist-upgrader growing support for
  transitioning from debian packages to snaps for some software it's
  possible that there may not be enough free space on disk (as the
  upgrader doesn't currently calculate the space need which is bug
  1783597) to support installing the snaps. Subsequently, it'd be good
  to remove the debs from disk after the upgrade has completed since
  they are likely on /var which is where the snaps will need space.

  [Test Case]
  1) Run 'du -sh /var/cache/apt/archives'
  2) Upgrade from Ubuntu 16.04 to Ubuntu 18.04
  3) Run 'du -sh /var/cache/apt/archives'
  4) Observe that /var/cache/apt/archives is taking up more space than it did.

  With the version of the dist-upgrader in -proposed
  /var/cache/apt/archives should be nearly empty - some debs may be left
  because they are left over from regular updates in Ubuntu 16.04 and
  were not part of the release upgrade process.

  [Regression Potential]
  It's possible that the debs are removed too early and if there were a failure to upgrade it'd be hard to recover from. One way to test this would be to use the apt-clone file from 1766890 which would create an upgrade failure.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1785096/+subscriptions



More information about the foundations-bugs mailing list