On Friday, February 10, 2023, Ilya Maximets <[email protected]> wrote: > On 2/9/23 08:48, Frode Nordahl wrote: >> Commit 08e9e5337383 fixed proper initialization of the dns-resolve >> module, and made DNS resolution asynchronous. >> >> A side effect of that change revealed a long standing logic bug >> which broke ovsdb-server listener configuration using DNS names. >> >> Previously this worked because the DNS resolution would block, >> now that DNS resolution is asynchronous the code before this >> change would assume the error from jsonrpc_pstream_open meant >> the remote was a specification for an active outgoing >> connection, even when that was not the case. >> >> To fix this a couple of changes was made to socket-util: >> 1) Pass optional result of dns resolution from inet_parse_passive. >> >> When (re-)configuring listeners that use DNS names, we may need >> to know whether the provided connection string is invalid or if >> the provided DNS name has finished resolving. >> >> 2) Check dns resolution status in inet_open_passive. >> >> If the connection string is valid, and contains a DNS name, >> inet_open_passive will now return -EAGAIN if dns resolution >> failed. DNS resolution failure may either mean the asynchronous >> resolver has not completed yet, or that the name does not resolve. >> >> Reported-at: https://bugs.launchpad.net/bugs/1998781 >> Fixes: 08e9e5337383 ("ovsdb: raft: Fix inability to read the database with DNS host names.") >> Fixes: 771680d96fb6 ("DNS: Add basic support for asynchronous DNS resolving") >> Signed-off-by: Frode Nordahl <[email protected]> >> --- >> lib/socket-util.c | 13 ++++++++++--- >> lib/socket-util.h | 3 ++- >> ovsdb/jsonrpc-server.c | 43 ++++++++++++++++++++++++++---------------- >> 3 files changed, 39 insertions(+), 20 deletions(-) >> > > > Thanks! I fixed the 'sesssion' typo and applied the patch. > Also, backported down to 2.17.
Awesome, thanks! -- Frode Nordahl > Best regards, Ilya Maximets. > -- Frode Nordahl _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
