Bug 1026688

Summary: libguestfs fails examining libvirt guest with ceph drives: rbd: image name must begin with a '/'
Product: [Community] Virtualization Tools Reporter: Richard W.M. Jones <rjones>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED UPSTREAM QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: acathrow, mbooth, three18ti
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-24 10:30:34 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 Richard W.M. Jones 2013-11-05 08:58:40 UTC
Description of problem:

# virt-sysprep -d server-clone-test --firstboot firstboot.sh
>> Examining the guest ...
>> Fatal error: exception Guestfs.Error("rbd: image name must begin with a '/'")

The guest has rbd (Ceph) drives:

>>     <disk type='network' device='disk'>                                      
>>       <driver name='qemu'/>                                                  
>>       <source protocol='rbd' name='libvirt-pool/server-clone-test'>          
>>         <host name='192.168.0.40' port='6789'/>                              
>>         <host name='192.168.0.35' port='6789'/>                              
>>         <host name='192.168.0.2' port='6789'/>                               
>>       </source>                                                              
>>       <target dev='hdb' bus='ide'/>                                          
>>       <address type='drive' controller='0' bus='0' target='0' unit='1'/>     
>>     </disk>                                                                  

Note the name field does not begin with a / (even though this
is valid).  Replacing the <source/> element with:

>>       <source protocol='rbd' name='/libvirt-pool/server-clone-test'>         

fixes libguestfs but breaks the guest itself.

Version-Release number of selected component (if applicable):

libguestfs 1.22.4

How reproducible:

Reported on the mailing list:
https://www.redhat.com/archives/libguestfs/2013-November/msg00003.html

Reporter: Jon three18ti gmail

Comment 1 three18ti 2013-11-05 19:20:34 UTC
Hello,

I can confirm this behavior in libguesstfs 1.24 from this build [1]

-Jon

Comment 2 Richard W.M. Jones 2014-01-23 11:56:44 UTC
Fairly comprehensive set of patches posted to fix this and
related issues:

https://www.redhat.com/archives/libguestfs/2014-January/msg00205.html

Comment 3 Richard W.M. Jones 2014-01-24 10:30:34 UTC
These are upstream now in libguestfs >= 1.25.27.