All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Daniel Lezcano <daniel.lezcano@free.fr>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	LXC Development <Lxc-devel@lists.sourceforge.net>
Subject: Re: [RFC] catching sys_reboot syscall
Date: Sat, 20 Aug 2011 13:03:08 +0200	[thread overview]
Message-ID: <20110820110308.GA1906@ucw.cz> (raw)
In-Reply-To: <4E4051A0.8030009@free.fr>

Hi!

> In this case, the container shutdowns correctly but, at the end, the
> init process is waiting indefinitely and we have the containers stuck
> with one process (the init process).
> 
> In order to fix that, we used a hypervisor process, parent of the
> container's init process, watching for the container's utmp file and
> detecting when the runlevel changes. When this runlevel change is
> detected we wait for the container to have one process left and then we
> kill the container's init.
> 
> That works well if we modify the distro configuration files, we make
> /var/run to not be a tmpfs and we remove all the files inside this
> directory when the container boots. *But* as soon as we upgrade the
> container distro, all the tweaks are lost. So this method works but at
> the cost of tweaking the containers configuration files again and again,
> each time there is an update, which is not tolerable in a production
> environment.
> 
> This problem is easy to solve with a small hack in the kernel:

Hmm. If you just made sys_reboot() equivalent to exit() for container
case... perhaps patch would be even simpler..?

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

      parent reply	other threads:[~2011-08-20 11:03 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-08 21:14 [RFC] catching sys_reboot syscall Daniel Lezcano
     [not found] ` <4E4051A0.8030009-GANU6spQydw@public.gmane.org>
2011-08-10 20:10   ` Bruno Prémont
2011-08-10 20:10     ` Bruno Prémont
     [not found]     ` <20110810221028.2e0c8590-hY15tx4IgV39zxVx7UNMDg@public.gmane.org>
2011-08-10 20:49       ` Daniel Lezcano
2011-08-10 20:49     ` Daniel Lezcano
     [not found]       ` <4E42EEE3.9050608-GANU6spQydw@public.gmane.org>
2011-08-11 16:30         ` Bruno Prémont
2011-08-11 16:30       ` Bruno Prémont
     [not found]         ` <20110811183027.49275b2d-hY15tx4IgV39zxVx7UNMDg@public.gmane.org>
2011-08-11 16:49           ` Daniel Lezcano
2011-08-11 16:49         ` Daniel Lezcano
     [not found]           ` <4E44082F.6040606-GANU6spQydw@public.gmane.org>
2011-08-11 17:04             ` Bruno Prémont
2011-08-11 17:04           ` Bruno Prémont
     [not found]             ` <20110811190456.77ff9280-hY15tx4IgV39zxVx7UNMDg@public.gmane.org>
2011-08-11 18:10               ` [lxc-devel] " Daniel Lezcano
2011-08-11 18:10               ` Serge Hallyn
2011-08-11 18:10             ` [lxc-devel] " Daniel Lezcano
2011-08-11 18:10             ` Serge Hallyn
2011-08-11 18:40               ` [PATCH] add pid->user_ns Serge Hallyn
2011-08-11 18:40               ` Serge Hallyn
2011-08-20 11:03 ` Pavel Machek [this message]

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=20110820110308.GA1906@ucw.cz \
    --to=pavel@ucw.cz \
    --cc=Lxc-devel@lists.sourceforge.net \
    --cc=daniel.lezcano@free.fr \
    --cc=linux-kernel@vger.kernel.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.