do-release-upgrade fails from 11.04 to 11.10 due to missing btrfs-tools package

Bug #873974 reported by Sami Haahtinen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
update-manager (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Release upgrade doesn't check whether btrfs-tools package is installed before attempting to use the commands within the package.

I have an 11.04 installation (that was done with the installer, possibly one of the betas) that uses btrfs root, but doesn't have btrfs-tools installed. The attached trace is displayed, but doesn't really offer any useful help on what went wrong. The easiest way to fix this would be to check whether the btrfs-tools package is installed and install it if not, assuming that the user is using btrfs.

--------8<--------
Traceback (most recent call last):

File "/tmp/update-manager-VGGglZ/oneiric", line 7, in <module>
sys.exit(main())

File "/tmp/update-manager-VGGglZ/DistUpgradeMain.py", line 199, in
main
if app.run():

File "/tmp/update-manager-VGGglZ/DistUpgradeController.py", line
1670, in run
return self.fullUpgrade()

File "/tmp/update-manager-VGGglZ/DistUpgradeController.py", line
1639, in fullUpgrade
if not self.doDistUpgrade():

File "/tmp/update-manager-VGGglZ/DistUpgradeController.py", line
1033, in doDistUpgrade
self._maybe_create_apt_btrfs_snapshot()

File "/tmp/update-manager-VGGglZ/DistUpgradeController.py", line
1017, in _maybe_create_apt_btrfs_snapshot
res = apt_btrfs.create_btrfs_root_snapshot(prefix)

File "/tmp/update-manager-VGGglZ/apt_btrfs_snapshot.py", line 123, in
create_btrfs_root_snapshot
os.path.join(mp, self.SNAP_PREFIX+additional_prefix+snap_id))

File "/tmp/update-manager-VGGglZ/apt_btrfs_snapshot.py", line 70, in
btrfs_subvolume_snapshot
source, dest])

File "/usr/lib/python2.7/subprocess.py", line 486, in call
return Popen(*popenargs, **kwargs).wait()

File "/usr/lib/python2.7/subprocess.py", line 672, in __init__
errread, errwrite)

File "/usr/lib/python2.7/subprocess.py", line 1213, in _execute_child
raise child_exception

OSError: [Errno 2] No such file or directory

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for your bugreport.

Could you please check with:
$ sudo cat /tmp/update-manager-VGGglZ/DistUpgradeVersion.py
what version you are using?

This should be fixed in version 0.152.25.1 that got uploaded a couple of hours ago. If you have this
version and its still crashing the fix is incomplete :/

Changed in update-manager (Ubuntu):
status: New → Incomplete
Revision history for this message
Sami Haahtinen (ressu) wrote :

I tried this last night and this morning I installed btrfs-tools before trying again. So it could be that the problem has been indeed fixed.

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks Sami for this update. Once the btrfs-tools were installed the upgrade worked as expected?

Revision history for this message
Sami Haahtinen (ressu) wrote :

Yes, the upgrade is running as we speak. Snapshot was created properly before the actual upgrade, so the only problem would appear to be the missing btrfs-tools

Changed in update-manager (Ubuntu):
status: Incomplete → Fix Released
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.