From owner-freebsd-jail@FreeBSD.ORG Thu Jun 24 16:33:10 2010 Return-Path: Delivered-To: freebsd-jail@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7CBBC1065672 for ; Thu, 24 Jun 2010 16:33:10 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from gritton.org (gritton.org [208.92.232.93]) by mx1.freebsd.org (Postfix) with ESMTP id 2B2638FC1B for ; Thu, 24 Jun 2010 16:33:09 +0000 (UTC) Received: from guppy.corp.verio.net (fw.oremut02.us.wh.verio.net [198.65.168.24]) (authenticated bits=0) by gritton.org (8.14.3/8.14.3) with ESMTP id o5OGX8PF028520; Thu, 24 Jun 2010 10:33:08 -0600 (MDT) (envelope-from jamie@FreeBSD.org) Message-ID: <4C238832.2050803@FreeBSD.org> Date: Thu, 24 Jun 2010 10:30:42 -0600 From: Jamie Gritton User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.5) Gecko/20100103 Thunderbird/3.0 MIME-Version: 1.0 To: freebsd-jail@FreeBSD.org References: <4C22650C.40309@FreeBSD.org> <20100624144312.00003d9f@unknown> In-Reply-To: <20100624144312.00003d9f@unknown> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Alexander Leidinger Subject: Re: Thoughts on jail.config X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Jun 2010 16:33:10 -0000 On 06/24/10 06:43, Alexander Leidinger wrote: > On Wed, 23 Jun 2010 13:48:28 -0600 Jamie Gritton > wrote: > >> The rc system is becoming increasingly unable to handle the newer jail >> features. We've held off patching /etc/rc.d/jail for new parameters, >> with the promise of something better. Here's my outline of what I >> hope will be in fact better than what we have now. > > I'm not sure from your explanation if your new setup allows ezjail to > mangage jails as easy as it is now. If the new jail command will have > an option to specify a config file, and the jail command only operates > on the jails of this config file and ignores other jails which are > already running (e.g. on a shutdown request), your new system looks > like it is easy to use with ezjail. Yes, you'll be able to specify a config file via the command line, with a default of /etc/jail.conf. Jails that exist outside of the config file's knowledge are a tricky point, and the problems are really only on a shutdown request. While I haven't coded this part of things yet, I've considered that I'll need two different kinds of blanket shutdowns: one for all the jails in the config file, and another for all jails in the system. The latter would be the most sensible to use during system shutdown, when it doesn't make sense to leave any jails running. But orderly shutdown is part of the config spec (e.g. running "/bin/sh /etc/rc.shutdown"), and it may be best to assume that if the jails were created outside of the rc system, they'll be removed in the same way. So in short, I think it will be compatible with ezjail. > Another point which interests me is how your new way of doing things > will handle things like allow.raw_sockets. Assume I have some kernel > modification which adds allow.XXX, do I need to modify the parsing of > the jail command to handle this, or will this work transparently > without userland modifications? That will work transparently, as does the current jail(8) command line. The only time you'd need to modify userland tools for a new jail parameter is if that parameter has a data type the tools don't understand. Most parameters operate on numbers or strings, but for example IP addresses are passed in binary and userland needs to know how to convert them to/from strings. - Jamie