[dpdk] Remove invalid vhost options
[fuel.git] / mcp / patches / salt-formula-linux / 0005-network-RHEL-Set-bridge-for-member-interfaces.patch
1 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
2 : Copyright (c) 2019 Mirantis Inc., Enea AB and others.
3 :
4 : All rights reserved. This program and the accompanying materials
5 : are made available under the terms of the Apache License, Version 2.0
6 : which accompanies this distribution, and is available at
7 : http://www.apache.org/licenses/LICENSE-2.0
8 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
9 From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
10 Date: Tue, 11 Jun 2019 03:57:29 +0200
11 Subject: [PATCH] network: RHEL: Set bridge for member interfaces
12
13 For RHEL, bridge member interfaces need to be passed down the
14 bridge name, so lookup all bridges, find the one containing the
15 current interface (if any) and use it when calling
16 `network.managed`.
17
18 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
19 ---
20  linux/network/interface.sls | 11 +++++++++++
21  1 file changed, 11 insertions(+)
22
23 diff --git a/linux/network/interface.sls b/linux/network/interface.sls
24 index 11db5be..ccac6d7 100644
25 --- a/linux/network/interface.sls
26 +++ b/linux/network/interface.sls
27 @@ -303,6 +303,17 @@ linux_interface_{{ interface_name }}:
28      - cmd: ovs_port_up_{{ network }}
29      {%- endfor %}
30    {%- endif %}
31 +  {%- if grains.os_family == 'RedHat' %}
32 +    {%- set br_todo = [] %}
33 +    {%- for br_name, br_info in network.interface.items() %}
34 +      {%- if br_info.type == 'bridge' and interface_name in br_info.get('use_interfaces', []) %}
35 +        {%- do br_todo.append(br_info.get('name', br_name)) %}
36 +      {%- endif %}
37 +    {%- endfor %}
38 +    {%- if br_todo %}
39 +  - bridge: {{ br_todo | first }}
40 +    {%- endif %}
41 +  {%- endif %}
42    {%- if interface.type == 'bridge' %}
43    - bridge: {{ interface_name }}
44    - delay: 0