Unable to create volumes on disk pools as parted support is missing

Bug #697046 reported by Edwin Chiu
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
libvirt (Ubuntu)
Fix Released
Medium
Unassigned
Lucid
Fix Released
Undecided
Unassigned
Maverick
Won't Fix
Undecided
Unassigned
Natty
Invalid
Undecided
Unassigned

Bug Description

SRU justification:

1. IMPACT:
libvirt is unable to create partitions to support volumes in physical disk devices (or logical disk devices).

2. HOW WAS BUG ADDRESSED: parted was added to build dependencies so that ./configure will build with its support. (libparted-dev was already in build dependencies)

3. MINIMAL PATCH - see debdiff in comment #8.

4. TEST CASE (using lvm):
Create a new logical volume:
  lvcreate -n sde -L 500M <vgname>
Initialise the volume using fdisk
  fdisk /dev/mapper/<vgname>-sde (exit using w to initialize partition table)
Create a new pool using this device (using attached sde.xml)
  virsh pool-define sde.xml
  virsh pool-start sde
Create a new volume in the pool:
  virsh vol-create-as --pool sde --name 1 --capacity 100M --allocation 100M

4. REGRESSION POTENTIAL - libvirt will now be built with support for parted, so any previously hidden bugs in that support could now come to light.

ORIGINAL BUG REPORT:

Ubuntu 10.10 x64
libvirt-bin:
  Installed: 0.8.3-1ubuntu14
  Candidate: 0.8.3-1ubuntu14

Error:

root@codis:/etc/libvirt/storage# virsh vol-create-as --pool sde --name 1 --capacity 100M --allocation 100M
error: Failed to create vol 1
error: internal error ' /dev/sde mkpart --script primary ext2 17408B 106928639B' exited with non-zero status 1 and signal 0: libvir: error : cannot execute binary : No such file or directory

Similar error in syslog:
Jan 2 23:30:03 codis libvirtd: 23:30:03.221: error : virRunWithHook:857 : internal error ' /dev/sde mkpart --script primary 1000341504B 1524629503B' exited with non-zero status 1 and signal 0: libvir: error : cannot execute binary : No such file or directory#012

Pool "sde" is a disk pool using GPT format:
<pool type='disk'>
  <name>sde</name>
  <uuid>5bdde906-722c-981c-128c-bf4496f5c508</uuid>
  <capacity>0</capacity>
  <allocation>0</allocation>
  <available>0</available>
  <source>
    <device path='/dev/sde'/>
    <format type='gpt'/>
  </source>
  <target>
    <path>/dev</path>
    <permissions>
      <mode>0700</mode>
      <owner>-1</owner>
      <group>-1</group>
    </permissions>
  </target>
</pool>

From build log, looks like parted headers are found, but not the binary, causing an empty DEFINE in config.h
Really this should be handled more gracefully, but that's another story....

https://launchpad.net/ubuntu/maverick/+source/libvirt/+builds?build_state=all

checking for DEVMAPPER... yes
checking for parted... no
checking parted/parted.h usability... yes
checking parted/parted.h presence... yes
checking for parted/parted.h... yes
checking for uuid_generate in -luuid... yes
checking for ped_device_read in -lparted... yes

Manually rebuilding it locally fixed the problem for me...

Edwin Chiu (edwin-chiu)
tags: added: disk kvm maverick pool virsh
Revision history for this message
James Page (james-page) wrote :

Reproduced against a logical volume (used in a physical disk device pool) in 10.10 x64

Changed in libvirt (Ubuntu):
status: New → Confirmed
Revision history for this message
James Page (james-page) wrote :
description: updated
description: updated
Revision history for this message
James Page (james-page) wrote :

Assuming that the lack of parted presense during the build process causes this issue 11.04 will suffer from the same issue:

http://launchpadlibrarian.net/61613745/buildlog_ubuntu-natty-amd64.libvirt_0.8.5-0ubuntu4_BUILDING.txt.gz

checking for lvs... /sbin/lvs
checking for iscsiadm... /sbin/iscsiadm
checking for DEVMAPPER... yes
checking for parted... no
checking parted/parted.h usability... yes
checking parted/parted.h presence... yes
checking for parted/parted.h... yes
checking for uuid_generate in -luuid... yes

Revision history for this message
James Page (james-page) wrote :

Completed a quick and dirty test build with parted as a build dependency for Maverick: this appears to resolve the issue (partitions are created to support volumes within the pool).

