Commit 31e3c47f authored by David Johnson's avatar David Johnson

Expose Keystone-via-Apache/WSGI as an option.

This was to try to solve the performance problem; no luck here.
parent e37a48fe
......@@ -104,6 +104,11 @@ pc.defineParameter("keystoneUseMemcache","Keystone Uses Memcache",
portal.ParameterType.BOOLEAN,False,
longDescription="Specify whether or not Keystone should use Memcache as its token backend. In our testing, this has seemed to exacerbate intermittent Keystone internal errors, so it is off by default, and by default, the SQL token backend is used instead.")
# advanced=True,
pc.defineParameter("keystoneUseWSGI","Keystone Uses WSGI",
portal.ParameterType.INTEGER,
-1, [ (-1,"(default)"),(1,"Yes"),(0,"No") ],
longDescription="Specify whether or not Keystone should use Apache/WSGI instead of its own server. This is the default from Kilo onwards. In our testing, this has seemed to slow down Keystone.")
# advanced=True,
pc.defineParameter("quotasOff","Unlimit Default Quotas",
portal.ParameterType.BOOLEAN,True,
longDescription="Set the default Nova and Cinder quotas to unlimited, at least those that can be set via CLI utils (some cannot be set, but the significant ones can be set).")
......@@ -709,6 +714,15 @@ class Parameters(RSpec.Resource):
param = ET.SubElement(el,paramXML)
param.text = "KEYSTONEUSEMEMCACHE=%d" % (int(bool(params.keystoneUseMemcache)))
if params.keystoneUseWSGI == 0:
param = ET.SubElement(el,paramXML)
param.text = "KEYSTONEUSEWSGI=0"
elif params.keystoneUseWSGI == 0:
param = ET.SubElement(el,paramXML)
param.text = "KEYSTONEUSEWSGI=1"
else:
pass
param = ET.SubElement(el,paramXML)
param.text = "QUOTASOFF=%d" % (int(bool(params.quotasOff)))
......
......@@ -227,7 +227,7 @@ if [ -z "${KEYSTONE_DBPASS}" ]; then
su -s /bin/sh -c "/usr/bin/keystone-manage db_sync" keystone
if [ $OSVERSION -eq $OSKILO ]; then
if [ $OSVERSION -eq $OSKILO -a $KEYSTONEUSEWSGI -eq 1 ]; then
cat <<EOF >/etc/apache2/sites-available/wsgi-keystone.conf
Listen 5000
Listen 35357
......@@ -269,7 +269,7 @@ EOF
cp -p /var/www/cgi-bin/keystone/admin /var/www/cgi-bin/keystone/main
chown -R keystone:keystone /var/www/cgi-bin/keystone
chmod 755 /var/www/cgi-bin/keystone/*
elif [ $OSVERSION -ge $OSLIBERTY ]; then
elif [ $OSVERSION -ge $OSLIBERTY -a $KEYSTONEUSEWSGI -eq 1 ]; then
cat <<EOF >/etc/apache2/sites-available/wsgi-keystone.conf
Listen 5000
Listen 35357
......@@ -325,7 +325,7 @@ EOF
/etc/apache2/sites-enabled
fi
if [ $OSVERSION -le $OSJUNO ]; then
if [ $OSVERSION -le $OSJUNO -o $KEYSTONEUSEWSGI -eq 0 ]; then
service_restart keystone
service_enable keystone
else
......
......@@ -61,6 +61,8 @@ CEILOMETER_USE_WSGI=0
QUOTASOFF=1
# Off by default; seems to cause intermittent keystone unavailability.
KEYSTONEUSEMEMCACHE=0
# Off by default for Juno; on for Kilo and on by default.
KEYSTONEUSEWSGI=""
#
# We have an 'adminapi' user that gets a random password. Then, we have
# the dashboard and instance password, that comes in from geni-lib/rspec as a
......@@ -271,6 +273,18 @@ else
KAPISTR='v2.0'
fi
#
# Figure out if we got told to use keystone wsgi or not, or what our
# default should be if not.
#
if [ "x$KEYSTONEUSEWSGI" = "x" -a $OSVERSION -ge $OSKILO ]; then
KEYSTONEUSEWSGI=1
elif [ "x$KEYSTONEUSEWSGI" = "x1" ]; then
# Let them force WSGI
KEYSTONEUSEWSGI=1
else
KEYSTONEUSEWSGI=0
fi
if [ $GENIUSER -eq 1 ]; then
SWAPPER_EMAIL=`geni-get slice_email`
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment