Page MenuHomePhabricator

etcd: listen-peer-urls only supports IP addresses and no FQDNs
Closed, InvalidPublic

Description

According to https://etcd.io/docs/v3.3.12/op-guide/configuration/#listen-peer-urls, we should use an IP address to specify where should etcd listen for peers.

However, in profile::etcd, the base class is called like:

class { '::etcd':
        host               => $::fqdn,
        [...]

Which in turn, ends up being:

$peer_url = "http://${host}:${peer_port}" # Peer TLS is currently broken? in modules/etcd/manifests/init.pp

In my testing setup for a new Toolforge k8s cluster, I saw this error message:

etcd[16341]: error verifying flags, expected IP in URL for binding (http://toolsbeta-arturo-k8s-etcd-1.toolsbeta.eqiad.wmflabs:2380). See 'etcd --help'.

The upstream documentation mentions that it defaults to http://localhost:2380.

Event Timeline

Hi @aborrero I think you were using profile::etcd instead than profile::etcd::v3 which is the profile you should use with etcd3.

In that case, $peer_listen_ip = $::facts['ipaddress'] defaults to the ipaddress fact and should DTRT.

Joe triaged this task as Medium priority.