aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2017-12-30 23:04:17 +0100
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-01-03 03:07:56 +0100
commit7b7171d4b505f5774b874225ff079360d550d772 (patch)
treed1ebc2cdfd7fe48c02d414e6a30a2d1eca765f1a
parentfaa82bb7a3fc85b6e7dbd5adeae76d18043ff161 (diff)
[baremetal] cmp: Add missing public gw (default)
When we dropped the default gw via mas01 NAT, we uncovered a bug, compute nodes do not have the proper public gw set up and used to reach public network via mas01, slowing everything down. Add gw similar to prx nodes. Fixes: d4ab072 Change-Id: I4343c31c376a7a223670cdd623366454396d8d92 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> (cherry picked from commit e9d597db3a9e8a38577908f36f5f700e875d4d78)
-rw-r--r--mcp/patches/0007-network.interface-Fix-ifup-OVS-port-with-route.patch32
-rw-r--r--mcp/patches/patches.list1
-rw-r--r--mcp/reclass/classes/cluster/baremetal-mcp-ocata-common-ha/openstack_compute_pdf.yml.j25
3 files changed, 38 insertions, 0 deletions
diff --git a/mcp/patches/0007-network.interface-Fix-ifup-OVS-port-with-route.patch b/mcp/patches/0007-network.interface-Fix-ifup-OVS-port-with-route.patch
new file mode 100644
index 000000000..c36631aea
--- /dev/null
+++ b/mcp/patches/0007-network.interface-Fix-ifup-OVS-port-with-route.patch
@@ -0,0 +1,32 @@
+From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+Date: Sun, 31 Dec 2017 16:06:30 +0100
+Subject: [PATCH] network.interface: Fix ifup OVS port with route
+
+This change attempts to fix the following sequence for nodes with
+OVS ports that also have routes defined:
+- state.sls linux.network; system.reboot; state.sls linux.network;
+
+If an OVS port also has a route defined, a route cfg file is
+created in </etc/network/if.{down,up}.d/>, which is sourced after
+system reboot before we (eventually) re-run `interface.sls`, leaving
+the OVS port in UP state, so `ifup` would fail.
+
+Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+---
+ linux/network/interface.sls | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/linux/network/interface.sls b/linux/network/interface.sls
+--- a/linux/network/interface.sls
++++ b/linux/network/interface.sls
+@@ -146,6 +146,10 @@ ovs_port_up_{{ interface_name }}:
+ - file: ovs_port_{{ interface_name }}_line2
+ - openvswitch_bridge: ovs_bridge_{{ interface.bridge }}
+ - file: linux_interfaces_final_include
++ {%- if interface.route is defined %}
++ - unless:
++ - ip link show {{ interface_name }} | grep -q '\<UP\>'
++ {% endif %}
+
+ {%- endif %}
+
diff --git a/mcp/patches/patches.list b/mcp/patches/patches.list
index a54fadced..4c5522339 100644
--- a/mcp/patches/patches.list
+++ b/mcp/patches/patches.list
@@ -11,6 +11,7 @@
/usr/share/salt-formulas/env: 0004-maas-region-use-authorized_keys-1st-entry.patch
/usr/share/salt-formulas/env: 0005-maas-module-Obtain-fabric-ID-from-CIDR.patch
/usr/share/salt-formulas/env: 0006-maas-module-Add-VLAN-DHCP-enable-support.patch
+/usr/share/salt-formulas/env: 0007-network.interface-Fix-ifup-OVS-port-with-route.patch
/usr/share/salt-formulas/env: 0008-Handle-file_recv-option.patch
/usr/share/salt-formulas/env: 0010-maas-region-allow-timeout-override.patch
/usr/share/salt-formulas/reclass: 0011-service.horizon.server.cluster-Default-to-v2-API.patch
diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common-ha/openstack_compute_pdf.yml.j2 b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common-ha/openstack_compute_pdf.yml.j2
index ed52b9a93..e9d265ddf 100644
--- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common-ha/openstack_compute_pdf.yml.j2
+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common-ha/openstack_compute_pdf.yml.j2
@@ -101,6 +101,11 @@ parameters:
mtu: ${_param:interface_mtu}
address: ${_param:external_address}
netmask: 255.255.255.0
+ route:
+ public:
+ address: 0.0.0.0
+ netmask: 0.0.0.0
+ gateway: ${_param:opnfv_net_public_gw}
use_interfaces:
- {{ nic_public }}{% if vlan_public and vlan_public != 'native' %}.{{ vlan_public }}{% endif %}
use_ovs_ports: