[ceph] Fix for ceph-osd pods restart
This PS updates ceph-osd pod containers making sure that osd pods are not stuck at deletion. In this PS we are taking care of another background process that has to be terminated by preStop script. Change-Id: Icebb6119225b4b88fb213932cc3bcf78d650848f
This commit is contained in:
parent
c98ea9ca61
commit
2b500465da
@ -15,6 +15,6 @@ apiVersion: v1
|
||||
appVersion: v1.0.0
|
||||
description: OpenStack-Helm Ceph OSD
|
||||
name: ceph-osd
|
||||
version: 0.1.56
|
||||
version: 0.1.57
|
||||
home: https://github.com/ceph/ceph
|
||||
...
|
||||
|
@ -26,3 +26,10 @@ do
|
||||
kill -9 ${TAIL_PID};
|
||||
sleep 1;
|
||||
done
|
||||
|
||||
SLEEP_PID="$(cat /tmp/ceph-log-runner-sleep.pid)"
|
||||
while kill -0 ${SLEEP_PID} >/dev/null 2>&1;
|
||||
do
|
||||
kill -9 ${SLEEP_PID};
|
||||
sleep 1;
|
||||
done
|
||||
|
@ -25,7 +25,7 @@ function tail_file () {
|
||||
while $keep_running; do
|
||||
tail --retry -f "${log_file}" &
|
||||
tail_pid=$!
|
||||
echo $tail_pid > /tmp/ceph-log-runner.pid
|
||||
echo $tail_pid > /tmp/ceph-log-runner-tail.pid
|
||||
wait $tail_pid
|
||||
if [ -f /tmp/ceph-log-runner.stop ]; then
|
||||
keep_running=false
|
||||
@ -37,6 +37,8 @@ function tail_file () {
|
||||
function truncate_log () {
|
||||
while $keep_running; do
|
||||
sleep ${TRUNCATE_PERIOD}
|
||||
sleep_pid=$!
|
||||
echo $sleep_pid > /tmp/ceph-log-runner-sleep.pid
|
||||
if [[ -f ${log_file} ]] ; then
|
||||
truncate -s "${TRUNCATE_SIZE}" "${log_file}"
|
||||
fi
|
||||
|
@ -57,4 +57,5 @@ ceph-osd:
|
||||
- 0.1.54 Remove use of tini for ceph-daemon
|
||||
- 0.1.55 Update ceph-osd pod containers to make sure OSD pods are properly terminated at restart
|
||||
- 0.1.56 Add preStop lifecycle script to log-runner
|
||||
- 0.1.57 Added code to kill another background process in log-runner at restart
|
||||
...
|
||||
|
Loading…
Reference in New Issue
Block a user