mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 22:35:15 +00:00
ovsdb: raft: Fix inability to read the database with DNS host names.
Clustered OVSDB allows to use DNS names as addresses of raft members.
However, if DNS resolution fails during the initial database read,
this causes a fatal failure and exit of the ovsdb-server process.
Also, if DNS name of a joining server is not resolvable for one of the
followers, this follower will reject append requests for a new server
to join until the name is successfully resolved. This makes a follower
effectively non-functional while DNS is unavailable.
To fix the problem relax the address verification. Allowing validation
to pass if only name resolution failed and the address is valid
otherwise. This will allow addresses to be added to the database, so
connections could be established later when the DNS is available.
Additionally fixing missed initialization of the dns-resolve module.
Without it, DNS requests are blocking. This causes unexpected delays
in runtime.
Fixes: 771680d96f
("DNS: Add basic support for asynchronous DNS resolving")
Reported-at: https://bugzilla.redhat.com/2055097
Acked-by: Dumitru Ceara <dceara@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
This commit is contained in:
@@ -49,7 +49,8 @@ ovs_be32 guess_netmask(ovs_be32 ip);
|
||||
void inet_parse_host_port_tokens(char *s, char **hostp, char **portp);
|
||||
void inet_parse_port_host_tokens(char *s, char **portp, char **hostp);
|
||||
bool inet_parse_active(const char *target, int default_port,
|
||||
struct sockaddr_storage *ssp, bool resolve_host);
|
||||
struct sockaddr_storage *ssp,
|
||||
bool resolve_host, bool *dns_failure);
|
||||
int inet_open_active(int style, const char *target, int default_port,
|
||||
struct sockaddr_storage *ssp, int *fdp, uint8_t dscp);
|
||||
|
||||
|
Reference in New Issue
Block a user