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

Guru Shetty guru at ovn.org
Sat Oct 7 02:13:14 UTC 2017


On 6 October 2017 at 15:25, Ben Pfaff <blp at ovn.org> wrote:

> 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?
>
Yes. I will do that.


>
> 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?
>
Makes sense too. I will do that.

>
> Acked-by: Ben Pfaff <blp at ovn.org>
>
I did the above 2 and applied it to master. I will also backport to
relevent branches. Thanks a lot!


More information about the dev mailing list