Save gnocchi-api's PID to a PID file

gnocchi-api is enabled by systemd during initial puppet configuration
in order to create resource types in gnocchi, its PID should be saved
in its PID file so sm can restart it properly after the system is up.

Story: 2002825
Task: 22871
Depends-On: https://review.openstack.org/#/c/592097/

Change-Id: Iada5ae76e7ac33102bbf0f30620871f82cf3f125
Signed-off-by: Angie Wang <angie.wang@windriver.com>
This commit is contained in:
Angie Wang 2018-08-15 15:18:51 -04:00
parent 5ee147ba75
commit 42f35b2ac4

View File

@ -5,7 +5,11 @@ After=syslog.target network.target
[Service]
Type=simple
User=root
ExecStart=/bin/python /usr/bin/gunicorn --config /usr/share/gnocchi/gnocchi-api.conf --pythonpath /usr/share/gnocchi gnocchi-api --log-file /var/log/gnocchi/api.log
ExecStart=/bin/python /usr/bin/gunicorn \
--config /usr/share/gnocchi/gnocchi-api.conf \
--pythonpath /usr/share/gnocchi gnocchi-api \
--log-file /var/log/gnocchi/api.log \
--pid /var/run/gnocchi-api.pid
#Restart=on-failure
[Install]