v3.1.0
Today we're announcing etcd v3.1.0, backward-compatible with all previous v3.0.0+ releases.
For the 3.1 release, we focused on fixing bugs and reducing issue backlog. Besides that, we introduced a number of new features.
Please read NEWS for highlighted changes.
Release signing key can be found at coreos.com/security/app-signing-key.
New features
- GH6038: api: transfer leadership when stopping leader
- GH6321: api: lease timetolive
- GH6330: clientv3: add SetEndpoints method
- GH6474: clientv3: add 'Sync' method
- GH6273: ctlv3: add 'print-value-only' flag to get command
- GH6439: etcdctl/ctlv3: make-mirror: feature add to modify/remove prefix in dest cluster
- GH6799: etcdmain: configurable 'etcd' binary log-output
- GH7030: etcdmain: add '--metrics' option to support different level of metrics reporting
- GH6172: clientv3/concurrency: remove session manager and add ttl
- experimental gRPC proxy; see gRPC proxy for more detail
Notable changes
- GH6106: etcdserver, embed: stricter reconfig checking
- GH6156: etcdserver: reject member removal that breaks active quorum
- GH6170: use default ip for advertise URL
- GH6629: clientv3: drop Config.Logger field
- GH6672: *: sort by ASCEND by default when missing sort order
- GH6653: acbuild: add symlinks to /usr/local/bin/etcd*
Security changes
Bug fix
- GH6649: discovery: add upper limit for waiting on a retry
- GH5845: clientv3: respect up/down notifications from grpc
- GH6077: v2http: use guest access in non-TLS mode
- GH6166: clientv3: support non-blocking New()
- GH6253: discovery: reject IP address records in SRVGetCluster
- GH6365: embed: reject domain names before binding
- GH6888: Use monotonic time in lease
- GH7023: clientv3: fix lease "freezing" on unhealthy cluster
- GH7148: clientv3: don't reset stream on keepaliveonce or revoke failure
- GH7195: concurrency: fix stm restart on concurrent key deletion
- GH7203: etcdctlv3: snapshot restore works with lease key
Enhancements
- GH6543: etcdserver: use linearizableReadNotify for txn
There are over 10 minor bug fixes, please check git history for more details.
Getting started
Linux
ETCD_VER=v3.1.0
DOWNLOAD_URL=https://github.com/coreos/etcd/releases/download
curl -L ${DOWNLOAD_URL}/${ETCD_VER}/etcd-${ETCD_VER}-linux-amd64.tar.gz -o /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz
mkdir -p /tmp/test-etcd && tar xzvf /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz -C /tmp/test-etcd --strip-components=1
/tmp/test-etcd/etcd --version
Git SHA: 8ba2897
Go Version: go1.7.4
Go OS/Arch: linux/amd64
# 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
Mac OS (Darwin)
ETCD_VER=v3.1.0
DOWNLOAD_URL=https://github.com/coreos/etcd/releases/download
curl -L ${DOWNLOAD_URL}/${ETCD_VER}/etcd-${ETCD_VER}-darwin-amd64.zip -o /tmp/etcd-${ETCD_VER}-darwin-amd64.zip
mkdir -p /tmp/test-etcd && 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
Run in containers
rkt
RKT_VERSION=v1.23.0
GITHUB_URL=https://github.com/coreos/rkt/releases/download
DOWNLOAD_URL=${GITHUB_URL}
rm -f /tmp/rkt-${RKT_VERSION}.tar.gz
rm -rf /tmp/test-rkt-${RKT_VERSION} && mkdir -p /tmp/test-rkt-${RKT_VERSION}
curl -L ${DOWNLOAD_URL}/${RKT_VERSION}/rkt-${RKT_VERSION}.tar.gz -o /tmp/rkt-${RKT_VERSION}.tar.gz
tar xzvf /tmp/rkt-${RKT_VERSION}.tar.gz -C /tmp/test-rkt-${RKT_VERSION} --strip-components=1
# sudo cp /tmp/test-rkt-${RKT_VERSION}/rkt /usr/local/bin
sudo cp /tmp/test-rkt-${RKT_VERSION}/rkt /
/rkt version
sudo /rkt \
--trust-keys-from-https \
run \
--stage1-name coreos.com/rkt/stage1-fly:1.23.0 \
quay.io/coreos/etcd:v3.1.0 \
--exec=/bin/sh -- -c "export ETCDCTL_API=3 && /usr/local/bin/etcdctl version"
sudo rm -rf /tmp/etcd-data
sudo mkdir -p /tmp/etcd-data
sudo chown -R root:$(whoami) /tmp/etcd-data
sudo chmod -R a+rw /tmp/etcd-data
sudo /rkt \
--trust-keys-from-https \
run \
--stage1-name coreos.com/rkt/stage1-fly:1.23.0 \
--net=host \
--volume etcd-data-dir,kind=host,source=/tmp/etcd-data \
--mount volume=etcd-data-dir,target=/tmp/etcd-data \
quay.io/coreos/etcd:v3.1.0 -- \
--name my-etcd-1 \
--data-dir /tmp/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
sudo /rkt \
--trust-keys-from-https \
run \
--stage1-name coreos.com/rkt/stage1-fly:1.23.0 \
quay.io/coreos/etcd:v3.1.0 \
--exec=/bin/sh -- -c "export ETCDCTL_API=3 && /usr/local/bin/etcdctl put foo bar"
For more details, please check rkt commands.
Docker
docker run --name etcd quay.io/coreos/etcd:v3.1.0
For more details, please check Docker guide.