aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rumba/prototypes/ouroboros.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/rumba/prototypes/ouroboros.py b/rumba/prototypes/ouroboros.py
index 03f94eb..97abb21 100644
--- a/rumba/prototypes/ouroboros.py
+++ b/rumba/prototypes/ouroboros.py
@@ -267,8 +267,20 @@ class Experiment(mod.Experiment):
for e in el:
ipcp = e['src']
cmd = "irm i conn n " + ipcp.name + " dst " + e['dst'].name
-
- ipcp.node.execute_command(cmd, time_out=None)
+ retry = 0
+ max_retries = 3
+ while retry < max_retries:
+ time.sleep(retry * 5)
+ try:
+ ipcp.node.execute_command(cmd, time_out=None)
+ break
+ except Exception as e:
+ retry += 1
+ logger.error('Failed to connect IPCP, retrying: ' +
+ str(retry) + '/' + str(max_retries) +
+ ' retries')
+ if retry == max_retries:
+ raise Exception('Failed to connect IPCP')
def _install_prototype(self):
logger.info("Installing Ouroboros...")