On 03/10/2011 12:54 PM, Laine Stump wrote:
Okay, I've figured out what happened - the permission on a parent
of my
target directory on the NFS server had been changed during unrelated
testing from (root,root) 755 to 700, so even though the target directory
had the proper user (qemu,qemu), qemu was denied access to the directory
due to its parent's permissions/ownership. When I set the parent
directory back to 755, save and restore both work.
However, the current code still has a problem - if you try to save
to/from a directory that the qemu user doesn't have permission for (and
presumably if there's any other error in the child that causes it to
skip the sendmsg), rather than returning an error virFileOpenAs just
hangs on recvmsg waiting for the fd info to come over the pipe, while
the child process sits around as a zombie because nobody has reaped its
exit status.
Yep, makes sense. I'm double checking whether I reliably closed the
write end of the socket in all paths, and it may boil down to changing
the child to _always_ sendmsg even if there is no fd to send. I'm still
thinking about it.
--
Eric Blake eblake(a)redhat.com +1-801-349-2682
Libvirt virtualization library
http://libvirt.org