Update openvswitch to 2.10 15/66615/5 opnfv-7.2.0
authorMichael Polenchuk <mpolenchuk@mirantis.com>
Wed, 23 Jan 2019 11:36:57 +0000 (15:36 +0400)
committerMichael Polenchuk <mpolenchuk@mirantis.com>
Mon, 28 Jan 2019 08:33:52 +0000 (12:33 +0400)
Change-Id: I0121b3190869528e5f2e9985f9e9299ac6c6724e
Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
mcp/patches/salt-formula-linux/0001-Set-ovs-bridges-as-L3-interfaces.patch
mcp/reclass/classes/cluster/all-mcp-arch-common/openvswitch_210.yml [new file with mode: 0644]
mcp/reclass/classes/cluster/mcp-common-noha/openstack_init.yml.j2
mcp/reclass/classes/cluster/mcp-odl-noha/openstack/compute.yml.j2
mcp/reclass/classes/cluster/mcp-odl-noha/openstack/gateway.yml.j2
mcp/reclass/classes/cluster/mcp-ovs-dpdk-noha/openstack/gateway.yml.j2

index cf3da7f..a1230be 100644 (file)
@@ -12,16 +12,18 @@ Subject: [PATCH] Set ovs bridges as L3 interfaces
 
 diff --git a/linux/files/ovs_bridge b/linux/files/ovs_bridge
 new file mode 100644
-index 0000000..d33864c
+index 0000000..1322eeb
 --- /dev/null
 +++ b/linux/files/ovs_bridge
-@@ -0,0 +1,18 @@
+@@ -0,0 +1,20 @@
 +auto {{ bridge_name }}
 +allow-ovs {{ bridge_name }}
-+iface {{ bridge_name }} inet static
++iface {{ bridge_name }} inet {{ bridge.get('proto', 'static' if bridge.address is defined else 'manual') }}
 +  ovs_type OVSBridge
++  {%- if bridge.address is defined %}
 +  address {{ bridge.address }}
 +  netmask {{ bridge.netmask }}
++  {%- endif %}
 +  {%- if bridge.use_interfaces is defined %}
 +  ovs_ports {{ bridge.use_interfaces|join(' ') }}
 +  {%- endif %}
@@ -52,14 +54,13 @@ index 222ca8e..03072cd 100644
  mtu {{ port.get('mtu', '1500') }}
  ovs_bridge {{ port.bridge }}
 diff --git a/linux/network/interface.sls b/linux/network/interface.sls
-index a39fc37..c4a94a3 100644
+index a39fc37..8bce092 100644
 --- a/linux/network/interface.sls
 +++ b/linux/network/interface.sls
-@@ -92,6 +92,37 @@ add_int_{{ int_name }}_to_ovs_dpdk_bridge_{{ interface_name }}:
+@@ -92,6 +92,35 @@ add_int_{{ int_name }}_to_ovs_dpdk_bridge_{{ interface_name }}:
  ovs_bridge_{{ interface_name }}:
    openvswitch_bridge.present:
    - name: {{ interface_name }}
-+{%- if interface.get('proto', 'manual') == 'static' %}
 +  file.managed:
 +  - name: /etc/network/interfaces.u/ifcfg-{{ interface_name }}
 +  - makedirs: True
@@ -87,13 +88,21 @@ index a39fc37..c4a94a3 100644
 +  {%- if network.noifupdown|d(false) or interface.noifupdown|d(false) %}
 +  - onlyif: /bin/false
 +  {%- else %}
-+  - unless: ip link show {{ interface_name }} | grep -q '\<UP\>'
++  - unless: grep -qFx up /sys/class/net/{{ interface_name }}/operstate
 +  {%- endif %}
