does anyone use these any more?
Oleg Ginzburg
olevole at olevole.ru
Thu Sep 13 15:45:53 UTC 2018
Hi,
(sorry, I am not a member of freebsd-jails ML)
mwlucas > https://lists.freebsd.org/pipermail/freebsd-jail/2018-September/003619.html
mwlucas > persist - why keep it around?
One case of persist in CBSD (as example) for many years is ability to
ZFS attach and interface renaming for vnet-based jails without
'post-execution' script:
https://github.com/cbsd/cbsd/blob/11.2.1/tools/makejconf#L95
Without persist mode, jail was created and execute <exec_start> script
atomically and without interruption (you can not insert between
creating a container and /etc/rc start sentience anything that you
need, for example: 'zfs attach' or rename epairXXX to eth0 )
With persist mode, CBSD created jail in follow scenario:
1) jail -c (create jail) in persist mode ( with empty exec.start script )
2) exec inside jail something (zfs attach, /sbin/ifconfig ... ), what
you need to do before launching /etc/rc -> /etc/rc.d/*
3) execute normal /etc/rc sequence
in this way, /etc/rc.d/zfs can mount ZFS on 'start' stage without
execution from CBSD wrapper 'late' commands after jail start, e.g (
jexec X /sbin/zfs mount + restart all services ))
Perhaps because of a misunderstanding of this option, exec.created
hook was created in FreeBSD 12-HEAD ;-):
https://lists.freebsd.org/pipermail/freebsd-jail/2018-August/003616.html
With exec.create, the 'persist' option is no longer so relevant as before.
More information about the freebsd-jail
mailing list