From 3c31148df01876a773715748f7c6f93d06918d84 Mon Sep 17 00:00:00 2001 From: James Denton Date: Wed, 28 Nov 2018 13:34:01 +0000 Subject: [PATCH] Modify OVS hostname value to match server's hostname When an instance is scheduled to a compute node with the ML2/OVN plugin configured, the hostname of the compute node must match the hostname value set in the external_ids row of the Open_vSwitch table in OVS. This commit replaces the use of inventory_hostname with ansible_hostname when configuring the external_ids row of the local Open_vSwitch table in OVS. Change-Id: Ib26eda468fe512a58157911e3271bafb7924ff76 Closes-Bug: #1805626 --- tasks/providers/setup_ovs_ovn.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/providers/setup_ovs_ovn.yml b/tasks/providers/setup_ovs_ovn.yml index 7772c06a..57e6b3a9 100644 --- a/tasks/providers/setup_ovs_ovn.yml +++ b/tasks/providers/setup_ovs_ovn.yml @@ -15,7 +15,7 @@ # limitations under the License. - name: Set openvswitch hostname - command: "ovs-vsctl set open_vswitch . external-ids:hostname='{{ inventory_hostname }}'" + command: "ovs-vsctl set open_vswitch . external-ids:hostname='{{ ansible_hostname }}'" tags: - ovn-config when: