conf/142972: [jail] [patch] Support JAILv2 and vnet in rc.d/jail

Philipp Wuensche cryx-freebsd at h3q.com
Thu Jan 21 20:50:59 UTC 2010


I'm taking this off bug-followup for now.

David BERARD wrote:
>> I did some testing with vnet and I find the way of using _poststart and
>> _afterstart to configure ip-addr. inside a vimage jail very impractical.
>> First we loose all the nice features of configuring ipaddrs. via
>> ipv4_addrs_if in rc.conf from inside the jail and second, more
>> important, the jail will be fully bootet before any ipaddr. is
>> configured or even interfaces are configured. This will result in
>> services not starting correctly, firewalling going nuts, routing-daemons
>> not working etc.pp.
>>
> 
> 
> I had to patch rc to support this, and use this in rc.conf
> jail_example_exec_earlypoststart0="ifconfig epair0b vnet example"
> jail_example_exec_afterstart0="ifconfig epair0b x.x.x.x"

I'm not sure I do understand this correct, but this doesn't solve the
problem I described.

With this patch, the ipaddr. configuration of the vnet jail is still
done from outside and not by the rc scripts inside the jail!

_afterstart is way too late for doing the ip-configuration because
services inside the jail are already started.

_earlypoststart makes no sense to me, it is still run during the wrong time.

greetings,
philipp



More information about the freebsd-jail mailing list