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