From 2e259679732ed4e0464992b4cae04a4cf4d88000 Mon Sep 17 00:00:00 2001 From: Martin Klozik Date: Fri, 20 May 2016 13:24:15 +0100 Subject: bugfix: Remove dependency on ifconfig VSPERF uses ifconfig at several places to bring up a networking interface. However ifconfig has been deprecated by iproute2 package and it is not available in standard installation of many Linux distributions. Thus all calls of ifconfig have been replaced by call of 'ip' tool. Change-Id: I935eaf85b6082e4641d12cffea3e0882c634e5ea JIRA: VSPERF-299 Signed-off-by: Martin Klozik Reviewed-by: Maryam Tahhan Reviewed-by: Al Morton Reviewed-by: Christian Trautman Reviewed-by: Brian Castelli --- vswitches/ovs_vanilla.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'vswitches') diff --git a/vswitches/ovs_vanilla.py b/vswitches/ovs_vanilla.py index a6b720ae..89023a79 100644 --- a/vswitches/ovs_vanilla.py +++ b/vswitches/ovs_vanilla.py @@ -94,8 +94,10 @@ class OvsVanilla(IVSwitchOvs): params = [] # For PVP only - tasks.run_task(['sudo', 'ifconfig', port_name, '0'], + tasks.run_task(['sudo', 'ip', 'addr', 'flush', 'dev', port_name], self._logger, 'Remove IP', False) + tasks.run_task(['sudo', 'ip', 'link', 'set', 'dev', port_name, 'up'], + self._logger, 'Bring up ' + port_name, False) of_port = bridge.add_port(port_name, params) self._current_id += 1 @@ -119,7 +121,9 @@ class OvsVanilla(IVSwitchOvs): tap_name, 'mode', 'tap'], self._logger, 'Creating tap device...', False) - tasks.run_task(['sudo', 'ifconfig', tap_name, '0'], + tasks.run_task(['sudo', 'ip', 'addr', 'flush', 'dev', tap_name], + self._logger, 'Remove IP', False) + tasks.run_task(['sudo', 'ip', 'link', 'set', 'dev', tap_name, 'up'], self._logger, 'Bring up ' + tap_name, False) bridge = self._bridges[switch_name] -- cgit 1.2.3-korg