[uWSGI] Namespaced vassals and log rotation

Łukasz Mierzwa l.mierzwa at gmail.com
Sat Apr 5 17:52:20 CEST 2014


Hi,

I'm not sure if this is bug with logging or I simply failed to find the
right combination of options. Right now I'm pushing logs from vassals using
remote syslog plugin (localhost syslog over tcp), it works just fine. I
wanted to switch to plain log files, each vassal would have rotated log
file inside the namespace.

If I use --logto I must pass full path including namespace path, example:
--logto=/ns/app1/home/uwsgi.log
so I guess that logs are opened before jailing vassal.

If I'll add --log-maxsize it doesn't work regardless if I set full path, or
just path inside the namespace. I think that uWSGI  tries to call rename()
using full path as first arg, but we are inside the namespace so it fails.

So i tried using --logto2 - it would open logfile after dropping
privileges, so it will happen inside my namespace. This works just fine.

So I've added --log-maxsize again, log is being rotated, but all writes are
still going to rotated log, looks like it's not being reopened after
rotating. I've checked with lsof and it turns out that master process has
new file opened, but all workers keep old file opened.
I've tried adding --log-master, but it doesn't seem to have any  effect.

Am I missing something with this setup?

-- 
Łukasz Mierzwa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.unbit.it/pipermail/uwsgi/attachments/20140405/c7c36d4b/attachment.html>


More information about the uWSGI mailing list