[libvirt] [RFC: PATCHv4 00/15] outgoing migration via fd: rather than exec:

Wen Congyang wency at cn.fujitsu.com
Fri Mar 11 04:30:46 UTC 2011


At 03/11/2011 04:01 AM, Eric Blake Write:
> 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.

Using SOCK_STREAM instead of SOCK_DGRAM to create socketpair can resolve this
problem. But I don't know why.




More information about the libvir-list mailing list