From 67d762eef32d6fcd74fd134fac127fcd22b9cfad Mon Sep 17 00:00:00 2001 From: Phil Sphicas Date: Mon, 15 Jun 2020 23:14:44 +0000 Subject: [PATCH] ceph-osd: Log the script name, lineno and funcname For the scripts in the ceph-osd daemonset that source common.sh (i.e. those that run in the osd-init and ceph-osd-default containers), updates the PS4 prompt so that the script name, line number, and function are included in xtrace output. Change-Id: Ieebbb82b64db4cf363ed4396289c823744d4a860 --- ceph-osd/templates/bin/osd/ceph-disk/_common.sh.tpl | 1 + ceph-osd/templates/bin/osd/ceph-volume/_common.sh.tpl | 1 + 2 files changed, 2 insertions(+) diff --git a/ceph-osd/templates/bin/osd/ceph-disk/_common.sh.tpl b/ceph-osd/templates/bin/osd/ceph-disk/_common.sh.tpl index d06a23322..2f75f1a38 100644 --- a/ceph-osd/templates/bin/osd/ceph-disk/_common.sh.tpl +++ b/ceph-osd/templates/bin/osd/ceph-disk/_common.sh.tpl @@ -15,6 +15,7 @@ limitations under the License. */}} set -ex +export PS4='+${BASH_SOURCE:+$(basename ${BASH_SOURCE}):${LINENO}:}${FUNCNAME:+${FUNCNAME}():} ' : "${CRUSH_LOCATION:=root=default host=${HOSTNAME}}" : "${OSD_PATH_BASE:=/var/lib/ceph/osd/${CLUSTER}}" diff --git a/ceph-osd/templates/bin/osd/ceph-volume/_common.sh.tpl b/ceph-osd/templates/bin/osd/ceph-volume/_common.sh.tpl index 39adc1bd8..5d68ba349 100644 --- a/ceph-osd/templates/bin/osd/ceph-volume/_common.sh.tpl +++ b/ceph-osd/templates/bin/osd/ceph-volume/_common.sh.tpl @@ -15,6 +15,7 @@ limitations under the License. */}} set -ex +export PS4='+${BASH_SOURCE:+$(basename ${BASH_SOURCE}):${LINENO}:}${FUNCNAME:+${FUNCNAME}():} ' : "${CRUSH_LOCATION:=root=default host=${HOSTNAME}}" : "${OSD_PATH_BASE:=/var/lib/ceph/osd/${CLUSTER}}"