mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Add debug logging to all etcd migration operations.
This commit is contained in:
parent
d51e27fe96
commit
fd289c2d55
@ -113,11 +113,13 @@ start_etcd() {
|
||||
local ETCDCTL_CMD="${ETCDCTL:-/usr/local/bin/etcdctl-${START_VERSION}}"
|
||||
local API_VERSION="$(echo ${START_STORAGE} | cut -c5-5)"
|
||||
if [ "${API_VERSION}" = "2" ]; then
|
||||
ETCDCTL_CMD="${ETCDCTL_CMD} --endpoint=http://127.0.0.1:${ETCD_PORT} set"
|
||||
ETCDCTL_CMD="${ETCDCTL_CMD} --debug --endpoint=http://127.0.0.1:${ETCD_PORT} set"
|
||||
else
|
||||
ETCDCTL_CMD="${ETCDCTL_CMD} --endpoints=http://127.0.0.1:${ETCD_PORT} put"
|
||||
fi
|
||||
${ETCD_CMD} --name="etcd-$(hostname)" \
|
||||
${ETCD_CMD} \
|
||||
--name="etcd-$(hostname)" \
|
||||
--debug \
|
||||
--data-dir=${DATA_DIRECTORY} \
|
||||
--listen-client-urls http://127.0.0.1:${ETCD_PORT} \
|
||||
--advertise-client-urls http://127.0.0.1:${ETCD_PORT} \
|
||||
@ -153,7 +155,7 @@ if [ "${CURRENT_VERSION}" = "2.2.1" -a ! -d "${BACKUP_DIR}" ]; then
|
||||
echo "Backup etcd before starting migration"
|
||||
mkdir ${BACKUP_DIR}
|
||||
ETCDCTL_CMD="/usr/local/bin/etcdctl-2.2.1"
|
||||
ETCDCTL_API=2 ${ETCDCTL_CMD} backup --data-dir=${DATA_DIRECTORY} \
|
||||
ETCDCTL_API=2 ${ETCDCTL_CMD} --debug backup --data-dir=${DATA_DIRECTORY} \
|
||||
--backup-dir=${BACKUP_DIR}
|
||||
echo "Backup done in ${BACKUP_DIR}"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user