From ac8d1b9e0fa7b95a440f6537423dec74ba131dd3 Mon Sep 17 00:00:00 2001 From: Saravanan KR Date: Fri, 17 Jul 2020 18:46:31 +0530 Subject: [PATCH] Avoid openvswitch restarts during re-run For offload configuration on the first time, opevswitch need to be restarted after the interface configured to switchdev mode to enable VF-LAG. But once it is configured, openvswitch should not be restarted, which will create VF-LAG failures. In general, in the TripleO during updates/upgrades, ovs restart will not be triggered and it will be allowed to the user to restart or reboot the node. Aligning with it, opevswitch restart has been avoided on all os-net-config re-runs. Closes-Bug: #1887957 Change-Id: I0a3b374b321ba039c8e0b1c126ac3eb59e6dc980 (cherry picked from commit 4c95f7d08732d8e4f4b865e8c119dee87b8196eb) --- os_net_config/cli.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/os_net_config/cli.py b/os_net_config/cli.py index c44c4c3e..b532e06d 100644 --- a/os_net_config/cli.py +++ b/os_net_config/cli.py @@ -320,9 +320,15 @@ def main(argv=sys.argv): pf_files_changed = provider.apply(cleanup=opts.cleanup, activate=not opts.no_activate) if not opts.noop: + restart_ovs = bool(sriovpf_member_of_bond_ovs_port_list) + # Avoid ovs restart for os-net-config re-runs, which will + # dirupt the offload configuration + if os.path.exists(utils._SRIOV_CONFIG_SERVICE_FILE): + restart_ovs = False + utils.configure_sriov_pfs( execution_from_cli=True, - restart_openvswitch=bool(sriovpf_member_of_bond_ovs_port_list)) + restart_openvswitch=restart_ovs) for iface_json in iface_array: # All objects other than the sriov_pf will be added here.