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
parent 2ffbaa13
...@@ -71,7 +71,7 @@ kube::etcd::start() { ...@@ -71,7 +71,7 @@ kube::etcd::start() {
if [[ -d "${ARTIFACTS_DIR:-}" ]]; then if [[ -d "${ARTIFACTS_DIR:-}" ]]; then
ETCD_LOGFILE="${ARTIFACTS_DIR}/etcd.$(uname -n).$(id -un).log.DEBUG.$(date +%Y%m%d-%H%M%S).$$" ETCD_LOGFILE="${ARTIFACTS_DIR}/etcd.$(uname -n).$(id -un).log.DEBUG.$(date +%Y%m%d-%H%M%S).$$"
else else
ETCD_LOGFILE=/dev/null ETCD_LOGFILE=${ETCD_LOGFILE:-"/dev/null"}
fi 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" 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 & 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 &
......
...@@ -445,6 +445,7 @@ function warning_log { ...@@ -445,6 +445,7 @@ function warning_log {
function start_etcd { function start_etcd {
echo "Starting etcd" echo "Starting etcd"
ETCD_LOGFILE=${LOG_DIR}/etcd.log
kube::etcd::start kube::etcd::start
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment