[Merge] ~bryce/ubuntu/+source/coreutils:project-c2439-ignore-snaps-groovy into ubuntu/+source/coreutils:ubuntu/devel

Bryce Harrington bryce at bryceharrington.org
Mon Jul 6 20:55:39 UTC 2020


Bryce Harrington has proposed merging ~bryce/ubuntu/+source/coreutils:project-c2439-ignore-snaps-groovy into ubuntu/+source/coreutils:ubuntu/devel.

Requested reviews:
  Ubuntu Core Development Team (ubuntu-core-dev)
  Canonical Server Team (canonical-server)
Related bugs:
  Bug #1219529 in coreutils (Ubuntu): "df -x tmpfs fails to exclude udev (/dev)"
  https://bugs.launchpad.net/ubuntu/+source/coreutils/+bug/1219529
  Bug #1756595 in apt (Ubuntu): "disk space info inadvertently provides all installed snaps"
  https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1756595

For more details, see:
https://code.launchpad.net/~bryce/ubuntu/+source/coreutils/+git/coreutils/+merge/386911

This excludes squashfs and devtmpfs filesystems.  A better fix would distinguish between snap squashfs and other squashfs usages by filtering on the 'x-gdu.hide' tag, which can be seen via `mount`.  This tag is visible via libmount, however unfortunately coreutils (and gnulib) avoid dependence on libmount because it depends on selinux which in turn depends on a lot of extraneous stuff.

I was not able to identify an alternate way to access this tag from within the gnulib codebase, however that would be a helpful refinement to the fix.  I plan to continue investigation into that, but meanwhile this patch will improve df usability considerably.  The patch is what upstream appears to be considering, and I suspect is close to what will be landed there.

Test case:

  $ multipass launch --name ubuntu-groovy daily:20.10
  $ multipass exec ubuntu-groovy -- bash

  Inside vm:
  $ df -h
  Filesystem      Size  Used Avail Use% Mounted on
  udev            474M     0  474M   0% /dev
  tmpfs            99M  944K   98M   1% /run
  /dev/sda1       4.7G  1.3G  3.5G  26% /
  tmpfs           491M     0  491M   0% /dev/shm
  tmpfs           5.0M     0  5.0M   0% /run/lock
  tmpfs           491M     0  491M   0% /sys/fs/cgroup
  /dev/sda15      105M  3.9M  101M   4% /boot/efi
  tmpfs            99M     0   99M   0% /run/user/1000
  /dev/loop0       30M   30M     0 100% /snap/snapd/8140
  /dev/loop1       55M   55M     0 100% /snap/core18/1754
  /dev/loop2       72M   72M     0 100% /snap/lxd/15913

  Install fix
  ¢ sudo add-apt-repository ppa:bryce/coreutils-project-c2439-ignore-snaps
  ¢ apt-get install coreutils
  ...
  Setting up coreutils (8.30-3ubuntu3~ppa1) ...
  ...
  ¢ df
  Filesystem     1K-blocks    Used Available Use% Mounted on
  tmpfs             100480     948     99532   1% /run
  /dev/sda1        4901996 1423260   3462352  30% /
  tmpfs             502388       0    502388   0% /dev/shm
  tmpfs               5120       0      5120   0% /run/lock
  tmpfs             502388       0    502388   0% /sys/fs/cgroup
  /dev/sda15        106858    3934    102924   4% /boot/efi
  tmpfs             100476       0    100476   0% /run/user/1000



-- 
Your team Ubuntu Core Development Team is requested to review the proposed merge of ~bryce/ubuntu/+source/coreutils:project-c2439-ignore-snaps-groovy into ubuntu/+source/coreutils:ubuntu/devel.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: review-diff.txt
Type: text/x-diff
Size: 2302 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-reviews/attachments/20200706/a1722814/attachment.diff>


More information about the Ubuntu-reviews mailing list