[ovs-dev] [PATCH 1/2] ovs-ctl.in: Call 'hostname -f' after vswitchd starts.

Ben Pfaff blp at ovn.org
Fri Oct 6 22:25:15 UTC 2017


On Fri, Oct 06, 2017 at 04:08:22AM -0700, Gurucharan Shetty wrote:
> Currently we call 'hostname -f' when ovs-vswitchd is not
> running. If you are using ovs-vswitchd to provide your
> primary networking, then 'hostname -f' will "hang" till it
> times out. On the system this issue was discovered, this was
> as long as 40 seconds. This is a problem during OVS restarts
> or upgrades.
> 
> This commit calls 'hostname -f' after ovs-vswitchd has started.
> 
> Signed-off-by: Gurucharan Shetty <guru at ovn.org>

Thanks for figuring this out.

It looks like every start_forwarding call is now followed by
set_hostname.  Would it make sense for start_forwarding to call
set_hostname itself?

I guess that setting external-ids:hostname is not something that has to
happen synchronously.  Would it make sense to do it in the background,
e.g. "set_hostname &", so that if DNS is slow or unavailable (even after
starting ovs-vswitchd), it doesn't slow down startup?

Acked-by: Ben Pfaff <blp at ovn.org>


More information about the dev mailing list