Skip to content

v3.2.0

Compare
Choose a tag to compare
@gyuho gyuho released this 09 Jun 18:31

Today we're announcing etcd v3.2.0. Release blog post can be found at etcd 3.2 announcement. Please read NEWS for highlighted changes.

Upgrade guide from v3.1+ to v3.2+ can be found at upgrade 3.2.

The release signing key can be found at coreos.com/security/app-signing-key.

Enhancements
Breaking changes
  • #7305 lease: LeaseTimeToLive returns TTL=-1 resp on lease not found
  • #7879 embed: Etcd.Peers field is now []*peerListener
  • #7266 clientv3: NewFromConfigFile is moved to clientv3/yaml.NewConfig
Security changes
  • #7524 auth: changes of managing roles and users
  • #7687 transport: deny incoming peer certs with wrong IP SAN
  • #7767 transport: resolve DNSNames when SAN checking
  • #7829 pkg/transport: reload TLS certificates for every client requests
v0, v2 changes

Only affects when migrated from v3.2.0-rc.0, v3.2.0-rc.1

  • #7803 v2http: remove deprecated /v2/machines path
  • #8062 v2http: put back /v2/machines and mark as non-deprecated
Other changes
  • #7745 *: add bill of materials
  • #6174 *: use Go 1.8+
  • #7560 Dockerfile-release: add nsswitch.conf into image
  • #7714 *: add multi-arch support in release binaries
  • #7170 embed: make v2 endpoint optional
  • #7524 etcdserver, backend: configure mmap size based on quota
  • #7752 clientv3: translate WithPrefix() into WithFromKey() for empty key
  • #7692 vendor: upgrade grpc to 1.2.1
  • #7695 vendor: upgrade grpc-gateway to v1.2.0
  • #7846 scripts: annotate with acbuild with supports-systemd-notify
  • #7877 backend: print snapshotting duration warning every 30s
  • #7892 backend: add prometheus metric for large snapshot duration
Notable bug fixes
  • #5386#issuecomment,#8074 rafthttp: permit very large v2 snapshots
  • #7515,#7518 *: use filepath.Join (fix for Windows)
  • #7789,#7809 fileutil: return immediately if preallocating 0 bytes
  • #7322,#7743 *: use gRPC server GracefulStop
  • #7724,#7759 *: ignore ErrAuthNotEnabled in clientv3 if auth not enabled
  • #7880,#7890 clientv3: Do no stop keep alive loop by server side errors
  • #7348,#7394 *: use machine default host only for default value, 0.0.0.0
  • #7834,#7856 etcdserver: apply() sets consistIndex for any entry type
  • #7628,#7876 etcdserver: renaming db before snapshot persists to wal,snap
  • #7789,#7809 auth: support watch
  • #8071 etcdserver: use same ReadView for read-only txns
New features
  • #7676 etcdmain: support SRV discovery for gRPC proxy
  • #7733 clientv3: let client dial endpoints not in the balancer
  • #7342 clientv3: version checking
  • #7649 etcdctl: add a new option --open-ended for unlimited range permission
  • #7591 etcdctl: add initial check perf command
  • #7983 etcdctl: support exec on lock
  • #7221 grpcproxy: support lease coalescing
  • #7549 namespace proxy
  • #7634 Election RPC service
  • #4709,#6285,#7444 gRPC lock service
  • #4378,#7882 gateway: DNS SRV priority
New metrics
  • #8050,#8064 etcdserver: add leaseExpired metrics
Getting started
Linux
ETCD_VER=v3.2.0
 
# choose either URL
GOOGLE_URL=https://storage.googleapis.com/etcd
GITHUB_URL=https://github.com/coreos/etcd/releases/download
DOWNLOAD_URL=${GOOGLE_URL}

rm -f /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz
rm -rf /tmp/test-etcd && mkdir -p /tmp/test-etcd

curl -L ${DOWNLOAD_URL}/${ETCD_VER}/etcd-${ETCD_VER}-linux-amd64.tar.gz -o /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz
tar xzvf /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz -C /tmp/test-etcd --strip-components=1

/tmp/test-etcd/etcd --version
<<COMMENT
etcd Version: 3.2.0
Git SHA: 66722b1
Go Version: go1.8.3
Go OS/Arch: linux/amd64
COMMENT
 
ETCDCTL_API=3 /tmp/test-etcd/etcdctl version
<<COMMENT
etcdctl version: 3.2.0
API version: 3.2
COMMENT
# start a local etcd server
/tmp/test-etcd/etcd
 
# write,read to etcd
ETCDCTL_API=3 /tmp/test-etcd/etcdctl --endpoints=localhost:2379 put foo bar
ETCDCTL_API=3 /tmp/test-etcd/etcdctl --endpoints=localhost:2379 get foo
macOS (Darwin)
ETCD_VER=v3.2.0
 
# choose either URL
GOOGLE_URL=https://storage.googleapis.com/etcd
GITHUB_URL=https://github.com/coreos/etcd/releases/download
DOWNLOAD_URL=${GOOGLE_URL}

rm -f /tmp/etcd-${ETCD_VER}-darwin-amd64.zip
rm -rf /tmp/test-etcd && mkdir -p /tmp/test-etcd

curl -L ${DOWNLOAD_URL}/${ETCD_VER}/etcd-${ETCD_VER}-darwin-amd64.zip -o /tmp/etcd-${ETCD_VER}-darwin-amd64.zip
unzip /tmp/etcd-${ETCD_VER}-darwin-amd64.zip -d /tmp
mv /tmp/etcd-${ETCD_VER}-darwin-amd64/* /tmp/test-etcd

/tmp/test-etcd/etcd --version
ETCDCTL_API=3 /tmp/test-etcd/etcdctl version
Docker
docker run \
  --rm \
  -p 2379:2379 \
  -p 2380:2380 \
  --name etcd-v3.2.0 \
  --volume=/tmp/etcd-data:/etcd-data \
  quay.io/coreos/etcd:v3.2.0 \
  /usr/local/bin/etcd \
  --name my-etcd-1 \
  --data-dir /etcd-data \
  --listen-client-urls http://localhost:2379 \
  --advertise-client-urls http://localhost:2379 \
  --listen-peer-urls http://localhost:2380 \
  --initial-advertise-peer-urls http://localhost:2380 \
  --initial-cluster my-etcd-1=http://localhost:2380 \
  --initial-cluster-token my-etcd-token \
  --initial-cluster-state new \
  --auto-compaction-retention 1
 
docker exec etcd-v3.2.0 /bin/sh -c "export ETCDCTL_API=3 && /usr/local/bin/etcd -version"
docker exec etcd-v3.2.0 /bin/sh -c "export ETCDCTL_API=3 && /usr/local/bin/etcdctl version"
docker exec etcd-v3.2.0 /bin/sh -c "export ETCDCTL_API=3 && /usr/local/bin/etcdctl endpoint health"
 
docker exec etcd-v3.2.0 /bin/sh -c "export ETCDCTL_API=3 && /usr/local/bin/etcdctl put foo bar"
docker exec etcd-v3.2.0 /bin/sh -c "export ETCDCTL_API=3 && /usr/local/bin/etcdctl get --consistency=s foo"

For more details, please check Docker guide.