lvm volumes not listed if lvm has command_names option = 1

Bug #836329 reported by Dave Gilbert
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libvirt (Ubuntu)
Fix Released
Medium
Unassigned
lvm2 (Ubuntu)
Won't Fix
Medium
Unassigned

Bug Description

I have an lvm vg called 'main' in which I keep images for my VMs and a few other things in. It's configured as a storage pool in libvirt:

sudo cat /etc/libvirt/storage/main.xml
<pool type='logical'>
  <name>main</name>
  <uuid>507fc133-c479-ec69-fb3e-1a2693ce27c3</uuid>
  <capacity>0</capacity>
  <allocation>0</allocation>
  <available>0</available>
  <source>
    <name>main</name>
    <format type='lvm2'/>
  </source>
  <target>
    <path>/dev/main</path>
    <permissions>
      <mode>0700</mode>
      <owner>0</owner>
      <group>0</group>
    </permissions>
  </target>
</pool>

virsh vol-list main wasn't working for me, after a bit of prodding I found the issue was that in /etc/lvm/lvm.conf I'd set

command_names = 1

in the 'log' section (having tried to debug some other lvm issues).

I'm going to say also this might be an lvm bug - I think command_names is actually changing the output format of the lvm commands, not just what's logged, and for an option in the log section of /etc/lvm/lvm.conf that's probably wrong.

Dave

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: libvirt-bin 0.9.2-4ubuntu11
ProcVersionSignature: Ubuntu 3.0.0-9.14-generic 3.0.3
Uname: Linux 3.0.0-9-generic x86_64
Architecture: amd64
CheckboxSubmission: f2d10bd9f943a85b486a282e7840a570
CheckboxSystem: 0531969bcfd4f03af7405c98dc94a948
Date: Sun Aug 28 23:53:51 2011
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
ProcEnviron:
 LANGUAGE=
 PATH=(custom, user)
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
SourcePackage: libvirt
UpgradeStatus: Upgraded to oneiric on 2011-07-31 (28 days ago)
modified.conffile..etc.libvirt.libvirtd.conf: [modified]
modified.conffile..etc.libvirt.qemu.networks.default.xml: [modified]
mtime.conffile..etc.libvirt.libvirtd.conf: 2011-08-28T23:35:06.483917
mtime.conffile..etc.libvirt.qemu.networks.default.xml: 2010-05-16T16:51:54.363311

Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :
Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

This, and possibly other parsing issues in libvirt's storage_backend_logical.c is causing LVM bugs with virt-manager. See bug 551432.

Revision history for this message
Dave Walker (davewalker) wrote :

@Marc, do you believe this is Invalid with lvm2, therefore limited to how libvirt handles the xml markup?

Has this been raised upstream?

Thanks.

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

I think this would be legitimate as a bug against lvm for spitting out the command_name prefix when --noheadings is specified. However, changing existing behavior is always bad, and this should be easy enough to work around in libvirt, so I'll work on a patch for that.

Changed in libvirt (Ubuntu):
status: New → Confirmed
Changed in lvm2 (Ubuntu):
status: New → Won't Fix
Revision history for this message
Alasdair G. Kergon (agk2) wrote : Re: [Bug 836329] Re: lvm volumes not listed if lvm has command_names option = 1

On Wed, Sep 07, 2011 at 03:28:45PM -0000, Serge Hallyn wrote:
> I think this would be legitimate as a bug against lvm for spitting out
> the command_name prefix when --noheadings is specified.

--noheadings only refers only to the headings line.

command_names applies to all output lines.

The option exists because LVM1 output used to look like that and this
option was to try to ease the transition to LVM2.

Alasdair

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

This fix came in to precise through upstream.

Changed in libvirt (Ubuntu):
status: Triaged → 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.