Merge "Added bond Dashboard"
diff --git a/README.rst b/README.rst
index ed21934..fea2e1a 100644
--- a/README.rst
+++ b/README.rst
@@ -1478,6 +1478,60 @@
enabled: true
type: dpdk_ovs_bridge
+**DPDK OVS LACP Bond with vlan tag**
+
+.. code-block:: yaml
+
+ linux:
+ network:
+ bridge: openvswitch
+ dpdk:
+ enabled: true
+ driver: uio
+ openvswitch:
+ pmd_cpu_mask: "0x6"
+ dpdk_socket_mem: "1024,1024"
+ dpdk_lcore_mask: "0x400"
+ memory_channels: "2"
+ interface:
+ eth3:
+ enabled: true
+ type: eth
+ proto: manual
+ name: ${_param:tenant_first_nic}
+ eth4:
+ enabled: true
+ type: eth
+ proto: manual
+ name: ${_param:tenant_second_nic}
+ dpdk0:
+ name: ${_param:tenant_first_nic}
+ pci: "0000:81:00.0"
+ driver: igb_uio
+ bond: bond1
+ enabled: true
+ type: dpdk_ovs_port
+ n_rxq: 2
+ dpdk1:
+ name: ${_param:tenant_second_nic}
+ pci: "0000:81:00.1"
+ driver: igb_uio
+ bond: bond1
+ enabled: true
+ type: dpdk_ovs_port
+ n_rxq: 2
+ bond1:
+ enabled: true
+ bridge: br-prv
+ type: dpdk_ovs_bond
+ mode: balance-slb
+ br-prv:
+ enabled: true
+ type: dpdk_ovs_bridge
+ tag: ${_param:tenant_vlan}
+ address: ${_param:tenant_address}
+ netmask: ${_param:tenant_network_netmask}
+
**DPDK OVS bridge for VXLAN**
If VXLAN is used as tenant segmentation then ip address must be set on br-prv
@@ -1496,6 +1550,25 @@
tag: 101
mtu: 9000
+
+
+**DPDK OVS bridge with Linux network interface**
+
+.. code-block:: yaml
+
+ linux:
+ network:
+ ...
+ interface:
+ eth0:
+ type: eth
+ ovs_bridge: br-prv
+ ...
+ br-prv:
+ enabled: true
+ type: dpdk_ovs_bridge
+ ...
+
Linux storage
-------------
diff --git a/linux/meta/prometheus.yml b/linux/meta/prometheus.yml
index 153705c..5d75f74 100644
--- a/linux/meta/prometheus.yml
+++ b/linux/meta/prometheus.yml
@@ -153,6 +153,16 @@
summary: 'Bond status interface {{ $labels.bond }} is DOWN on {{ $labels.host }}'
description: 'The bond interface ({{ $labels.bond }) has all ifaces in a down state on {{ $labels.host }}.'
{% endraw %}
+ BondSlaveInterfacesMinimum:
+ if: '(sum(bond_slave_status) BY (bond,host)) / (count(bond_slave_status) BY (bond,host)) <= 0.5'
+ {% raw %}
+ labels:
+ severity: critical
+ service: system
+ annotations:
+ summary: 'At least half of Bond slave interfaces {{ $labels.bond }} are DOWN on {{ $labels.host }}'
+ description: 'The bond interface ({{ $labels.bond }) has at least half of slave ifaces in a down state on {{ $labels.host }}.'
+ {% endraw %}
BondSlaveInterfaceStatus:
if: 'bond_slave_status < 1'
{% raw %}
diff --git a/linux/network/dpdk.sls b/linux/network/dpdk.sls
index 4b73f7f..fb2da30 100644
--- a/linux/network/dpdk.sls
+++ b/linux/network/dpdk.sls
@@ -111,7 +111,7 @@
linux_network_dpdk_bond_mode_{{ interface_name }}:
cmd.run:
- - name: "ovs-vsctl set port {{ interface_name }} bond_mode={{ interface.mode }}"
+ - name: "ovs-vsctl set port {{ interface_name }} bond_mode={{ interface.mode }}{%- if interface.mode == 'balance-slb' %} lacp=active{%- endif %}"
- unless: "ovs-appctl bond/show {{ interface_name }} | grep {{ interface.mode }}"
- require:
- cmd: linux_network_dpdk_bond_interface_{{ interface_name }}
diff --git a/linux/network/interface.sls b/linux/network/interface.sls
index 3e79847..fa37e5e 100644
--- a/linux/network/interface.sls
+++ b/linux/network/interface.sls
@@ -62,6 +62,25 @@
{%- set interface_name = interface.get('name', interface_name) %}
+{# add linux network interface into OVS dpdk bridge #}
+
+{%- if interface.type == 'dpdk_ovs_bridge' %}
+
+{%- for int_name, int in network.interface.items() %}
+
+{%- set int_name = int.get('name', int_name) %}
+
+{%- if int.ovs_bridge is defined and interface_name == int.ovs_bridge %}
+
+add_int_{{ int_name }}_to_ovs_dpdk_bridge_{{ interface_name }}:
+ cmd.run:
+ - unless: ovs-vsctl show | grep -w {{ int_name }}
+ - name: ovs-vsctl add-port {{ interface_name }} {{ int_name }}
+
+{%- endif %}
+{%- endfor %}
+{%- endif %}
+
{# it is not used for any interface with type preffix dpdk,eg. dpdk_ovs_port #}
{%- if interface.get('managed', True) and not 'dpdk' in interface.type %}
diff --git a/tests/pillar/network_openvswitch_dpdk.sls b/tests/pillar/network_openvswitch_dpdk.sls
index d4e6785..be8ed98 100644
--- a/tests/pillar/network_openvswitch_dpdk.sls
+++ b/tests/pillar/network_openvswitch_dpdk.sls
@@ -20,6 +20,11 @@
name: "openvswitch-vhost"
path: "/run/openvswitch-vhost"
interface:
+ eth0:
+ enabled: true
+ type: eth
+ proto: manual
+ ovs_bridge: br-prv
dpdk0:
name: enp5s0f1
pci: "0000:05:00.1"
@@ -34,14 +39,39 @@
bond: dpdkbond0
enabled: true
type: dpdk_ovs_port
+ dpdk2:
+ name: enp6s0f1
+ pci: "0000:06:00.1"
+ driver: igb_uio
+ bond: dpdkbond1
+ enabled: true
+ type: dpdk_ovs_port
+ dpdk3:
+ name: enp6s0f2
+ pci: "0000:06:00.2"
+ driver: igb_uio
+ bond: dpdkbond1
+ enabled: true
+ type: dpdk_ovs_port
dpdkbond0:
enabled: true
bridge: br-prv
type: dpdk_ovs_bond
mode: active-backup
+ dpdkbond1:
+ enabled: true
+ bridge: br-mesh
+ type: dpdk_ovs_bond
+ mode: balance-slb
br-prv:
enabled: true
type: dpdk_ovs_bridge
+ br-mesh:
+ tag: 1302
+ enabled: true
+ type: dpdk_ovs_bridge
+ address: 1.2.3.4
+ netmask: 255.255.255.252
dummy0:
enabled: true
name: dummy0