Bug 1346724

Summary: cannot pool-define/create mpath pool
Product: Red Hat Enterprise Linux 7 Reporter: yisun
Component: libvirtAssignee: Ján Tomko <jtomko>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 7.3CC: dyuan, jtomko, rbalakri, xuzhang, yanyang
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: libvirt-2.0.0-1.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1347486 (view as bug list) Environment:
Last Closed: 2016-11-03 18:47:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description yisun 2016-06-15 08:53:38 UTC
Description:
cannot pool-define/create mpath pool

versions:
libvirt-1.3.5-1.el7.x86_64

reproduce rate:
100%

THIS IS A REGRESSION BUG, and it works on libvirt-1.3.4-1.el7.x86_64


Steps:
1. # cat pool.mpath
<pool type="mpath">
<name>mpath-pool-1</name>
<target>
<path>/dev/mapper</path>
</target>
</pool>


2. # virsh pool-define pool.mpath
error: Failed to define pool from pool.mpath
error: internal error: missing backend for pool type 7 (mpath)

Actual result:
mpath pool cannot be defined


Expected result:
mpath pool can be defined


Additional info:
This works fined with libvirt-1.3.4-1.el7.x86_64

Comment 2 Ján Tomko 2016-06-17 10:21:54 UTC
Upstream patch:
https://www.redhat.com/archives/libvir-list/2016-June/msg01147.html

Comment 3 Ján Tomko 2016-06-17 13:40:01 UTC
Fixed upstream by:
commit 7303e7079ccfec1bf7d2891c6e87a8646355f124
Author:     Ján Tomko <jtomko>
CommitDate: 2016-06-17 15:35:46 +0200

    configure: define preprocessor macros for SCSI and MPATH
    
    This fixes building these backends when explicitly enabled
    on the command line.
    
    Exposed by commit a659559 which started adding
    --with-storage-mpath in the spec file.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1346724

git describe: v1.3.5-306-g7303e70

Comment 5 yisun 2016-07-26 08:39:56 UTC
Verified on libvirt-2.0.0-3.el7.x86_64 and PASSED

steps:
1. # cat pool.xml 
<pool type="mpath">
<name>mpool</name>
<target>
<path>/dev/mapper</path>
</target>
</pool>


2. # virsh pool-define pool.xml 
Pool mpool defined from pool.xml

3. # virsh pool-undefine mpool
Pool mpool has been undefined

4. # virsh pool-create pool.xml 
Pool mpool created from pool.xml

5. # virsh vol-list mpool
 Name                 Path                                    
------------------------------------------------------------------------------
 dm-2                 /dev/mapper/mpatha                      
 dm-3                 /dev/mapper/mpathb                      
 dm-4                 /dev/mapper/mpathd                      
 dm-5                 /dev/mapper/mpathc                      
 dm-7                 /dev/mapper/mpathg       

6. # virsh pool-dumpxml mpool
<pool type='mpath'>
  <name>mpool</name>
  <uuid>4cb87b5a-4eb5-4e1c-9bb3-1977002ac1c6</uuid>
  <capacity unit='bytes'>96636764160</capacity>
  <allocation unit='bytes'>96636764160</allocation>
  <available unit='bytes'>0</available>
  <source>
  </source>
  <target>
    <path>/dev/mapper</path>
  </target>
</pool>

Comment 7 errata-xmlrpc 2016-11-03 18:47:10 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2016-2577.html