All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Serge E. Hallyn" <serge.hallyn-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
To: Matt Helsley <matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Subject: Re: trying to build simple checkpoint/restart recipes
Date: Wed, 8 Dec 2010 08:52:45 -0600	[thread overview]
Message-ID: <20101208145245.GB8316@hallyn.com> (raw)
In-Reply-To: <20101208055320.GH10470-52DBMbEzqgQ/wnmkkaCWp/UQ3DHhIser@public.gmane.org>

Quoting Matt Helsley (matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org):
> > So far, so good.  Note that I couldn't use upstart for my init bc upstart
> > uses inotify, which we don't yet checkpoint.  The kernel is compiled without
> 
> Interesting, I didn't know that. What does upstart use inotify for?

Dunno :)  I was quite put out though.

> > There are two issues:
> > 
> > 1. how to re-create the mounts.  Kernel doesn't do it yet.  There
> >    isn't (that I know of) a clean way to hook lxc-restart to do it.
> >    Comments?
> 
> It's incomplete but I think you can save the most important portions of
> a mount namespace with a simple 1-line command:
> 
> lxc-attach -n cr1 cat /proc/self/mountinfo > cr1.mountinfo
> 
> It's incomplete because:
> 
> 	1. It does not adequately address cross-mount-ns bind mounts (IIRC).
> 
> 	2. It won't work for nested containers (though I don't know if
> 		lxc supports this already it's not *too* far fetched
> 		to expect folks will ask for it in the future). We can
> 		extend the hack to deal with this by making a small
> 		change in sys_checkpoint but I can't see how to fix #1
> 		without doing it all in-kernel anyway.

Heck, for these examples I don't mind just having a sort of dummy
fstab file which both the dummy init and restart use.

> The restoration of the mounts is not scriptable however. It involves
> parsing the mountinfo file and coordinating the mounts with those done by
> lxc itself during lxc-restart. I honestly haven't looked at that closely

I'd be fine with requiring some bit of hand-parsing.  But right, even
once we get a list of the mounts to be restored, I don't know of any
good way to get those mounts re-created at the right time.

I suppose I could hack lxc-restart to do it.  But I'm sort of hoping we
can get something less hacked and more true to the 'real' upstream
code.

> enough yet to say how pretty/ugly that'd be but it entails
> modifications to lxc-restart itself. And since #1 above would still
> be an issue I'm not sure it's worth doing it that way.

So do you know of anyone who's been working on re-creation of mounts
in the kernel?  If not, what have you been doing, hand-scripting
all container creation, checkpoint, and restart?

thanks,
-serge

  parent reply	other threads:[~2010-12-08 14:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-08  4:53 trying to build simple checkpoint/restart recipes Serge E. Hallyn
     [not found] ` <20101208045322.GA17602-7LNsyQBKDXoIagZqoN9o3w@public.gmane.org>
2010-12-08  5:53   ` Matt Helsley
     [not found]     ` <20101208055320.GH10470-52DBMbEzqgQ/wnmkkaCWp/UQ3DHhIser@public.gmane.org>
2010-12-08 14:52       ` Serge E. Hallyn [this message]
     [not found]         ` <20101208145245.GB8316-A9i7LUbDfNHQT0dZR+AlfA@public.gmane.org>
2010-12-08 21:10           ` Rob Landley
     [not found]             ` <7E28E74ACE78074AAD1BDD3E455CF8749422-w6YtkvcGFufufkSEj+1U85Z3qXmFLfmx@public.gmane.org>
2010-12-08 22:26               ` Serge E. Hallyn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101208145245.GB8316@hallyn.com \
    --to=serge.hallyn-z7wlfzj8ewms+fvcfc7uqw@public.gmane.org \
    --cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.