From 42f35b2ac4b4c2108d5daace7245cc005c6bdf10 Mon Sep 17 00:00:00 2001 From: Angie Wang Date: Wed, 15 Aug 2018 15:18:51 -0400 Subject: [PATCH] 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 --- openstack/python-gnocchi/centos/files/gnocchi-api.service | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/openstack/python-gnocchi/centos/files/gnocchi-api.service b/openstack/python-gnocchi/centos/files/gnocchi-api.service index 7ebeea78..99fd4003 100644 --- a/openstack/python-gnocchi/centos/files/gnocchi-api.service +++ b/openstack/python-gnocchi/centos/files/gnocchi-api.service @@ -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]