2020-04-15 17:44:40 +00:00
|
|
|
From b620ae1fa40aeadb4bbe2164fad7cb5c330acb78 Mon Sep 17 00:00:00 2001
|
2018-11-28 06:49:05 +00:00
|
|
|
From: Chris Friesen <chris.friesen@windriver.com>
|
|
|
|
Date: Wed, 28 Nov 2018 01:33:39 -0500
|
2020-04-15 17:44:40 +00:00
|
|
|
Subject: [PATCH] Remove stale Apache2 service pids when a POD starts.
|
2018-11-28 06:49:05 +00:00
|
|
|
|
|
|
|
Stale Apache2 pids will prevent Apache2 from starting and will leave
|
|
|
|
the POD in a crashed state.
|
|
|
|
|
|
|
|
Note: the pid file is somewhat confusingly called
|
|
|
|
/var/run/httpd/httpd.pid and /var/run/apache2 is just a symlink to
|
|
|
|
/var/run/httpd.
|
|
|
|
|
|
|
|
This is loosely based off the in-review upstream commit at
|
|
|
|
https://review.openstack.org/#/c/619747
|
2019-03-22 08:37:33 +00:00
|
|
|
|
|
|
|
Signed-off-by: Robert Church <robert.church@windriver.com>
|
2018-11-28 06:49:05 +00:00
|
|
|
---
|
|
|
|
ceilometer/templates/bin/_ceilometer-api.sh.tpl | 3 +++
|
2019-03-22 08:37:33 +00:00
|
|
|
keystone/templates/bin/_keystone-api.sh.tpl | 6 ++----
|
2020-04-15 17:44:40 +00:00
|
|
|
2 files changed, 5 insertions(+), 4 deletions(-)
|
2018-11-28 06:49:05 +00:00
|
|
|
|
|
|
|
diff --git a/ceilometer/templates/bin/_ceilometer-api.sh.tpl b/ceilometer/templates/bin/_ceilometer-api.sh.tpl
|
2020-04-15 17:44:40 +00:00
|
|
|
index 3ba90d9..4b77452 100644
|
2018-11-28 06:49:05 +00:00
|
|
|
--- a/ceilometer/templates/bin/_ceilometer-api.sh.tpl
|
|
|
|
+++ b/ceilometer/templates/bin/_ceilometer-api.sh.tpl
|
2020-04-15 17:44:40 +00:00
|
|
|
@@ -40,6 +40,9 @@ function start () {
|
2019-09-23 17:30:08 +00:00
|
|
|
fi
|
2018-11-28 06:49:05 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
+ # Get rid of stale pid file if present.
|
|
|
|
+ rm -f /var/run/apache2/*.pid
|
|
|
|
+
|
|
|
|
# Start Apache2
|
2019-09-23 17:30:08 +00:00
|
|
|
exec {{ .Values.conf.software.apache2.binary }} {{ .Values.conf.software.apache2.start_parameters }}
|
2018-11-28 06:49:05 +00:00
|
|
|
}
|
|
|
|
diff --git a/keystone/templates/bin/_keystone-api.sh.tpl b/keystone/templates/bin/_keystone-api.sh.tpl
|
2020-04-15 17:44:40 +00:00
|
|
|
index 5d4286a..85740a0 100644
|
2018-11-28 06:49:05 +00:00
|
|
|
--- a/keystone/templates/bin/_keystone-api.sh.tpl
|
|
|
|
+++ b/keystone/templates/bin/_keystone-api.sh.tpl
|
2020-04-15 17:44:40 +00:00
|
|
|
@@ -41,10 +41,8 @@ function start () {
|
2018-11-28 06:49:05 +00:00
|
|
|
source /etc/apache2/envvars
|
|
|
|
fi
|
|
|
|
|
2019-03-22 08:37:33 +00:00
|
|
|
- if [ -f /var/run/apache2/apache2.pid ]; then
|
|
|
|
- # Remove the stale pid for debian/ubuntu images
|
|
|
|
- rm -f /var/run/apache2/apache2.pid
|
|
|
|
- fi
|
2019-01-13 04:21:53 +00:00
|
|
|
+ # Get rid of stale pid, shared memory segment and wsgi sock files if present.
|
|
|
|
+ rm -f /var/run/apache2/*
|
2019-03-22 08:37:33 +00:00
|
|
|
|
2018-11-28 06:49:05 +00:00
|
|
|
# Start Apache2
|
2019-09-23 17:30:08 +00:00
|
|
|
exec {{ .Values.conf.software.apache2.binary }} {{ .Values.conf.software.apache2.start_parameters }}
|
2018-11-28 06:49:05 +00:00
|
|
|
--
|
2020-04-15 17:44:40 +00:00
|
|
|
1.8.3.1
|
2018-11-28 06:49:05 +00:00
|
|
|
|