-
Notifications
You must be signed in to change notification settings - Fork 38.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use etcd3.0.10 in integration tests #34082
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v1.6.3-8 | ||
v1.6.3-9 | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -157,15 +157,14 @@ killApiServer | |
# We always perform offline migration, so we need to stop etcd. | ||
####################################################### | ||
|
||
# TODO: Uncomment once we support migration. | ||
#kube::etcd::stop | ||
#TARGET_STORAGE="etcd3" \ | ||
# DATA_DIRECTORY="${ETCD_DIR}" \ | ||
# ETCD=$(which etcd) \ | ||
# ETCDCTL=$(which etcdctl) \ | ||
# ATTACHLEASE="${KUBE_OUTPUT_HOSTBIN}/attachlease" \ | ||
# ${KUBE_ROOT}/cluster/images/etcd/migrate-if-needed.sh | ||
#kube::etcd::start | ||
kube::etcd::stop | ||
TARGET_STORAGE="etcd3" \ | ||
DATA_DIRECTORY="${ETCD_DIR}" \ | ||
ETCD=$(which etcd) \ | ||
ETCDCTL=$(which etcdctl) \ | ||
ATTACHLEASE="${KUBE_OUTPUT_HOSTBIN}/attachlease" \ | ||
${KUBE_ROOT}/cluster/images/etcd/migrate-if-needed.sh | ||
kube::etcd::start | ||
|
||
|
||
####################################################### | ||
|
@@ -176,8 +175,7 @@ killApiServer | |
|
||
KUBE_API_VERSIONS="${KUBE_NEW_API_VERSION},${KUBE_OLD_API_VERSION}" | ||
RUNTIME_CONFIG="api/all=false,api/${KUBE_OLD_API_VERSION}=true,api/${KUBE_NEW_API_VERSION}=true" | ||
# TODO: Switch to STORAGE_BACKEND_ETCD3 once we support it. | ||
startApiServer ${STORAGE_BACKEND_ETCD2} ${KUBE_NEW_STORAGE_VERSIONS} ${KUBE_STORAGE_MEDIA_TYPE_JSON} | ||
startApiServer ${STORAGE_BACKEND_ETCD3} ${KUBE_NEW_STORAGE_VERSIONS} ${KUBE_STORAGE_MEDIA_TYPE_JSON} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Update the comment block above to say that this also tests rolling forward to etcd3? Also, will this be flaky? Should we start and stop through etcd 2.3 first? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Currently, this is just the first step of test, because we are using 3.0.10 binary in all runs. So we are actually only testing migration from v2 to v3 API, not upgrading the binary itself. I will try to improve the test later (once we have the "migrate-if-needed.sh" script fully ready. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So what i wanted to say is that it shouldn't be flaky. |
||
|
||
# Update etcd objects, so that will now be stored in the new api version. | ||
kube::log::status "Updating storage versions in etcd" | ||
|
@@ -192,8 +190,7 @@ for test in ${tests[@]}; do | |
new_storage_version=${test_data[5]} | ||
|
||
kube::log::status "Verifying ${resource}/${namespace}/${name} has updated storage version ${new_storage_version} in etcd" | ||
# note that should use flag --endpoints for etcdctl 3 | ||
${ETCDCTL} --endpoint="${ETCD_HOST}:${ETCD_PORT}" get "/${ETCD_PREFIX}/${resource}/${namespace}/${name}" | grep ${new_storage_version} | ||
ETCDCTL_API=3 ${ETCDCTL} --endpoints="${ETCD_HOST}:${ETCD_PORT}" get "/${ETCD_PREFIX}/${resource}/${namespace}/${name}" | grep ${new_storage_version} | ||
done | ||
|
||
killApiServer | ||
|
@@ -209,8 +206,7 @@ RUNTIME_CONFIG="api/all=false,api/${KUBE_NEW_API_VERSION}=true" | |
|
||
# This seems to reduce flakiness. | ||
sleep 1 | ||
# TODO: Switch to STORAGE_BACKEND_ETCD3 once we support it. | ||
startApiServer ${STORAGE_BACKEND_ETCD2} ${KUBE_NEW_STORAGE_VERSIONS} ${KUBE_STORAGE_MEDIA_TYPE_PROTOBUF} | ||
startApiServer ${STORAGE_BACKEND_ETCD3} ${KUBE_NEW_STORAGE_VERSIONS} ${KUBE_STORAGE_MEDIA_TYPE_PROTOBUF} | ||
|
||
for test in ${tests[@]}; do | ||
IFS=',' read -ra test_data <<<"$test" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lavalamp - test are failing because of this - if you agree that this is a good approach, I will build this image