Merge lp:~jtv/maas/bug-1064737 into lp:maas/trunk

Proposed by Jeroen T. Vermeulen on 2012-10-10
Status: Merged
Approved by: Jeroen T. Vermeulen on 2012-10-10
Approved revision: 1245
Merged at revision: 1246
Proposed branch: lp:~jtv/maas/bug-1064737
Merge into: lp:maas/trunk
Diff against target: 14 lines (+6/-0)
1 file modified
contrib/maas-http.conf (+6/-0)
To merge this branch: bzr merge lp:~jtv/maas/bug-1064737
Reviewer Review Type Date Requested Status
Raphaël Badin (community) Approve on 2012-10-10
Martin Packman (community) 2012-10-10 Approve on 2012-10-10
Review via email: mp+128891@code.launchpad.net

Commit Message

Work around lxml locking up its region controller process in production (not in a branch!) when validating a malformed xpath expression as a tag definition.

See https://techknowhow.library.emory.edu/blogs/branker/2010/07/30/django-lxml-wsgi-and-python-sub-interpreter-magic

Description of the Change

Sanity-checked with Raphael; he can't think of any problems that this might cause. Martin notes that "we probably want to use the daemon configuration for mod_wsgi longer term."

Jeroen

To post a comment you must log in.
Martin Packman (gz) wrote :

So, the configuration is already using WSGIDaemonProcess which provides an alternative method of seperating different applications from each other. It seems that we do still need to set this option to avoid the sub-interpreter incompatibility, but won't lose isolation from other apps as we are already daemon'd.

review: Approve
Raphaël Badin (rvb) wrote :

Looks good.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'contrib/maas-http.conf'
2--- contrib/maas-http.conf 2012-10-02 19:08:05 +0000
3+++ contrib/maas-http.conf 2012-10-10 09:38:22 +0000
4@@ -1,4 +1,10 @@
5 WSGIDaemonProcess maas user=maas group=maas processes=2 threads=1 display-name=%{GROUP}
6+
7+# Without this, defining a tag as a malformed xpath expression will hang
8+# the region controller.
9+# See https://techknowhow.library.emory.edu/blogs/branker/2010/07/30/django-lxml-wsgi-and-python-sub-interpreter-magic
10+WSGIApplicationGroup %{GLOBAL}
11+
12 WSGIScriptAlias /MAAS /usr/share/maas/wsgi.py
13 # Preload application when process starts. This will allow publishing
14 # the MAAS server existence over Avahi.