可以更改etcd中的任何成员或集群运行时重新配置吗?

huangapple go评论49阅读模式
英文:

Can I change any member or cluster runtime reconfiguration in etcd?

问题

etcd文档中关于运行时重新配置(v3.5)仅列出了以下内容:

  • 对等/客户端URL更新
  • 添加成员
  • 移除成员

但如果我想要更改:

  • 对于成员
    • --quota-backend-bytes
    • --snapshot-count
    • --heartbeat-interval
    • --election-interval
  • 对于集群
    • --auto-compaction-retention

或者我的期望更新仅适用于新创建的集群?

英文:

etcd documentation for runtime reconfiguration (v3.5) only lists:

  • peer/client URL updates
  • adding members
  • removing members

But what if I wish to change:

  • for members
    • --quota-backend-bytes
    • --snapshot-count
    • --heartbeat-interval
    • --election-interval
  • for cluster
    • --auto-compaction-retention

Or mine wished updates are only applicable to the newly created cluster?

答案1

得分: 1

在运行时,与etcd进行命令行交互的唯一方式是使用etcdctletcdctl仅允许:

  • 处理etcd警报
  • 兼容性/碎片整理
  • 键值操作
  • 快照保存/恢复
  • 租约/授权
  • 成员的创建/读取/更新/删除
  • 角色的创建/读取/更新/删除
  • 用户的创建/读取/更新/删除

每个etcd成员在加入集群时应具有相同的--flag值,除了--advertise-*地址、--name--*-dir

总之,考虑到你的"希望",在运行时你可以:

  1. 使用etcdctl执行snapshot/compat/defrag

这意味着,如果你希望更改除我提到的那些--flags之外的一些参数,你必须使用所需的配置创建全新的集群。所有其他更改(当然,你可以尝试应用)将导致集群不安全。

英文:

The only way you interact (for CLI) with etcd during runtime is etcdctl. The etcdctl allows only:

  • work with etcd alarms
  • compat/defrag
  • KV operations
  • snapshot save/restore
  • leases/grants
  • member CRUD
  • role CRUD
  • user CRUD

Each etcd member should have same --flag values when joining the cluster ./etcd ..., except --advertise-* addresses, --name and these --*-dir.

All above said and taking into consideration your "wishes", on fly you can:

  1. Perform snapshot/compat/defrag using etcdctl

That means, if you wish to change some --flags except the ones I've mentioned, you have to create brand new cluster with that desired configuration. All other changes (which, of course, you can try to apply) will lead to unsafe cluster

huangapple
  • 本文由 发表于 2023年7月6日 17:51:29
  • 转载请务必保留本文链接:https://go.coder-hub.com/76627575.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定