Whamcloud - gitweb
* The fix for 5541, which makes lconf chose the "best match" between peer IP
authoreeb <eeb>
Thu, 16 Jun 2005 02:34:52 +0000 (02:34 +0000)
committereeb <eeb>
Thu, 16 Jun 2005 02:34:52 +0000 (02:34 +0000)
    addresses broke other network types (ra, openib, iib, vib) that also need a
    host IP.  This change handles tcp networks (the only type which supports
    multiple IPs) with the 5541 fix and other appropriate network types are
    handled as before.

lustre/utils/lconf

index 6ba555b..63b341f 100755 (executable)
@@ -498,7 +498,11 @@ class LCTLInterface:
 
     def connect(self, srv):
         self.add_uuid(srv.net_type, srv.nid_uuid, srv.nid)
-        if srv.net_type  in ('tcp','openib','iib','vib','ra') and not config.lctl_dump:
+
+        if config.lctl_dump:
+            return
+
+        if srv.net_type  in ('tcp',):
             host = socket.gethostname()
             node_list = []
             if config.node:
@@ -535,6 +539,9 @@ class LCTLInterface:
                     break
 
             self.add_peer(srv.net_type, srv.nid, hostaddr, srv.port)
+            
+        if srv.net_type in ('openib','iib','vib','ra'):
+            self.add_peer(srv.net_type, srv.nid, srv.hostaddr[0], srv.port)
 
     # Recover a device
     def recover(self, dev_name, new_conn):