Bug 1610166
| Summary: | etcdctl2&etcdctl3 is deprecated commands | |||
|---|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | ge liu <geliu> | |
| Component: | Installer | Assignee: | Scott Dodson <sdodson> | |
| Status: | CLOSED ERRATA | QA Contact: | Gaoyun Pei <gpei> | |
| Severity: | medium | Docs Contact: | Vikram Goyal <vigoyal> | |
| Priority: | unspecified | |||
| Version: | 3.11.0 | CC: | aos-bugs, geliu, jialiu, jokerman, kalexand, mmccomas, scuppett, sdodson, vigoyal | |
| Target Milestone: | --- | Keywords: | Reopened | |
| Target Release: | 3.10.z | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | Doc Type: | Bug Fix | ||
| Doc Text: |
The etcd helper functions `etcdctl2` and `etcdctl3` were broken during the upgrade to 3.10. These scripts have been updated to work properly when etcd is running inside a static pod restoring normal function.
|
Story Points: | --- | |
| Clone Of: | ||||
| : | 1640014 (view as bug list) | Environment: | ||
| Last Closed: | 2018-09-04 07:10:49 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: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 1640014 | |||
|
Description
ge liu
2018-07-31 05:48:52 UTC
Scott says that "etcdctl2 and etcdctl3 are bash functions that should be deployed to /etc/profile.d/etcdctl.sh" (https://github.com/openshift/openshift-docs/pull/11121#discussion_r206508513) @Ge Liu, are 'etcdctl' for etcdctl2 and 'ETCDCTL_API=3 etcdctl' for etcdctl3 standard, or do we need to add a note saying something like: "In the following etcdctl commands, `etcdctl2` is the alias for the v2 API and `etcdctl3` is the alias for the v2 API. Your alias might be different, such as `etcdctl` for the v2 API and 'ETCDCTL_API=3 etcdctl' for the v2 API." @Scott, do you have an opinion? Here's the functions we define, these should be present on any master and etcd host.
# cat /etc/profile.d/etcdctl.sh
#!/bin/bash
# Sets up handy aliases for etcd, need etcdctl2 and etcdctl3 because
# command flags are different between the two. Should work on stand
# alone etcd hosts and master + etcd hosts too because we use the peer keys.
etcdctl2() {
/usr/bin/etcdctl --cert-file /etc/etcd/peer.crt --key-file /etc/etcd/peer.key --ca-file /etc/etcd/ca.crt -C https://`hostname`:2379 ${@}
}
etcdctl3() {
ETCDCTL_API=3 /usr/bin/etcdctl --cert /etc/etcd/peer.crt --key /etc/etcd/peer.key --cacert /etc/etcd/ca.crt --endpoints https://`hostname`:2379 ${@}
}
Interesting. When are those functions applied to the host? @kalexand, the clarification is necessary without scott's PR merged, if etcdctl2 & etcdctl3 are works well after the PR merged, I think the clarification is not necessary, thanks. There's an engineering PR to fix the root cause of this issue: https://github.com/openshift/openshift-ansible/pull/9385 I'm closing this issue as NOTABUG per Ge Liu's comment. @kalexand, sorry for this bug could not be closed currently, because it should be used to trace this PR: https://github.com/openshift/openshift-ansible/pull/9385 and the PR also reference to this bug, I changed the owner to @sdodson, pls help to change it to exact component but not current 'Documentation', thanks in advance. https://github.com/openshift/openshift-ansible/pull/9757 3.10 backport Verify this bug with openshift-ansible-3.10.41-1.git.0.fd15dd7.el7.noarch.rpm. 1. etcd running as static pod co-located with masters, etcdctl2 & etcdctl3 alias configured on etcd hosts [root@qe-jialiu310z-master-etcd-3 ~]# etcdctl2 cluster-health member 1c648b504ba4936 is healthy: got healthy result from https://10.240.0.69:2379 member 855c261e91cd1b0b is healthy: got healthy result from https://10.240.0.70:2379 member 8fa4e5f628ec1629 is healthy: got healthy result from https://10.240.0.68:2379 cluster is healthy [root@qe-jialiu310z-master-etcd-3 ~]# etcdctl3 member list 1c648b504ba4936, started, qe-jialiu310z-master-etcd-2, https://10.240.0.69:2380, https://10.240.0.69:2379 855c261e91cd1b0b, started, qe-jialiu310z-master-etcd-3, https://10.240.0.70:2380, https://10.240.0.70:2379 8fa4e5f628ec1629, started, qe-jialiu310z-master-etcd-1, https://10.240.0.68:2380, https://10.240.0.68:2379 2. rpm etcd service running on standalone host, etcdctl2 & etcdctl3 alias configured on etcd host [root@ip-172-18-5-224 ~]# etcdctl2 cluster-health member 357f1b12fd37f32c is healthy: got healthy result from https://172.18.5.224:2379 cluster is healthy [root@ip-172-18-5-224 ~]# etcdctl3 member list 357f1b12fd37f32c, started, ip-172-18-5-224.ec2.internal, https://172.18.5.224:2380, https://172.18.5.224:2379 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2018:2578 |