Hi, Thanks for your response. If that is the case please move ticket to accepted state.
Thanks, Praveen On 06-Jul-16 8:58 AM, Vo Minh Hoang wrote: > Dear Praveen, > > I am sorry to say that after applying #1818, this problem still occur in the > same phenomenon. > The occur rate is small when we run testing with many nodes and low device > capability. > > This patch is try to handle problem by a work around way. > I myself find it is not good patch. > So please ignore this patch, I will submit a better one after more deeply > investigating. > > Thank you and best regards, > Hoang > > -----Original Message----- > From: praveen malviya [mailto:praveen.malv...@oracle.com] > Sent: Tuesday, July 5, 2016 3:57 PM > To: Hoang Vo <hoang.m...@dektech.com.au> > Cc: opensaf-devel@lists.sourceforge.net > Subject: Re: [PATCH 1 of 1] ntf: Issue of using mds_dn event in ntfd [#1895] > > Hi, > > The error reported in error_trace.txt is already fixed in #1818. > So what problem is being solved in this ticket and how to reproduce it. > > > Thanks, > Praveen > > > On 24-Jun-16 9:24 AM, Hoang Vo wrote: >> osaf/libs/agents/saf/ntfa/ntfa.h | 2 +- >> osaf/libs/agents/saf/ntfa/ntfa_api.c | 5 +++-- >> osaf/libs/agents/saf/ntfa/ntfa_util.c | 4 +++- >> osaf/libs/common/ntfsv/include/ntfsv_msg.h | 1 + >> osaf/services/saf/ntfsv/ntfs/NtfAdmin.cc | 12 ++++++++---- >> osaf/services/saf/ntfsv/ntfs/ntfs_com.c | 4 ++-- >> osaf/services/saf/ntfsv/ntfs/ntfs_evt.c | 7 +++++-- >> osaf/services/saf/ntfsv/ntfs/ntfs_mds.c | 2 +- >> 8 files changed, 24 insertions(+), 13 deletions(-) >> >> >> This patch fix the problem: mds_dn event doesn't mean that mds_dest is not > used now so ntfs server could not use this event to clean up client list. >> Fixing actions: >> Do not clean up client list when receive mds_dn Clean up part of >> client list when receive initialize Clean up part of client list when >> cannot actively send message to client >> >> diff --git a/osaf/libs/agents/saf/ntfa/ntfa.h >> b/osaf/libs/agents/saf/ntfa/ntfa.h >> --- a/osaf/libs/agents/saf/ntfa/ntfa.h >> +++ b/osaf/libs/agents/saf/ntfa/ntfa.h >> @@ -166,7 +166,7 @@ extern uint32_t ntfa_mds_msg_async_send( extern >> void ntfsv_ntfa_evt_free(struct ntfsv_msg *); >> >> /* ntfa_init.c */ >> -extern unsigned int ntfa_startup(void); >> +extern unsigned int ntfa_startup(uint32_t* use_count); >> extern unsigned int ntfa_shutdown(bool forced); >> >> /* ntfa_hdl.c */ >> diff --git a/osaf/libs/agents/saf/ntfa/ntfa_api.c >> b/osaf/libs/agents/saf/ntfa/ntfa_api.c >> --- a/osaf/libs/agents/saf/ntfa/ntfa_api.c >> +++ b/osaf/libs/agents/saf/ntfa/ntfa_api.c >> @@ -1212,7 +1212,7 @@ SaAisErrorT saNtfInitialize(SaNtfHandleT >> ntfa_client_hdl_rec_t *ntfa_hdl_rec; >> ntfsv_msg_t i_msg, *o_msg = NULL; >> SaAisErrorT rc; >> - uint32_t client_id, mds_rc; >> + uint32_t client_id, mds_rc, use_count; >> >> TRACE_ENTER(); >> >> @@ -1222,7 +1222,7 @@ SaAisErrorT saNtfInitialize(SaNtfHandleT >> goto done; >> } >> >> - if ((rc = ntfa_startup()) != NCSCC_RC_SUCCESS) { >> + if ((rc = ntfa_startup(&use_count)) != NCSCC_RC_SUCCESS) { >> TRACE("ntfa_startup FAILED"); >> rc = SA_AIS_ERR_LIBRARY; >> goto done; >> @@ -1257,6 +1257,7 @@ SaAisErrorT saNtfInitialize(SaNtfHandleT >> i_msg.type = NTFSV_NTFA_API_MSG; >> i_msg.info.api_info.type = NTFSV_INITIALIZE_REQ; >> i_msg.info.api_info.param.init.version = *version; >> + i_msg.info.api_info.param.init.count = use_count; >> >> /* Send a message to NTFS to obtain a client_id/server ref id which > is cluster >> * wide unique. >> diff --git a/osaf/libs/agents/saf/ntfa/ntfa_util.c >> b/osaf/libs/agents/saf/ntfa/ntfa_util.c >> --- a/osaf/libs/agents/saf/ntfa/ntfa_util.c >> +++ b/osaf/libs/agents/saf/ntfa/ntfa_util.c >> @@ -598,7 +598,7 @@ static uint32_t ntfa_hdl_cbk_dispatch_bl >> * >> * @return unsigned int >> */ >> -unsigned int ntfa_startup(void) >> +unsigned int ntfa_startup(uint32_t* use_count) >> { >> unsigned int rc = NCSCC_RC_SUCCESS; >> pthread_mutex_lock(&ntfa_lock); >> @@ -607,6 +607,7 @@ unsigned int ntfa_startup(void) >> if (ntfa_use_count > 0) { >> /* Already created, just increment the use_count */ >> ntfa_use_count++; >> + *use_count = ntfa_use_count; >> goto done; >> } else { >> if ((rc = ncs_agents_startup()) != NCSCC_RC_SUCCESS) { @@ > -619,6 >> +620,7 @@ unsigned int ntfa_startup(void) >> goto done; >> } else >> ntfa_use_count = 1; >> + *use_count = ntfa_use_count; >> } >> >> done: >> diff --git a/osaf/libs/common/ntfsv/include/ntfsv_msg.h >> b/osaf/libs/common/ntfsv/include/ntfsv_msg.h >> --- a/osaf/libs/common/ntfsv/include/ntfsv_msg.h >> +++ b/osaf/libs/common/ntfsv/include/ntfsv_msg.h >> @@ -127,6 +127,7 @@ as mentioned in LOGSV PR doc Section 3.5 >> >> typedef struct { >> SaVersionT version; >> + uint32_t count; >> } ntfsv_initialize_req_t; >> >> typedef struct { >> diff --git a/osaf/services/saf/ntfsv/ntfs/NtfAdmin.cc >> b/osaf/services/saf/ntfsv/ntfs/NtfAdmin.cc >> --- a/osaf/services/saf/ntfsv/ntfs/NtfAdmin.cc >> +++ b/osaf/services/saf/ntfsv/ntfs/NtfAdmin.cc >> @@ -515,8 +515,7 @@ void NtfAdmin::clientRemoveMDS(MDS_DEST >> { >> clientRemoved(client->getClientId()); >> found = true; >> - /* avoid continue iterate after erase */ >> - break; >> + /* continue iterate after erase when there > are clients use same >> +MDS */ >> } >> } >> } while (found); >> @@ -1024,8 +1023,13 @@ uint32_t NtfAdmin::send_cluster_membersh >> mds_dest = client->getMdsDest(); >> NODE_ID tmp_node_id = > m_NTFS_GET_NODE_ID_FROM_ADEST(mds_dest); >> //Do not send to A11 client. >> - if ((tmp_node_id == node_id) && (client->IsA11Client() == > false)) >> - rc = send_clm_node_status_lib(cluster_change, > client_id, mds_dest); >> + if ((tmp_node_id == node_id) && (client->IsA11Client() == > false)) { >> + rc = send_clm_node_status_lib(cluster_change, > client_id, mds_dest); >> + // Clean up client list >> + if (rc == NCSCC_RC_FAILURE) { >> + clientRemoved(client_id); >> + } >> + } >> } >> TRACE_LEAVE(); >> return rc; >> diff --git a/osaf/services/saf/ntfsv/ntfs/ntfs_com.c >> b/osaf/services/saf/ntfsv/ntfs/ntfs_com.c >> --- a/osaf/services/saf/ntfsv/ntfs/ntfs_com.c >> +++ b/osaf/services/saf/ntfsv/ntfs/ntfs_com.c >> @@ -305,7 +305,7 @@ int send_notification_lib(ntfsv_send_not >> MDS_SEND_PRIORITY_HIGH); >> if (rc != NCSCC_RC_SUCCESS) { >> discarded = NTFS_NOTIFICATION_DISCARDED; >> - LOG_ER("ntfs_mds_msg_send to ntfa failed rc: %d", (int)rc); >> + TRACE("ntfs_mds_msg_send to ntfa failed rc: %d", (int)rc); >> } >> /* Allways confirm if not success notification will be put in > discarded list. */ >> notificationSentConfirmed(client_id, dispatchInfo->subscriptionId, >> *header->notificationId, discarded); @@ -539,7 +539,7 @@ uint32_t > send_clm_node_status_lib(SaClmC >> msg.info.cbk_info.param.clm_node_status_cbk.clm_node_status = > cluster_change; >> rc = ntfs_mds_msg_send(ntfs_cb, &msg, &mdsDest, NULL, > MDS_SEND_PRIORITY_HIGH); >> if (rc != NCSCC_RC_SUCCESS) { >> - LOG_ER("ntfs_mds_msg_send to ntfa failed rc: %d", (int)rc); >> + TRACE("ntfs_mds_msg_send to ntfa failed rc: %d", (int)rc); >> } >> >> TRACE_LEAVE(); >> diff --git a/osaf/services/saf/ntfsv/ntfs/ntfs_evt.c >> b/osaf/services/saf/ntfsv/ntfs/ntfs_evt.c >> --- a/osaf/services/saf/ntfsv/ntfs/ntfs_evt.c >> +++ b/osaf/services/saf/ntfsv/ntfs/ntfs_evt.c >> @@ -104,8 +104,8 @@ static uint32_t proc_ntfa_updn_mds_msg(n >> case NTFSV_NTFS_EVT_NTFA_UP: >> break; >> case NTFSV_NTFS_EVT_NTFA_DOWN: >> - /* Remove this NTFA entry from our processing lists */ >> - clientRemoveMDS(evt->fr_dest); >> + /* Do nothing when this event occur, MDS might be unsed > again */ >> + /* Keep it there for future use */ >> break; >> default: >> TRACE("Unknown evt type!!!"); >> @@ -280,6 +280,9 @@ static uint32_t proc_initialize_msg(ntfs >> client_added_res_lib(ais_rc, 0, evt->fr_dest, > &evt->mds_ctxt, version); >> goto done; >> } >> + if (evt->info.msg.info.api_info.param.init.count == 1) { >> + clientRemoveMDS(evt->fr_dest); >> + } >> clientAdded(0, evt->fr_dest, &evt->mds_ctxt, version); >> >> done: >> diff --git a/osaf/services/saf/ntfsv/ntfs/ntfs_mds.c >> b/osaf/services/saf/ntfsv/ntfs/ntfs_mds.c >> --- a/osaf/services/saf/ntfsv/ntfs/ntfs_mds.c >> +++ b/osaf/services/saf/ntfsv/ntfs/ntfs_mds.c >> @@ -1287,7 +1287,7 @@ uint32_t ntfs_mds_msg_send(ntfs_cb_t *cb >> /* send the message */ >> rc = ncsmds_api(&mds_info); >> if (rc != NCSCC_RC_SUCCESS) { >> - LOG_ER("ntfs_mds_msg_send FAILED"); >> + TRACE("ntfs_mds_msg_send FAILED"); >> } >> return rc; >> } >> > ------------------------------------------------------------------------------ Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel