Is there a way to get uwsgi running in emperor mode to exec a completely fresh vassal process after chrooting? Here is the background of what we're trying to
do any why:

We currently have uwsgi running customer sites. Each site is run in a chroot
where there are different chroots that are chosen based on user config.

We want to upgrade the OS (to Ubuntu 16.04) outside the chroot, but keep the OS
(Ubuntu 14.04) inside the chroot to avoid breaking the user sites.

Our initial attempt was to compile a plugin per python version in each chroot and specify that in the vassal config for the site. This worked to some extent,
but we ran into a weird problem that took us a little time to diagnose. The
issue that we faced was that host name lookups failed from the site code. After
some investigation, it appears that the problem is caused by dynamic library
version mismatches. When the emperor starts, it loads libc from outside the
chroot. When the vassal is forked, it still has the non-chroot version of libc
loaded in memory. When the hostname lookup is called, libc tries to load
libresolv, but can't find a matching version, because the vassal has already
been chrooted.

We've been trying to get it working by using unprivileged-binary-patch to run
uwsgi as a binary in the chroot, but have had no success yet. At the moment,
the vassal is just immediately cursed and shut down. We'll continue trying
that, but it would be useful to know if there is a better way or if there are
things that we should know about unprivileged-binary-patch and how it works.

Thanks
Glenn

--
Glenn Jones
[email protected]

PythonAnywhere: Develop Python in your browser
<http://pythonanywhere.com/>

PythonAnywhere LLP
17a Clerkenwell Road, London EC1M 5RD, UK
VAT No.: GB 893 5643 79
Registered in England and Wales as company number OC378414.
Registered address: 28 Ely Place, 3rd Floor, London EC1N 6TD, UK

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

Reply via email to