Skip to content

Commit 8000058

Browse files
committed
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 <[email protected]>
1 parent ef291d3 commit 8000058

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

linux/network/interface.sls

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,10 @@ ovs_port_up_{{ interface_name }}:
146146
- file: ovs_port_{{ interface_name }}_line2
147147
- openvswitch_bridge: ovs_bridge_{{ interface.bridge }}
148148
- file: linux_interfaces_final_include
149+
{%- if interface.route is defined %}
150+
- unless:
151+
- ip link show {{ interface_name }} | grep -q '\<UP\>'
152+
{% endif %}
149153
150154
{%- endif %}
151155

0 commit comments

Comments
 (0)