vmbuilder fails with "device-mapper: remove ioctl failed: No such device or address" - Wrong device name loop0pp1

Bug #911704 reported by Jean-Baptiste Lallement on 2012-01-04
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
vm-builder (Ubuntu)
High
Canonical Server Team
Precise
High
Canonical Server Team

Bug Description

During cleanup vm-build tries to remove loop0ppN but the real name is loop0pN

TEST CASE:
1. In a terminal run the command:
ubuntu-vm-builder kvm oneiric

EXPECTED RESULT:
An oneiric VM

ACTUAL RESULT:
VM build fails with
  File "/usr/bin/ubuntu-vm-builder", line 24, in <module>
    uvb.main()
  File "/usr/lib/python2.7/dist-packages/VMBuilder/contrib/cli.py", line 223, in main
    hypervisor.install_os()
  File "/usr/lib/python2.7/dist-packages/VMBuilder/hypervisor.py", line 72, in install_os
    self.call_hooks('unmount_partitions')
  File "/usr/lib/python2.7/dist-packages/VMBuilder/distro.py", line 67, in call_hooks
    call_hooks(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/VMBuilder/util.py", line 165, in call_hooks
    getattr(context, func, log_no_such_method)(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/VMBuilder/hypervisor.py", line 105, in unmount_partitions
    disk.unmap()
  File "/usr/lib/python2.7/dist-packages/VMBuilder/disk.py", line 195, in unmap
    run_cmd('dmsetup', 'remove', parted_oldmap, ignore_fail=ignore_fail)
  File "/usr/lib/python2.7/dist-packages/VMBuilder/util.py", line 120, in run_cmd
    raise VMBuilderException, "Process (%s) returned %d. stdout: %s, stderr: %s" % (args.__repr__(), status, mystdout.buf, mystderr.buf)
VMBuilder.exception.VMBuilderException: Process (['dmsetup', 'remove', 'loop0pp1']) returned 1. stdout: , stderr: device-mapper: remove ioctl failed: No such device or address
Command failed

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: python-vm-builder 0.12.4+bzr475-0ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-7.13-generic 3.2.0-rc7
Uname: Linux 3.2.0-7-generic x86_64
ApportVersion: 1.90-0ubuntu1
Architecture: amd64
Date: Wed Jan 4 12:14:48 2012
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
PackageArchitecture: all
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: vm-builder
UpgradeStatus: No upgrade log present (probably fresh install)

Jean-Baptiste Lallement (jibel) wrote :
Changed in vm-builder (Ubuntu Precise):
importance: Undecided → High
assignee: nobody → Canonical Server Team (canonical-server)
tags: added: rls-mgr-p-tracking
tags: added: qa-daily-testing
Jean-Baptiste Lallement (jibel) wrote :

output of ubuntu-vm-builder kvm oneiric

Jean-Baptiste Lallement (jibel) wrote :
summary: - vmbuilder fails with device-mapper: remove ioctl failed: No such device
- or address - Wrong device name loop0pp1
+ vmbuilder fails with "device-mapper: remove ioctl failed: No such device
+ or address" - Wrong device name loop0pp1
Jean-Baptiste Lallement (jibel) wrote :

not only the name is wrong but also the devices are already removed when dmsetup tries to remove them.

Launchpad Janitor (janitor) wrote :

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

Changed in vm-builder (Ubuntu):
status: New → Confirmed
tags: added: iso-testing
Sergio Rubio (rubiojr) wrote :

Removing that extra "p" in line 193 from file /usr/share/pyshared/VMBuilder/disk.py worked for me if that helps.

Sergio Rubio (rubiojr) wrote :
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package vm-builder - 0.12.4+bzr476-0ubuntu1

---------------
vm-builder (0.12.4+bzr476-0ubuntu1) precise; urgency=low

  [rubiojr]
  * Drop extraneous 'p' before partition number. (LP: #911704)
 -- Serge Hallyn <email address hidden> Wed, 18 Jan 2012 15:52:37 -0600

Changed in vm-builder (Ubuntu Precise):
status: Confirmed → Fix Released
Serge Hallyn (serge-hallyn) wrote :

Thanks, rubiojr, pushed your patch for precise.

John-Mark Bell (jmb202) wrote :

This issue is still present in precise. It appears that bzr477 reintroduced it.

Jason Tackaberry (tack) wrote :

I had this problem in 12.04.1. It is resolved with #1012946. Once I installed parted 2.3-8ubuntu5.1 (which is scheduled for 12.04.2) I was able to use vmbuilder with a logical volume as a raw device.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers