[BProc] Re: bproc+autofs: oz_pgrp problem
hanzl at noel.feld.cvut.cz
hanzl at noel.feld.cvut.cz
Thu May 9 11:19:07 PDT 2002
> > static inline int autofs_oz_mode(struct autofs_sb_info *sbi) {
> > return sbi->catatonic || current->pgrp == sbi->oz_pgrp;
> > }
> > ...
>
> That should work. bproc.masq->pgrp is the value returned by getpgrp.
> Make sure you check to make sure that current->bproc.masq is not null
> though. It's null for all non-remotely managed processes.
>
> - Erik
I tried this but things are probably different in older bproc used in
linux-2.4.18-lanl.16 which I wanted to fix. However I got working
autofs on node with this in fs/autofs/autofs_i.h:
...
#include <asm/uaccess.h>
/* Added by VH for bproc: */
#include <linux/bproc.h>
...
static inline int autofs_oz_mode(struct autofs_sb_info *sbi) {
/* return sbi->catatonic || current->pgrp == sbi->oz_pgrp;
* Changed by Vaclav Hanzl to let it work with bproc:
*/
return sbi->catatonic ||
bproc_hook_imv(current->pgrp,sys_getpgrp,()) == sbi->oz_pgrp;
}
I have little idea what it actually means, but it works :)
Any comments welcome, as always.
More exactly, I did this:
- edited /usr/src/linux-2.4.18-lanl.16/fs/autofs/autofs_i.h as
indicated above
- make xconfig, load configs/kernel-2.4.18-i686.config, save without changes
- make dep
- make modules
- insmod --node 1 -f /usr/src/linux-2.4.18-lanl.16/fs/autofs/autofs.o
Any lover of risky games can take my autofs.o and autofs_i.h here:
http://noel.feld.cvut.cz/magi/bproc-autofs
and use it at HIS/HER OWN BIG RISK.
>> - Start automount outside the distributed PID space. I am not sure how
>> to do this, bproc is damn good in not letting you escape :-) - we
>> could modify /etc/inittab on node and signal init process and have our
>> automount process created this way?
>
>This is the easiest way to get around the problem although there are
>some drawbacks. I've been pretty vehement about not providing hooks
>for things like daemons to escape. The rationale there is basically
>that people would use those hooks if they were there. :)
Good rationale. Keep it. :-))
Little side-effect probably is that most people are not able to run
any daemons on bproc node. :-) But things are getting better...
Regards
Vaclav
More information about the Beowulf
mailing list