description: updated
Changed in libvirt (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Triaged
Revision history for this message
Edwin Chiu (edwin-chiu) wrote :

When will this be fixed in maverick and/or natty? The fix is trivial and reported almost 4 months ago......

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

@JamesPage,

exactly which dependency did you add? 'libparted0'? ('libparted0-dev' is already there, but I presume the configure check may be looking for something not in the -dev package).

Revision history for this message
Edwin Chiu (edwin-chiu) wrote : Re: [Bug 697046] Re: Unable to create volumes on disk pools as parted support is missing
Download full text (3.2 KiB)

configure is looking for the parted binary, so I think the missing
dependency is probably the parted package...

On Wed, May 4, 2011 at 09:50, Serge Hallyn <email address hidden>wrote:

> @JamesPage,
>
> exactly which dependency did you add? 'libparted0'? ('libparted0-dev'
> is already there, but I presume the configure check may be looking for
> something not in the -dev package).
>
> --
> You received this bug notification because you are a direct subscriber
> of the bug.
> https://bugs.launchpad.net/bugs/697046
>
> Title:
> Unable to create volumes on disk pools as parted support is missing
>
> Status in “libvirt” package in Ubuntu:
> Triaged
>
> Bug description:
> IMPACT:
> libvirt is unable to create partitions to support volumes in physical disk
> devices (or logical disk devices).
>
> TEST CASE (using lvm):
> Create a new logical volume:
> lvcreate -n sde -L 500M <vgname>
> Initialise the volume using fdisk
> fdisk /dev/mapper/<vgname>-sde (exit using w to initialize partition
> table)
> Create a new pool using this device (using attached sde.xml)
> virsh pool-define sde.xml
> virsh pool-start sde
> Create a new volume in the pool:
> virsh vol-create-as --pool sde --name 1 --capacity 100M --allocation
> 100M
>
> ORIGINAL BUG REPORT:
>
> Ubuntu 10.10 x64
> libvirt-bin:
> Installed: 0.8.3-1ubuntu14
> Candidate: 0.8.3-1ubuntu14
>
> Error:
>
> root@codis:/etc/libvirt/storage# virsh vol-create-as --pool sde --name 1
> --capacity 100M --allocation 100M
> error: Failed to create vol 1
> error: internal error ' /dev/sde mkpart --script primary ext2 17408B
> 106928639B' exited with non-zero status 1 and signal 0: libvir: error :
> cannot execute binary : No such file or directory
>
> Similar error in syslog:
> Jan 2 23:30:03 codis libvirtd: 23:30:03.221: error : virRunWithHook:857 :
> internal error ' /dev/sde mkpart --script primary 1000341504B 1524629503B'
> exited with non-zero status 1 and signal 0: libvir: error : cannot execute
> binary : No such file or directory#012
>
> Pool "sde" is a disk pool using GPT format:
> <pool type='disk'>
> <name>sde</name>
> <uuid>5bdde906-722c-981c-128c-bf4496f5c508</uuid>
> <capacity>0</capacity>
> <allocation>0</allocation>
> <available>0</available>
> <source>
> <device path='/dev/sde'/>
> <format type='gpt'/>
> </source>
> <target>
> <path>/dev</path>
> <permissions>
> <mode>0700</mode>
> <owner>-1</owner>
> <group>-1</group>
> </permissions>
> </target>
> </pool>
>
> From build log, looks like parted headers are found, but not the binary,
> causing an empty DEFINE in config.h
> Really this should be handled more gracefully, but that's another
> story....
>
>
> https://launchpad.net/ubuntu/maverick/+source/libvirt/+builds?build_state=all
>
> checking for DEVMAPPER... yes
> checking for parted... no
> checking parted/parted.h usability... yes
> checking parted/parted.h presence... yes
> checking for parted/parted.h... yes
> checking for uuid_generate in -luuid... yes
> checking for ped_device_read in -lparted... yes
>
> Manually rebuilding it locally fixed the problem f...

Read more...

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

With this debdiff applied, the build log shows:

checking for parted... /sbin/parted
checking for LIBPARTED... yes

Changed in libvirt (Ubuntu):
assignee: nobody → Serge Hallyn (serge-hallyn)
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Fix has been pushed for oneiric. We'll have to apply and wait for SRU for natty and maverick.

Changed in libvirt (Ubuntu):
status: Triaged → Fix Committed
Changed in libvirt (Ubuntu Lucid):
status: New → Confirmed
Changed in libvirt (Ubuntu Maverick):
status: New → Confirmed
Changed in libvirt (Ubuntu Natty):
status: New → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libvirt - 0.8.8-1ubuntu7

---------------
libvirt (0.8.8-1ubuntu7) oneiric; urgency=low

  * add parted to build-depends (LP: #697046)
 -- Serge Hallyn <email address hidden> Wed, 04 May 2011 19:54:43 -0500

Changed in libvirt (Ubuntu):
status: Fix Committed → Fix Released
description: updated
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted libvirt into natty-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in libvirt (Ubuntu Natty):
status: Confirmed → Fix Committed
tags: added: verification-needed
Revision history for this message
Martin Pitt (pitti) wrote :

Accepted libvirt into maverick-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in libvirt (Ubuntu Maverick):
status: Confirmed → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

Accepted libvirt into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in libvirt (Ubuntu Lucid):
status: Confirmed → Fix Committed
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

These packages have been superseded by security updates in 0.7.5-5ubuntu27.13 on lucid, 0.8.3-1ubuntu18 on maverick and 0.8.8-1ubuntu6.2 on natty.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Thanks for the warning, Jamie. I've uploaded new versions, hopefully they will be accepted into *-proposed.

---
Ubuntu Bug Squad volunteer triager
http://wiki.ubuntu.com/BugSquad

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Serge, it looks like there's no need for your upload, as your change was included in the security fixes.

Rejecting all of the -proposed uploads and marking all tasks as Fix Released.

Changed in libvirt (Ubuntu Lucid):
status: Fix Committed → Fix Released
Changed in libvirt (Ubuntu Maverick):
status: Fix Committed → Fix Released
Changed in libvirt (Ubuntu Natty):
status: Fix Committed → Fix Released
tags: removed: verification-needed
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Clint, I don't see the change in the security fixes...

Revision history for this message
Chris Halse Rogers (raof) wrote :

Neither do I. The security packages do not contain a build-dep on parted. Marking the Lucid, Maverick and Natty tasks back to incomplete.

I note that you've got another SRU upload for bug #495394 in the queue. Would you like to fold this change into that upload, or process them separately?

Changed in libvirt (Ubuntu Natty):
status: Fix Released → Incomplete
Changed in libvirt (Ubuntu Lucid):
status: Fix Released → Incomplete
Changed in libvirt (Ubuntu Maverick):
status: Fix Released → Incomplete
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Thanks, Chris. I'd personally prefer to handle them separately so that one doesn't get hung because another doesn't get quickly verified. I'll jot down a note to re-check this bug next week.

tags: added: testcase
Revision history for this message
Edwin Chiu (edwin-chiu) wrote :

Just wondering if this will be fixed anytime soon or if I'll continue doing my own builds for the next while? It's been almost a year now for a simple build dependency change....

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

How odd.

I'll upload new versions for lucid..natty-proposed.

Changed in libvirt (Ubuntu):
assignee: Serge Hallyn (serge-hallyn) → nobody
Changed in libvirt (Ubuntu Lucid):
status: Incomplete → New
Changed in libvirt (Ubuntu Natty):
status: Incomplete → New
Changed in libvirt (Ubuntu Maverick):
status: Incomplete → New
Revision history for this message
Martin Pitt (pitti) wrote :

Hello Edwin, or anyone else affected,

Accepted libvirt into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in libvirt (Ubuntu Lucid):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Martin Pitt (pitti) wrote :

Maverick is three months before EOL and has survived without this new feature for most of its lifetime. I don't think it makes too much sense to add it now.

Changed in libvirt (Ubuntu Maverick):
status: New → Won't Fix
Revision history for this message
Martin Pitt (pitti) wrote :

Hello Edwin, or anyone else affected,

Accepted libvirt into natty-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in libvirt (Ubuntu Natty):
status: New → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

Could anyone please test the update? This is blocking another lucid-proposed fix in the queue. Thanks!

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libvirt - 0.7.5-5ubuntu27.22

---------------
libvirt (0.7.5-5ubuntu27.22) lucid-proposed; urgency=low

  * Don't override local removal of default network autostart on upgrades
      (LP: #372001)
    - re-enable debian/Don-t-enable-default-network-on-boot.patch
    - debian/libvirt-bin.preinst: note if the symlink exists
    - debian/libvirt-bin.postinst: if symlink existed, OR if we are upgrading
      from one of the broken versions, then recreate the symlink. (Continue
      to create the symlink on new installs.)
 -- Serge Hallyn <email address hidden> Mon, 23 Jan 2012 10:15:56 -0600

Changed in libvirt (Ubuntu Lucid):
status: Fix Committed → Fix Released
dino99 (9d9)
Changed in libvirt (Ubuntu Natty):
status: Fix Committed → Invalid
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.