changing cpuset of jail from inside of jail - is it feature?
Miroslav Lachman
000.fbsd at quip.cz
Thu Apr 23 23:22:12 UTC 2009
Bjoern A. Zeeb wrote:
[...]
> Ok, I am not sure what is going wrong here; well I know but I don't
> know if it's intended in cpuset. Trying to talk to the right people
> but they seen to be AWOL atm.
>
>
> If you are brave, you could try:
>
> http://people.freebsd.org/~bz/20090423-01-cpuset-jails.diff
>
> I haven't even compiled it yet. It may work, it may not work, it may
> make your machine panicing, ... just to warn you.
>
> it should still allow you to create further sets within a jail but you
> should not be able to change the "root set" of the jail from inside
> the jail anymore (in case it works;)
I did just a quick test. (OK, not so quick, because compilation inside
Qemu on my old PC takes 2 hours ;])
It compiles without problems and did what I expect:
root at 72-rc1 ~/# jls
JID IP Address Hostname Path
1 alpha.test /usr/jail/alpha
root at 72-rc1 ~/# jexec 1 tcsh
root at alpha //# cpuset -l 0 -j 1
cpuset: setaffinity: Operation not permitted
root at alpha //# cpuset -l 0 -r -j 1
cpuset: setaffinity: Operation not permitted
I have no real multicore machine to test it more deeply. (can't test it
on production servers and spare machine is blocked by another task)
Will this fix be included in 7.2-RELEASE or is it too late to commit
this fix?
Miroslav Lachman
More information about the freebsd-jail
mailing list