On 2016-10-31T18:45:31 +0000 list+org.freebsd.j...@io7m.com wrote: > On 2016-10-31T14:07:16 -0400 > Ernie Luzar <luzar...@gmail.com> wrote: > > > > The correct way to stop the jail is to issue this command from the host > > command line > > > > host# jail -v -f com.example.service0.conf -r com_example_service0 > > Hello. > > The problem with this is that jails can end up in this broken, undead > state. It seems rather nasty that the created process could crash, > leaving a nonexistent jail with no processes that nevertheless can't be > restarted without first "destroying" it, even though it appears to have > already gone! How is an administrator even supposed to know that a jail > that doesn't appear in the output of `jls` must be destroyed before it > can be started? > > M >
And, in fact, having just tried it, it doesn't work: host# jail -v -f com.example.service0.conf -c com_example_service0 com_example_service0: run command: /sbin/ifconfig em0 inet 127.0.0.2 netmask 255.255.255.255 alias com_example_service0: run command: /sbin/mount -t nullfs -o ro,noauto /usr/jail/base /usr/jail/com.example.service0/base com_example_service0: jail_set(JAIL_CREATE) persist name=com_example_service0 host.hostname=com.example.service0 ip4.addr=127.0.0.2 path=/usr/jail/com.example.service0 com_example_service0: created com_example_service0: run command in jail: /bin/sh # exit com_example_service0: jail_set(JAIL_UPDATE) jid=14 nopersist host# jail -v -f com.example.service0.conf -r com_example_service0 jail: "com_example_service0" not found host# jail -v -f com.example.service0.conf -c com_example_service0 com_example_service0: run command: /sbin/ifconfig em0 inet 127.0.0.2 netmask 255.255.255.255 alias com_example_service0: run command: /sbin/mount -t nullfs -o ro,noauto /usr/jail/base /usr/jail/com.example.service0/base mount_nullfs: /usr/jail/com.example.service0/base: Resource deadlock avoided jail: com_example_service0: /sbin/mount -t nullfs -o ro,noauto /usr/jail/base /usr/jail/com.example.service0/base: failed com_example_service0: run command: /sbin/ifconfig em0 inet 127.0.0.2 netmask 255.255.255.255 -alias host#
pgpnC4HtqsYip.pgp
Description: OpenPGP digital signature