mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-25 11:31:44 +00:00
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
This commit is contained in:
parent
2ffbaa13d0
commit
d98c21e912
@ -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 &
|
||||
|
@ -445,6 +445,7 @@ function warning_log {
|
||||
|
||||
function start_etcd {
|
||||
echo "Starting etcd"
|
||||
ETCD_LOGFILE=${LOG_DIR}/etcd.log
|
||||
kube::etcd::start
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user