{"action":"created","issue":{"url":"https://api.github.com/repos/coreos/etcd/issues/2123","labels_url":"https://api.github.com/repos/coreos/etcd/issues/2123/labels{/name}","comments_url":"https://api.github.com/repos/coreos/etcd/issues/2123/comments","events_url":"https://api.github.com/repos/coreos/etcd/issues/2123/events","html_url":"https://github.com/coreos/etcd/issues/2123","id":55113681,"number":2123,"title":"cluster initialization fails with URLs in hostname","user":{"login":"sorah","id":29440,"avatar_url":"https://avatars.githubusercontent.com/u/29440?v=3","gravatar_id":"","url":"https://api.github.com/users/sorah","html_url":"https://github.com/sorah","followers_url":"https://api.github.com/users/sorah/followers","following_url":"https://api.github.com/users/sorah/following{/other_user}","gists_url":"https://api.github.com/users/sorah/gists{/gist_id}","starred_url":"https://api.github.com/users/sorah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sorah/subscriptions","organizations_url":"https://api.github.com/users/sorah/orgs","repos_url":"https://api.github.com/users/sorah/repos","events_url":"https://api.github.com/users/sorah/events{/privacy}","received_events_url":"https://api.github.com/users/sorah/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-01-22T04:37:25Z","updated_at":"2015-01-26T07:52:01Z","closed_at":null,"body":"cluster initialization fails on the following commandline:\r\n\r\n```\r\n./etcd \\\r\n  --name $(hostname) \\\r\n  --listen-peer-urls \"https://0.0.0.0:2380,https://0.0.0.0:7001\" \\\r\n  --listen-client-urls \"https://0.0.0.0:2379,https://0.0.0.0:4001\" \\\r\n  --advertise-client-urls \"https://$(hostname -f):2379\" \\\r\n  --initial-advertise-peer-urls \"https://$(hostname -f):2380\" \\\r\n  --peer-ca-file=/etc/etcd/ca.crt --peer-cert-file=/etc/etcd/node.crt --peer-key-file=/etc/etcd/node.key \\\r\n  --ca-file=/etc/etcd/ca.crt --cert-file=/etc/etcd/node.crt --key-file=/etc/etcd/node.key \\\r\n  --initial-cluster-state new \\\r\n  --initial-cluster-token 'mycluster' \\\r\n  --initial-cluster 'etcd-001=https://etcd-001:2380,etcd-002=https://etcd-002:2380,etcd-003=https://etcd-003:2380'\r\n```\r\n\r\n```\r\n$ ./start.sh\r\n2015/01/22 13:14:52 netutil: Resolving etcd-001:2380 to 10.0.0.136:2380\r\n2015/01/22 13:14:52 netutil: Resolving etcd-001:2379 to 10.0.0.136:2379\r\n2015/01/22 13:14:52 netutil: Resolving etcd-001:2379 to 10.0.0.136:2379\r\n2015/01/22 13:14:52 no data-dir provided, using default data-dir ./etcd-001.etcd\r\n2015/01/22 13:14:52 etcd: peerTLS: cert = /etc/etcd/node.crt, key = /etc/etcd/node.key, ca = /etc/etcd/ca.crt\r\n2015/01/22 13:14:53 etcd: listening for peers on https://0.0.0.0:2380\r\n2015/01/22 13:14:54 etcd: listening for peers on https://0.0.0.0:7001\r\n2015/01/22 13:14:54 etcd: clientTLS: cert = /etc/etcd/node.crt, key = /etc/etcd/node.key, ca = /etc/etcd/ca.crt\r\n2015/01/22 13:14:54 etcd: listening for client requests on https://10.0.0.136:2379\r\n\r\n2015/01/22 13:14:54 etcd: stopping listening for client requests on https://10.0.0.136:2379\r\n2015/01/22 13:14:54 etcd: stopping listening for peers on https://0.0.0.0:7001\r\n2015/01/22 13:14:54 etcd: stopping listening for peers on https://0.0.0.0:2380\r\n2015/01/22 13:14:54 etcd: etcd-001 has different advertised URLs in the cluster and advertised peer URLs list\r\n```\r\n\r\napurls is `[https://10.0.0.136:2380]` and `m.PeerURLs` is `[https://etcd-001:2380/]` at this point:\r\n\r\n``` go\r\n\tif !reflect.DeepEqual(apurls, m.PeerURLs) {\r\n\t\treturn fmt.Errorf(\"%s has different advertised URLs in the cluster and advertised peer URLs list\", c.Name)\r\n\t}\r\n```\r\n\r\nI'm specifying initial-cluster url in hostname, because IP address is not fixed in our environment and etcd requires valid common name / subjectAltName validation for cluster peer URL.\r\n\r\nCommit 705ec450830035a5d3cb4a5e9fd157ec098410a8  (#1991, #1996) is a cause of this issue... resolves `apurls`. So reverting the commit fixes the problem... but it makes issue #1991 again.\r\n\r\nI'm planning to write a patch to make to try hostname verification with member name. Suggest me if there's better way."},"comment":{"url":"https://api.github.com/repos/coreos/etcd/issues/comments/71424208","html_url":"https://github.com/coreos/etcd/issues/2123#issuecomment-71424208","issue_url":"https://api.github.com/repos/coreos/etcd/issues/2123","id":71424208,"user":{"login":"sorah","id":29440,"avatar_url":"https://avatars.githubusercontent.com/u/29440?v=3","gravatar_id":"","url":"https://api.github.com/users/sorah","html_url":"https://github.com/sorah","followers_url":"https://api.github.com/users/sorah/followers","following_url":"https://api.github.com/users/sorah/following{/other_user}","gists_url":"https://api.github.com/users/sorah/gists{/gist_id}","starred_url":"https://api.github.com/users/sorah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sorah/subscriptions","organizations_url":"https://api.github.com/users/sorah/orgs","repos_url":"https://api.github.com/users/sorah/repos","events_url":"https://api.github.com/users/sorah/events{/privacy}","received_events_url":"https://api.github.com/users/sorah/received_events","type":"User","site_admin":false},"created_at":"2015-01-26T07:52:01Z","updated_at":"2015-01-26T07:52:01Z","body":"To get etcd cluster on our environment, wrote a patch #2150. I don't think this is the best."}}