osaf/services/saf/amf/amfd/main.cc |  8 ++++++++
 osaf/services/saf/amf/amfd/role.cc |  5 -----
 2 files changed, 8 insertions(+), 5 deletions(-)


With the introduction of spares support #79, all services were modified to wait 
for AMF role assignment
to register with MDS and proceed further with their lifecycle.
However, this is not necessary and would create a problem of 1781.
i.e. All services should ideally register with CLM independent of their HA 
roles as provided by AMF or RDA.
But ofcourse until now only AMF, EVT, CKPT, MSG, NTF, SMF have been integrated 
with CLM.
This patch makes the services register with CLM before entering the wait() for 
AMF role.
NTF service is already handling this correctly.
This is also necessary to make OpenSAF services run - without abort, on nodes 
that are administratively
locked/shutdown via CLM node admin commands.
A separate patch for SMF follow.

diff --git a/osaf/services/saf/amf/amfd/main.cc 
b/osaf/services/saf/amf/amfd/main.cc
--- a/osaf/services/saf/amf/amfd/main.cc
+++ b/osaf/services/saf/amf/amfd/main.cc
@@ -576,6 +576,14 @@ static uint32_t initialize(void)
                goto done;
        }
 
+       // CLM init is independent of this SC's role. Init with CLM early.
+
+       if (avd_clm_init() != SA_AIS_OK) {
+               LOG_EM("avd_clm_init FAILED");
+               rc = NCSCC_RC_FAILURE;
+               goto done;
+       }
+
        if ((rc = initialize_for_assignment(cb, role))
                != NCSCC_RC_SUCCESS) {
                LOG_ER("initialize_for_assignment FAILED %u", (unsigned) rc);
diff --git a/osaf/services/saf/amf/amfd/role.cc 
b/osaf/services/saf/amf/amfd/role.cc
--- a/osaf/services/saf/amf/amfd/role.cc
+++ b/osaf/services/saf/amf/amfd/role.cc
@@ -194,11 +194,6 @@ uint32_t initialize_for_assignment(cl_cb
                LOG_ER("avsv_mbcsv_register FAILED");
                goto done;
        }
-       if (avd_clm_init() != SA_AIS_OK) {
-               LOG_EM("avd_clm_init FAILED");
-               rc = NCSCC_RC_FAILURE;
-               goto done;
-       }
        if (avd_imm_init(cb) != SA_AIS_OK) {
                LOG_ER("avd_imm_init FAILED");
                rc = NCSCC_RC_FAILURE;

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to