Dnia wtorek, 1 maja 2012 08:14:05 Roberto De Ioris pisze:
> Sorry, exec-in-jail run before fs-rebuilt so whatever you do will be
> overwritten.
> Use --exec-as-root, it will be triggered before privileges drop in the jail.
> 
> Remember that you have no stdin, and stdout/stderr are mapped to uWSGI log.

It works with exec-in-jail = mfsmount <mount options>.
The only issue remaining is that mfsmount is a client daemon for MooseFS mount 
and it runs all the time in the background. During vassal shutdown/reload 
uWSGI hangs waiting for mfsmount to die (if I kill mfsmount than it reloads, 
but only then). uWSGI doesn't seem to send any signal to it, I guess that it 
doesn't expect exec-as-root command to be long living process and all it does 
is to run it and wait untill it is terminated.
Is there a way to execute something also at exit time so that I can umount my 
MooseFs (mfsmount would die)?

Maybe instead of (possibly) growing number if exec-* options You could add 
exec slots  into code (moments in app lifetime when one can run some command, 
like at startup, or during reload), so there would be only one options:

exec = <slot>:<command>

for example:

exec = post-jail:<something>
exec = as-root-startup:<at startup command>
exec = as-root-shutdown:<at shutdown command>

Instead of long list of --exec-* commands there would be one, but with a list 
of possible slots to use.

Łukasz Mierzwa
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to