On 6/30/25 10:09 AM, jun.gu via discuss wrote: > Hi team, > The dns reslove expiration cause the ovsdb-server startup failed. > ``` > ovsdb-server --relay-leader-only > --remote=db:OVN_Southbound,SB_Global,connections -vconsole:info > -vsyslog:off -vfile:off --log-file=/var/log/ovn/ovn-ovsdb-sb.log > --pidfile=/var/run/ovn/ovnsb_db.pid --unixctl=/var/run/ovn/ovnsb_db.ctl > relay:OVN_Southbound:tcp:ovn-ovsdb-sb-0.ovn-ovsdb-sb-discovery.openstack.svc.cluster.local:6642,tcp:ovn-ovsdb-sb-1.ovn-ovsdb-sb-discovery.openstack.svc.cluster.local:6642,tcp:ovn-ovsdb-sb-2.ovn-ovsdb-sb-discovery.openstack.svc.cluster.local:6642 > ``` > The sb relay need to connect sb-0/1/2 when it startup, but maybe failed > as sb-0/1/2 can't provide service at this time. So sb relay will print > the below logs: > ```
<snip> > ``` > Based on the above info and code analysis: > The sb relay reconnects to an sb service every 8 seconds (based on > RECONNECT_DEFAULT_MAX_BACKOFF). There are three sb services, so the sb > relay attempts to reconnect to one of them every 24 seconds. DNS uses > synchronous resolving with a TTL of 5 seconds. For example: > - The first time, sb relay uses synchronous DNS resolving for sb-0 and > succeeds, but no address is returned. > - After 24 seconds, when sb relay tries to request sb-0's address again, > it finds the data has expired. It then performs synchronous resolving > again, but no address is returned. > As a result, sb relay repeats step 2 continuously. That's an unfortunate configuration mismatch. If you can't change the TTL of the DNS server, you may reduce the max backoff for the relay if you switch to the --config-file way of configuring the ovsdb-server. You may find a config file example with max-backoff in the docs: https://docs.openvswitch.org/en/latest/ref/ovsdb.7/#relay-service-model Setting max-backoff to 1 second would give you 3 seconds between connection attempts instead of 24, and that should fit into 5 second TTL of the DNS. Best regards, Ilya Maximets. _______________________________________________ discuss mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
