aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@ugent.be>2017-09-04 18:41:34 +0200
committerSander Vrijders <sander.vrijders@ugent.be>2017-09-04 18:41:34 +0200
commit29efe42e64f50c69a0622a8403de72882a2495fe (patch)
tree43f33cec478e3f82bb0925b4627504a0be9fca83
parentf3f51c550ef9751bada8ffcd4d4e846c786a26e0 (diff)
downloadrumba-29efe42e64f50c69a0622a8403de72882a2495fe.tar.gz
rumba-29efe42e64f50c69a0622a8403de72882a2495fe.zip
testbeds: qemu: Add dev option to ip link set
If the dev option is omitted, the command may fail on short names that resemble options.
-rw-r--r--rumba/testbeds/qemu.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/rumba/testbeds/qemu.py b/rumba/testbeds/qemu.py
index 3d30ce2..7e07ec9 100644
--- a/rumba/testbeds/qemu.py
+++ b/rumba/testbeds/qemu.py
@@ -97,7 +97,7 @@ class Testbed(mod.Testbed):
ipcp.ifname = output
ssh_support.execute_command(
self, node.ssh_config,
- "ip link set %(ifname)s up"
+ "ip link set dev %(ifname)s up"
% {'ifname': ipcp.ifname})
def swap_in(self, experiment):
@@ -153,7 +153,7 @@ class Testbed(mod.Testbed):
ipcps = shim.ipcps
command_list = []
command_list += ('sudo brctl addbr %(br)s\n'
- 'sudo ip link set %(br)s up'
+ 'sudo ip link set dev %(br)s up'
% {'br': shim.name}
).split('\n')
for node in shim.members: # type:mod.Node
@@ -163,7 +163,7 @@ class Testbed(mod.Testbed):
tap_id = '%s.%02x' % (name, port_id)
command_list += ('sudo ip tuntap add mode tap name %(tap)s\n'
- 'sudo ip link set %(tap)s up\n'
+ 'sudo ip link set dev %(tap)s up\n'
'sudo brctl addif %(br)s %(tap)s'
% {'tap': tap_id, 'br': shim.name}
).split('\n')
@@ -361,7 +361,7 @@ class Testbed(mod.Testbed):
commands = []
commands += ('sudo brctl delif %(br)s %(tap)s\n'
- 'sudo ip link set %(tap)s down\n'
+ 'sudo ip link set dev %(tap)s down\n'
'sudo ip tuntap del mode tap name %(tap)s'
% {'tap': tap, 'br': shim.name}
).split('\n')
@@ -399,7 +399,7 @@ class Testbed(mod.Testbed):
for shim in self.shims:
commands = []
- commands += ('sudo ip link set %(br)s down\n'
+ commands += ('sudo ip link set dev %(br)s down\n'
'sudo brctl delbr %(br)s'
% {'br': shim.name}
).split('\n')