Hide Forgot
Description of problem: When etcd_hostname used in etcd configuration is not the same as the hostname of etcd host, etcdctl3 command will fail for x509 cert error. Version-Release number of selected component (if applicable): openshift-ansible-3.4.26-1.git.0.882474b.el7.noarch.rpm How reproducible: Always Steps to Reproduce: 1.The hostname of etcd host: [root@jialiu1-share-master-etcd-zone2-1 ~]# hostname jialiu1-share-master-etcd-zone2-1.c.openshift-gce-devel.internal The ETCD_NAME used in etcd.conf [root@jialiu1-share-master-etcd-zone2-1 ~]# grep ETCD_NAME /etc/etcd/etcd.conf ETCD_NAME=jialiu1-share-master-etcd-zone2-1 The Subject CN in /etc/etcd/peer.crt [root@jialiu1-share-master-etcd-zone2-1 ~]# openssl x509 -in /etc/etcd/peer.crt -text |grep Subject: Subject: CN=jialiu1-share-master-etcd-zone2-1 2.Run etcdctl3 command [root@jialiu1-share-master-etcd-zone2-1 ~]# etcdctl3 member list 2016/11/23 04:51:15 Failed to dial jialiu1-share-master-etcd-zone2-1.c.openshift-gce-devel.internal:2379: connection error: desc = "transport: x509: certificate is valid for jialiu1-share-master-etcd-zone2-1, not jialiu1-share-master-etcd-zone2-1.c.openshift-gce-devel.internal"; please retry. Error: grpc: timed out when dialing Actual results: Expected results: etcdctl3 command should work well. Maybe we could consider using a more reliable way to detect the etcd_hostname, such as getting it from etcd.conf, instead of just using `hostname` Additional info: