diff options
author | Sander Vrijders <sander.vrijders@ugent.be> | 2018-02-12 17:07:22 +0100 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@ugent.be> | 2018-02-12 17:07:22 +0100 |
commit | 4066c5f649f6837fdf9e8d3c249af0dfab69e36a (patch) | |
tree | 2eb3ab1e488d159c9e3d2e0950e21c16da6f96f7 | |
parent | 1c31de63fc0410c2c9a2383d7196f2f68ca63fab (diff) | |
parent | efbdb92d5376c619e6941787a3d961f32d6bca8b (diff) | |
download | rumba-4066c5f649f6837fdf9e8d3c249af0dfab69e36a.tar.gz rumba-4066c5f649f6837fdf9e8d3c249af0dfab69e36a.zip |
Merge branch 'master' into testing
-rwxr-xr-x | examples/converged-operator-network.py | 39 | ||||
-rw-r--r-- | rumba/prototypes/ouroboros.py | 13 | ||||
-rw-r--r-- | rumba/testbeds/jfed.py | 11 |
3 files changed, 38 insertions, 25 deletions
diff --git a/examples/converged-operator-network.py b/examples/converged-operator-network.py index b3d4a54..6242e31 100755 --- a/examples/converged-operator-network.py +++ b/examples/converged-operator-network.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # Initial scale experiment for converged operator network -# (ARCFIRE T4.2) +# (ARCFIRE T4.3) from rumba.model import * from rumba.storyboard import * @@ -34,7 +34,6 @@ f1e3 = ShimEthDIF("f1e3") l1e1 = ShimEthDIF("l1e1") -m1f2 = ShimEthDIF("m1f2") m1f1 = ShimEthDIF("m1f1") m1e1 = ShimEthDIF("m1e1") @@ -79,8 +78,8 @@ f1n1 = Node("f1n1", dif_registrations = {f1 : [f1e3], n1: [f1]}) f1n2 = Node("f1n2", - difs = [f1, m1f2, f1e1, f1e2, f1e3], - dif_registrations = {f1: [m1f2, f1e1, f1e2, f1e3]}) + difs = [f1, f1e1, f1e2, f1e3, m1f1], + dif_registrations = {f1: [f1e1, f1e2, f1e3, m1f1]}) f1n3 = Node("f1n3", difs = [n1, f1, f1e1], @@ -115,9 +114,9 @@ m1n5 = Node("m1n5", difs = [m1, m1e4, m1e5], dif_registrations = {m1: [m1e4, m1e5]}) m1n6 = Node("m1n6", - difs = [m1, f1, m1e5, m1e6, m1f2, n1], + difs = [n1, m1, f1, m1e5, m1e6, m1f1], dif_registrations = {m1: [m1e5, m1e6], - f1: [m1f2], n1: [f1, m1]}) + f1: [m1f1], n1: [f1, m1]}) m2n1 = Node("m2n1", difs = [m2, m2e1, m2e6], @@ -151,20 +150,20 @@ m3n4 = Node("m3n4", difs = [m3, m3e3, m3e4, m3c2], dif_registrations = {m3: [m3e3, m3e4, m3c2]}) m3n5 = Node("m3n5", - difs = [n1, m3, m3e4, m3e5], - dif_registrations = {m3: [m3e4, m3e5], n1: [m3]}) + difs = [m3, m3e4, m3e5], + dif_registrations = {m3: [m3e4, m3e5]}) m3n6 = Node("m3n6", - difs = [m3, m3e5, m3e6, n1], - dif_registrations = {m3: [m3e5, m3e6], n1: [m3]}) + difs = [m3, m3e5, m3e6], + dif_registrations = {m3: [m3e5, m3e6]}) c1n1 = Node("c1n1", difs = [n1, c1, m1, m2, m1c1, m2c1, c1e1, c1e4], - dif_registrations = {c1: [c1e1, c1e4], m1: [m1c1, c1], - m2: [m2c1, c1], n1: [m1, m2]}) + dif_registrations = {c1: [c1e1, c1e4], m1: [c1, m1c1], + m2: [c1, m2c1], n1: [m1, m2]}) c1n2 = Node("c1n2", difs = [n1, c1, m2, m3, m2c2, m3c1, c1e1, c1e2], - dif_registrations = {c1: [c1e1, c1e2], m2: [m2c2, m3c1], m3: [c1, m2c2], - n1: [m2, m3]}) + dif_registrations = {c1: [c1e1, c1e2], m2: [c1, m2c2], + m3: [c1, m3c1], n1: [m2, m3]}) c1n3 = Node("c1n3", difs = [n1, c1, m3, m3c2, c1e2, c1e3], dif_registrations = {c1: [c1e2, c1e3], m3: [c1, m3c2], n1: [m3]}) @@ -172,18 +171,18 @@ c1n4 = Node("c1n4", difs = [n1, c1, m1, m1c2, c1e3, c1e4], dif_registrations = {c1: [c1e3, c1e4], m1: [c1, m1c2], n1: [m1]}) -tb = jfed.Testbed(exp_name = "arcfiret42", +tb = jfed.Testbed(exp_name = "arcfiret43", proj_name = "ARCFIRE", cert_file = "/home/dstaesse/jfed/cert.pem", authority = "exogeni.net", username = "dstaesse") exp = rl.Experiment(tb, nodes = [f1n1, f1n2, f1n3, f1n4, - l1n1, l1n2, - m1n1, m1n2, m1n3, m1n4, m1n5, m1n6, - m2n1, m2n2, m2n3, m2n4, m2n5, m2n6, - m3n1, m3n2, m3n3, m3n4, m3n5, m3n6, - c1n1, c1n2, c1n3, c1n4]) + l1n1, l1n2, + m1n1, m1n2, m1n3, m1n4, m1n5, m1n6, + m2n1, m2n2, m2n3, m2n4, m2n5, m2n6, + m3n1, m3n2, m3n3, m3n4, m3n5, m3n6, + c1n1, c1n2, c1n3, c1n4]) print(exp) diff --git a/rumba/prototypes/ouroboros.py b/rumba/prototypes/ouroboros.py index 17a91df..653c486 100644 --- a/rumba/prototypes/ouroboros.py +++ b/rumba/prototypes/ouroboros.py @@ -39,6 +39,7 @@ logger = log.get_logger(__name__) class Experiment(mod.Experiment): def __init__(self, testbed, nodes=None): mod.Experiment.__init__(self, testbed, nodes) + self.r_ipcps = dict() @staticmethod def make_executor(node, packages, testbed): @@ -117,8 +118,8 @@ class Experiment(mod.Experiment): continue cmds.append(cmd) - for cmd in cmds2: - cmds.append(cmd) + # Postpone registrations + self.r_ipcps[ipcp] = cmds2 ssh.execute_commands(self.testbed, node.ssh_config, cmds, time_out=None) @@ -127,6 +128,14 @@ class Experiment(mod.Experiment): for e in el: ipcp = e['enrollee'] cmds = list() + + # Execute postponed registration + if e['enroller'] in self.r_ipcps: + ssh.execute_commands(self.testbed, + e['enroller'].node.ssh_config, + self.r_ipcps[e['enroller']], time_out=None) + self.r_ipcps.pop(e['enroller'], None) + cmd = "irm r n " + ipcp.name for dif_b in e['enrollee'].node.dif_registrations[ipcp.dif]: cmd += " layer " + dif_b.name diff --git a/rumba/testbeds/jfed.py b/rumba/testbeds/jfed.py index 94a06e5..5fdde99 100644 --- a/rumba/testbeds/jfed.py +++ b/rumba/testbeds/jfed.py @@ -269,6 +269,11 @@ class Testbed(mod.Testbed): node_n.ssh_config, "sudo locale-gen en_US.UTF-8 || true") + ssh_support.execute_command( + self, + node_n.ssh_config, + "sudo touch /var/lib/cloud/instance/locale-check.skip || true") + for intf in intfs: aux_mac_address = intf.getAttribute("mac_address") @@ -300,9 +305,9 @@ class Testbed(mod.Testbed): if self.if_id[ipcp] == i_name: ipcp.ifname = ifname if ifname is None or ifname == "": - logger.error("Could not determine name of node" - "%s interface %s" - % (node_n.name, mac)) + raise Exception("Could not determine name of " + "node %s interface %s" + % (node_n.name, mac)) else: logger.debug("Node %s interface %s has name %s." % (node_n.name, mac, ifname)) |