[openib-general] RE: [PATCH] osm_lid_mgr.c : exit only if exit_on_fatal in case of corrupted guid2lid file

Ofer Gigi oferg at mellanox.co.il
Mon May 1 01:28:11 PDT 2006


Hi Hal,
Please apply to trunk and branch.

Thanks!
Ofer

-----Original Message-----
From: Ofer Gigi 
Sent: Monday, May 01, 2006 11:23 AM
To: 'openib-general at openib.org'
Cc: 'halr at voltaire.com'
Subject: [PATCH] osm_lid_mgr.c : exit only if exit_on_fatal in case of
corrupted guid2lid file

Hi Hal,

The default of opensm is to exit_on_fatal.
However, opensm can overcome sometimes fatal errors.
One of this errors is a corrupted guid2lid file. 
Therefore, if you want opensm to overcome this problem you can use
 -y option (don't exit 
on fatal) and opensm won't exit in case of a corrupted guid2lid file -
 it will just put an error in the log.

Thanks

Ofer G.

Signed-off-by:  Ofer Gigi <oferg at mellanox.co.il>

Index: osm_lid_mgr.c
===================================================================
--- osm_lid_mgr.c	(revision 6640)
+++ osm_lid_mgr.c	(working copy)
@@ -304,11 +304,19 @@ osm_lid_mgr_init(
   {
     if (osm_db_restore(p_mgr->p_g2l))
     {
+      if (p_subn->opt.exit_on_fatal) 
+      {
+        osm_log( p_mgr->p_log, OSM_LOG_SYS,
+                 "Fatal: Error restoring Guid-to-Lid persistent
database\n" );
+        status = IB_ERROR;
+        goto Exit;
+      }
+      else
+      {
       osm_log( p_mgr->p_log, OSM_LOG_ERROR,
                "osm_lid_mgr_init: ERR 0317: "
                "Error restoring Guid-to-Lid persistent database\n");
-      status = IB_ERROR;
-      goto Exit;
+      }
     }
 
     /* we need to make sure we did not get duplicates with




More information about the general mailing list