Merge "Update ceph-osd to be able to use tini"
This commit is contained in:
commit
c77bdd82d4
@ -15,6 +15,6 @@ apiVersion: v1
|
|||||||
appVersion: v1.0.0
|
appVersion: v1.0.0
|
||||||
description: OpenStack-Helm Ceph OSD
|
description: OpenStack-Helm Ceph OSD
|
||||||
name: ceph-osd
|
name: ceph-osd
|
||||||
version: 0.1.52
|
version: 0.1.53
|
||||||
home: https://github.com/ceph/ceph
|
home: https://github.com/ceph/ceph
|
||||||
...
|
...
|
||||||
|
@ -18,14 +18,20 @@ wait_for_file "${osd_id_file}" "${WAIT_FOR_OSD_ID_TIMEOUT}"
|
|||||||
log_file="/var/log/ceph/${DAEMON_NAME}.$(cat "${osd_id_file}").log"
|
log_file="/var/log/ceph/${DAEMON_NAME}.$(cat "${osd_id_file}").log"
|
||||||
wait_for_file "${log_file}" "${WAIT_FOR_OSD_ID_TIMEOUT}"
|
wait_for_file "${log_file}" "${WAIT_FOR_OSD_ID_TIMEOUT}"
|
||||||
|
|
||||||
|
trap "exit" SIGTERM SIGINT
|
||||||
|
keep_running=true
|
||||||
|
|
||||||
function tail_file () {
|
function tail_file () {
|
||||||
while true; do
|
while $keep_running; do
|
||||||
tail --retry -f "${log_file}"
|
tail --retry -f "${log_file}" &
|
||||||
|
tail_pid=$!
|
||||||
|
wait $tail_pid
|
||||||
|
sleep 1
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
function truncate_log () {
|
function truncate_log () {
|
||||||
while true; do
|
while $keep_running; do
|
||||||
sleep ${TRUNCATE_PERIOD}
|
sleep ${TRUNCATE_PERIOD}
|
||||||
if [[ -f ${log_file} ]] ; then
|
if [[ -f ${log_file} ]] ; then
|
||||||
truncate -s "${TRUNCATE_SIZE}" "${log_file}"
|
truncate -s "${TRUNCATE_SIZE}" "${log_file}"
|
||||||
@ -37,3 +43,5 @@ tail_file &
|
|||||||
truncate_log &
|
truncate_log &
|
||||||
|
|
||||||
wait -n
|
wait -n
|
||||||
|
keep_running=false
|
||||||
|
wait
|
||||||
|
@ -315,8 +315,11 @@ spec:
|
|||||||
value: {{ .Values.logging.truncate.period | quote }}
|
value: {{ .Values.logging.truncate.period | quote }}
|
||||||
- name: WAIT_FOR_OSD_ID_TIMEOUT
|
- name: WAIT_FOR_OSD_ID_TIMEOUT
|
||||||
value: {{ .Values.logging.osd_id.timeout | quote }}
|
value: {{ .Values.logging.osd_id.timeout | quote }}
|
||||||
command:
|
{{- if .Values.conf.tini.log_runner.enabled }}
|
||||||
- /tmp/log-tail.sh
|
command: ["/usr/local/bin/tini", "--", "/tmp/log-tail.sh"]
|
||||||
|
{{- else }}
|
||||||
|
command: ["/tmp/log-tail.sh"]
|
||||||
|
{{- end }}
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: pod-tmp
|
- name: pod-tmp
|
||||||
mountPath: /tmp
|
mountPath: /tmp
|
||||||
@ -357,8 +360,11 @@ spec:
|
|||||||
value: {{ tuple "ceph_mon" "internal" "mon" $envAll | include "helm-toolkit.endpoints.endpoint_port_lookup" | quote }}
|
value: {{ tuple "ceph_mon" "internal" "mon" $envAll | include "helm-toolkit.endpoints.endpoint_port_lookup" | quote }}
|
||||||
- name: MON_PORT_V2
|
- name: MON_PORT_V2
|
||||||
value: {{ tuple "ceph_mon" "internal" "mon_msgr2" $envAll | include "helm-toolkit.endpoints.endpoint_port_lookup" | quote }}
|
value: {{ tuple "ceph_mon" "internal" "mon_msgr2" $envAll | include "helm-toolkit.endpoints.endpoint_port_lookup" | quote }}
|
||||||
command:
|
{{- if .Values.conf.tini.ceph_osd_default.enabled }}
|
||||||
- /tmp/osd-start.sh
|
command: ["/usr/local/bin/tini", "--", "/tmp/osd-start.sh"]
|
||||||
|
{{- else }}
|
||||||
|
command: ["/tmp/osd-start.sh"]
|
||||||
|
{{- end }}
|
||||||
lifecycle:
|
lifecycle:
|
||||||
preStop:
|
preStop:
|
||||||
exec:
|
exec:
|
||||||
|
@ -179,6 +179,11 @@ jobs:
|
|||||||
startingDeadlineSecs: 60
|
startingDeadlineSecs: 60
|
||||||
|
|
||||||
conf:
|
conf:
|
||||||
|
tini:
|
||||||
|
log_runner:
|
||||||
|
enabled: false
|
||||||
|
ceph_osd_default:
|
||||||
|
enabled: false
|
||||||
ceph:
|
ceph:
|
||||||
global:
|
global:
|
||||||
# auth
|
# auth
|
||||||
|
@ -53,4 +53,5 @@ ceph-osd:
|
|||||||
- 0.1.50 Allow lvcreate to wipe existing LV metadata
|
- 0.1.50 Allow lvcreate to wipe existing LV metadata
|
||||||
- 0.1.51 Update Ceph images to patched 18.2.2 and restore debian-reef repo
|
- 0.1.51 Update Ceph images to patched 18.2.2 and restore debian-reef repo
|
||||||
- 0.1.52 Use quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal by default
|
- 0.1.52 Use quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal by default
|
||||||
|
- 0.1.53 Update ceph-daemon to be able to use tini init system
|
||||||
...
|
...
|
||||||
|
Loading…
Reference in New Issue
Block a user