From 09d4d65b1bdd8ece7e781816921419d6426e2e11 Mon Sep 17 00:00:00 2001 From: Howard Zhang Date: Mon, 25 Nov 2019 10:19:34 +0800 Subject: [PATCH] fix etcd version check error on ARM "etcd -version" command output an additional line on ARM platform: "running etcd on unsupported architecture "arm64" since ETCD_UNSUPPORTED_ARCH is set" Currently etcd version filtering code can not get correct version number. Signed-off-by: Howard Zhang --- hack/lib/etcd.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/lib/etcd.sh b/hack/lib/etcd.sh index c3d2fe98499..05e5404171c 100755 --- a/hack/lib/etcd.sh +++ b/hack/lib/etcd.sh @@ -46,7 +46,7 @@ kube::etcd::validate() { fi # validate installed version is at least equal to minimum - version=$(etcd --version | tail -n +1 | head -n 1 | cut -d " " -f 3) + version=$(etcd --version | grep Version | tail -n +1 | head -n 1 | cut -d " " -f 3) if [[ $(kube::etcd::version "${ETCD_VERSION}") -gt $(kube::etcd::version "${version}") ]]; then export PATH=${KUBE_ROOT}/third_party/etcd:${PATH} hash etcd