I’m again having issues getting OVN clustered.
I’ve tried a complete uninstall, reboot and reinstall … the same result.
I have 3 hosts, all three don’t look right, but in different ways. The first host has different behaviour to the other two.
I’ve checked again my setup commands and compared them to those in OVN high availability cluster tutorial, and can’t see the difference. Nor can I see why they’re behaving differently.
Any pointers to the wrong config (or should I just go back to the single ovn-central
setup which I had working successfully)?
All three are complaining about bind: Cannot assign requested address
. On the first host, it seems to then bind to ports 6643 & 6644 (in addition to 6641 & 6642). On the other two … not.
on the “first” host:
# ovs-vsctl list open_vswitch
[sudo] password for albans:
_uuid : 4ff0e1cf-2c23-40cb-a803-53baf2ddec4a
bridges : [be31ed83-2ca2-409c-ae8b-93102eccd124]
cur_cfg : 1
datapath_types : [netdev, system]
datapaths : {}
db_version : "8.2.0"
dpdk_initialized : false
dpdk_version : none
external_ids : {hostname=albans.domuz, ovn-encap-ip="10.1.0.215", ovn-encap-type=geneve, ovn-openflow-probe-interval="15000", ovn-remote="unix:/var/run/ovn/ovnsb_db.sock", ovn-remote-probe-interval="5000", rundir="/var/run/openvswitch", system-id="f015fb56-439c-4d56-bfc6-d9087f6753f5"}
iface_types : [erspan, geneve, gre, internal, ip6erspan, ip6gre, lisp, patch, stt, system, tap, vxlan]
manager_options : []
next_cfg : 1
other_config : {}
ovs_version : "2.13.1"
ssl : []
statistics : {}
system_type : ubuntu
system_version : "20.04"
# ovs-vsctl show
4ff0e1cf-2c23-40cb-a803-53baf2ddec4a
Bridge br-int
fail_mode: secure
Port br-int
Interface br-int
type: internal
ovs_version: "2.13.1"
$ cat /etc/default/ovn-central
# This is a POSIX shell fragment -*- sh -*-
OVN_CTL_OPTS= \
--db-nb-create-insecure-remote=yes \
--db-sb-create-insecure-remote=yes \
--db-nb-addr=10.1.0.215 \
--db-sb-addr=10.1.0.215 \
--db-nb-cluster-local-addr=10.1.0.215 \
--db-sb-cluster-local-addr=10.1.0.215 \
--ovn-northd-nb-db=tcp:10.1.0.215:6641,tcp:10.1.0.213:6641,tcp:10.1.0.214:6641 \
--ovn-northd-sb-db=tcp:10.1.0.215:6642,tcp:10.1.0.213:6642,tcp:10.1.0.214:6642
# ss -tuxlpn \
> | grep -e '^\s*tcp\s.*\b:664[0-5]\b' -e '^\s*u_str\s.*\bovn\b' \
> | sed -r -e 's/\s+$//'
[sudo] password for albans:
u_str LISTEN 0 64 /var/run/ovn/ovnnb_db.ctl 32322 * 0 users:(("ovsdb-server",pid=1816,fd=19))
u_str LISTEN 0 64 /var/run/ovn/ovn-northd.1804.ctl 32880 * 0 users:(("ovn-northd",pid=1804,fd=9))
u_str LISTEN 0 64 /var/run/ovn/ovn-controller.1745.ctl 32810 * 0 users:(("ovn-controller",pid=1745,fd=9))
u_str LISTEN 0 64 /var/run/ovn/ovnnb_db.sock 32315 * 0 users:(("ovsdb-server",pid=1816,fd=14))
u_str LISTEN 0 64 /var/run/ovn/ovnsb_db.sock 32317 * 0 users:(("ovsdb-server",pid=1824,fd=14))
u_str LISTEN 0 64 /var/run/ovn/ovnsb_db.ctl 32326 * 0 users:(("ovsdb-server",pid=1824,fd=21))
tcp LISTEN 0 10 10.1.0.215:6641 0.0.0.0:* users:(("ovsdb-server",pid=1816,fd=20))
tcp LISTEN 0 10 10.1.0.215:6642 0.0.0.0:* users:(("ovsdb-server",pid=1824,fd=25))
tcp LISTEN 0 10 10.1.0.215:6643 0.0.0.0:* users:(("ovsdb-server",pid=1816,fd=23))
tcp LISTEN 0 10 10.1.0.215:6644 0.0.0.0:* users:(("ovsdb-server",pid=1824,fd=26))
==> /var/log/ovn/ovsdb-server-nb.log <==
2021-05-16T15:40:42.277Z|00009|socket_util|ERR|6643:10.1.0.215: bind: Cannot assign requested address
2021-05-16T15:40:42.277Z|00010|raft|WARN|ptcp:6643:10.1.0.215: listen failed (Cannot assign requested address)
2021-05-16T15:40:42.292Z|00011|socket_util|ERR|6641:10.1.0.215: bind: Cannot assign requested address
2021-05-16T15:40:42.292Z|00012|ovsdb_jsonrpc_server|ERR|ptcp:6641:10.1.0.215: listen failed: Cannot assign requested address
2021-05-16T15:40:42.293Z|00013|socket_util|ERR|6641:10.1.0.215: bind: Cannot assign requested address
2021-05-16T15:40:42.294Z|00014|ovsdb_jsonrpc_server|ERR|ptcp:6641:10.1.0.215: listen failed: Cannot assign requested address
2021-05-16T15:40:42.301Z|00015|ovsdb_jsonrpc_server|ERR|ptcp:6641:10.1.0.215: listen failed: Cannot assign requested address
2021-05-16T15:40:43.278Z|00016|raft|WARN|ptcp:6643:10.1.0.215: listen failed (Cannot assign requested address)
2021-05-16T15:40:52.277Z|00017|memory|INFO|6708 kB peak resident set size after 10.1 seconds
2021-05-16T15:40:52.277Z|00018|memory|INFO|cells:31 monitors:2 sessions:1
==> /var/log/ovn/ovsdb-server-sb.log <==
2021-05-16T15:40:42.261Z|00009|socket_util|ERR|6644:10.1.0.215: bind: Cannot assign requested address
2021-05-16T15:40:42.261Z|00010|raft|WARN|ptcp:6644:10.1.0.215: listen failed (Cannot assign requested address)
2021-05-16T15:40:42.278Z|00011|socket_util|ERR|6642:10.1.0.215: bind: Cannot assign requested address
2021-05-16T15:40:42.278Z|00012|ovsdb_jsonrpc_server|ERR|ptcp:6642:10.1.0.215: listen failed: Cannot assign requested address
2021-05-16T15:40:42.294Z|00013|socket_util|ERR|6642:10.1.0.215: bind: Cannot assign requested address
2021-05-16T15:40:42.295Z|00014|ovsdb_jsonrpc_server|ERR|ptcp:6642:10.1.0.215: listen failed: Cannot assign requested address
2021-05-16T15:40:42.296Z|00015|ovsdb_jsonrpc_server|ERR|ptcp:6642:10.1.0.215: listen failed: Cannot assign requested address
2021-05-16T15:40:43.262Z|00016|raft|WARN|ptcp:6644:10.1.0.215: listen failed (Cannot assign requested address)
2021-05-16T15:40:52.263Z|00017|memory|INFO|6368 kB peak resident set size after 10.1 seconds
2021-05-16T15:40:52.263Z|00018|memory|INFO|cells:43 monitors:2 sessions:1
on the other two:
# ovs-vsctl list open_vswitch
[sudo] password for grantham:
_uuid : 3cb6267d-184f-480e-ad20-d7dcc752d294
bridges : [fbe424d6-4eb1-471d-9f38-9011901ed544]
cur_cfg : 1
datapath_types : [netdev, system]
datapaths : {}
db_version : "8.2.0"
dpdk_initialized : false
dpdk_version : none
external_ids : {hostname=grantham.domuz, ovn-encap-ip="10.1.0.213", ovn-encap-type=geneve, ovn-openflow-probe-interval="15000", ovn-remote="unix:/var/run/ovn/ovnsb_db.sock", ovn-remote-probe-interval="5000", rundir="/var/run/openvswitch", system-id="36d534c9-dc90-45a7-94c6-af3b1dc41697"}
iface_types : [erspan, geneve, gre, internal, ip6erspan, ip6gre, lisp, patch, stt, system, tap, vxlan]
manager_options : []
next_cfg : 1
other_config : {}
ovs_version : "2.13.1"
ssl : []
statistics : {}
system_type : ubuntu
system_version : "20.04"
# ovs-vsctl show
3cb6267d-184f-480e-ad20-d7dcc752d294
Bridge br-int
fail_mode: secure
Port br-int
Interface br-int
type: internal
ovs_version: "2.13.1"
$ cat /etc/default/ovn-central
# This is a POSIX shell fragment -*- sh -*-
OVN_CTL_OPTS= \
--db-nb-create-insecure-remote=yes \
--db-sb-create-insecure-remote=yes \
--db-nb-addr=10.1.0.213 \
--db-sb-addr=10.1.0.213 \
--db-nb-cluster-local-addr=10.1.0.213 \
--db-sb-cluster-local-addr=10.1.0.213 \
--db-nb-cluster-remote-addr=10.1.0.215 \
--db-sb-cluster-remote-addr=10.1.0.215 \
--ovn-northd-nb-db=tcp:10.1.0.215:6641,tcp:10.1.0.213:6641,tcp:10.1.0.214:6641 \
--ovn-northd-sb-db=tcp:10.1.0.215:6642,tcp:10.1.0.213:6642,tcp:10.1.0.214:6642
# ss -tuxlpn \
> | grep -e '^\s*tcp\s.*\b:664[0-5]\b' -e '^\s*u_str\s.*\bovn\b' \
> | sed -r -e 's/\s+$//'
[sudo] password for grantham:
u_str LISTEN 0 64 /var/run/ovn/ovn-controller.2482.ctl 35393 * 0 users:(("ovn-controller",pid=2482,fd=9))
u_str LISTEN 0 64 /var/run/ovn/ovnsb_db.sock 41988 * 0 users:(("ovsdb-server",pid=2340,fd=14))
u_str LISTEN 0 64 /var/run/ovn/ovn-northd.2679.ctl 1843 * 0 users:(("ovn-northd",pid=2679,fd=9))
u_str LISTEN 0 64 /var/run/ovn/ovnnb_db.sock 31570 * 0 users:(("ovsdb-server",pid=2332,fd=14))
u_str LISTEN 0 64 /var/run/ovn/ovnsb_db.ctl 41990 * 0 users:(("ovsdb-server",pid=2340,fd=15))
u_str LISTEN 0 64 /var/run/ovn/ovnnb_db.ctl 31572 * 0 users:(("ovsdb-server",pid=2332,fd=15))
tcp LISTEN 0 10 10.1.0.213:6641 0.0.0.0:* users:(("ovsdb-server",pid=2332,fd=16))
tcp LISTEN 0 10 10.1.0.213:6642 0.0.0.0:* users:(("ovsdb-server",pid=2340,fd=17))
==> /var/log/ovn/ovsdb-server-nb.log <==
2021-05-16T15:40:43.847Z|00005|socket_util|ERR|6641:10.1.0.213: bind: Cannot assign requested address
2021-05-16T15:40:43.847Z|00006|ovsdb_jsonrpc_server|ERR|ptcp:6641:10.1.0.213: listen failed: Cannot assign requested address
2021-05-16T15:40:43.848Z|00007|socket_util|ERR|6641:10.1.0.213: bind: Cannot assign requested address
2021-05-16T15:40:43.848Z|00008|ovsdb_jsonrpc_server|ERR|ptcp:6641:10.1.0.213: listen failed: Cannot assign requested address
2021-05-16T15:40:46.349Z|00009|socket_util|ERR|6641:10.1.0.213: bind: Cannot assign requested address
2021-05-16T15:40:46.349Z|00010|ovsdb_jsonrpc_server|ERR|ptcp:6641:10.1.0.213: listen failed: Cannot assign requested address
2021-05-16T15:40:48.850Z|00011|socket_util|ERR|6641:10.1.0.213: bind: Cannot assign requested address
2021-05-16T15:40:48.850Z|00012|ovsdb_jsonrpc_server|ERR|ptcp:6641:10.1.0.213: listen failed: Cannot assign requested address
2021-05-16T15:40:53.856Z|00013|memory|INFO|6600 kB peak resident set size after 10.0 seconds
2021-05-16T15:40:53.857Z|00014|memory|INFO|cells:31 monitors:0
==> /var/log/ovn/ovsdb-server-sb.log <==
2021-05-16T15:40:43.845Z|00005|socket_util|ERR|6642:10.1.0.213: bind: Cannot assign requested address
2021-05-16T15:40:43.845Z|00006|ovsdb_jsonrpc_server|ERR|ptcp:6642:10.1.0.213: listen failed: Cannot assign requested address
2021-05-16T15:40:43.845Z|00007|socket_util|ERR|6642:10.1.0.213: bind: Cannot assign requested address
2021-05-16T15:40:43.845Z|00008|ovsdb_jsonrpc_server|ERR|ptcp:6642:10.1.0.213: listen failed: Cannot assign requested address
2021-05-16T15:40:44.799Z|00009|socket_util|ERR|6642:10.1.0.213: bind: Cannot assign requested address
2021-05-16T15:40:44.799Z|00010|ovsdb_jsonrpc_server|ERR|ptcp:6642:10.1.0.213: listen failed: Cannot assign requested address
2021-05-16T15:40:44.799Z|00011|socket_util|ERR|6642:10.1.0.213: bind: Cannot assign requested address
2021-05-16T15:40:44.799Z|00012|ovsdb_jsonrpc_server|ERR|ptcp:6642:10.1.0.213: listen failed: Cannot assign requested address
2021-05-16T15:40:53.855Z|00013|memory|INFO|6600 kB peak resident set size after 10.0 seconds
2021-05-16T15:40:53.855Z|00014|memory|INFO|cells:248 monitors:2 sessions:1
2021-05-16T15:51:07.114Z|00015|jsonrpc|WARN|unix#1: send error: Broken pipe
2021-05-16T15:51:07.114Z|00016|reconnect|WARN|unix#1: connection dropped (Broken pipe)
This is after all the hosts have been restarted (the “first” first).