etcdmain: initial cluster has duplicate url
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
kolla-ansible |
Invalid
|
Undecided
|
Unassigned | ||
Rocky |
Triaged
|
Medium
|
Unassigned |
Bug Description
Using rocky/stable centos/source
The following error occurs in etcd container logs on the new compute/storage host (<SERVER3>/<IP3> below) when deploying services on the new host (--limit <NEW_HOST>). This results in that etcd container continuously restarting. There are no issues with the etcd container on the existing hosts.
Running command: 'etcd'
+ exec etcd
2020-08-02 12:01:13.450356 I | pkg/flags: recognized and used environment variable ETCD_ADVERTISE_
2020-08-02 12:01:13.450445 I | pkg/flags: recognized and used environment variable ETCD_DATA_
2020-08-02 12:01:13.450465 I | pkg/flags: recognized and used environment variable ETCD_INITIAL_
2020-08-02 12:01:13.450471 I | pkg/flags: recognized and used environment variable ETCD_INITIAL_
2020-08-02 12:01:13.450475 I | pkg/flags: recognized and used environment variable ETCD_INITIAL_
2020-08-02 12:01:13.450479 I | pkg/flags: recognized and used environment variable ETCD_INITIAL_
2020-08-02 12:01:13.450485 I | pkg/flags: recognized and used environment variable ETCD_LISTEN_
2020-08-02 12:01:13.450490 I | pkg/flags: recognized and used environment variable ETCD_LISTEN_
2020-08-02 12:01:13.450501 I | pkg/flags: recognized and used environment variable ETCD_NAME=<SERVER3>
2020-08-02 12:01:13.450526 W | pkg/flags: unrecognized environment variable ETCD_OUT_
2020-08-02 12:01:13.450568 I | etcdmain: etcd Version: 3.3.11
2020-08-02 12:01:13.450574 I | etcdmain: Git SHA: 2cf9e51
2020-08-02 12:01:13.450577 I | etcdmain: Go Version: go1.10.3
2020-08-02 12:01:13.450580 I | etcdmain: Go OS/Arch: linux/amd64
2020-08-02 12:01:13.450583 I | etcdmain: setting maximum number of CPUs to 24, total number of available CPUs is 24
2020-08-02 12:01:13.450704 N | etcdmain: the server is already initialized as member before, starting as etcd member...
2020-08-02 12:01:13.450824 I | embed: listening for peers on http://<IP3>:2380
2020-08-02 12:01:13.450884 I | embed: listening for client requests on <IP3>:2379
etcdmain: initial cluster <SERVER1>=http://<IP1>:2380,
It may be related to: https:/
I think this is caused by using hosts which are in both the control and compute groups:
ETCD_INITIAL_ CLUSTER: "{% for host in etcd_hosts %}{{ hostvars[ host][' ansible_ hostname' ] }}={{ internal_protocol }}://{{ hostvars[ host][' ansible_ ' + hostvars[ host][' api_interface' ]]['ipv4' ]['add ress'] }}:{{ etcd_peer_port }}{% if not loop.last %},{% endif %}{% endfor %}"
etcd_hosts: "{{ groups['control'] + (groups['compute'] if enable_kuryr | bool else []) }}"
There probably needs to be some uniqueness enforcement, e.g. the unique filter in etcd_hosts.
Note that this probably doesn't affect Stein & later releases, which just iterate over the etcd group.
As a workaround you could override the etcd_hosts variable.