Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discovery fails on broken links #7

Open
shurickdaryin opened this issue Sep 4, 2012 · 2 comments
Open

Discovery fails on broken links #7

shurickdaryin opened this issue Sep 4, 2012 · 2 comments

Comments

@shurickdaryin
Copy link

Hi, Jason!

If a bad link is encountered, the subnet discovery fails with an exception. Here is a simple patch to ignore bad links.

Best regards,
Alexander Daryin

@shurickdaryin
Copy link
Author

--- discovery.py    2012-08-28 16:38:26.000000000 +0400
+++ discovery2.py   2012-08-31 21:21:55.294313560 +0400
@@ -1,5 +1,6 @@
 # Copyright 2011 Obsidian Research Corp. GPLv2, see COPYING.
 import rdma;
+import logging;
 import collections;
 import rdma.path;
 import rdma.satransactor;
@@ -319,7 +320,12 @@
     def do_node(self,path,depth=0,peer=None):
         """Coroutine to get the :class:`~rdma.IBA.SMPNodeInfo` and scan all the
         port infos."""
-        ninf = yield self.sched.SubnGet(IBA.SMPNodeInfo,path);
+        try:
+            ninf = yield self.sched.SubnGet(IBA.SMPNodeInfo,path);
+        except rdma.RDMAError as err:
+            logging.error(err) 
+            return
+
         node,port = self.sbn.get_node_ninf(ninf,path);

         if isinstance(node,rdma.subnet.Switch):

@jgunthorpe
Copy link
Owner

This seems like a good improvement until a generally more complete way of handling discovery errors could be implemented. What I had in mind was removing all the failed links from the main topology and keeping a separate list of failed links for later reporting..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants