Long paths are not handled correctly when deleting partition mappings

Bug #1497108 reported by Leo Arias
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
Fix Released
Medium
Sergio Schvezov
multipath-tools (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

The bug seems to be in kpartx and long path handling
sergiusens@lindon:~/source/launchpad.net/snapcraft$ cd /
sergiusens@lindon:/$ sudo kpartx -avs ^C
sergiusens@lindon:/$ sudo losetup -a
[sudo] password for sergiusens:
sergiusens@lindon:/$ sudo kpartx -avs /home/sergiusens/source/launchpad.net/snapcraft/examples/godd/images/15.04.img
add map loop0p1 (252:0): 0 8192 linear /dev/loop0 8192
add map loop0p2 (252:1): 0 131072 linear /dev/loop0 16384
add map loop0p3 (252:2): 0 2097152 linear /dev/loop0 147456
add map loop0p4 (252:3): 0 2097152 linear /dev/loop0 2244608
add map loop0p5 (252:4): 0 3272704 linear /dev/loop0 4341760
sergiusens@lindon:/$ sudo losetup -a
/dev/loop0: [2050]:7872194 (/home/sergiusens/source/launchpad.net/snapcraft/examples/godd/images/15.04.img)
sergiusens@lindon:/$ sudo kpartx -ds /home/sergiusens/source/launchpad.net/snapcraft/examples/godd/images/15.04.img
sergiusens@lindon:/$ sudo losetup -a
/dev/loop0: [2050]:7872194 (/home/sergiusens/source/launchpad.net/snapcraft/examples/godd/images/15.04.img)

What follows is the snapcraft specific report
When I run snapcraft run, it boots the snappy kvm but leaves two loop devices behind:

$ losetup -a
/dev/loop0: []: (/home/elopio/workspace/canonical/snapcraft/trunk/examples/downloader-with-wiki-parts/image/15.04.img)
/dev/loop1: []: (/home/elopio/workspace/canonical/snapcraft/trunk/examples/downloader-with-wiki-parts/image/15.04.img)

Tested in vivid and wily

To reproduce:
bzr branch lp:snapcraft
cd snapcraft
cd examples/downloader-with-wiki-parts
./../../bin/snapcraft assemble
./../../bin/snapcraft run

$ apt-cache policy ubuntu-device-flash
ubuntu-device-flash:
  Instalita: 0.31-0ubuntu1
  Kandidato: 0.31-0ubuntu1
  Version table:
 *** 0.31-0ubuntu1 0
        500 http://ppa.launchpad.net/snappy-dev/tools-proposed/ubuntu/ vivid/main amd64 Packages
        500 http://ppa.launchpad.net/snappy-dev/tools/ubuntu/ vivid/main amd64 Packages
        100 /var/lib/dpkg/status
     0.20-0ubuntu1 0
        500 http://cr.archive.ubuntu.com/ubuntu/ vivid/universe amd64 Packages

Revision history for this message
Leo Arias (elopio) wrote :
Changed in snapcraft:
milestone: none → 0.2
Changed in snapcraft:
importance: Undecided → Medium
assignee: nobody → Sergio Schvezov (sergiusens)
Changed in snapcraft:
status: New → In Progress
description: updated
summary: - snapcraft run leaves multiple snappy loop partitions
+ Long paths are not handled correctly when deleting partition mappings
Changed in snapcraft:
status: In Progress → Fix Committed
Changed in snapcraft:
status: Fix Committed → Fix Released
Revision history for this message
Robie Basak (racb) wrote :

What is the task for multipath-tools here for, please?

Changed in multipath-tools (Ubuntu):
status: New → Incomplete
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.