do-release-upgrade failure leaves a btrfs snapshot

Bug #1723285 reported by Paul
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
ubuntu-release-upgrader (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

1. do-release-upgrade should at least notify upon failure that there is a snapshot, and ideally explain the options (delete versus rollback).
2. There should be a command line parameter to make do-release-upgrade not snapshot even if the filesystem supports it.

Ironically, the failure was due to the snapshot using ~8 GiB and causing the root filesystem to run out of free space.

There had been notification of the snapshot earlier in the upgrade process ... immediately after the download completed, i.e. at the point when one is no longer supposed to interrupt the process. When do-release-upgrade failed however, there was no notification that this snapshot still existed:

Upgrading
Inhibiting until Ctrl+C is pressed...
Create a snapshot of '/tmp/apt-btrfs-snapshot-mp-9posd7z8/@' in '/tmp/apt-btrfs-snapshot-mp-9posd7z8/@apt-snapshot-release-upgrade-artful-2017-10-13_08:12:28'

[many lines of apt output here]

Installing new version of config file /etc/usb_modeswitch.conf ...
dpkg: unrecoverable fatal error, aborting:
 unable to install updated status of 'usb-modeswitch': No space left on device

Upgrade complete

The upgrade has completed but there were errors during the upgrade
process.

To continue please press [ENTER]

Because do-release-upgrade had cleaned up that mount in /tmp, manual cleanup had to involve re-mounting. To wit:

# mount -t btrfs /dev/sda1 /mnt
# btrfs subvolume delete /mnt/@apt-snapshot-release-upgrade-artful-2017-10-13_08\:12\:28
Delete subvolume (no-commit): '/mnt/@apt-snapshot-release-upgrade-artful-2017-10-13_08:12:28'
# dpkg -a --configure
[plus some manual fixes]

ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: ubuntu-release-upgrader-core 1:17.10.7
ProcVersionSignature: Ubuntu 4.13.0-15.16-generic 4.13.4
Uname: Linux 4.13.0-15-generic x86_64
ApportVersion: 2.20.7-0ubuntu3
Architecture: amd64
CrashDB: ubuntu
CurrentDesktop: GNOME
Date: Fri Oct 13 10:55:15 2017
InstallationDate: Installed on 2016-12-02 (314 days ago)
InstallationMedia: Ubuntu-GNOME 16.10 "Yakkety Yak" - Release amd64 (20161012.1)
PackageArchitecture: all
SourcePackage: ubuntu-release-upgrader
UpgradeStatus: Upgraded to artful on 2017-10-12 (0 days ago)

Revision history for this message
Paul (i41bktob-launchpad-net) wrote :
tags: added: zesty2artful
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntu-release-upgrader (Ubuntu):
status: New → Confirmed
Revision history for this message
Martin (martin3000) wrote :

Same here. Had 19GB free, but the snapshot took 18GB and the release-upgrade failed.

Revision history for this message
Paul (i41bktob-launchpad-net) wrote :

@martin3000 IIRC the default partition scheme is for /home to be in the root partition. Not saying you had that setup, just musing.

With the default partition scheme, taking a snapshot of essentially the entire disk without notifying the user means the user's normal activity can blow out the snapshot. E.g. the user deletes 100 GiB of old videos and copies on some new ones while the upgrade is in progress. This really should be an option during the upgrade.

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.