Skip to content

etcd README scripts are wrong, here's a replacement: #19920

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

Open
4 tasks done
SamuelMarks opened this issue May 11, 2025 · 0 comments · May be fixed by #19921
Open
4 tasks done

etcd README scripts are wrong, here's a replacement: #19920

SamuelMarks opened this issue May 11, 2025 · 0 comments · May be fixed by #19921
Assignees
Labels
area/documentation area/tooling priority/backlog Higher priority than priority/awaiting-more-evidence. type/feature

Comments

@SamuelMarks
Copy link
Contributor

Bug report criteria

What happened?

https://github.com/etcd-io/etcd/releases has a guide but it's wrong

What did you expect to happen?

The guide to be correct

How can we reproduce it (as minimally and precisely as possible)?

Use correct quoting and support tar or zip based on OS

Anything else we need to know?

Solution that works on all platforms:

#!/bin/sh

ETCD_VERSION='v3.6.0-rc.5'
# choose either URL
GOOGLE_URL='https://storage.googleapis.com/etcd'
GITHUB_URL='https://github.com/etcd-io/etcd/releases/download'
DOWNLOAD_URL="${GOOGLE_URL}"

uname_lower="$(printf '%s' "$(uname)" | tr '[:upper:]' '[:lower:]')"
name='etcd-'"${ETCD_VERSION}"'-'"${uname_lower}"'-'"${ARCH_ALT}"
archive="${name}"
is_tar=1
case "${uname_lower}" in
  'darwin'|'windows')
    is_tar=0;
    archive="${archive}"'.zip' ;;
  *) archive="${archive}"'.tar.gz' ;;
esac

rm -rf '/tmp/'"${archive}" '/tmp/etcd-download-test'
mkdir -p '/tmp/etcd-download-test'
curl -L "${DOWNLOAD_URL}"'/'"${ETCD_VERSION}"'/'"${archive}" -o '/tmp/'"${archive}"
if [ "${is_tar}" -eq 1 ]; then
  tar xzvf '/tmp/'"${archive}" -C '/tmp/etcd-download-test' --strip-components=1
else
  unzip '/tmp/'"${archive}" -d '/tmp'
  d='/tmp/'"${name}"
  set +f
  mv "${d}"'/'* '/tmp/etcd-download-test'
  set -f
  rm -r "${d}"
fi
rm -f '/tmp/'"${archive}"

Etcd version (please run commands below)

$ etcd --version
# paste output here

$ etcdctl version
# paste output here

Etcd configuration (command line flags or environment variables)

paste your configuration here

Etcd debug information (please run commands below, feel free to obfuscate the IP address or FQDN in the output)

$ etcdctl member list -w table
# paste output here

$ etcdctl --endpoints=<member list> endpoint status -w table
# paste output here

Relevant log output

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/documentation area/tooling priority/backlog Higher priority than priority/awaiting-more-evidence. type/feature
Development

Successfully merging a pull request may close this issue.

2 participants