From d98c21e912107e5c0c66b3bbda42932783ebe225 Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Fri, 27 Jul 2018 14:50:33 -0400 Subject: [PATCH] enable etcd logging in local-e2e jobs We are not saving the etcd logs and just redirecting the output to /dev/null. In this change, we set ETCD_LOGFILE to the same directory where we log other kube relates processes. Change-Id: I719a941665b749b864f2efdcdfc7ddc7b2a61776 --- hack/lib/etcd.sh | 2 +- hack/local-up-cluster.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hack/lib/etcd.sh b/hack/lib/etcd.sh index 1aacae6cfec..4d5a623ebb8 100755 --- a/hack/lib/etcd.sh +++ b/hack/lib/etcd.sh @@ -71,7 +71,7 @@ kube::etcd::start() { if [[ -d "${ARTIFACTS_DIR:-}" ]]; then ETCD_LOGFILE="${ARTIFACTS_DIR}/etcd.$(uname -n).$(id -un).log.DEBUG.$(date +%Y%m%d-%H%M%S).$$" else - ETCD_LOGFILE=/dev/null + ETCD_LOGFILE=${ETCD_LOGFILE:-"/dev/null"} fi kube::log::info "etcd --advertise-client-urls http://${ETCD_HOST}:${ETCD_PORT} --data-dir ${ETCD_DIR} --listen-client-urls http://${ETCD_HOST}:${ETCD_PORT} --debug > \"${ETCD_LOGFILE}\" 2>/dev/null" etcd --advertise-client-urls http://${ETCD_HOST}:${ETCD_PORT} --data-dir ${ETCD_DIR} --listen-client-urls http://${ETCD_HOST}:${ETCD_PORT} --debug 2> "${ETCD_LOGFILE}" >/dev/null & diff --git a/hack/local-up-cluster.sh b/hack/local-up-cluster.sh index 93acacada32..f1c7ce4318b 100755 --- a/hack/local-up-cluster.sh +++ b/hack/local-up-cluster.sh @@ -445,6 +445,7 @@ function warning_log { function start_etcd { echo "Starting etcd" + ETCD_LOGFILE=${LOG_DIR}/etcd.log kube::etcd::start }