diff mbox series

[ovs-dev] controller: change dns resolution to async.

Message ID 20240403112904.139377-1-naveen.yerramneni@nutanix.com
State Superseded
Delegated to: Numan Siddique
Headers show
Series [ovs-dev] controller: change dns resolution to async. | expand

Checks

Context Check Description
ovsrobot/apply-robot warning apply and check: warning
ovsrobot/github-robot-_Build_and_Test fail github build: failed
ovsrobot/github-robot-_ovn-kubernetes success github build: passed

Commit Message

Naveen Yerramneni April 3, 2024, 11:29 a.m. UTC
Currently DNS resolution is a blocking call in OVN controller.
If DNS server is not reachable for any reason then, ovn-controller
thread blocks for longer time and other events are not processed.

Ex: If we try to run ovn-appctl commands during this then, ovn-controller
will not respond for a longer time.

Signed-off-by: Naveen Yerramneni <naveen.yerramneni@nutanix.com>
---
 controller/ovn-controller.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

0-day Robot April 3, 2024, 11:40 a.m. UTC | #1
References:  <20240403112904.139377-1-naveen.yerramneni@nutanix.com>
 

Bleep bloop.  Greetings Naveen Yerramneni, I am a robot and I have tried out your patch.
Thanks for your contribution.

I encountered some error that I wasn't expecting.  See the details below.


checkpatch:
WARNING: The subject summary should start with a capital.
Subject: controller: change dns resolution to async.
Lines checked: 49, Warnings: 1, Errors: 0


Please check this out.  If you feel there has been an error, please email aconole@redhat.com

Thanks,
0-day Robot
Mark Michelson April 4, 2024, 8:02 p.m. UTC | #2
Thanks Naveen,

Aside from what 0-day robot pointed out,
Acked-by: Mark Michelson <mmichels@redhat.com>

On 4/3/24 07:29, Naveen Yerramneni wrote:
> Currently DNS resolution is a blocking call in OVN controller.
> If DNS server is not reachable for any reason then, ovn-controller
> thread blocks for longer time and other events are not processed.
> 
> Ex: If we try to run ovn-appctl commands during this then, ovn-controller
> will not respond for a longer time.
> 
> Signed-off-by: Naveen Yerramneni <naveen.yerramneni@nutanix.com>
> ---
>   controller/ovn-controller.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/controller/ovn-controller.c b/controller/ovn-controller.c
> index c9ff5967a..b84f6dfd4 100644
> --- a/controller/ovn-controller.c
> +++ b/controller/ovn-controller.c
> @@ -85,6 +85,7 @@
>   #include "mirror.h"
>   #include "mac_cache.h"
>   #include "statctrl.h"
> +#include "lib/dns-resolve.h"
>   
>   VLOG_DEFINE_THIS_MODULE(main);
>   
> @@ -5090,6 +5091,7 @@ main(int argc, char *argv[])
>       mirror_init();
>       vif_plug_provider_initialize();
>       statctrl_init();
> +    dns_resolve_init(true);
>   
>       /* Connect to OVS OVSDB instance. */
>       struct ovsdb_idl_loop ovs_idl_loop = OVSDB_IDL_LOOP_INITIALIZER(
> @@ -6176,6 +6178,7 @@ loop_done:
>       unixctl_server_destroy(unixctl);
>       service_stop();
>       ovsrcu_exit();
> +    dns_resolve_destroy();
>   
>       exit(retval);
>   }
diff mbox series

Patch

diff --git a/controller/ovn-controller.c b/controller/ovn-controller.c
index c9ff5967a..b84f6dfd4 100644
--- a/controller/ovn-controller.c
+++ b/controller/ovn-controller.c
@@ -85,6 +85,7 @@ 
 #include "mirror.h"
 #include "mac_cache.h"
 #include "statctrl.h"
+#include "lib/dns-resolve.h"
 
 VLOG_DEFINE_THIS_MODULE(main);
 
@@ -5090,6 +5091,7 @@  main(int argc, char *argv[])
     mirror_init();
     vif_plug_provider_initialize();
     statctrl_init();
+    dns_resolve_init(true);
 
     /* Connect to OVS OVSDB instance. */
     struct ovsdb_idl_loop ovs_idl_loop = OVSDB_IDL_LOOP_INITIALIZER(
@@ -6176,6 +6178,7 @@  loop_done:
     unixctl_server_destroy(unixctl);
     service_stop();
     ovsrcu_exit();
+    dns_resolve_destroy();
 
     exit(retval);
 }