From cc6c27b185ae77e4d214c431a28475bbf66899ef Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Wed, 7 Feb 2018 13:50:33 +0100 Subject: testbeds: Fix local message in jFed testbed Setting the locale sometimes prevented the warning being shown. This disables the warning alltogether. --- rumba/testbeds/jfed.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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)) -- cgit v1.2.3 From 4eec90092d0258b0fcc8da3f20d94e676501b50c Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Mon, 12 Feb 2018 14:54:18 +0100 Subject: examples: Fix Converged Operator example There were some bad registrations in the core. Some rearrangements in other registrations for consistency. --- examples/converged-operator-network.py | 39 +++++++++++++++++----------------- 1 file changed, 19 insertions(+), 20 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) -- cgit v1.2.3 From efbdb92d5376c619e6941787a3d961f32d6bca8b Mon Sep 17 00:00:00 2001 From: Sander Vrijders Date: Mon, 12 Feb 2018 15:42:53 +0100 Subject: prototypes: Fix registration in Ouroboros plugin Registration was being done before the bootstrapped IPCP was actually reachable over the N-1 layer. This only does the registration once the layer below is fully connected. --- rumba/prototypes/ouroboros.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) 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 -- cgit v1.2.3