Ack from me.
Not tested.

/AndersBj 

-----Original Message-----
From: reddy.neelaka...@oracle.com [mailto:reddy.neelaka...@oracle.com] 
Sent: den 23 januari 2015 14:04
To: Anders Björnerstedt
Cc: opensaf-devel@lists.sourceforge.net
Subject: [PATCH 1 of 1] imm: exit the pbe when the verification of class 
returns TRY_AGAIN [#1245]

 osaf/libs/common/immsv/immpbe_dump.cc |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)


when IMMND is down TRY_AGAIN is returned for classdescripton. with this error 
imm.db will be Renamed form imm.db to imm.db.failed_immdump. when the node 
reboots and comes up node will come up with default imm.xml instead of PBE.

The solution is to exit immpbed when classdescripton returns TRY_AGAIN.Because, 
cl_node->isPbe is set only when implementer is set. Implementer is set only 
when verification of classes is success when the PBE is re-attached.

diff --git a/osaf/libs/common/immsv/immpbe_dump.cc 
b/osaf/libs/common/immsv/immpbe_dump.cc
--- a/osaf/libs/common/immsv/immpbe_dump.cc
+++ b/osaf/libs/common/immsv/immpbe_dump.cc
@@ -1192,8 +1192,10 @@ static ClassInfo* verifyClassPBE(std::st
                &attrDefinitions);
 
        if(errorCode != SA_AIS_OK) {
-               TRACE_4("Failed to get class description for class %s from imm",
-                       classNameString.c_str());
+               TRACE_4("Failed to get class description for class %s from imm 
with error=%d",
+                       classNameString.c_str(), errorCode);
+               if(errorCode == SA_AIS_ERR_TRY_AGAIN)
+                       exit(1);
                goto bailout;
        }
 

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to