Skip to content

Commit

Permalink
Add check to use /tmp/supervisord_<>.sock if present
Browse files Browse the repository at this point in the history
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 12a139d)
  • Loading branch information
Santosh Gupta committed Feb 15, 2017
1 parent 1344d72 commit f36ac9a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion common/control_files/barbican-api.initd.supervisord
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion common/control_files/barbican-worker.initd.supervisord
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit f36ac9a

Please sign in to comment.