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
This commit is contained in:
Phil Sphicas 2020-06-15 23:14:44 +00:00
parent 1065b48025
commit 67d762eef3
2 changed files with 2 additions and 0 deletions

View File

@ -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}}"

View File

@ -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}}"