Unverified Commit bcd220d8 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #63633 from misterikkit/hacktest

Automatic merge from submit-queue (batch tested with PRs 65247, 63633, 67425). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. test: allow etcd to run on other ports. running `make test-integration` with the `ETCD_PORT` option set should work. Numerous integration test expect the correct URL to be populated in the `KUBE_INTEGRATION_ETCD_URL` environment variable. **What this PR does / why we need it**: This makes the ETCD_PORT option work correctly. **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: **Special notes for your reviewer**: I expect nobody is using the ETCD_PORT option, but I noticed that it is broken. **Release note**: ```release-note NONE ``` /sig testing
parents 93accdb2 39cfbf95
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
ETCD_VERSION=${ETCD_VERSION:-3.2.18} ETCD_VERSION=${ETCD_VERSION:-3.2.18}
ETCD_HOST=${ETCD_HOST:-127.0.0.1} ETCD_HOST=${ETCD_HOST:-127.0.0.1}
ETCD_PORT=${ETCD_PORT:-2379} ETCD_PORT=${ETCD_PORT:-2379}
export KUBE_INTEGRATION_ETCD_URL="http://${ETCD_HOST}:${ETCD_PORT}"
kube::etcd::validate() { kube::etcd::validate() {
# validate if in path # validate if in path
...@@ -74,13 +75,13 @@ kube::etcd::start() { ...@@ -74,13 +75,13 @@ kube::etcd::start() {
else else
ETCD_LOGFILE=${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 ${KUBE_INTEGRATION_ETCD_URL} --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 ${KUBE_INTEGRATION_ETCD_URL} --data-dir ${ETCD_DIR} --listen-client-urls ${KUBE_INTEGRATION_ETCD_URL} --debug 2> "${ETCD_LOGFILE}" >/dev/null &
ETCD_PID=$! ETCD_PID=$!
echo "Waiting for etcd to come up." echo "Waiting for etcd to come up."
kube::util::wait_for_url "http://${ETCD_HOST}:${ETCD_PORT}/v2/machines" "etcd: " 0.25 80 kube::util::wait_for_url "${KUBE_INTEGRATION_ETCD_URL}/v2/machines" "etcd: " 0.25 80
curl -fs -X PUT "http://${ETCD_HOST}:${ETCD_PORT}/v2/keys/_test" curl -fs -X PUT "${KUBE_INTEGRATION_ETCD_URL}/v2/keys/_test"
} }
kube::etcd::stop() { kube::etcd::stop() {
......
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