Skip to content
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

Rollback etcd server version to 3.1.11 due to #60589 #60891

Merged
merged 2 commits into from
Mar 8, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/build-image/cross/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ RUN go get golang.org/x/tools/cmd/cover \
golang.org/x/tools/cmd/goimports

# Download and symlink etcd. We need this for our integration tests.
RUN export ETCD_VERSION=v3.2.16; \
RUN export ETCD_VERSION=v3.1.11; \
mkdir -p /usr/local/src/etcd \
&& cd /usr/local/src/etcd \
&& curl -fsSL https://github.com/coreos/etcd/releases/download/${ETCD_VERSION}/etcd-${ETCD_VERSION}-linux-amd64.tar.gz | tar -xz \
Expand Down
4 changes: 2 additions & 2 deletions build/root/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ http_archive(
urls = ["https://github.com/bazelbuild/bazel-skylib/archive/2169ae1c374aab4a09aa90e65efe1a3aad4e279b.tar.gz"],
)

ETCD_VERSION = "3.2.16"
ETCD_VERSION = "3.1.11"

new_http_archive(
name = "com_coreos_etcd",
build_file = "third_party/etcd.BUILD",
sha256 = "b664649bdc5e67bc79cda7f0d77156fdd31c8742a9e5335c3f16cb7119da4ec5",
sha256 = "b80c6c0719beee703821ece80f9e48b071ad5f59bb284bd3ea2104700738d9ec",
strip_prefix = "etcd-v%s-linux-amd64" % ETCD_VERSION,
urls = ["https://github.com/coreos/etcd/releases/download/v%s/etcd-v%s-linux-amd64.tar.gz" % (ETCD_VERSION, ETCD_VERSION)],
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ spec:
dnsPolicy: Default
containers:
- name: etcd-empty-dir-cleanup
image: k8s.gcr.io/etcd-empty-dir-cleanup:3.1.10.0
image: k8s.gcr.io/etcd-empty-dir-cleanup:3.1.11.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see a 3.1.11.0 in gcr.io. The etcd version of etcd-empty-dir-cleanup is only for the version of etcdctl copied into the container image which hasn't changed between 3.1.10 and 3.1.11.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. In that case, do you want me to:

  • keep the tag at 3.1.10.0, or
  • change it to 3.1.11.0 (to sync with etcd version used in the makefile) and push a new image?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sigh. To be consistent, let's publish 3.1.11.0..

Copy link
Contributor

@jpbetz jpbetz Mar 8, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of we could just tag the 3.1.10.0 image with 3.1.11.0 as well 😁

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer the former, to avoid messing up the tag wrt the underlying etcd version actually used to build the image.

That said, I failed with the following error while running make push:

The push refers to a repository [staging-k8s.gcr.io/etcd-empty-dir-cleanup]
41ad6ade37a0: Pushing [==================================================>]  14.32MB/14.32MB
8b8608fe70b0: Pushing [==================================================>]  14.32MB/14.32MB
c5183829c43c: Layer already exists 
read tcp [2a00:79e0:2:11:cdf:6d7d:727b:913e]:37568->[2a00:1450:400c:c06::52]:443: use of closed network connection

@krzyzacy @BenTheElder Is this somehow related to that docker auth issue? Leads on how to fix it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried it. Getting:

ERROR: (gcloud.beta.auth.configure-docker) Error writing Docker configuration to disk: [Errno 2] No such file or directory: '/usr/local/google/home/shyamjvs/.docker/tmptYLal3'

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok.. I think I fixed it by creating that dir. Let me try pushing now.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still fails, but with:

unexpected EOF

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's the gcloud docker -- push vs docker push issue again - have you upgraded your workstation yet?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I finally managed to make it work by replacing docker with gcloud docker and using the right credentials allowing me to push.

@jpbetz - We're good to go here now.

2 changes: 1 addition & 1 deletion cluster/gce/config-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ METADATA_AGENT_VERSION="${KUBE_METADATA_AGENT_VERSION:-0.2-0.0.16-1}"
# Useful for scheduling heapster in large clusters with nodes of small size.
HEAPSTER_MACHINE_TYPE="${HEAPSTER_MACHINE_TYPE:-}"

# Set etcd image (e.g. k8s.gcr.io/etcd) and version (e.g. 3.2.16) if you need
# Set etcd image (e.g. k8s.gcr.io/etcd) and version (e.g. 3.1.11) if you need
# non-default version.
ETCD_IMAGE="${TEST_ETCD_IMAGE:-}"
ETCD_DOCKER_REPOSITORY="${TEST_ETCD_DOCKER_REPOSITORY:-}"
Expand Down
4 changes: 2 additions & 2 deletions cluster/gce/manifests/etcd.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"containers":[
{
"name": "etcd-container",
"image": "{{ pillar.get('etcd_docker_repository', 'k8s.gcr.io/etcd') }}:{{ pillar.get('etcd_docker_tag', '3.2.16') }}",
"image": "{{ pillar.get('etcd_docker_repository', 'k8s.gcr.io/etcd') }}:{{ pillar.get('etcd_docker_tag', '3.1.11') }}",
"resources": {
"requests": {
"cpu": {{ cpulimit }}
Expand All @@ -29,7 +29,7 @@
"value": "{{ pillar.get('storage_backend', 'etcd3') }}"
},
{ "name": "TARGET_VERSION",
"value": "{{ pillar.get('etcd_version', '3.2.16') }}"
"value": "{{ pillar.get('etcd_version', '3.1.11') }}"
},
{ "name": "DATA_DIRECTORY",
"value": "/var/etcd/data{{ suffix }}"
Expand Down
4 changes: 2 additions & 2 deletions cluster/gce/upgrade-aliases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ export KUBE_GCE_ENABLE_IP_ALIASES=true
export SECONDARY_RANGE_NAME="pods-default"
export STORAGE_BACKEND="etcd3"
export STORAGE_MEDIA_TYPE="application/vnd.kubernetes.protobuf"
export ETCD_IMAGE=3.2.16
export ETCD_VERSION=3.2.16
export ETCD_IMAGE=3.1.11
export ETCD_VERSION=3.1.11

# Upgrade master with updated kube envs
${KUBE_ROOT}/cluster/gce/upgrade.sh -M -l
Expand Down
4 changes: 2 additions & 2 deletions cluster/images/etcd-empty-dir-cleanup/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@

.PHONY: build push

ETCD_VERSION = 3.1.10
ETCD_VERSION = 3.1.11
IMAGE = staging-k8s.gcr.io/etcd-empty-dir-cleanup
TAG = 3.1.10.0
TAG = 3.1.11.0

clean:
rm -rf etcdctl etcd-v$(ETCD_VERSION)-linux-amd64 etcd-v$(ETCD_VERSION)-linux-amd64.tar.gz
Expand Down
6 changes: 3 additions & 3 deletions cluster/images/etcd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# Build the etcd image
#
# Usage:
# [TAGS=2.2.1 2.3.7 3.0.17 3.1.11 3.2.16] [REGISTRY=k8s.gcr.io] [ARCH=amd64] [BASEIMAGE=busybox] make (build|push)
# [TAGS=2.2.1 2.3.7 3.0.17 3.1.11] [REGISTRY=k8s.gcr.io] [ARCH=amd64] [BASEIMAGE=busybox] make (build|push)

# The image contains different etcd versions to simplify
# upgrades. Thus be careful when removing any tag from here.
Expand All @@ -26,8 +26,8 @@
# Except from etcd-$(tag) and etcdctl-$(tag) binaries, we also
# need etcd and etcdctl binaries for backward compatibility reasons.
# That binary will be set to the last tag from $(TAGS).
TAGS?=2.2.1 2.3.7 3.0.17 3.1.11 3.2.16
REGISTRY_TAG?=3.2.16
TAGS?=2.2.1 2.3.7 3.0.17 3.1.11
REGISTRY_TAG?=3.1.11
# ROLLBACK_REGISTRY_TAG specified the tag that REGISTRY_TAG may be rolled back to.
ROLLBACK_REGISTRY_TAG?=3.1.11
ARCH?=amd64
Expand Down
7 changes: 3 additions & 4 deletions cluster/images/etcd/migrate-if-needed.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# This script performs etcd upgrade based on the following environmental
# variables:
# TARGET_STORAGE - API of etcd to be used (supported: 'etcd2', 'etcd3')
# TARGET_VERSION - etcd release to be used (supported: '2.2.1', '2.3.7', '3.0.17', '3.1.11', '3.2.16')
# TARGET_VERSION - etcd release to be used (supported: '2.2.1', '2.3.7', '3.0.17', '3.1.11')
# DATA_DIRECTORY - directory with etcd data
#
# The current etcd version and storage format is detected based on the
Expand All @@ -29,7 +29,6 @@
# - 2.2.1/etcd2 -> 2.3.7/etcd2
# - 2.3.7/etcd2 -> 3.0.17/etcd2
# - 3.0.17/etcd3 -> 3.1.11/etcd3
# - 3.1.11/etcd3 -> 3.2.16/etcd3
#
# NOTE: The releases supported in this script has to match release binaries
# present in the etcd image (to make this script work correctly).
Expand Down Expand Up @@ -65,7 +64,7 @@ rollback_etcd3_minor_version() {
echo "Starting etcd version ${START_VERSION} to capture rollback snapshot."
if ! start_etcd; then
echo "Unable to automatically downgrade etcd: starting etcd version ${START_VERSION} to capture rollback snapshot failed."
echo "See https://coreos.com/etcd/docs/3.2.16/op-guide/recovery.html for manual downgrade options."
echo "See https://coreos.com/etcd/docs/3.1.11/op-guide/recovery.html for manual downgrade options."
exit 1
else
ETCDCTL_API=3 ${ETCDCTL_CMD} snapshot --endpoints "http://127.0.0.1:${ETCD_PORT}" save "${SNAPSHOT_FILE}"
Expand Down Expand Up @@ -139,7 +138,7 @@ fi
# NOTE: SUPPORTED_VERSION has to match release binaries present in the
# etcd image (to make this script work correctly).
# We cannot use array since sh doesn't support it.
SUPPORTED_VERSIONS_STRING="2.2.1 2.3.7 3.0.17 3.1.11 3.2.16"
SUPPORTED_VERSIONS_STRING="2.2.1 2.3.7 3.0.17 3.1.11"
SUPPORTED_VERSIONS=$(echo "${SUPPORTED_VERSIONS_STRING}" | tr " " "\n")

VERSION_FILE="version.txt"
Expand Down
2 changes: 1 addition & 1 deletion cluster/kubemark/gce/config-default.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ TERMINATED_POD_GC_THRESHOLD=${TERMINATED_POD_GC_THRESHOLD:-100}
KUBE_APISERVER_REQUEST_TIMEOUT=300
ETCD_COMPACTION_INTERVAL_SEC="${KUBEMARK_ETCD_COMPACTION_INTERVAL_SEC:-}"

# Set etcd image (e.g. k8s.gcr.io/etcd) and version (e.g. 3.1.10) if you need
# Set etcd image (e.g. k8s.gcr.io/etcd) and version (e.g. 3.1.11) if you need
# non-default version.
ETCD_IMAGE="${TEST_ETCD_IMAGE:-}"
ETCD_VERSION="${TEST_ETCD_VERSION:-}"
Expand Down
6 changes: 3 additions & 3 deletions cmd/kubeadm/app/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ const (
MinExternalEtcdVersion = "3.1.11"

// DefaultEtcdVersion indicates the default etcd version that kubeadm uses
DefaultEtcdVersion = "3.2.16"
DefaultEtcdVersion = "3.1.11"

// Etcd defines variable used internally when referring to etcd component
Etcd = "etcd"
Expand Down Expand Up @@ -297,8 +297,8 @@ var (
// SupportedEtcdVersion lists officially supported etcd versions with corresponding kubernetes releases
SupportedEtcdVersion = map[uint8]string{
9: "3.1.11",
10: "3.2.16",
11: "3.2.16",
10: "3.1.11",
11: "3.1.11",
}
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/kubeadm/app/constants/constants_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,12 @@ func TestEtcdSupportedVersion(t *testing.T) {
},
{
kubernetesVersion: "1.10.0",
expectedVersion: version.MustParseSemantic("3.2.16"),
expectedVersion: version.MustParseSemantic("3.1.11"),
expectedError: nil,
},
{
kubernetesVersion: "1.10.1",
expectedVersion: version.MustParseSemantic("3.2.16"),
expectedVersion: version.MustParseSemantic("3.1.11"),
expectedError: nil,
},
}
Expand Down
18 changes: 9 additions & 9 deletions cmd/kubeadm/app/phases/upgrade/compute_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func TestGetAvailableUpgrades(t *testing.T) {
KubeVersion: "v1.10.0",
KubeadmVersion: "v1.10.0",
DNSVersion: "1.14.8",
EtcdVersion: "3.2.16",
EtcdVersion: "3.1.11",
},
},
},
Expand Down Expand Up @@ -196,7 +196,7 @@ func TestGetAvailableUpgrades(t *testing.T) {
KubeVersion: "v1.10.1",
KubeadmVersion: "v1.10.1",
DNSVersion: "1.14.8",
EtcdVersion: "3.2.16",
EtcdVersion: "3.1.11",
},
},
},
Expand Down Expand Up @@ -243,7 +243,7 @@ func TestGetAvailableUpgrades(t *testing.T) {
KubeVersion: "v1.10.0-alpha.2",
KubeadmVersion: "v1.10.0-alpha.2",
DNSVersion: "1.14.8",
EtcdVersion: "3.2.16",
EtcdVersion: "3.1.11",
},
},
},
Expand Down Expand Up @@ -276,7 +276,7 @@ func TestGetAvailableUpgrades(t *testing.T) {
KubeVersion: "v1.10.0-alpha.2",
KubeadmVersion: "v1.10.0-alpha.2",
DNSVersion: "1.14.8",
EtcdVersion: "3.2.16",
EtcdVersion: "3.1.11",
},
},
},
Expand Down Expand Up @@ -310,7 +310,7 @@ func TestGetAvailableUpgrades(t *testing.T) {
KubeVersion: "v1.10.0-beta.1",
KubeadmVersion: "v1.10.0-beta.1",
DNSVersion: "1.14.8",
EtcdVersion: "3.2.16",
EtcdVersion: "3.1.11",
},
},
},
Expand Down Expand Up @@ -344,7 +344,7 @@ func TestGetAvailableUpgrades(t *testing.T) {
KubeVersion: "v1.10.0-rc.1",
KubeadmVersion: "v1.10.0-rc.1",
DNSVersion: "1.14.8",
EtcdVersion: "3.2.16",
EtcdVersion: "3.1.11",
},
},
},
Expand Down Expand Up @@ -378,7 +378,7 @@ func TestGetAvailableUpgrades(t *testing.T) {
KubeVersion: "v1.10.6-rc.1",
KubeadmVersion: "v1.10.6-rc.1",
DNSVersion: "1.14.8",
EtcdVersion: "3.2.16",
EtcdVersion: "3.1.11",
},
},
},
Expand Down Expand Up @@ -412,7 +412,7 @@ func TestGetAvailableUpgrades(t *testing.T) {
KubeVersion: "v1.10.0-rc.1",
KubeadmVersion: "v1.10.0-rc.1",
DNSVersion: "1.14.8",
EtcdVersion: "3.2.16",
EtcdVersion: "3.1.11",
},
},
{
Expand All @@ -430,7 +430,7 @@ func TestGetAvailableUpgrades(t *testing.T) {
KubeVersion: "v1.11.0-alpha.2",
KubeadmVersion: "v1.11.0-alpha.2",
DNSVersion: "1.14.8",
EtcdVersion: "3.2.16",
EtcdVersion: "3.1.11",
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion hack/lib/etcd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

# A set of helpers for starting/running etcd for tests

ETCD_VERSION=${ETCD_VERSION:-3.2.16}
ETCD_VERSION=${ETCD_VERSION:-3.1.11}
ETCD_HOST=${ETCD_HOST:-127.0.0.1}
ETCD_PORT=${ETCD_PORT:-2379}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ spec:
- "--etcd-servers=http://localhost:2379"
- "--audit-log-path=-"
- name: etcd
image: quay.io/coreos/etcd:v3.2.16
image: quay.io/coreos/etcd:v3.1.11
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ spec:
imagePullPolicy: Never
command: [ "/kube-sample-apiserver", "--etcd-servers=http://localhost:2379" ]
- name: etcd
image: quay.io/coreos/etcd:v3.2.16
image: quay.io/coreos/etcd:v3.1.11
2 changes: 1 addition & 1 deletion test/e2e/apimachinery/aggregator.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func TestSampleAPIServer(f *framework.Framework, image string) {

// kubectl create -f deploy.yaml
deploymentName := "sample-apiserver-deployment"
etcdImage := "quay.io/coreos/etcd:v3.2.16"
etcdImage := "quay.io/coreos/etcd:v3.1.11"
podLabels := map[string]string{"app": "sample-apiserver", "apiserver": "true"}
replicas := int32(1)
zero := int64(0)
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/framework/nodes_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func etcdUpgradeGCE(target_storage, target_version string) error {
os.Environ(),
"TEST_ETCD_VERSION="+target_version,
"STORAGE_BACKEND="+target_storage,
"TEST_ETCD_IMAGE=3.2.16")
"TEST_ETCD_IMAGE=3.1.11")

_, _, err := RunCmdEnv(env, gceUpgradeScript(), "-l", "-M")
return err
Expand Down Expand Up @@ -107,7 +107,7 @@ func masterUpgradeGCE(rawV string, enableKubeProxyDaemonSet bool) error {
env = append(env,
"TEST_ETCD_VERSION="+TestContext.EtcdUpgradeVersion,
"STORAGE_BACKEND="+TestContext.EtcdUpgradeStorage,
"TEST_ETCD_IMAGE=3.2.16")
"TEST_ETCD_IMAGE=3.1.11")
} else {
// In e2e tests, we skip the confirmation prompt about
// implicit etcd upgrades to simulate the user entering "y".
Expand Down
1 change: 1 addition & 0 deletions test/e2e/scalability/load.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ var _ = SIGDescribe("Load capacity", func() {
f.NamespaceDeletionTimeout = time.Hour

BeforeEach(func() {
framework.Skipf("SKIP LOAD")
testPhaseDurations = timer.NewTestPhaseTimer()
clientset = f.ClientSet

Expand Down
2 changes: 1 addition & 1 deletion test/kubemark/start-kubemark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ SERVICE_CLUSTER_IP_RANGE="${SERVICE_CLUSTER_IP_RANGE:-}"
EVENT_PD="${EVENT_PD:-}"

# Etcd related variables.
ETCD_IMAGE="${ETCD_IMAGE:-3.2.16}"
ETCD_IMAGE="${ETCD_IMAGE:-3.1.11}"
ETCD_VERSION="${ETCD_VERSION:-}"

# Controller-manager related variables.
Expand Down