Bug 640807

Summary: libvirt fails on LVM volume groups with mirrored volumes
Product: [Community] Virtualization Tools Reporter: Nuutti Kotivuori <naked>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: unspecifiedCC: crobinso, jtomko, xen-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-07-28 15:05:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 561077    
Bug Blocks:    

Description Nuutti Kotivuori 2010-10-06 20:08:58 UTC
Description of problem:
libvirt fails on LVM volume groups with even a single mirrored volume. This is because it cannot parse the "lvs" command output after this. The parsing fails, because libvirt is using "," as a field separator, and "lvs" is using "," as a separator for listing multiple parts of the mirror. The offending piece of code is in src/storage/storage_backend_logical.c, function virStorageBackendLogicalFindLVs. An example of a lvs output line for a volume with mirrors:

  xxx-2,,NeqcV6-OwR6-iHUQ-vQ8I-2FX2-t0Ti-rYKLnA,xxx-2_mimage_0(0),xxx-2_mimage_1(0),21474836480,4194304

Version-Release number of selected component (if applicable):
All versions, including 0.8.4

How reproducible:
Fully reproducible.

Steps to Reproduce:
1. Configure a volume group for libvirt usage.
2. Create a volume in the volume group.
3. Configure volume to be mirrored: lvconvert -m 1 <logicalvolume>
4. Attempt to start the storage pool in libvirt.
  
Actual results:
Storage pool does not start because of lvs command error.

Expected results:
Storage pool works as expected.

Comment 1 Nuutti Kotivuori 2010-10-06 20:17:41 UTC
This is essentially the same bug as #561077, but since the path specification for mirrored volumed is different from striped volumes, I believe this bug should be left open until it can be confirmed that libvirt works for mirrored volumes as well.

Comment 2 Ján Tomko 2015-07-28 15:05:18 UTC
Fixed upstream by:
commit 82c1740ab92682d69ec8f02adb36b13e1902acd1
Author:     Osier Yang <jyang>
AuthorDate: 2011-10-10 20:34:59 +0800
Commit:     Osier Yang <jyang>
CommitDate: 2011-10-10 20:34:59 +0800

    storage: Do not use comma as seperator for lvs output
    
    RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=727474

git describe: v0.9.6-89-g82c1740 contains: v0.9.7-rc1~172