[Bug 238326] Kernel crash on jail stop (VIMAGE/VNET)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Bug 238326] Kernel crash on jail stop (VIMAGE/VNET)

bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238326

--- Comment #16 from Mason Loring Bliss <[hidden email]> ---
Markus Stoff wrote:

> Running 'ifconfig ${epair}b -vnet ${jid}' before removing the jail avoids
> the kernel panic. However, I would prefer to shut my jails down in a
> 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 = "/usr/sbin/jexec ${name} /bin/sh /etc/rc.shutdown";
    exec.prestop += "/sbin/ifconfig epair${ep}b -vnet ${name}";

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

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

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-jail
To unsubscribe, send any mail to "[hidden email]"