Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Dec 2015 16:01:29 -0700 (MST)
From:      Warren Block <wblock@wonkity.com>
To:        dweimer <dweimer@dweimer.net>
Cc:        "Michael B. Eichorn" <ike@michaeleichorn.com>, freebsd-jail@freebsd.org, freebsd-questions <freebsd-questions@freebsd.org>, Michael Grimm <trashcan@odo.in-berlin.de>, owner-freebsd-questions@freebsd.org
Subject:   Re: How to define the order of starting jails?
Message-ID:  <alpine.BSF.2.20.1512201558410.60560@wonkity.com>
In-Reply-To: <b538d6be51b83cf48e18f603ea1009a9@dweimer.net>
References:  <5D6BA0FE-60E1-4C6B-906B-BB62A1AB9BE8@odo.in-berlin.de> <1450639510.27618.8.camel@michaeleichorn.com> <b538d6be51b83cf48e18f603ea1009a9@dweimer.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 20 Dec 2015, dweimer wrote:

> On 2015-12-20 1:25 pm, Michael B. Eichorn wrote:
>> On Sun, 2015-12-20 at 17:50 +0100, Michael Grimm wrote:
>>> Hi —
>>> 
>>> [Background: I wish to run (some of my) ezjail-made jails and VNET
>>> which cannot be done by ezjail, natively.]
>>> 
>>> But I found a way to mix both ezjail and basic jail(8) functionality.
>>> It's quite easy to fire up ezjail-made jails defined in jail.conf by
>>> jail. And, now I can apply VNET to those jails I do wish to run their
>>> own network stacks. That's all working well.
>>> 
>>> But I am bit stuck in finding a way to start my jails in a pre-
>>> defined order (e.g. first DNS, then mail, …). Well, I can achieve
>>> that during boot time by using jail_list="dns mail …" in rc.conf.
>>> But, this is respected during boot time, *only*. Whenever I do run a
>>> "jail -rc '*'" that shutdown and starting order becomes arbitrary. It
>>> doesn't follow the sequence of my jail definitions in jail.conf,
>>> either. I thoroughly checked the jail.conf(5) man page for a
>>> functionality that would allow me to define a startup/shutdown
>>> sequence, but I couldn't find it.
>>> 
>>> Thus, I might have overlooked it, is there a way to achieve my goal
>>> using jail and jail.conf?
>>> Or something else?
>>> 
>>> Thanks and regards,
>>> Michael
>> 
>> jail(8)'s '*' operates on everything without concern for rc.conf, as
>> such jail_list is not respected. Perhaps try something tied to the rc.d
>> system. Does `service jail restart` do what you are looking for?
>> 
>> Otherwise I would just go with simple restart script such as:
>> #!/bin/sh
>> set -e
>> jail -r '*'
>> jail -c dns
>> jail -c mail
>
> You can also define a jail dependency to make sure a jail starts before 
> another one
>
> dns {
>  ...
> }
> mail {
>  ...
>  depend = "dns"
> }

I submitted an ezjail patch last year to be able to start a jail very 
early.  This is useful for me because that lets the DNS jail start early 
enough that the ezjail host can use it as a DNS server.

An update to ezjail came out a few weeks back, but did not include it.
From owner-freebsd-questions@freebsd.org  Sun Dec 20 23:54:56 2015
Return-Path: <owner-freebsd-questions@freebsd.org>
Delivered-To: freebsd-questions@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id CDA4AA4D2BD
 for <freebsd-questions@mailman.ysv.freebsd.org>;
 Sun, 20 Dec 2015 23:54:56 +0000 (UTC)
 (envelope-from idouz@matrix.co.il)
Received: from mailout-hz.matrix.co.il (mailout-hz.matrix.co.il
 [199.203.148.203])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 513DD13DD
 for <freebsd-questions@FreeBSD.org>; Sun, 20 Dec 2015 23:54:56 +0000 (UTC)
 (envelope-from idouz@matrix.co.il)
Received: from EX1.Matrix.IT (10.90.13.211) by EX1.Matrix.IT (10.90.13.211)
 with Microsoft SMTP Server (TLS) id 15.0.1076.9; Mon, 21 Dec 2015 01:54:52
 +0200
Received: from EX1.Matrix.IT ([10.90.13.211]) by EX1.Matrix.IT
 ([10.90.13.211]) with mapi id 15.00.1076.000; Mon, 21 Dec 2015 01:54:52 +0200
From: Ido Uziel <idouz@matrix.co.il>
To: "kpneal@pobox.com" <kpneal@pobox.com>
CC: "freebsd-questions@FreeBSD.org" <freebsd-questions@FreeBSD.org>
Subject: RE: HP server gen 9 support
Thread-Topic: HP server gen 9 support
Thread-Index: AdE7Z56PiSvXGx6mRSqwTOOCQ8iyb////X4A///L3uA=
Date: Sun, 20 Dec 2015 23:54:52 +0000
Message-ID: <d3b673859c844ab786d06190d5eda456@EX1.Matrix.IT>
References: <3069d2383aac49a7a2b93a2b1aa40ac7@EX1.Matrix.IT>
 <20151220223822.GA68564@neutralgood.org>
In-Reply-To: <20151220223822.GA68564@neutralgood.org>
Accept-Language: he-IL, en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-ms-exchange-transport-fromentityheader: Hosted
x-originating-ip: [10.90.13.90]
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-BeenThere: freebsd-questions@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: User questions <freebsd-questions.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-questions>, 
 <mailto:freebsd-questions-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-questions/>;
List-Post: <mailto:freebsd-questions@freebsd.org>
List-Help: <mailto:freebsd-questions-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-questions>, 
 <mailto:freebsd-questions-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 20 Dec 2015 23:54:56 -0000

SGVsbG8gdGhhbmtzIGZvciB0aGUgcXVpY2sgYW5zd2VyLg0KDQpCdXQgSSB0aGluayB5b3UgbWlz
dW5kZXJzdG9vZCBtZS4gSSBoYXZlIEhQIERMIDM2MCBHZW4gOSBzZXJ2ZXIgd2l0aCBIUCBzbWFy
dCBhcnJheSBwNDQwIGNvbnRyb2xsZXIsIGl04oCZcyB0aGUgY29tbW9uIG9uZSBvZiBIUCBnZW4g
OSBzZXJ2ZXIuDQpJIGFsc28gaG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