WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] xm save workaround

To: John Croft <john@xxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] xm save workaround
From: Ewan Mellor <ewan@xxxxxxxxxxxxx>
Date: Sat, 25 Mar 2006 16:16:39 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Sat, 25 Mar 2006 16:18:01 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <442507A8.1000409@xxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Nfrom: Ewan Mellor <ewan@xxxxxxxxxxxxx>
References: <442507A8.1000409@xxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
On Sat, Mar 25, 2006 at 09:04:40AM +0000, John Croft wrote:

> Hi all,
> 
> This is something I posted earlier on Xen-Users. I understand it is a known 
> problem so you may be interested in this workaround.
> 
> cheers,
> John
> 
> 
> Hi John-
> 
> 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!
> 
> -Patrick
> 
> On 3/24/06, John Croft <john@xxxxxxxxxxxxxxxx> wrote:
> 
> >>Hi Patrick,
> >>
> >>I'm wondering if this is related to the problem I had and posted on the
> >>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 may
> >>be due to environmental differences.
> >>
> >>original post follows.
> >>John
> >>
> >>Hi all,
> >>
> >>Just installed Xen from the base FC5 released on Monday.
> >>
> >>It all seems to work great except for "xm save/migrate" which fails with
> >>"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 for
> >>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 into
> >>Xen by xc_save fail. I got it to work by adding...
> >>
> >>   from fcntl import ioctl;
> >>   FIONCLEX = 0x5450
> >>
> >>near the top of XendCheckpoint.py
> >>
> >>and...
> >>
> >>   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 descriptors, so

import fcntl
...
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 place.  The
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?

Thanks,

Ewan.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>