Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 09 Nov 2014 10:44:49 +0200
From:      wishmaster <artemrts@ukr.net>
To:        James Gritton <jamie@freebsd.org>
Cc:        freebsd-jail@freebsd.org
Subject:   Re[2]: fails exec.postsop after shutdown jail.
Message-ID:  <1415522364.331948284.b9pf4yjg@frv34.fwdcdn.com>
In-Reply-To: <294ef242e2fd3c13fbe9c1a9aa00e559@gritton.org>
References:  <E1XmeGJ-0002V2-MN@st14.mi6.kiev.ua> <294ef242e2fd3c13fbe9c1a9aa00e559@gritton.org>

next in thread | previous in thread | raw e-mail | index | archive | help

Hi, List, James.
 
 --- Original message ---
 From: "James Gritton" <jamie@freebsd.org>
 Date: 9 November 2014, 07:34:22
  


> On 2014-11-07 00:47, Борис wrote:
> > Hi, i use FreeBSD 10.1-RC4.
> > When i shutdown jail (jexec /bin/sh /etc/rc.shudown) exec.poststop
> > doesn't work and 1st string in my jail.conf (mount = "....) doesn't
> > automatically unmounted, but in "man jails" say's that mount will
> > unmount after removing jails.
> > my jail.conf:
> > 
> > mount = "/usr/ports /jails/$name/usr/ports nullfs ro 0 
> > 0 ";
> > exec.start = "/bin/sh /etc/rc";
> > exec.stop = "/bin/sh /etc/rc.shutdown";
> > mount.devfs;
> > exec.clean;
> > allow.mount;
> > vnet = new;
> > path = "/jails/$name";
> > allow.raw_sockets;
> > 
> > testjail1 {
> > exec.prestart += "ifconfig epair0 create";
> > exec.prestart += "ifconfig bridge0 addm epair0a";
> > exec.prestart += "ifconfig epair0a up";
> > vnet.interface = "epair0b";
> > exec.start += "ifconfig epair0b 192.168.1.150/24";
> > exec.start += "route add default 192.168.1.254";
> > exec.poststop = "ifconfig epair0a destroy";
> > }
> > 
> > Or am I doing something wrong?
> 
> 
> Everything looks right to me. I've tried it out on my own system, and
> it worked as expected. The only difference is I don't have VIMAGE, so
> I commented out the vnet stuff (including the exec.start that goes
> along with it).
> 
> So maybe the trouble is with vnet? Even still, that looks correct.
> I'm just able to test it at the moment. Regardless, vnet shouldn't
> affect the nullfs mount.
> 
> What output do you get for "jail -vr testjail1"?

  I have the same problem. The server has one jail with nginx and I use ram disk for fastcgi cache.

 /dev/md0 on /usr/home/jails/j2/var/tmp/nginx/fastcgi_cache (ufs, local, noatime, noexec, nosuid, nosymfollow)

After stopping jail mount point is still present. I use VIMAGE too.

May be need CC to freebsd-virtualization or freebsd-net as this issue might be vnet related?

Cheers,
Vitaliy



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1415522364.331948284.b9pf4yjg>