Release upgrade fails due to apt-btrfs-snapshot not being able to take a snapshot

Bug #1771811 reported by Kees Bakker
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apt-btrfs-snapshot (Ubuntu)
New
Undecided
Unassigned

Bug Description

Upgrading 16.04, with btrfs and apt-btrfs-snapshot fails with
a message that it cannot create a snapshot.

The package apt-btrfs-snapshot (0.3.4.2) is installed. Notice that
on Xenial you need to create a symlink /sbin/btrfs -> /bin/btrfs in
order to get the snapshooting to work with apt.

From the error messages it looks like it is trying to create a second
snapshot with the same name. Perhaps it's a race condition.

=============================8X==================================
Upgrading
Create a snapshot of '/tmp/apt-btrfs-snapshot-mp-s2c_k3qa/@' in '/tmp/apt-btrfs-snapshot-mp-s2c_k3qa/@apt-snapshot-release-upgrade-bionic-2018-05-17_13:59:08'
Fetched 0 B in 0s (0 B/s)
Supported
Create a snapshot of '/tmp/apt-btrfs-snapshot-mp-m5onzpjo/@' in '/tmp/apt-btrfs-snapshot-mp-m5onzpjo/@apt-snapshot-2018-05-17_13:59:09'
Supported
Create a snapshot of '/tmp/apt-btrfs-snapshot-mp-l8vw4ipx/@' in '/tmp/apt-btrfs-snapshot-mp-l8vw4ipx/@apt-snapshot-2018-05-17_13:59:09/@'
Supported
Create a snapshot of '/tmp/apt-btrfs-snapshot-mp-p4ob7l8q/@' in '/tmp/apt-btrfs-snapshot-mp-p4ob7l8q/@apt-snapshot-2018-05-17_13:59:09/@'
ERROR: cannot snapshot '/tmp/apt-btrfs-snapshot-mp-p4ob7l8q/@': File exists
Exception during pm.DoInstall(): E:Problem executing scripts DPkg::Pre-Invoke 'if [ -x /usr/bin/apt-btrfs-snapshot ] && apt-btrfs-snapshot supported; then apt-btrfs-snapshot snapshot; fi ', E:Sub-process returned an error code
No pending crash reports. Try --help for more information.

Could not install the upgrades

The upgrade has aborted. Your system could be in an unusable state. A
recovery will run now (dpkg --configure -a).

Upgrade complete

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

To continue please press [ENTER]
=============================8X==================================

Revision history for this message
Kees Bakker (keestux) wrote :

The quick workaround is to remove the symlink in /sbin.

You can/should make a snapshot before removing the symlink.

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.