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

Babu Shanmugam bschanmu at redhat.com
Thu Nov 24 09:36:16 UTC 2016


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)\""
 
     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



More information about the dev mailing list