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.
Description:
nfs pool-build prompts unclear error when target dir exists
versions:
libvirt-1.2.16-1.el7.x86_64
qemu-kvm-rhev-2.3.0-2.el7.x86_64
kernel-3.10.0-254.el7.x86_64
How reproducible:
100%
Steps:
1.#mkdir /a
2.# cat nfs_pool.xml
<pool type='netfs'>
<name>nfs_pool</name>
<capacity unit='bytes'>322122547200</capacity>
<allocation unit='bytes'>161484570624</allocation>
<available unit='bytes'>160637976576</available>
<source>
<host name='nfs.server.name'/>
<dir path='/path/to/dir'/>
<format type='nfs'/>
</source>
<target>
<path>/a</path>
<permissions>
<owner>0</owner>
<group>0</group>
</permissions>
</target>
</pool>
3.# virsh pool-define nfs_pool.xml
Pool nfs_pool defined from nfs_pool.xml
4. # virsh pool-build nfs_pool
error: Failed to build pool nfs_pool
error: An error occurred, but the cause is unknown
Expected result:
In step 4:# virsh pool-build nfs_pool
error: Failed to build pool nfs_pool
error: failed to create directory '/a': File exists
Actual result:
message is unclear in step 4
Additional info:
If remove following xml segment, clear error message will be generated.
<permissions>
<owner>0</owner>
<group>0</group>
</permissions>
fixed upstream:
commit e9478d9a8b8ab2e4ffe1d7ed06395dd721647d55
Author: Erik Skultety <eskultet>
Date: Thu Jun 11 10:51:23 2015 +0200
util: virfile: Fix 'unknown cause' error if NFS mount point creation fails
This happens if user requires creation of a directory with specified
UID/GID permissions. To accomplish this, we use fork approach and
set particular UID/GID permissions in child process. However, child
process doesn't have a valid descriptor to a logfile (this is prohibited
explicitly) and since parent process doesn't handle negative exit codes from
child in any way, 'uknown cause' error is returned to the user.
Commit 92d9114e tweaked the way we handle child errors when using fork
approach to set specific permissions (features originally introduced
by 98f6f381). The same logic should be used to create directories with
specified permissions as well.
v1.2.16-189-ge9478d9
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/RHBA-2015-2202.html
Description: nfs pool-build prompts unclear error when target dir exists versions: libvirt-1.2.16-1.el7.x86_64 qemu-kvm-rhev-2.3.0-2.el7.x86_64 kernel-3.10.0-254.el7.x86_64 How reproducible: 100% Steps: 1.#mkdir /a 2.# cat nfs_pool.xml <pool type='netfs'> <name>nfs_pool</name> <capacity unit='bytes'>322122547200</capacity> <allocation unit='bytes'>161484570624</allocation> <available unit='bytes'>160637976576</available> <source> <host name='nfs.server.name'/> <dir path='/path/to/dir'/> <format type='nfs'/> </source> <target> <path>/a</path> <permissions> <owner>0</owner> <group>0</group> </permissions> </target> </pool> 3.# virsh pool-define nfs_pool.xml Pool nfs_pool defined from nfs_pool.xml 4. # virsh pool-build nfs_pool error: Failed to build pool nfs_pool error: An error occurred, but the cause is unknown Expected result: In step 4:# virsh pool-build nfs_pool error: Failed to build pool nfs_pool error: failed to create directory '/a': File exists Actual result: message is unclear in step 4 Additional info: If remove following xml segment, clear error message will be generated. <permissions> <owner>0</owner> <group>0</group> </permissions>