The disk-space-needed estimate doesn't account for the snaps
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-release-upgrader (Ubuntu) |
Fix Released
|
Medium
|
Łukasz Zemczak | ||
Disco |
Fix Released
|
Medium
|
Unassigned | ||
Eoan |
Fix Released
|
Medium
|
Łukasz Zemczak |
Bug Description
[Impact]
Since there have been reports that users might fail to boot to a working gdm in the case of a full disk, we need to make sure users upgrading from and older release to disco/eoan have enough space for the upgrade to succeed. Currently we are installing snaps to replace certain debs on the system (+ refreshing existing snaps to newer channels/branches). The additional size required for the snap replacements was not taken into consideration when performing the upgrade, which might lead to edge-cases of users not having enough space for the upgrade to succeed.
[Test Case]
* Prepare a bionic machine
* Make sure ubuntu-desktop and snapd are installed on it
* Install core18 from stable and, for instance, gnome-characters from the stable/ubuntu-18.04 branch
* Do snap list and snap refresh other gnome-related snaps to stable/ubuntu-18.04
* Perform an upgrade to disco (with the --proposed option, to use disco-proposed)
* Reboot
* Make sure the update succeeded and all the installed gnome snaps now track stable/ubuntu-19.04 instead
* Check /var/log/
Additional test case to make sure update-manager did not regress due to the changes:
* On the newly upgraded system (or a new disco instance with ubuntu-
* On the terminal, run `update-manager` and wait for the window to appear
* Once the list of available upgrades appears, press the 'install now' button
* Upgrades should install and no python traceback should be printed on the terminal
[Regression Potential]
As with any change touching the upgrade code-path, this change also carries a risk and should be well tested before going forward. That being said, the fix has been specifically basically limited to DistUpgradeQuirks to make regressions less likely. Additionally, unit tests have been added for every modified code-path.
If any regressions should be found, the most likely place for those would be in size estimation, causing users to get notified of lack of space when they shouldn't. Another possible location would be all the things regarding replacing the debs with snaps - so either failures in snap replacement installation or refreshing.
[Original Description]
Looking at the code change recently made to install snaps on upgrade, it seems like there was no change made to the disk-space-estimate code. We had some reports recently that bionic might fail to boot to a working gdm on full disk so that could potentially be an important issue for upgraders
Related branches
- Brian Murray: Needs Fixing
-
Diff: 440 lines (+321/-38)3 files modifiedDistUpgrade/DistUpgradeCache.py (+2/-0)
DistUpgrade/DistUpgradeQuirks.py (+115/-38)
tests/test_quirks.py (+204/-0)
tags: | added: rls-bb-incoming |
tags: | added: id-5b5b80eb89d784de8e6deacd |
tags: |
added: rls-ee-incoming removed: rls-cc-incoming |
tags: | removed: id-5b5b80eb89d784de8e6deacd |
tags: | added: id-5d0baca7c9fcc35d33039355 |
description: | updated |
Changed in ubuntu-release-upgrader (Ubuntu Eoan): | |
status: | Triaged → In Progress |
assignee: | nobody → Łukasz Zemczak (sil2100) |
tags: | removed: rls-ee-incoming |
Changed in ubuntu-release-upgrader (Ubuntu Disco): | |
status: | New → Triaged |
importance: | Undecided → Medium |
description: | updated |
description: | updated |
tags: |
added: verification-done verification-done-disco removed: verification-needed verification-needed-disco |
Given that the snaps are located in /var/lib/snapd and we currently allocate free space to download debs in /var/cache/ apt/archives and that it is a corner case for those to not be the same mount point it is likely that the space allocated for /var/cache/ apt/archives would be enough free space. However, the release upgrader doesn't currently clean up the download .debs at all let alone before installing the snaps. So one solution would be to have the release upgrader clean up after itself.