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 of problem:
Can not restore domain from root_squashing nfs export even if qemu gid matches nfs
Version-Release number of selected component (if applicable):
libvirt-0.8.7-7.el6.x86_64
qemu-kvm-0.12.1.2-2.145.el6.x86_64
qemu-img-0.12.1.2-2.145.el6.x86_64
kernel-2.6.32-113.el6.x86_64
How reproducible:
5/5
Steps to Reproduce:
On nfs server:
1. Create a shared directory
# mkdir /tmp/test
2. Set ownership to vdsm:qemu
# chown 501:107 /tmp/test/
# chmod 775 /tmp/test/
3. check exports file:
# cat /etc/exports
/tmp/test *(rw,root_squash,async)
On RHEL6.1 client:
1. setsebool -P virt_use_nfs 1
2. Start a domain with "qemu" user.
3. Mount the nfs shared directory.
# mount -o vers=3 10.66.93.159:/tmp/test /mnt/ddd
# ll -d /mnt/ddd
drwxrwxr-x. 2 vsdm qemu 4096 Feb 18 09:18 /mnt/ddd
4. Save the domain to /mnt/ddd/saved
# virsh save rhel6 /mnt/ddd/saved
Domain rhel6 saved to /mnt/ddd/saved
5. Restore the domain
# virsh restore /mnt/ddd/saved
error: Failed to restore domain from /mnt/ddd/saved
error: cannot close file: Bad file descriptor
Actual results:
Can not restore domain from root_squashing nfs export even if qemu gid matches nfs.
Expected results:
Restore should be successful.
Additional info:
NOTE:If run command "setenforce 0" in client host ,restore will be successful.
1.# setenforce 0
2.# virsh restore /mnt/ddd/saved
Domain restored from /mnt/ddd/saved
Please post the version of selinux-policy on the machine, as well as the AVCs that are issued (leave setenforce 0 so we can see the entire list). I'm still suspicious that this is the same as Bug 667756, which was fixed by both a libvirt change and an selinux-policy change.
Your selinux-policy doesn't contains the change mentioned by @laine in #c2, (Note that the change was included since selinux-policy-3.7.19-68). So please update selinux-policy and try again.