Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Jul 2018 22:31:41 -0500
From:      Kyle Evans <kevans@freebsd.org>
To:        Kyle Evans <kevans@freebsd.org>
Cc:        src-committers <src-committers@freebsd.org>, svn-src-projects@freebsd.org
Subject:   Re: svn commit: r336730 - projects/bectl/sbin/bectl
Message-ID:  <CACNAnaFcpX2k1bT7YeQtUJiPWXreEK8QGXwwgk4uvxtT1Q8=dA@mail.gmail.com>
In-Reply-To: <201807260314.w6Q3Ewhf008665@repo.freebsd.org>
References:  <201807260314.w6Q3Ewhf008665@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jul 25, 2018 at 10:14 PM, Kyle Evans <kevans@freebsd.org> wrote:
> Author: kevans
> Date: Thu Jul 26 03:14:58 2018
> New Revision: 336730
> URL: https://svnweb.freebsd.org/changeset/base/336730
>
> Log:
>   bectl(8): Support unjailing a boot environment
>
>   The given parameter may either be a jid, jail name, or a BE name.  In all
>   cases, the parameter will be resolved to a jid and bectl(8) will
>   sanity-check that there's actually a BE mounted at the requested jail root
>   before invoking jail_remove(2).

It was probably also worth mentioning that this will currently leave
the mount point hanging around to be unmounted manually. This was a
conscious decision- at the moment, `bectl jail` will throw you into a
shell inside the jail. Exiting the shell will clean up the jail and
the mount appropriately, leaving 'unjail' for edge cases where this
cleanup didn't get to happen -- but that won't always be the case.

I waffled on whether or not unjail will be useful for removing the
mount in the current world, and decided against it for now. The jail
command will be getting modified to instead use jail API to create the
jail then exec sh inside, at which point I will likely make 'unjail'
properly remove the mount as the user will be free to go in and out of
jail without worrying about it getting cleaned up upon 'exit'.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACNAnaFcpX2k1bT7YeQtUJiPWXreEK8QGXwwgk4uvxtT1Q8=dA>