Previous change logs can be found at CHANGELOG-3.3.
See code changes and v3.4 upgrade guide for any breaking changes. Again, before running upgrades from any previous release, please make sure to read change logs below and v3.4 upgrade guide.
etcd_network_client_grpc_sent_bytes_total.etcdserver: read-only range request "key:\"\\000\" range_end:\"\\000\" " took too long [3.389041388s] to execute--auto-compaction-mode=revision --auto-compaction-retention=1000 automatically Compact on "latest revision" - 1000 every 5-minute (when latest revision is 30000, compact on revision 29000).--auto-compaction-mode=periodic --auto-compaction-retention=24h automatically Compact with 24-hour retention windown for every 2.4-hour. Now, Compact happens for every 1-hour.--auto-compaction-mode=periodic --auto-compaction-retention=30m automatically Compact with 30-minute retention windown for every 3-minute. Now, Compact happens for every 30-minute.--auto-compaction-mode=periodic --auto-compaction-retention=24h).--auto-compaction-mode=periodic --auto-compaction-retention=24h, v3.2.x, v3.3.0, v3.3.1, and v3.3.2 compact revision 2400, 2640, and 2880 for every 2.4-hour, while v3.3.3 or later compacts revision 2400, 2500, 2600 for every 1-hour.--auto-compaction-mode=periodic --auto-compaction-retention=30m and writes per minute are about 1000, v3.3.0, v3.3.1, and v3.3.2 compact revision 30000, 33000, and 36000, for every 3-minute, while v3.3.3 or later compacts revision 30000, 60000, and 90000, for every 30-minute.Lookup non-blocking with concurrent Grant/Revoke.raft.ErrProposalDropped on internal Raft proposal drop in v3 applier and v2 applier.
raftpb.MsgProp arrives at current leader while there is an ongoing leadership transfer.snapshot package for easier snapshot workflow (see godoc.org/github.com/etcd/clientv3/snapshot for more).etcd --ca-file flag, instead use --trusted-ca-file (--ca-file has been deprecated since v2.1).etcd --peer-ca-file flag, instead use --peer-trusted-ca-file (--peer-ca-file has been deprecated since v2.1).pkg/transport.TLSInfo.CAFile field, instead use pkg/transport.TLSInfo.TrustedCAFile (CAFile has been deprecated since v2.1).acbuild is not maintained anymore.*.aci files are not available from v3.4 release.--advertise-client-urls=http://:2379.--initial-advertise-peer-urls=http://:2380.ETCD_NAME=abc etcd --name=def.ETCD_INITIAL_CLUSTER_TOKEN=abc etcd --initial-cluster-token=def.ETCDCTL_ENDPOINTS=abc.com ETCDCTL_API=3 etcdctl endpoint health --endpoints=def.com.etcdserverpb.AuthRoleRevokePermissionRequest/key,range_end fields type from string to bytes.etcdserver.ServerConfig.SnapCount field to etcdserver.ServerConfig.SnapshotCount, to be consistent with the flag name etcd --snapshot-count.embed.Config.SnapCount field to embed.Config.SnapshotCount, to be consistent with the flag name etcd --snapshot-count.embed.Config.CorsInfo in *cors.CORSInfo type to embed.Config.CORS in map[string]struct{} type.embed.Config.SetupLogging.
embed.Config.Logger, embed.Config.LogOutputs, embed.Config.Debug fields.etcd --log-output to --log-outputs to support multiple log outputs.
etcd --log-output will be deprecated in v3.5.embed.Config.LogOutput to embed.Config.LogOutputs to support multiple log outputs.embed.Config.LogOutputs type from string to []string to support multiple log outputs.
--log-outputs accepts multiple writers, etcd configuration YAML file log-outputs field must be changed to []string type.--config-file etcd.config.yaml can have log-outputs: default field, now must be log-outputs: [default].etcdctl snapshot exit codes with snapshot package.
snapshot save/restore commands).glide to golang/dep.
vendor directory under cmd/vendor directory to prevent conflicting transitive dependencies.cmd/vendor directory to vendor at repository root.cmd directory.go get/install/build on etcd packages (e.g. clientv3, tools/benchmark) enforce builds with etcd vendor directory./v3beta with /v3.
/v3alpha./v3beta in v3.5.curl -L http://localhost:2379/v3beta/kv/put -X POST -d '{"key": "Zm9v", "value": "YmFy"}' still works as a fallback to curl -L http://localhost:2379/v3/kv/put -X POST -d '{"key": "Zm9v", "value": "YmFy"}', but curl -L http://localhost:2379/v3beta/kv/put -X POST -d '{"key": "Zm9v", "value": "YmFy"}' won't work in v3.5. Use curl -L http://localhost:2379/v3/kv/put -X POST -d '{"key": "Zm9v", "value": "YmFy"}' instead.wal package function signatures to support structured logger and logging to file in server-side.
Open(dirpath string, snap walpb.Snapshot) (*WAL, error), now Open(lg *zap.Logger, dirpath string, snap walpb.Snapshot) (*WAL, error).OpenForRead(dirpath string, snap walpb.Snapshot) (*WAL, error), now OpenForRead(lg *zap.Logger, dirpath string, snap walpb.Snapshot) (*WAL, error).Repair(dirpath string) bool, now Repair(lg *zap.Logger, dirpath string) bool.Create(dirpath string, metadata []byte) (*WAL, error), now Create(lg *zap.Logger, dirpath string, metadata []byte) (*WAL, error).pkg/cors package.--experimental-enable-v2v3 flag to --enable-v2v3; v2 storage emulation is now stable."github.com/coreos/etcd/etcdserver/auth" to "github.com/coreos/etcd/etcdserver/api/v2auth"."github.com/coreos/etcd/etcdserver/stats" to "github.com/coreos/etcd/etcdserver/api/v2stats"."github.com/coreos/etcd/error" to "github.com/coreos/etcd/etcdserver/api/v2error"."github.com/coreos/etcd/snap" to "github.com/coreos/etcd/etcdserver/api/snap"."github.com/coreos/etcd/store" to "github.com/coreos/etcd/etcdserver/api/v2store".google.golang.org/grpc from v1.7.5 to v1.12.0.github.com/ugorji/go/codec to v1.1.1, and regenerate v2 client.github.com/soheilhy/cmux from v0.1.3 to v0.1.4.github.com/google/btree from google/btree@925471ac9 to google/btree@e89373fe6.github.com/spf13/cobra from spf13/cobra@1c44ec8d3 to spf13/cobra@cd30c2a7e.github.com/spf13/pflag from v1.0.0 to spf13/pflag@1ce0cc6db.github.com/coreos/go-systemd from v15 to v17.etcd_server_is_leader Prometheus metric.etcd_debugging_mvcc_db_total_size_in_use_in_bytes Prometheus metric.etcd_network_peer_sent_failures_total count.etcd_debugging_server_lease_expired_total Prometheus metric.See security doc for more details.
etcd --host-whitelist flag, etcdserver.Config.HostWhitelist, and embed.Config.HostWhitelist, to prevent "DNS Rebinding" attack.
"localhost" (or any other address). Then, all HTTP endpoints of etcd server listening on "localhost" becomes accessible, thus vulnerable to DNS rebinding attacks (CVE-2018-5702)."HostWhitelist" is not empty, only allow HTTP requests whose Host field is listed in whitelist."HostWhitelist" is "*", which means insecure server allows all client HTTP requests."localhost", "127.0.0.1", etc.).etcd --host-whitelist example.com, then the server will reject all HTTP requests whose Host field is not example.com (also rejects requests to "localhost").etcd --cors in v3 HTTP requests (gRPC gateway).ttl field for etcd Authentication JWT token.
etcd --auth-token jwt,pub-key=<pub key path>,priv-key=<priv key path>,sign-method=<sign method>,ttl=5m.etcdserver.ServerConfig.AuthToken.(*tls.Config).GetCertificate for TLS reload if and only if server's (*tls.Config).Certificates field is not empty, or (*tls.ClientHelloInfo).ServerName is not empty with a valid SNI from the client. Previously, etcd always populates (*tls.Config).Certificates on the initial client TLS handshake, as non-empty. Thus, client was always expected to supply a matching SNI in order to pass the TLS verification and to trigger (*tls.Config).GetCertificate to reload TLS assets.*tls.ClientHelloInfo with an empty ServerName field, thus failing to trigger the TLS reload on initial TLS handshake; this becomes a problem when expired certificates need to be replaced online.(*tls.Config).Certificates is created empty on initial TLS client handshake, first to trigger (*tls.Config).GetCertificate, and then to populate rest of the certificates on every new TLS connection, even when client SNI is empty (e.g. cert only includes IPs).--initial-election-tick-advance flag to configure initial election tick fast-forward.
--initial-election-tick-advance=true, then local member fast-forwards election ticks to speed up "initial" leader election trigger.--initial-election-tick-advance=false.--initial-election-tick-advance at the cost of slow initial bootstrap.--pre-vote flag to enable to run an additional Raft election phase.
--pre-vote=false by default.--pre-vote=true by default.--initial-corrupt-check flag is now stable (--experimental-initial-corrupt-checkhaisbeen deprecated).
--initial-corrupt-check=true by default, to check cluster database hashes before serving client/peer traffic.--corrupt-check-time flag is now stable (--experimental-corrupt-check-timehaisbeen deprecated).
--corrupt-check-time=12h by default, to check cluster database hashes for every 12-hour.--enable-v2v3 flag is now stable.
--experimental-enable-v2v3 has been deprecated.--enable-v2=true --enable-v2v3='' by default, to enable v2 API server that is backed by v2 store.--enable-v2=true --enable-v2v3=/aaa to enable v2 API server that is backed by v3 storage.--enable-v2=false --enable-v2v3='' to disable v2 API server.--enable-v2=false --enable-v2v3=/aaa to disable v2 API server. TODO: error?--enable-v2=true --enable-v2v3=/aaa to enable v2 API server that is backed by v3 storage.--discovery-srv-name flag to support custom DNS SRV name with discovery.
_etcd-server-ssl._tcp.[YOUR_HOST] and _etcd-server._tcp.[YOUR_HOST].--discovery-srv-name="foo", then query _etcd-server-ssl-foo._tcp.[YOUR_HOST] and _etcd-server-foo._tcp.[YOUR_HOST].etcd --cors in v3 HTTP requests (gRPC gateway).etcd --log-output to --log-outputs to support multiple log outputs.
etcd --log-output will be deprecated in v3.5.--logger flag to support structured logger and multiple log outputs in server-side.
etcd --logger=capnslog will be deprecated in v3.5.etcd --logger=capnslog --log-outputs=default is the default setting and same as previous etcd server logging format.etcd --logger=zap --log-outputs=default is not supported when --logger=zap.--logger=zap --log-outputs=stderr.etcd --logger=zap --log-outputs=systemd/journal to send logs to the local systemd journal.etcd --logger=capnslog --log-outputs=default redirects server logs to local systemd journal. And if write to journald fails, it writes to os.Stderr as a fallback.os.Stderr, which is inefficient.etcd --logger=zap --log-outputs=stderr will log server operations in JSON-encoded format and writes logs to os.Stderr. Use this to override journald log redirects.etcd --logger=zap --log-outputs=stdout will log server operations in JSON-encoded format and writes logs to os.Stdout Use this to override journald log redirects.etcd --logger=zap --log-outputs=a.log will log server operations in JSON-encoded format and writes logs to the specified file a.log.etcd --logger=zap --log-outputs=a.log,b.log,c.log,stdout writes server logs to multiple files a.log, b.log and c.log at the same time and outputs to os.Stderr, in JSON-encoded format.etcd --logger=zap --log-outputs=/dev/null will discard all server logs.mvcc "unsynced" watcher restore operation.
curl -L http://localhost:2379/v3/election/proclaim -X POST -d '{"value":""}', curl -L http://localhost:2379/v3/election/resign -X POST -d '{"value":""}'.etcd --auto-compaction-mode revision --auto-compaction-retention 1 was translated to revision retention 3600000000000.etcd --auto-compaction-mode revision --auto-compaction-retention 1 is correctly parsed as revision retention 1.TTL values for Lease Grant.
TTL parameter to Grant request is unit of second.TTL values exceeding math.MaxInt64 expire in unexpected ways.rpctypes.ErrLeaseTTLTooLarge to client, when the requested TTL is larger than 9,000,000,000 seconds (which is >285 years).Lease is meant for short-periodic keepalives or sessions, in the range of seconds or minutes. Not for hours or days!raft.Config.CheckQuorum when starting with ForceNewCluster.--wal-dir directory.
lost+found in WAL directory prevent etcd server boot.lost+found or a file that's not suffixed with .wal is considered non-initialized.snapshot package for snapshot restore/save operations (see godoc.org/github.com/etcd/clientv3/snapshot for more).watch_id field to etcdserverpb.WatchCreateRequest to allow user-provided watch ID to mvcc.
watch_id is returned via etcdserverpb.WatchResponse, if any.fragment field to etcdserverpb.WatchCreateRequest to request etcd server to split watch events when the total size of events exceeds --max-request-bytes flag value plus gRPC-overhead 512 bytes.
embed.DefaultMaxRequestBytes which is 1.5 MiB plus gRPC-overhead 512 bytes.fragment field true, the server will split watch events into a set of chunks, each of which is a subset of watch events below server-side request limit.--max-request-bytes flag value is 1 MiB. Then, server will send 10 separate fragmented events to the client.--max-request-bytes flag value is 1 MiB and clientv3.Config.MaxCallRecvMsgSize is 1 MiB. Then, server will try to send 5 separate fragmented events to the client, and the client will error with "code = ResourceExhausted desc = grpc: received message larger than max (...)".clientv3 does in etcd v3.4).raftAppliedIndex field to etcdserverpb.StatusResponse for current Raft applied index.errors field to etcdserverpb.StatusResponse for server-side error.
"etcdserver: no leader", "NOSPACE", "CORRUPT"dbSizeInUse field to etcdserverpb.StatusResponse for actual DB size after compaction.Note: v3.5 will deprecate etcd --log-package-levels flag for capnslog; etcd --logger=zap --log-outputs=stderr will the default. v3.5 will deprecate [CLIENT-URL]/config/local/log endpoint.
embedembed.Config.InitialElectionTickAdvance to enable/disable initial election tick fast-forward.
embed.NewConfig() would return *embed.Config with InitialElectionTickAdvance as true by default.embed.CompactorModePeriodic for compactor.ModePeriodic.embed.CompactorModeRevision for compactor.ModeRevision.embed.Config.CorsInfo in *cors.CORSInfo type to embed.Config.CORS in map[string]struct{} type.embed.Config.SetupLogging.
embed.Config.Logger, embed.Config.LogOutputs, embed.Config.Debug fields.embed.Config.Logger to support structured logger zap in server-side.embed.Config.SnapCount field to embed.Config.SnapshotCount, to be consistent with the flag name etcd --snapshot-count.embed.Config.LogOutput to embed.Config.LogOutputs to support multiple log outputs.embed.Config.LogOutputs type from string to []string to support multiple log outputs.integrationCLUSTER_DEBUG to enable test cluster logging.
capnslog in integration tests.WithFragment OpOption to support watch events fragmentation when the total size of events exceeds --max-request-bytes flag value plus gRPC-overhead 512 bytes.
embed.DefaultMaxRequestBytes which is 1.5 MiB plus gRPC-overhead 512 bytes.fragment field true, the server will split watch events into a set of chunks, each of which is a subset of watch events below server-side request limit.--max-request-bytes flag value is 1 MiB. Then, server will send 10 separate fragmented events to the client.--max-request-bytes flag value is 1 MiB and clientv3.Config.MaxCallRecvMsgSize is 1 MiB. Then, server will try to send 5 separate fragmented events to the client, and the client will error with "code = ResourceExhausted desc = grpc: received message larger than max (...)".check datascale command.check datascale --auto-compact, --auto-defrag flags.check perf --auto-compact, --auto-defrag flags.defrag --cluster flag.endpoint status.endpoint status.endpoint health --write-out support.
endpoint health --write-out json did not work.watch [key] [range_end] -- [exec-command…] parsing.
ETCDCTL_API=3 ./bin/etcdctl watch foo -- echo watch event received panicked./v3beta with /v3.
/v3alpha./v3beta in v3.5.curl -L http://localhost:2379/v3beta/kv/put -X POST -d '{"key": "Zm9v", "value": "YmFy"}' still works as a fallback to curl -L http://localhost:2379/v3/kv/put -X POST -d '{"key": "Zm9v", "value": "YmFy"}', but curl -L http://localhost:2379/v3beta/kv/put -X POST -d '{"key": "Zm9v", "value": "YmFy"}' won't work in v3.5. Use curl -L http://localhost:2379/v3/kv/put -X POST -d '{"key": "Zm9v", "value": "YmFy"}' instead./{v3beta,v3}/lease/leases, /{v3beta,v3}/lease/revoke, /{v3beta,v3}/lease/timetolive.
etcd --cors in v3 HTTP requests (gRPC gateway).raftraft.ErrProposalDropped.
(r *raft) Step returns raft.ErrProposalDropped if a proposal has been ignored.raftpb.MsgProp arrives at current leader while there is an ongoing leadership transfer.becomeLeader and stepLeader by keeping track of latest pb.EntryConfChange index.
pendingConf boolean field scanning the entire tail of the log, which can delay hearbeat send.(n *node) ApplyConfChange.etcd-dump-logs --entry-type flag to support WAL log filtering by entry type.