Re: [Xen-devel] xm save workaround
found it !
xen-3.0.1-cloexec.patch in the source RPM for xen-3.0.1
John Croft wrote:
Calling xc_interface_open returns a file descriptor which has had it's
close-on-exec flag set.
Disassembling the code in xc_interface_open in libxenctrl.so as
shipped in the FC5 release has two calls to fcntl just after the
open.. GET_FD, the flags, or in 1 and then SET_FD . This isn't in the
xc_misc.c in the repository, so I don't know how it's getting there.
Ewan Mellor wrote:
On Sat, Mar 25, 2006 at 09:04:40AM +0000, John Croft wrote:
This is something I posted earlier on Xen-Users. I understand it is
a known problem so you may be interested in this workaround.
Thanks a lot, that did the trick. Have you sent this to the Xen-Devel
list? If not, I bet they would be interested.
Anyway, thanks again!
On 3/24/06, John Croft <john@xxxxxxxxxxxxxxxx> wrote:
I'm wondering if this is related to the problem I had and posted
xen-users list with a work-around. The symptoms are similar in that
xm_save fails but the debug output is slightly different, but that
be due to environmental differences.
original post follows.
Just installed Xen from the base FC5 released on Monday.
It all seems to work great except for "xm save/migrate" which
"Unable to get platform info.: 9" at XendCheckpoint:227.
Playing around with it I found that there is a program called xc_save
which is called from XendCheckpoint.py and passed in a file handle
the xend session and the target file named on the command line. These
handles seem to be closed when xc_save exec's, so subsequent calls
Xen by xc_save fail. I got it to work by adding...
from fcntl import ioctl;
FIONCLEX = 0x5450
near the top of XendCheckpoint.py
ioctl (fd, FIONCLEX, 0)
ioctl (xc.handle(), FIONCLEX, 0)
at the beginning of forkHelper.
This is clearing the close-on-exec flag for each of the file
fcntl.fcntl(fd, fcntl.F_SETFD, 0)
fcntl.fcntl(xc.handle(), fcntl.F_SETFD, 0)
ought to do exactly the same, but be a little neater.
What interests me though, is that these flags are set in the first
default is for this flag to be unset, and Xend is not setting the flag
explicitly on either of those file descriptors, so how did they get set?
Could you investigate?
Xen-devel mailing list
Xen-devel mailing list