Merge "Setup LV before mkfs"
diff --git a/README.rst b/README.rst
index c1b8cc7..22b8b1a 100644
--- a/README.rst
+++ b/README.rst
@@ -798,6 +798,7 @@
type: dpdk_ovs_port
n_rxq: 2
bridge: br-prv
+ mtu: 9000
br-prv:
enabled: true
type: dpdk_ovs_bridge
@@ -826,6 +827,7 @@
enabled: true
type: dpdk_ovs_port
n_rxq: 2
+ mtu: 9000
dpdk_first_nic:
name: ${_param:primary_first_nic}
pci: 0000:05:00.0
@@ -834,6 +836,7 @@
enabled: true
type: dpdk_ovs_port
n_rxq: 2
+ mtu: 9000
dpdkbond0:
enabled: true
bridge: br-prv
@@ -843,6 +846,22 @@
enabled: true
type: dpdk_ovs_bridge
+**DPDK OVS bridge for VXLAN**
+
+If VXLAN is used as tenant segmentation then ip address must be set on br-prv
+
+.. code-block:: yaml
+
+ linux:
+ network:
+ ...
+ interface:
+ br-prv:
+ enabled: true
+ type: dpdk_ovs_bridge
+ address: 192.168.50.0
+ netmask: 255.255.255.0
+ mtu: 9000
Linux storage
-------------
diff --git a/linux/files/collectd_swap.conf b/linux/files/collectd_swap.conf
new file mode 100644
index 0000000..8f96465
--- /dev/null
+++ b/linux/files/collectd_swap.conf
@@ -0,0 +1,8 @@
+<LoadPlugin swap>
+ Globals false
+</LoadPlugin>
+
+<Plugin swap>
+ ReportBytes {{ plugin.get('report_bytes', False)|lower }}
+</Plugin>
+
diff --git a/linux/meta/collectd.yml b/linux/meta/collectd.yml
index 5410d2a..2555825 100644
--- a/linux/meta/collectd.yml
+++ b/linux/meta/collectd.yml
@@ -40,3 +40,5 @@
ignore_selected: True
linux_storage_swap:
plugin: swap
+ template: linux/files/collectd_swap.conf
+ report_bytes: True
diff --git a/linux/network/dpdk.sls b/linux/network/dpdk.sls
index 78d7ab2..6ddd856 100644
--- a/linux/network/dpdk.sls
+++ b/linux/network/dpdk.sls
@@ -109,6 +109,35 @@
- name: "ovs-vsctl add-br {{ interface_name }} -- set bridge {{ interface_name }} datapath_type=netdev"
- unless: "ovs-vsctl show | grep {{ interface_name }}"
+ {# OVS dpdk needs ip address for vxlan termination on bridge br-prv #}
+ {%- if interface.address is defined %}
+
+{# create override for openvswitch dependency for dpdk br-prv #}
+/etc/systemd/system/ifup@{{ interface_name }}.service.d/override.conf:
+ file.managed:
+ - require:
+ - cmd: linux_network_dpdk_bridge_interface_{{ interface_name }}
+ - contents: |
+ [Unit]
+ Requires=openvswitch-switch.service
+ After=openvswitch-switch.service
+
+{# enforce ip address and mtu for ovs dpdk br-prv #}
+/etc/network/interfaces.d/ifcfg-{{ interface_name }}:
+ file.managed:
+ - contents: |
+ auto {{ interface_name }}
+ iface {{ interface_name }} inet static
+ address {{ interface.address }}
+ netmask {{ interface.netmask }}
+ {%- if interface.mtu is defined %}
+ mtu {{ interface.mtu }}
+ {%- endif %}
+ - require:
+ - file: /etc/systemd/system/ifup@{{ interface_name }}.service.d/override.conf
+
+ {%- endif %}
+
{%- elif interface.type == 'dpdk_ovs_port' and interface.bridge is defined %}
linux_network_dpdk_bridge_port_interface_{{ interface_name }}:
@@ -118,8 +147,10 @@
- require:
- cmd: linux_network_dpdk_bridge_interface_{{ interface.bridge }}
- {# Multiqueue n_rxq setup on interfaces #}
- {%- elif interface.type == 'dpdk_ovs_port' and interface.n_rxq is defined %}
+ {# Multiqueue n_rxq and mtu setup on interfaces #}
+ {%- elif interface.type == 'dpdk_ovs_port' and (interface.n_rxq is defined or interface.mtu is defined) %}
+
+ {%- if interface.n_rxq is defined %}
linux_network_dpdk_bridge_port_interface_n_rxq_{{ interface_name }}:
cmd.run:
@@ -129,6 +160,18 @@
{%- endif %}
+ {%- if interface.mtu is defined %}
+
+{# MTU ovs dpdk setup on interfaces #}
+linux_network_dpdk_bridge_port_interface_mtu_{{ interface_name }}:
+ cmd.run:
+ - name: "ovs-vsctl set Interface {{ interface_name }} mtu_request={{ interface.mtu }} "
+ - unless: "ovs-vsctl get Interface {{ interface_name }} mtu_request | grep {{ interface.mtu }}"
+
+ {%- endif %}
+
+ {%- endif %}
+
{%- endfor %}
{%- endif %}