Skip to content

Commit

Permalink
test/integration: enable experimental-watch-progress-notify-interval …
Browse files Browse the repository at this point in the history
…flag for etcd

The experimental-watch-progress-notify-interval flag specifies an interval at which etcd sends data to the kube-api server.

It is used by the WatchBookmark feature ( kube-apiserver) which is GA since 1.17.
It will also be used by a new WatchList and WatchListClient features which are targeted to Beta in this release (1.30)
All GCE tests set the flag as well.

Given the above, a default installation must pass the flag required by the kube-apiserver to etcd. Otherwise, some features will not work.

etcd-io/etcd#13779 tracks stabilization of the flag in etcd.
  • Loading branch information
p0lyn0mial committed Jan 19, 2024
1 parent c6887b1 commit b3c01da
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions hack/lib/etcd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ ETCD_PORT=${ETCD_PORT:-2379}
# to the command line argument, even when both have the same value.
ETCD_LOGLEVEL=${ETCD_LOGLEVEL:-warn}
export KUBE_INTEGRATION_ETCD_URL="http://${ETCD_HOST}:${ETCD_PORT}"
# ETCD_PROGRESS_NOTIFY_INTERVAL defines the interval for etcd watch progress notify events in seconds.
ETCD_PROGRESS_NOTIFY_INTERVAL="${ETCD_PROGRESS_NOTIFY_INTERVAL:-5s}"

kube::etcd::validate() {
# validate if in path
Expand Down Expand Up @@ -84,8 +86,8 @@ kube::etcd::start() {
else
ETCD_LOGFILE=${ETCD_LOGFILE:-"/dev/null"}
fi
kube::log::info "etcd --advertise-client-urls ${KUBE_INTEGRATION_ETCD_URL} --data-dir ${ETCD_DIR} --listen-client-urls http://${ETCD_HOST}:${ETCD_PORT} --log-level=${ETCD_LOGLEVEL} 2> \"${ETCD_LOGFILE}\" >/dev/null"
etcd --advertise-client-urls "${KUBE_INTEGRATION_ETCD_URL}" --data-dir "${ETCD_DIR}" --listen-client-urls "${KUBE_INTEGRATION_ETCD_URL}" --log-level="${ETCD_LOGLEVEL}" 2> "${ETCD_LOGFILE}" >/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} --log-level=${ETCD_LOGLEVEL} --experimental-watch-progress-notify-interval ${ETCD_PROGRESS_NOTIFY_INTERVAL} 2> \"${ETCD_LOGFILE}\" >/dev/null"
etcd --advertise-client-urls "${KUBE_INTEGRATION_ETCD_URL}" --data-dir "${ETCD_DIR}" --listen-client-urls "${KUBE_INTEGRATION_ETCD_URL}" --log-level="${ETCD_LOGLEVEL}" --experimental-watch-progress-notify-interval "${ETCD_PROGRESS_NOTIFY_INTERVAL}" 2> "${ETCD_LOGFILE}" >/dev/null &
ETCD_PID=$!

echo "Waiting for etcd to come up."
Expand Down
3 changes: 2 additions & 1 deletion test/integration/framework/etcd.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ func startEtcd(output io.Writer) (func(), error) {
}
klog.V(1).Infof("could not connect to etcd: %v", err)

currentURL, stop, err := RunCustomEtcd("integration_test_etcd_data", nil, output)
etcdArgs := []string{"--experimental-watch-progress-notify-interval", "5s"}
currentURL, stop, err := RunCustomEtcd("integration_test_etcd_data", etcdArgs, output)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit b3c01da

Please sign in to comment.