From aa26baacb8206967d61aef74686be94e3f8c90b8 Mon Sep 17 00:00:00 2001 From: rabi Date: Thu, 20 Apr 2017 10:55:16 +0530 Subject: [PATCH] Create custom dir for uwsgi domain sockets On Centos, apache has a private view of /tmp and thus can't see this socket, causing keystone to fail. This happened after I46294fb24e3c23fa19fcfd7d6c9ee8a932354702. Move it to /var/run. Closes-Bug: #1684360 Change-Id: I47f091656802719c259752454ec88bf50760b967 --- lib/apache | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/apache b/lib/apache index f88f1d3504..afeac158ca 100644 --- a/lib/apache +++ b/lib/apache @@ -230,7 +230,12 @@ function write_uwsgi_config { local http=$4 local name="" name=$(basename $wsgi) - local socket="/tmp/${name}.socket" + + # create a home for the sockets; note don't use /tmp -- apache has + # a private view of it on some platforms. + local socket_dir='/var/run/uwsgi' + sudo install -d -o $STACK_USER -m 755 $socket_dir + local socket="$socket_dir/${name}.socket" # always cleanup given that we are using iniset here rm -rf $file