Bug 1918413
| Summary: | move-leader command does not work as expected from etcdctl container | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Sam Batschelet <sbatsche> |
| Component: | Etcd | Assignee: | Thomas Jungblut <tjungblu> |
| Status: | CLOSED DEFERRED | QA Contact: | ge liu <geliu> |
| Severity: | low | Docs Contact: | |
| Priority: | low | ||
| Version: | 4.10 | CC: | palonsor, rcernin, tjungblu, vsolanki |
| Target Milestone: | --- | Keywords: | Reopened |
| Target Release: | --- | Flags: | mfojtik:
needinfo?
|
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | LifecycleReset | ||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2022-09-08 13:25:16 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Sam Batschelet
2021-01-20 16:36:41 UTC
This bug hasn't had any activity in the last 30 days. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're marking this bug as "LifecycleStale" and decreasing the severity/priority. If you have further information on the current state of the bug, please update it, otherwise this bug can be closed in about 7 days. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. Additionally, you can add LifecycleFrozen into Keywords if you think this bug should never be marked as stale. Please consult with bug assignee before you do that. Hi Sam, With https://github.com/etcd-io/etcd/pull/11775: ➜ ~ oc rsh -n openshift-etcd etcd-master-0.example.com Defaulting container name to etcdctl. Use 'oc describe pod/etcd-master-0.example.com -n openshift-etcd' to see all of the containers in this pod. sh-4.4# /tmp/etcdctl move-leader aea116dbb5d40084 Leadership transferred from d6da693211cb40a to aea116dbb5d40084 sh-4.4# It's because mustClientFromCmd calls clientConfigFromCmd in https://github.com/zerodayz/etcd/blob/34bd797e6754911ee540e8c87f708f88ffe89f37/etcdctl/ctlv3/command/move_leader_command.go#L45 func mustClientFromCmd(cmd *cobra.Command) *clientv3.Client { cfg := clientConfigFromCmd(cmd) return cfg.mustClient() } And then again in https://github.com/zerodayz/etcd/blob/34bd797e6754911ee540e8c87f708f88ffe89f37/etcdctl/ctlv3/command/move_leader_command.go#L55 for _, ep := range eps { cfg := clientConfigFromCmd(cmd) cfg.endpoints = []string{ep} cli := cfg.mustClient() clientConfigFromCmd initiates twice the variables, the second time they are already configured and flags complains it's already set. Seems like the PR was never merged and closed. The LifecycleStale keyword was removed because the bug got commented on recently. The bug assignee was notified. updated the upstream PR: https://github.com/etcd-io/etcd/pull/14307 |