Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 09 Aug 2020 20:30:02 +0000
From:      bugzilla-noreply@freebsd.org
To:        jail@FreeBSD.org
Subject:   [Bug 238326] Kernel crash on jail stop (VIMAGE/VNET)
Message-ID:  <bug-238326-29815-EcuKsj6vxm@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-238326-29815@https.bugs.freebsd.org/bugzilla/>
References:  <bug-238326-29815@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D238326

--- Comment #16 from Mason Loring Bliss <mason@blisses.org> ---
Markus Stoff wrote:

> Running 'ifconfig ${epair}b -vnet ${jid}' before removing the jail avoids=
=20
> the kernel panic. However, I would prefer to shut my jails down in a=20
> clean way rather than just pulling the (network) plug.

While it's a little awkward-looking, you can do something like this to make
sure you've cleanly shut down and detached:

    exec.prestop =3D "/usr/sbin/jexec ${name} /bin/sh /etc/rc.shutdown";
    exec.prestop +=3D "/sbin/ifconfig epair${ep}b -vnet ${name}";

    exec.poststop =3D "ifconfig $bridge deletem epair${ep}a";
    exec.poststop +=3D "ifconfig epair${ep}a destroy";

The notable thing is that exec.prestop and exec.poststop run in system=20
context, not jail context, so you need the jexec to execute the clean=20
shutdown - but it works.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-238326-29815-EcuKsj6vxm>