[Bug 286179] Passing a vlan interface to a vnet jail result in a stuck dying state

[email protected]
Newsgroups gmane.os.freebsd.devel.net
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=286179

--- Comment #24 from Zhenlei Huang <[email protected]> ---
(In reply to florian.millet from comment #10)
> I tried to add a new exec.prestop step before the zfs unjail one with a
> "zfs umount -f zdata/jails-data/${name}" but I still ended up with a stuck
> un dying jail.
> I also tried on the host to do the zfs umount -f when the jail is stuck but it
> didn't change anything.

No. `zfs umount` should run in the jail but not in the host, since `zfs jail`
makes the jail to manage the dataset.

`exec.prestop` runs in the host ( system ) environment. Try this,

```
# diff jail.conf jail2.conf 
2c2,3
<     exec.start = "/bin/sh /etc/rc";
---
>     exec.start = "/sbin/zfs mount zroot/jails-data/${name}";
>     exec.start += "/bin/sh /etc/rc";
3a5
      exec.stop = "/bin/sh /etc/rc.shutdown jail";
>     exec.stop += "/sbin/zfs umount zroot/jails-data/${name}";
24c26
<     exec.prestop += "zfs unjail ${name} zroot/jails-data/${name}";
---
> #    exec.prestop += "zfs unjail ${name} zroot/jails-data/${name}";
```

FYI,

```
# jail -f jail2.conf -c vl2
vl2: created
# jexec vl2 zfs mount
zroot/appjail                   /
zroot/jails-data/vl2            /mnt
# jail -f jail2.conf -r vl2
vl2: removed
# jls -j vl2
   JID  IP Address      Hostname                      Path
jls: jail "vl2" not found
#
```

-- 
You are receiving this mail because:
You are on the CC list for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.