Bug 626873

Summary: pool creation fails if directory includes a broken symlink
Product: Red Hat Enterprise Linux 6 Reporter: Eric Paris <eparis>
Component: libvirtAssignee: Osier Yang <jyang>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 6.1CC: ccui, dallan, dyuan, eblake, fge, mjenner, nzhang, xen-maint
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: libvirt-0.8.7-1.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-19 13:20:43 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:

Description Eric Paris 2010-08-24 15:33:55 UTC
libvirt-0.8.1-27.el6.x86_64

I have a broken symlink in /var/lib/libvirt/images

I created this xml file:

<pool type='dir'>
  <name>default</name>
  <target>
    <path>/var/lib/libvirt/images</path>
  </target>
</pool>

and run virsh pool-create [path to file]

This fails to create the pool with the error:

error: Failed to create pool from [path to file]
error: cannot open volume '/var/lib/libvirt/images/[broken symlink]': No such file or directory

I don't understand why a broken symlink should cause the pool creation to fail...

Comment 2 Dave Allan 2010-11-16 04:17:17 UTC
*** Bug 652189 has been marked as a duplicate of this bug. ***

Comment 3 Osier Yang 2010-12-22 03:44:58 UTC
patch post upstream:

76965b800e40c2084f03c4359f614fd802087832

Comment 4 Jiri Denemark 2011-01-09 23:57:29 UTC
Built into libvirt-0.8.7-1.el6

Comment 6 Nan Zhang 2011-01-10 08:46:54 UTC
Verified with libvirt-0.8.7-1.el6.x86_64, it's already fixed.

# ln -s /tmp/aaa /var/lib/libvirt/images/testpool

# ll /var/lib/libvirt/images/
total 5691056
-rw-------. 1 qemu qemu 6442450944 Jan 10 03:43 demo.img
lrwxrwxrwx. 1 root root          8 Jan 10 03:23 testpool -> /tmp/aaa
-rw-------. 1 root root 8589934592 Dec 30 01:49 rhel5u6.img
-rw-------. 1 root root 1427636224 Jan  4 05:50 rhel6.qcow2
-rw-------. 1 root root 8589934592 Dec 30 02:22 test.img

# virsh pool-define ~/default-pool.xml
Pool default defined from /root/default-pool.xml

Comment 9 Cui Chun 2011-02-09 07:24:59 UTC
Rechecked it on the following test environment according to comment 6. It is passed.

Test environment:
libvirt-0.8.7-5.el6
qemu-kvm-0.12.1.2-2.144.el6
kernel-2.6.32-94.el6

Comment 12 errata-xmlrpc 2011-05-19 13:20:43 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0596.html