aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@ugent.be>2018-02-12 15:42:53 +0100
committerSander Vrijders <sander.vrijders@ugent.be>2018-02-12 15:42:53 +0100
commitefbdb92d5376c619e6941787a3d961f32d6bca8b (patch)
treec8169576ab28bc451d078b86ca9c4996ee6eefb2
parent4eec90092d0258b0fcc8da3f20d94e676501b50c (diff)
downloadrumba-efbdb92d5376c619e6941787a3d961f32d6bca8b.tar.gz
rumba-efbdb92d5376c619e6941787a3d961f32d6bca8b.zip
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.
-rw-r--r--rumba/prototypes/ouroboros.py13
1 files 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