[ovs-dev] [PATCH v1] utilities: Use FQDN for external_ids:hostname in Openvswitch table

Guru Shetty guru at ovn.org
Fri Oct 6 19:34:58 UTC 2017


On 24 November 2016 at 01:36, Babu Shanmugam <bschanmu at redhat.com> wrote:

> From: Babu Shanmugam <bschanmu at redhat.com>
>
> Openstack compute manager uses FQDN to check for the hypervisors to
> which the ports are bound.
>
> Without this fix, no instances can be launched as the hypervisor's hostname
> mismatches.
>
> Signed-off-by: Babu Shanmugam <bschanmu at redhat.com>
> ---
>  utilities/ovs-ctl.in | 2 +-
>  vswitchd/vswitch.xml | 3 ++-
>  2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in
> index ce3fb58..79979c3 100755
> --- a/utilities/ovs-ctl.in
> +++ b/utilities/ovs-ctl.in
> @@ -108,7 +108,7 @@ set_system_ids () {
>      esac
>      set "$@" external-ids:system-id="\"$SYSTEM_ID\""
>
> -    set "$@" external-ids:hostname="\"$(hostname)\""
> +    set "$@" external-ids:hostname="\"$(hostname -f)\""
>

I tracked down a 40 second outage when OVS upgrade happens to this change.
When we restart OVS, there is a possibility that there is no network
connectivity for 'hostname -f' to work. And this causes a timeout.


>
>      if test X"$SYSTEM_TYPE" != X; then
>          set "$@" system-type="\"$SYSTEM_TYPE\""
> diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml
> index 99c1476..14c7b87 100644
> --- a/vswitchd/vswitch.xml
> +++ b/vswitchd/vswitch.xml
> @@ -73,7 +73,8 @@
>        </column>
>
>        <column name="external_ids" key="hostname">
> -        The hostname for the host running Open vSwitch.
> +        The hostname for the host running Open vSwitch. This is a fully
> +        qualified domain name since ovs version 2.6.2.
>        </column>
>
>        <column name="other_config" key="stats-update-interval"
> --
> 1.9.1
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>


More information about the dev mailing list