文档版本 v3.7-DRAFT 处于 草稿 状态。如需获取最新的稳定版文档,请参阅 v3.6。
将 etcd 从 3.3 升级到 3.4
在一般情况下,从 etcd 3.3 升级到 3.4 可以实现零停机、滚动升级:
- 逐个停止 etcd v3.3 进程,并将其替换为 etcd v3.4 进程
- 在所有 v3.4 进程运行后,v3.4 中的新功能即可在集群中使用
在开始升级之前,请通读本指南其余部分以做好准备。
升级检查清单
注意: 当从 v2 迁移且没有 v3 数据时,如果 etcd 从现有快照恢复但不存在 v3 的 ETCD_DATA_DIR/member/snap/db 文件,etcd 服务器 v3.2+ 将会 panic。这种情况发生在服务器已从 v2 迁移但之前没有 v3 数据时。这也防止了意外的 v3 数据丢失(例如 db 文件可能已被移动)。etcd 要求只有在存在 v3 数据的情况下才能进行后续的 v3 版本迁移。在 v3.0 服务器包含 v3 数据之前,请勿升级到更新的 v3 版本。
3.4 版本中的重点破坏性变更。
将 ETCDCTL_API=3 etcdctl 设为默认值
ETCDCTL_API=3 现在是默认值。
etcdctl set foo bar
Error: unknown command "set" for "etcdctl"
-etcdctl set foo bar
+ETCDCTL_API=2 etcdctl set foo bar
bar
ETCDCTL_API=3 etcdctl put foo bar
OK
-ETCDCTL_API=3 etcdctl put foo bar
+etcdctl put foo bar
将 etcd --enable-v2=false 设为默认值
现在默认启用 etcd --enable-v2=false。
这意味着,除非明确指定 etcd --enable-v2=true,否则 etcd v3.4 服务器将不再响应 v2 API 请求。
如果使用了 v2 API,请确保在 v3.4 中启用 v2 API:
-etcd
+etcd --enable-v2=true
其他 HTTP API 仍可正常工作(例如 [CLIENT-URL]/metrics、[CLIENT-URL]/health、v3 gRPC 网关)。
弃用 etcd --ca-file 和 etcd --peer-ca-file 参数
--ca-file 和 --peer-ca-file 参数已被弃用;自 v2.1 起已不推荐使用。
注意:设置此参数会自动启用客户端证书认证,无论 --client-cert-auth 设置为何值。
-etcd --ca-file ca-client.crt
+etcd --trusted-ca-file ca-client.crt
-etcd --peer-ca-file ca-peer.crt
+etcd --peer-trusted-ca-file ca-peer.crt
弃用 grpc.ErrClientConnClosing 错误
grpc.ErrClientConnClosing 已在 gRPC >= 1.10 中被弃用。
import (
+ "go.etcd.io/etcd/clientv3"
"google.golang.org/grpc"
+ "google.golang.org/grpc/codes"
+ "google.golang.org/grpc/status"
)
_, err := kvc.Get(ctx, "a")
-if err == grpc.ErrClientConnClosing {
+if clientv3.IsConnCanceled(err) {
// or
+s, ok := status.FromError(err)
+if ok {
+ if s.Code() == codes.Canceled
客户端拨号需使用 grpc.WithBlock
新的客户端负载均衡器 使用异步解析器将端点传递给 gRPC 拨号函数。因此,v3.4 客户端需要 grpc.WithBlock 拨号选项,以等待底层连接建立完成。
import (
"time"
"go.etcd.io/etcd/clientv3"
+ "google.golang.org/grpc"
)
+// "grpc.WithBlock()" to block until the underlying connection is up
ccfg := clientv3.Config{
Endpoints: []string{"localhost:2379"},
DialTimeout: time.Second,
+ DialOptions: []grpc.DialOption{grpc.WithBlock()},
DialKeepAliveTime: time.Second,
DialKeepAliveTimeout: 500 * time.Millisecond,
}
弃用 etcd_debugging_mvcc_db_total_size_in_bytes Prometheus 指标
v3.4 将 etcd_debugging_mvcc_db_total_size_in_bytes Prometheus 指标升级为 etcd_mvcc_db_total_size_in_bytes,以鼓励对 etcd 存储进行监控。
etcd_debugging_mvcc_db_total_size_in_bytes 在 v3.4 中仍保留以支持向后兼容,将在 v3.5 中完全移除。
-etcd_debugging_mvcc_db_total_size_in_bytes
+etcd_mvcc_db_total_size_in_bytes
请注意,etcd_debugging_* 命名空间下的指标已被标记为实验性。随着我们不断完善监控指南,未来可能会有更多指标被正式推广。
弃用 etcd_debugging_mvcc_put_total Prometheus 指标
v3.4 将 etcd_debugging_mvcc_put_total Prometheus 指标升级为 etcd_mvcc_put_total,以鼓励对 etcd 存储进行监控。
etcd_debugging_mvcc_put_total 在 v3.4 中仍保留以支持向后兼容,将在 v3.5 中完全移除。
-etcd_debugging_mvcc_put_total
+etcd_mvcc_put_total
请注意,etcd_debugging_* 命名空间下的指标已被标记为实验性。随着我们不断完善监控指南,未来可能会有更多指标被正式推广。
弃用 etcd_debugging_mvcc_delete_total Prometheus 指标
v3.4 将 etcd_debugging_mvcc_delete_total Prometheus 指标升级为 etcd_mvcc_delete_total,以鼓励对 etcd 存储进行监控。
etcd_debugging_mvcc_delete_total 在 v3.4 中仍保留以支持向后兼容,将在 v3.5 中完全移除。
-etcd_debugging_mvcc_delete_total
+etcd_mvcc_delete_total
请注意,etcd_debugging_* 命名空间下的指标已被标记为实验性。随着我们不断完善监控指南,未来可能会有更多指标被正式推广。
弃用 etcd_debugging_mvcc_txn_total Prometheus 指标
v3.4 将 etcd_debugging_mvcc_txn_total Prometheus 指标升级为 etcd_mvcc_txn_total,以鼓励对 etcd 存储进行监控。
etcd_debugging_mvcc_txn_total 在 v3.4 中仍保留以支持向后兼容,将在 v3.5 中完全移除。
-etcd_debugging_mvcc_txn_total
+etcd_mvcc_txn_total
请注意,etcd_debugging_* 命名空间下的指标已被标记为实验性。随着我们不断完善监控指南,未来可能会有更多指标被正式推广。
弃用 etcd_debugging_mvcc_range_total Prometheus 指标
v3.4 将 etcd_debugging_mvcc_range_total Prometheus 指标升级为 etcd_mvcc_range_total,以鼓励对 etcd 存储进行监控。
etcd_debugging_mvcc_range_total 在 v3.4 中仍保留以确保向后兼容性,将在 v3.5 中完全弃用。
-etcd_debugging_mvcc_range_total
+etcd_mvcc_range_total
请注意,etcd_debugging_* 命名空间下的指标已被标记为实验性。随着我们不断完善监控指南,未来可能会有更多指标被正式推广。
弃用 etcd --log-output 参数(现改为 --log-outputs)
将 etcd --log-output 重命名为 --log-outputs,以支持多个日志输出。etcd --logger=capnslog 不支持多个日志输出。
etcd --log-output 将在 v3.5 中被弃用。etcd --logger=capnslog 也将在 v3.5 中被弃用。
-etcd --log-output=stderr
+etcd --log-outputs=stderr
+# to write logs to stderr and a.log file at the same time
+# only "--logger=zap" supports multiple writers
+etcd --logger=zap --log-outputs=stderr,a.log
v3.4 新增了 etcd --logger=zap --log-outputs=stderr 支持,用于结构化日志和多日志输出。主要目的是推动自动化的 etcd 监控,而不是在服务出问题后回查日志。未来的开发将尽量减少 etcd 的日志输出,并通过指标和告警使 etcd 更易于监控。etcd --logger=capnslog 将在 v3.5 中被弃用。
将 etcd --config-file 中的 log-outputs 字段类型更改为 []string
由于 log-outputs(旧字段名为 log-output)现在支持多个写入器,etcd 配置 YAML 文件中的 log-outputs 字段必须更改为 []string 类型,如下所示:
# Specify 'stdout' or 'stderr' to skip journald logging even when running under systemd.
-log-output: default
+log-outputs: [default]
将 embed.Config.LogOutput 重命名为 embed.Config.LogOutputs
将 embed.Config.LogOutput 重命名为 embed.Config.LogOutputs 以支持多个日志输出,并将 embed.Config.LogOutput 的类型从 string 改为 []string 以支持多个日志输出。
import "github.com/coreos/etcd/embed"
cfg := &embed.Config{Debug: false}
-cfg.LogOutput = "stderr"
+cfg.LogOutputs = []string{"stderr"}
v3.5 将弃用 capnslog
v3.5 将弃用用于 capnslog 的 etcd --log-package-levels 参数;etcd --logger=zap --log-outputs=stderr 将成为默认配置。v3.5 将弃用 [CLIENT-URL]/config/local/log 端点。
-etcd
+etcd --logger zap
弃用 etcd --debug 参数(现改为 --log-level=debug)
v3.4 已弃用 etcd --debug 参数,建议改用 etcd --log-level=debug 参数。
-etcd --debug
+etcd --logger zap --log-level debug
已弃用 pkg/transport.TLSInfo.CAFile 字段
已弃用 pkg/transport.TLSInfo.CAFile 字段。
import "github.com/coreos/etcd/pkg/transport"
tlsInfo := transport.TLSInfo{
CertFile: "/tmp/test-certs/test.pem",
KeyFile: "/tmp/test-certs/test-key.pem",
- CAFile: "/tmp/test-certs/trusted-ca.pem",
+ TrustedCAFile: "/tmp/test-certs/trusted-ca.pem",
}
tlsConfig, err := tlsInfo.ClientConfig()
if err != nil {
panic(err)
}
将 embed.Config.SnapCount 更改为 embed.Config.SnapshotCount
为了与命令行参数 etcd --snapshot-count 保持一致,embed.Config.SnapCount 字段已重命名为 embed.Config.SnapshotCount:
import "github.com/coreos/etcd/embed"
cfg := embed.NewConfig()
-cfg.SnapCount = 100000
+cfg.SnapshotCount = 100000
将 etcdserver.ServerConfig.SnapCount 更改为 etcdserver.ServerConfig.SnapshotCount
为了与命令行参数 etcd --snapshot-count 保持一致,etcdserver.ServerConfig.SnapCount 字段已重命名为 etcdserver.ServerConfig.SnapshotCount:
import "github.com/coreos/etcd/etcdserver"
srvcfg := etcdserver.ServerConfig{
- SnapCount: 100000,
+ SnapshotCount: 100000,
更改了 wal 包中的函数签名
修改了 wal 包的函数签名以支持结构化日志记录器。
import "github.com/coreos/etcd/wal"
+import "go.uber.org/zap"
+lg, _ = zap.NewProduction()
-wal.Open(dirpath, snap)
+wal.Open(lg, dirpath, snap)
-wal.OpenForRead(dirpath, snap)
+wal.OpenForRead(lg, dirpath, snap)
-wal.Repair(dirpath)
+wal.Repair(lg, dirpath)
-wal.Create(dirpath, metadata)
+wal.Create(lg, dirpath, metadata)
更改了 pkg/adt 包中的 IntervalTree 类型
pkg/adt.IntervalTree 现在被定义为一个 interface。
import (
"fmt"
"go.etcd.io/etcd/pkg/adt"
)
func main() {
- ivt := &adt.IntervalTree{}
+ ivt := adt.NewIntervalTree()
已弃用 embed.Config.SetupLogging
embed.Config.SetupLogging 已被移除,以防止错误的日志配置,现在日志功能将自动设置。
import "github.com/coreos/etcd/embed"
cfg := &embed.Config{Debug: false}
-cfg.SetupLogging()
更改了 gRPC 网关的 HTTP 端点(将 /v3beta 替换为 /v3)
之前
curl -L http://localhost:2379/v3beta/kv/put \
-X POST -d '{"key": "Zm9v", "value": "YmFy"}'
之后
curl -L http://localhost:2379/v3/kv/put \
-X POST -d '{"key": "Zm9v", "value": "YmFy"}'
对 /v3beta 端点的请求将重定向到 /v3,且 /v3beta 将在 3.5 版本中被移除。
已弃用容器镜像标签
latest 和次版本号的镜像标签已被弃用:
-docker pull gcr.io/etcd-development/etcd:latest
+docker pull gcr.io/etcd-development/etcd:v3.4.0
-docker pull gcr.io/etcd-development/etcd:v3.4
+docker pull gcr.io/etcd-development/etcd:v3.4.0
-docker pull gcr.io/etcd-development/etcd:v3.4
+docker pull gcr.io/etcd-development/etcd:v3.4.1
-docker pull gcr.io/etcd-development/etcd:v3.4
+docker pull gcr.io/etcd-development/etcd:v3.4.2
服务器升级检查清单
升级要求
要将现有的 etcd 部署升级到 3.4 版本,运行中的集群必须是 3.3 或更高版本。如果低于 3.3,请先升级到 3.3,再升级到 3.4。
此外,为确保平滑的滚动升级,运行中的集群必须处于健康状态。在继续操作前,请使用 etcdctl endpoint health 命令检查集群健康状况。
准备工作
在升级 etcd 之前,务必先在预演环境中测试依赖 etcd 的服务,然后再将升级部署到生产环境。
开始之前,请下载快照备份。如果升级过程中出现问题,可以使用此备份降级回当前的 etcd 版本。请注意,snapshot 命令仅备份 v3 数据。对于 v2 数据,请参阅备份 v2 数据存储。
混合版本
升级过程中,etcd 集群支持混合版本的成员,并以最低公共版本的协议运行。只有当所有成员都升级到 3.4 版本后,集群才被视为完成升级。内部机制上,etcd 成员之间会相互协商以确定整个集群的版本,该版本控制着报告的版本号和支持的功能。
限制
注意:如果集群仅有 v3 数据而无 v2 数据,则不受此限制影响。
如果集群提供的 v2 数据集大于 50MB,则每个新升级的成员可能需要最多两分钟才能追上现有集群的进度。可通过检查最近快照的大小来估算总数据量。换句话说, safest 的做法是在每次升级成员之间等待 2 分钟。
对于更大的总数据量(100MB 或以上),这个一次性过程可能需要更长时间。对于如此大规模的大型 etcd 集群的管理员,可以在升级前联系etcd 团队,我们将很乐意提供升级流程建议。
Downgrade
如果所有成员均已升级到 v3.4,集群将升级至 v3.4,此时无法降级。然而,如果仍有任意一个成员处于 v3.3 版本,则集群及其操作仍保持为“v3.3”状态,此时可以从这种混合状态回退到在所有成员上使用 v3.3 的 etcd 二进制文件。
请下载快照备份,以便即使在集群完全升级后仍可进行降级。
升级流程
此示例展示如何升级本地机器上运行的三成员 v3.3 etcd 集群。
步骤 1:检查升级要求
集群是否健康并运行在 v3.3.x?
etcdctl --endpoints=localhost:2379,localhost:22379,localhost:32379 endpoint health
<<COMMENT
localhost:2379 is healthy: successfully committed proposal: took = 2.118638ms
localhost:22379 is healthy: successfully committed proposal: took = 3.631388ms
localhost:32379 is healthy: successfully committed proposal: took = 2.157051ms
COMMENT
curl http://localhost:2379/version
<<COMMENT
{"etcdserver":"3.3.5","etcdcluster":"3.3.0"}
COMMENT
curl http://localhost:22379/version
<<COMMENT
{"etcdserver":"3.3.5","etcdcluster":"3.3.0"}
COMMENT
curl http://localhost:32379/version
<<COMMENT
{"etcdserver":"3.3.5","etcdcluster":"3.3.0"}
COMMENT
步骤 2:从主节点下载快照备份
下载快照备份,以便在出现问题时提供降级恢复路径。
etcd 主节点保证拥有最新的应用数据,因此应从主节点获取快照:
curl -sL http://localhost:2379/metrics | grep etcd_server_is_leader
<<COMMENT
# HELP etcd_server_is_leader Whether or not this member is a leader. 1 if is, 0 otherwise.
# TYPE etcd_server_is_leader gauge
etcd_server_is_leader 1
COMMENT
curl -sL http://localhost:22379/metrics | grep etcd_server_is_leader
<<COMMENT
etcd_server_is_leader 0
COMMENT
curl -sL http://localhost:32379/metrics | grep etcd_server_is_leader
<<COMMENT
etcd_server_is_leader 0
COMMENT
etcdctl --endpoints=localhost:2379 snapshot save backup.db
<<COMMENT
{"level":"info","ts":1526585787.148433,"caller":"snapshot/v3_snapshot.go:109","msg":"created temporary db file","path":"backup.db.part"}
{"level":"info","ts":1526585787.1485257,"caller":"snapshot/v3_snapshot.go:120","msg":"fetching snapshot","endpoint":"localhost:2379"}
{"level":"info","ts":1526585787.1519694,"caller":"snapshot/v3_snapshot.go:133","msg":"fetched snapshot","endpoint":"localhost:2379","took":0.003502721}
{"level":"info","ts":1526585787.1520295,"caller":"snapshot/v3_snapshot.go:142","msg":"saved","path":"backup.db"}
Snapshot saved at backup.db
COMMENT
步骤 3:停止一个现有的 etcd 服务器
每当一个 etcd 进程停止时,集群中的其他成员会记录预期的错误日志。这是正常现象,因为集群成员之间的连接已(临时)中断。
10.237579 I | etcdserver: updating the cluster version from 3.0 to 3.3
10.238315 N | etcdserver/membership: updated the cluster version from 3.0 to 3.3
10.238451 I | etcdserver/api: enabled capabilities for version 3.3
^C21.192174 N | pkg/osutil: received interrupt signal, shutting down...
21.192459 I | etcdserver: 7339c4e5e833c029 starts leadership transfer from 7339c4e5e833c029 to 729934363faa4a24
21.192569 I | raft: 7339c4e5e833c029 [term 8] starts to transfer leadership to 729934363faa4a24
21.192619 I | raft: 7339c4e5e833c029 sends MsgTimeoutNow to 729934363faa4a24 immediately as 729934363faa4a24 already has up-to-date log
WARNING: 2018/05/17 12:45:21 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial tcp: operation was canceled"; Reconnecting to {localhost:2379 0 <nil>}
WARNING: 2018/05/17 12:45:21 grpc: addrConn.transportMonitor exits due to: grpc: the connection is closing
21.193589 I | raft: 7339c4e5e833c029 [term: 8] received a MsgVote message with higher term from 729934363faa4a24 [term: 9]
21.193626 I | raft: 7339c4e5e833c029 became follower at term 9
21.193651 I | raft: 7339c4e5e833c029 [logterm: 8, index: 9, vote: 0] cast MsgVote for 729934363faa4a24 [logterm: 8, index: 9] at term 9
21.193675 I | raft: raft.node: 7339c4e5e833c029 lost leader 7339c4e5e833c029 at term 9
21.194424 I | raft: raft.node: 7339c4e5e833c029 elected leader 729934363faa4a24 at term 9
21.292898 I | etcdserver: 7339c4e5e833c029 finished leadership transfer from 7339c4e5e833c029 to 729934363faa4a24 (took 100.436391ms)
21.292975 I | rafthttp: stopping peer 729934363faa4a24...
21.293206 I | rafthttp: closed the TCP streaming connection with peer 729934363faa4a24 (stream MsgApp v2 writer)
21.293225 I | rafthttp: stopped streaming with peer 729934363faa4a24 (writer)
21.293437 I | rafthttp: closed the TCP streaming connection with peer 729934363faa4a24 (stream Message writer)
21.293459 I | rafthttp: stopped streaming with peer 729934363faa4a24 (writer)
21.293514 I | rafthttp: stopped HTTP pipelining with peer 729934363faa4a24
21.293590 W | rafthttp: lost the TCP streaming connection with peer 729934363faa4a24 (stream MsgApp v2 reader)
21.293610 I | rafthttp: stopped streaming with peer 729934363faa4a24 (stream MsgApp v2 reader)
21.293680 W | rafthttp: lost the TCP streaming connection with peer 729934363faa4a24 (stream Message reader)
21.293700 I | rafthttp: stopped streaming with peer 729934363faa4a24 (stream Message reader)
21.293711 I | rafthttp: stopped peer 729934363faa4a24
21.293720 I | rafthttp: stopping peer b548c2511513015...
21.293987 I | rafthttp: closed the TCP streaming connection with peer b548c2511513015 (stream MsgApp v2 writer)
21.294063 I | rafthttp: stopped streaming with peer b548c2511513015 (writer)
21.294467 I | rafthttp: closed the TCP streaming connection with peer b548c2511513015 (stream Message writer)
21.294561 I | rafthttp: stopped streaming with peer b548c2511513015 (writer)
21.294742 I | rafthttp: stopped HTTP pipelining with peer b548c2511513015
21.294867 W | rafthttp: lost the TCP streaming connection with peer b548c2511513015 (stream MsgApp v2 reader)
21.294892 I | rafthttp: stopped streaming with peer b548c2511513015 (stream MsgApp v2 reader)
21.294990 W | rafthttp: lost the TCP streaming connection with peer b548c2511513015 (stream Message reader)
21.295004 E | rafthttp: failed to read b548c2511513015 on stream Message (context canceled)
21.295013 I | rafthttp: peer b548c2511513015 became inactive
21.295024 I | rafthttp: stopped streaming with peer b548c2511513015 (stream Message reader)
21.295035 I | rafthttp: stopped peer b548c2511513015
步骤 4:使用相同的配置重新启动 etcd 服务器
使用相同的配置但替换为新的 etcd 二进制文件来重启 etcd 服务器。
-etcd-old --name s1 \
+etcd-new --name s1 \
--data-dir /tmp/etcd/s1 \
--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 s1=http://localhost:2380,s2=http://localhost:22380,s3=http://localhost:32380 \
--initial-cluster-token tkn \
+ --initial-cluster-state new \
+ --logger zap \
+ --log-outputs stderr
新的 v3.4 etcd 将向集群发布其信息。此时,集群仍以 v3.3 协议运行,因为这是当前的最低公共版本。
{"level":"info","ts":1526586617.1647713,"caller":"membership/cluster.go:485","msg":"set initial cluster version","cluster-id":"7dee9ba76d59ed53","local-member-id":"7339c4e5e833c029","cluster-version":"3.0"}
{"level":"info","ts":1526586617.1648536,"caller":"api/capability.go:76","msg":"enabled capabilities for version","cluster-version":"3.0"}
{"level":"info","ts":1526586617.1649303,"caller":"membership/cluster.go:473","msg":"updated cluster version","cluster-id":"7dee9ba76d59ed53","local-member-id":"7339c4e5e833c029","from":"3.0","from":"3.3"}
{"level":"info","ts":1526586617.1649797,"caller":"api/capability.go:76","msg":"enabled capabilities for version","cluster-version":"3.3"}
{"level":"info","ts":1526586617.2107732,"caller":"etcdserver/server.go:1770","msg":"published local member to cluster through raft","local-member-id":"7339c4e5e833c029","local-member-attributes":"{Name:s1 ClientURLs:[http://localhost:2379]}","request-path":"/0/members/7339c4e5e833c029/attributes","cluster-id":"7dee9ba76d59ed53","publish-timeout":7}
验证每个成员以及整个集群在使用新的 v3.4 etcd 二进制文件后是否变为健康状态:
etcdctl endpoint health --endpoints=localhost:2379,localhost:22379,localhost:32379
<<COMMENT
localhost:32379 is healthy: successfully committed proposal: took = 2.337471ms
localhost:22379 is healthy: successfully committed proposal: took = 1.130717ms
localhost:2379 is healthy: successfully committed proposal: took = 2.124843ms
COMMENT
在整个集群完成升级前,未升级的成员将持续记录如下警告信息。
这是预期行为,在所有 etcd 集群成员升级到 v3.4 后将停止出现:
:41.942121 W | etcdserver: member 7339c4e5e833c029 has a higher version 3.4.0
:45.945154 W | etcdserver: the local etcd version 3.3.5 is not up-to-date
步骤 5:对剩余成员重复步骤 3 和 步骤 4
当所有成员都升级后,集群将报告成功升级到 3.4:
成员 1:
{"level":"info","ts":1526586949.0920913,"caller":"api/capability.go:76","msg":"enabled capabilities for version","cluster-version":"3.4"}{"level":"info","ts":1526586949.0921566,"caller":"etcdserver/server.go:2272","msg":"cluster version is updated","cluster-version":"3.4"}
成员 2:
{"level":"info","ts":1526586949.092117,"caller":"membership/cluster.go:473","msg":"updated cluster version","cluster-id":"7dee9ba76d59ed53","local-member-id":"729934363faa4a24","from":"3.3","from":"3.4"}{"level":"info","ts":1526586949.0923078,"caller":"api/capability.go:76","msg":"enabled capabilities for version","cluster-version":"3.4"}
成员 3:
{"level":"info","ts":1526586949.0921423,"caller":"membership/cluster.go:473","msg":"updated cluster version","cluster-id":"7dee9ba76d59ed53","local-member-id":"b548c2511513015","from":"3.3","from":"3.4"}{"level":"info","ts":1526586949.0922918,"caller":"api/capability.go:76","msg":"enabled capabilities for version","cluster-version":"3.4"}
endpoint health --endpoints=localhost:2379,localhost:22379,localhost:32379
<<COMMENT
localhost:2379 is healthy: successfully committed proposal: took = 492.834µs
localhost:22379 is healthy: successfully committed proposal: took = 1.015025ms
localhost:32379 is healthy: successfully committed proposal: took = 1.853077ms
COMMENT
curl http://localhost:2379/version
<<COMMENT
{"etcdserver":"3.4.0","etcdcluster":"3.4.0"}
COMMENT
curl http://localhost:22379/version
<<COMMENT
{"etcdserver":"3.4.0","etcdcluster":"3.4.0"}
COMMENT
curl http://localhost:32379/version
<<COMMENT
{"etcdserver":"3.4.0","etcdcluster":"3.4.0"}
COMMENT