[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [ezjail] start/stop script broken on latest 9-STABLE

Now that the dust has settled and our jails can start at boot-time, its
time to buildworld and update our jails using 
	ezjail-admin update -I

Unfortunately, if you're tracking FreeBSD9.0Stable, you might find your
jails not starting due to a missing symbol,
	/bin/sh: Undefined symbol "_ThreadRuneLocale"jail: /bin/sh /etc/rc:
This is due to libc.so not being updated in the basejails, because it has
the flag schg set. In fact there are a few friends in /lib that also aren't
being updated for the same reason.

To get things working after you've updated your basejail you'll need to:
(please substitute where your jails are, mine are in /usr/jails/JAILBASE)
	chflags noschg /usr/jails/JAILBASE/lib/libc.so.7
	chflags noschg /usr/jails/JAILBASE/lib/libthr.so.3 

Then copy from your base system files into your basejail, e.g
	cp /lib/libc.so.7 /lib/libcrypt.so.* /lib/libthr.so.*
A quick kludge, will get you going again

So to the cause: ezjail-admin has a routine ezjail_splitworld for updating
& ezjail_dirlist is  correctly set and used to chflags -R noschg, yet
something seems to be locking these specific files?  The rest of lib is
being updated...  I have multiple basejails, and one of them contains:
	-r-xr-xr-x  1 root  wheel  schg 394492 Feb 12 08:47
	-r-xr-xr-x  1 root  wheel  schg 217604 Feb 12 08:47
Clearly the problem isn't confined to /lib.  Because things are happening
pretty quickly its easy to miss, messages like:

/usr/jails/bj1/lib/libc.so.7cpio: lib/libc.so.7: Can't unlink
already-existing object: Operation not permitted

/usr/jails/bj1/lib/libcrypt.so.5cpio: lib/libcrypt.so.5: Can't unlink
already-existing object: Operation not permitted

I'm thankful for the changes at (on 22nd May)
That caused this discovery to be triggered, I did insert 
    chflags -R noschg ${ezjail_jailbase}/${dir}; 
at line 276 of ezjail-admin V3.2 and my jails are correctly updated.
Though I'll leave the resolution to someone technical.

Regards, Dewayne