From f36ac9a4649415eb9ffa33f875de6c6c121ae7af Mon Sep 17 00:00:00 2001 From: Santosh Gupta Date: Thu, 9 Feb 2017 16:57:15 -0800 Subject: [PATCH] Add check to use /tmp/supervisord_<>.sock if present After upgrade config files might still have old location for socket files. Check if socket file is present in /tmp/, if not then use the one in /var/run. Following obsolete files are not being updated. Will delete them as separate bug. common/control_files/supervisor-{analytics|control|vrouter|webui}.service Change-Id: Ib58b12cd3284e22408ee6413912a666442e7a558 Closes-Bug: #1663370 (cherry picked from commit 12a139d710bbab53d52a0c7c6f6e8c8da524cc13) --- common/control_files/barbican-api.initd.supervisord | 6 +++++- common/control_files/barbican-worker.initd.supervisord | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/common/control_files/barbican-api.initd.supervisord b/common/control_files/barbican-api.initd.supervisord index 20c0099d5..90f40aee3 100755 --- a/common/control_files/barbican-api.initd.supervisord +++ b/common/control_files/barbican-api.initd.supervisord @@ -3,4 +3,8 @@ # chkconfig: 2345 99 01 # description: Juniper Network Virtualization API -supervisorctl -s unix:///tmp/supervisord_openstack.sock ${1} `basename ${0}` +if [ -e /tmp/supervisord_openstack.sock ]; then + supervisorctl -s unix:///tmp/supervisord_openstack.sock ${1} `basename ${0}` +else + supervisorctl -s unix:///var/run/supervisord_openstack.sock ${1} `basename ${0}` +fi diff --git a/common/control_files/barbican-worker.initd.supervisord b/common/control_files/barbican-worker.initd.supervisord index 20c0099d5..90f40aee3 100755 --- a/common/control_files/barbican-worker.initd.supervisord +++ b/common/control_files/barbican-worker.initd.supervisord @@ -3,4 +3,8 @@ # chkconfig: 2345 99 01 # description: Juniper Network Virtualization API -supervisorctl -s unix:///tmp/supervisord_openstack.sock ${1} `basename ${0}` +if [ -e /tmp/supervisord_openstack.sock ]; then + supervisorctl -s unix:///tmp/supervisord_openstack.sock ${1} `basename ${0}` +else + supervisorctl -s unix:///var/run/supervisord_openstack.sock ${1} `basename ${0}` +fi