-+{%- endif %}
 
  {# add linux network interface into OVS bridge #}
  {%- for int_name, int in network.interface.items() %}
-@@ -176,6 +207,9 @@ ovs_port_{{ interface_name }}_line2:
+@@ -102,7 +131,7 @@ ovs_bridge_{{ interface_name }}:
+
+ add_int_{{ int_name }}_to_ovs_bridge_{{ interface_name }}:
+   cmd.run:
+-    - unless: ovs-vsctl show | grep {{ int_name }}
++    - unless: ovs-vsctl list-ports {{ interface_name }} | grep -qFx {{ int_name }}
+     - name: ovs-vsctl{%- if network.ovs_nowait %} --no-wait{%- endif %} add-port {{ interface_name }} {{ int_name }}
+
+ {%- endif %}
+@@ -176,6 +205,9 @@ ovs_port_{{ interface_name }}_line2:
  ovs_port_up_{{ interface_name }}:
    cmd.run:
    - name: ifup {{ interface_name }}
diff --git a/mcp/reclass/classes/cluster/all-mcp-arch-common/openvswitch_210.yml b/mcp/reclass/classes/cluster/all-mcp-arch-common/openvswitch_210.yml
new file mode 100644 (file)
index 0000000..cefca2e
--- /dev/null
@@ -0,0 +1,14 @@
+parameters:
+  _param:
+    repo_ovs_210: https://mirror.mirantis.com/nightly/openstack-rocky/${_param:linux_system_codename}
+  linux:
+    system:
+      repo:
+        openvswitch:
+          source: "deb ${_param:repo_ovs_210} ${_param:linux_system_codename} main"
+          clean_file: true
+          key_url: ${_param:repo_ovs_210}/archive-rocky.key
+          pin:
+            - pin: 'release l=openstack-rocky-nightly'
+              priority: 1101
+              package: 'openvswitch* python3-openvswitch ovn* dpdk* libdpdk*'
index 54df34c..6c2c088 100644 (file)
@@ -8,7 +8,7 @@
 {%- import 'net_map.j2' as nm with context %}
 ---
 classes:
-  - cluster.all-mcp-arch-common.uca_repo
+  - cluster.all-mcp-arch-common.openvswitch_210
 parameters:
   _param:
     openstack_region: RegionOne
@@ -83,13 +83,8 @@ parameters:
           net.ipv4.tcp_congestion_control: yeah
           net.ipv4.tcp_slow_start_after_idle: 0
           net.ipv4.tcp_fin_timeout: 30
-      repo:
-        uca:
-          pin:
-            - pin: 'release o=Canonical'
-              priority: 1200
-              package: 'openvswitch* python-openvswitch ovn* dpdk* libdpdk*'
 {%- if 'aarch64' in nm.cluster.arch %}
+      repo:
         armband_3:  # Should be in sync with the repo config generated via curtin/MaaS
           source: "deb http://linux.enea.com/mcp-repos/${_param:openstack_version}/${_param:linux_system_codename} ${_param:openstack_version}-armband main"
           key: ${_param:armband_key}
index 3e912c1..5d8d26a 100644 (file)
@@ -21,6 +21,7 @@ classes:
 parameters:
   linux:
     network:
+      ovs_nowait: false
       interface:
 {%- if '-ovs-' in conf.MCP_DEPLOY_SCENARIO %}
         dpdk0:
@@ -48,11 +49,15 @@ parameters:
         br-floating:
           enabled: true
           type: ovs_bridge
+          datapath_type: netdev
+          use_interfaces:
+            - float-to-ex
         float-to-ex:
           enabled: true
           type: ovs_port
           mtu: ${_param:interface_mtu}
           bridge: br-floating
+          ovs_bridge: br-floating
           noifupdown: true
         br-ex:
           enabled: true
index 58ba34f..c7272ff 100644 (file)
@@ -27,6 +27,8 @@ parameters:
           proto: static
           address: ${_param:tenant_address}
           netmask: ${_param:opnfv_net_private_mask}
+          use_interfaces:
+            - {{ nm.ctl01.nic_private }}
 {%- else %}
         br-mesh:
           enabled: true
index 8d11eed..3ec0c82 100644 (file)
@@ -25,3 +25,5 @@ parameters:
           enabled: true
           type: ovs_bridge
           mtu: ${_param:interface_mtu}
+          use_interfaces:
+            - {{ nm.ctl01.nic_private }}