Workaround to keep connectivity to kvm* nodes after linux state
State linux.network.interface creates br_mgm with the same address
as on the DHCP management interface that is included into the bridge.
To keep the connectivity, let's remove the IP address from the
DHCP interface after the linux.network.interface state if exists.
Change-Id: Id5a4d7c5515219091f3e79acc254986a147eb602
Reviewed-on: https://review.gerrithub.io/365048
Reviewed-by: Dennis Dmitriev <dis.xcom@gmail.com>
Tested-by: Dennis Dmitriev <dis.xcom@gmail.com>
diff --git a/tcp_tests/templates/physical_mcp11_ovs_dpdk/salt.yaml b/tcp_tests/templates/physical_mcp11_ovs_dpdk/salt.yaml
index ffd1104..07cb8c7 100644
--- a/tcp_tests/templates/physical_mcp11_ovs_dpdk/salt.yaml
+++ b/tcp_tests/templates/physical_mcp11_ovs_dpdk/salt.yaml
@@ -218,7 +218,7 @@
- description: Run 'salt.master' formula on cfg01
cmd: timeout 120 salt --hard-crash --state-output=mixed --state-verbose=False
- -C 'I@salt:master' state.sls salt.master.service;
+ -C 'I@salt:master' state.sls salt.master;
node_name: {{ HOSTNAME_CFG01 }}
retry: {count: 2, delay: 5}
skip_fail: false
@@ -286,6 +286,14 @@
retry: {count: 1, delay: 5}
skip_fail: false
+
+- description: '*Workaround* Avoid reboot when IP addresses are doubled on interfaces and bridges at the same time. For test environments only!'
+ cmd: salt --hard-crash --state-output=mixed --state-verbose=False -C 'kvm*' cmd.run
+ "salt-call state.sls linux.network.interface && ls -1 /var/run/ | grep dhclient | awk -F'.' '{print \$2}' | xargs -I {} ifconfig {} 0.0.0.0"
+ node_name: {{ HOSTNAME_CFG01 }}
+ retry: {count: 3, delay: 5}
+ skip_fail: false
+
- description: Configure linux for present baremetal nodes
cmd: salt --hard-crash --state-output=mixed --state-verbose=False -C '* and not
cfg01*' state.sls linux