Acked-by: Flavio Fernandes <[email protected] <mailto:[email protected]>> 


> On May 20, 2020, at 11:52 AM, Daniel Alvarez <[email protected]> wrote:
> 
> ovs-ctl started to add the hostname as external-id [0] at some point.
> 
> However, this can be problematic as if it's already set by an external
> entity it will get overwritten. In RHEL systems, systemd will invoke
> ovs-ctl to start OVS and that will overwrite it to the hostname of the
> machine.
> 
> For OVN this can have a big impact because if, for whatever reason the
> hostname changes and the host gets restarted, ovn-controller won't
> claim the ports back leaving the workloads unaccessible.
> 
> Also, it makes sense to leave this untouched as 1) it's an external_id,
> so it will actually let external entities to configure it (unlike now),
> and 2) it's optional. In the case of OVN, if the external-id doesn't
> exist, it'll default to its hostname so nothing should get broken by
> this change.
> 
> [0] https://mail.openvswitch.org/pipermail/ovs-dev/2016-March/312054.html
> 
> Signed-off-by: Daniel Alvarez <[email protected]>
> ---
> utilities/ovs-ctl.in | 12 ------------
> 1 file changed, 12 deletions(-)
> 
> diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in
> index 8c5cd7032..87fc4934f 100644
> --- a/utilities/ovs-ctl.in
> +++ b/utilities/ovs-ctl.in
> @@ -35,17 +35,6 @@ insert_mod_if_required () {
>     ovs_kmod_ctl insert
> }
> 
> -set_hostname () {
> -    # 'hostname -f' needs network connectivity to work.  So we should
> -    # call this only after ovs-vswitchd is running.
> -    if test X$FULL_HOSTNAME = Xyes; then
> -        hn="$(hostname -f)" || hn="$(uname -n)"
> -    else
> -        hn="$(uname -n)"
> -    fi
> -    ovs_vsctl set Open_vSwitch . external-ids:hostname="$hn"
> -}
> -
> set_system_ids () {
>     set ovs_vsctl set Open_vSwitch .
> 
> @@ -225,7 +214,6 @@ start_forwarding () {
>     if test X"$OVS_VSWITCHD" = Xyes; then
>         do_start_forwarding || return 1
>     fi
> -    set_hostname &
>     return 0
> }
> 
> --
> 
> _______________________________________________
> dev mailing list
> [email protected]
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to