[openstack-dev] [all][tc][ptls][glance] final stages of python 3 transition

Thomas Goirand zigo at debian.org
Sat May 19 17:21:22 UTC 2018


On 05/08/2018 07:55 PM, Matthew Treinish wrote:
> I wrote up a doc about running under
> apache when I added the uwsgi chunked transfer encoding support to glance about
> running glance under apache here:
> 
> https://docs.openstack.org/glance/latest/admin/apache-httpd.html
> 
> Which includes how you have to configure things to get it working and a section
> on why mod_wsgi doesn't work.

Thanks for that. Could you also push a uWSGI .ini configuration example
file, as well as the mod_proxy example? There's so many options in uwsgi
that I don't want to risk doing something wrong. I've pasted my config
at the end of this message. Do you think it's also OK to use SSL
directly with uwsgi, using the --https option? What about the 104 error
that I've been experiencing? Is it because I'm not using mod_proxy?

BTW, there's no need to manually do the symlink, you can use instead:
a2ensite uwsgi-glance-api.conf

Cheers,

Thomas Goirand (zigo)


[uwsgi]
############################
### Generic UWSGI config ###
############################

# Override the default size for headers from the 4k default.
buffer-size = 65535

# This avoids error 104: "Connection reset by peer"
rem-header = Content-Lenght

# This is running standalone
master = true

# Threads and processes
enable-threads = true

processes = 4

# uwsgi recommends this to prevent thundering herd on accept.
thunder-lock = true

plugins = python3

# This ensures that file descriptors aren't shared between the WSGI
application processes.
lazy-apps = true

# Log from the wsgi application: needs python3-pastescript as runtime
depends.
paste-logger = true

# automatically kill workers if master dies
no-orphans = true

# exit instead of brutal reload on SIGTERM
die-on-term = true

##################################
### OpenStack service specific ###
##################################

# This is the standard port for the WSGI application, listening on all
available IPs
http-socket = :9292
logto = /var/log/glance/glance-api.log
name = glance-api
uid = glance
gid = glance
chdir = /var/lib/glance
wsgi-file = /usr/bin/glance-wsgi-api



More information about the OpenStack-dev mailing list