diff options
Diffstat (limited to 'rumba/prototypes/ouroboros.py')
-rw-r--r-- | rumba/prototypes/ouroboros.py | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/rumba/prototypes/ouroboros.py b/rumba/prototypes/ouroboros.py index 643754f..1ca5e6d 100644 --- a/rumba/prototypes/ouroboros.py +++ b/rumba/prototypes/ouroboros.py @@ -169,9 +169,7 @@ class Experiment(mod.Experiment): "git clone -b " + self.git_branch + " " + self.git_repo + \ " " + fs_loc, "cd " + fs_loc + " && mkdir build && cd build && " + - "cmake -DCMAKE_BUILD_TYPE=Debug -DIPCP_FLOW_STATS=True " + - "-DCONNECT_TIMEOUT=60000 -DIPCP_CONN_WAIT_DIR=True " + - "-DREG_TIMEOUT=60000 -DQUERY_TIMEOUT=4000 .. && " + + "cmake .. && " + "sudo make install -j$(nproc)"] names = [] @@ -199,7 +197,7 @@ class Experiment(mod.Experiment): if isinstance(self.testbed, local.Testbed): cmd += " type local layer " + ipcp.dif.name else: - cmd += " type eth-llc dev " + ipcp.ifname + cmd += " type eth-dix dev " + ipcp.ifname cmd += " layer " + ipcp.dif.name elif isinstance(ipcp.dif, mod.NormalDIF): cmd += " type normal" @@ -299,10 +297,28 @@ class Experiment(mod.Experiment): logger.info("All done, have fun!") - def _terminate_prototype(self): + def _terminate_prototype(self, force=False): + cmds = list() + + if force: + kill = 'killall -9 ' + cmds.append(kill + 'irmd') + cmds.append(kill + 'ipcpd-normal') + cmds.append(kill + 'ipcpd-shim-eth-llc') + cmds.append(kill + 'ipcpd-local') + cmds.append('kill -9 $(ps axjf | grep \'sudo irmd\' ' + '| grep -v grep | cut -f4 -d " "') + else: + cmds.append('killall -15 irmd') + + logger.info("Killing Ouroboros...") if isinstance(self.testbed, local.Testbed): - logger.info("Killing IRMd...") - subprocess.check_call('sudo killall -15 irmd'.split()) + cmds = list(map(lambda c: "sudo %s" % (c,), cmds)) + for cmd in cmds: + subprocess.check_call(cmd.split()) + else: + for node in self.nodes: + node.execute_commands(cmds, time_out=None, as_root=True) def destroy_dif(self, dif): for ipcp in dif.ipcps: |