Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1092882

Summary: vol-list get volume which actually does not exist
Product: Red Hat Enterprise Linux 6 Reporter: Shanzhi Yu <shyu>
Component: libvirtAssignee: John Ferlan <jferlan>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0CC: dyuan, lagarcia, mzhan, rbalakri
Target Milestone: rc   
Target Release: 6.6   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-0.10.2-36.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-14 04:21:43 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 Shanzhi Yu 2014-04-30 07:46:30 UTC
Description of problem:

vol-list get volume which actually does not exist

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

libvirt-0.10.2-34.el6.x86_64

How reproducible:

100%

Steps to Reproduce:

1.Prepare an NFS server with below configuration
[nfs server]#cat /etc/export

/mnt/nfs*(sync,rw,no_all_squash)

2.define an netfs type pool

# virsh pool-dumpxml netfs-nfs
<pool type='netfs'>
  <name>netfs-nfs</name>
  <uuid>7caa395b-5b1d-a2c1-9ef4-3035f100990f</uuid>
  <capacity unit='bytes'>84551925760</capacity>
  <allocation unit='bytes'>3193962496</allocation>
  <available unit='bytes'>81357963264</available>
  <source>
    <host name='nfs server'/>
    <dir path='/mnt/nfs'/>
    <format type='auto'/>
  </source>
  <target>
    <path>/var/lib/libvirt/images/netfs-nfs</path>
    <permissions>
      <mode>0755</mode>
      <owner>0</owner>
      <group>0</group>
    </permissions>
  </target>
</pool>

3. create raw format image
# virsh vol-create-as netfs-nfs raw.img --format raw 100M
error: Failed to create vol raw.img
error: cannot create path '/var/lib/libvirt/images/netfs-nfs/raw.img': Operation not permitted

# virsh vol-create-as netfs-nfs raw.img --format raw 100M
error: Failed to create vol raw.img
error: Storage volume not found: storage vol already exists


4. check raw.img

# virsh vol-list netfs-nfs|grep raw.img
raw.img              /var/lib/libvirt/images/netfs-nfs/raw.img

# qemu-img info /var/lib/libvirt/images/netfs-nfs/raw.img
Could not open '/var/lib/libvirt/images/netfs-nfs/raw.img': No such file or directory


Actual results:


Expected results:

Fail to create raw type image with netfs pool while vol-list get that image. 

Additional info:

after refresh pool, the problem gone.

Comment 5 chhu 2014-05-27 03:33:27 UTC
Reproduced with libvirt-0.10.2-33.el6.x86_64,

Verified with package:
libvirt-0.10.2-37.el6.x86_64

Test steps:
1. Prepare an NFS server with below configuration:
[nfs server]# cat /etc/export
/mnt/nfs*(sync,rw,no_all_squash)

2. Define,build,start an netfs type pool
# virsh pool-dumpxml netfs-nfs
<pool type='netfs'>
  <name>netfs-nfs</name>
  <uuid>7caa395b-5b1d-a2c1-9ef4-3035f100990f</uuid>
  <capacity unit='bytes'>53634662400</capacity>
  <allocation unit='bytes'>37549506560</allocation>
  <available unit='bytes'>16085155840</available>
  <source>
    <host name='nfs server'/>
    <dir path='/mnt/nfs'/>
    <format type='auto'/>
  </source>
  <target>
    <path>/var/lib/libvirt/images/netfs-nfs</path>
    <permissions>
      <mode>0755</mode>
      <owner>0</owner>
      <group>0</group>
    </permissions>
  </target>
</pool>

3. create raw format image failed with permission denied.
# virsh vol-create-as netfs-nfs raw.img --format raw 100M
error: Failed to create vol raw.img
error: Failed to create file '/var/lib/libvirt/images/netfs-nfs/raw.img': Permission denied

# virsh vol-create-as netfs-nfs raw.img --format raw 100M
error: Failed to create vol raw.img
error: Failed to create file '/var/lib/libvirt/images/netfs-nfs/raw.img': Permission denied

4. check raw.img is not existed.
# virsh vol-list netfs-nfs
Name                 Path                                    
-----------------------------------------

Test results:
Current command work well.

Comment 7 errata-xmlrpc 2014-10-14 04:21:43 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.

http://rhn.redhat.com/errata/RHBA-2014-1374.html