Hi Thuan,
You can have following logic(Subject to testing) :
 
void avd_mds_avnd_down_evh(AVD_CL_CB *cb, AVD_EVT *evt) {
  AVD_AVND *node = avd_node_find_nodeid(evt->info.node_id);
  if (node == nullptr) {
                                      Walk though the node_name_db and find the 
matching node with evt->info.node_id
                                       node = matching node;
                                       }
 
This way, you will have node pointer and everything should follow.
 
Thanks,
Nagu
--------- Original Message --------- Subject: [PATCH 1/1] amf: amfd should not 
delete node in CLM callback [#2891]
From: "thuan.tran" <thuan.t...@dektech.com.au>
Date: 7/10/18 4:31 pm
To: minh.c...@dektech.com.au, nagen...@hasolutions.in, 
hans.nordeb...@ericsson.com, gary....@dektech.com.au
Cc: opensaf-devel@lists.sourceforge.net, "thuan.tran" 
<thuan.t...@dektech.com.au>

There is a case that after AMFD send reboot order due to “out of sync window”.
 AMFD receive CLM track callback but node is not AMF member yet and delete node.
 Later AMFND MDS down will do nothing since it cannot find the node.
 When node reboot up, AMFD continue use old msg_id counter send to AMFND
 cause messasge ID mismatch in AMFND then AMFND order reboot itself node.
 
 If AMFD do not delete node in CLM callback then later AMFND MDS down
 will do proper actions.
 ---
 src/amf/amfd/clm.cc | 1 -
 1 file changed, 1 deletion(-)
 
 diff --git a/src/amf/amfd/clm.cc b/src/amf/amfd/clm.cc
 index e113a65f9..83a0a4972 100644
 --- a/src/amf/amfd/clm.cc
 +++ b/src/amf/amfd/clm.cc
 @@ -318,7 +318,6 @@ static void clm_track_cb(
 } else if (node->node_state == AVD_AVND_STATE_ABSENT) {
 LOG_IN("%s: CLM node '%s' is not an AMF cluster member; MDS down received",
 __FUNCTION__, node_name.c_str());
 - avd_node_delete_nodeid(node);
 goto done;
 }
 TRACE(" Node Left: rootCauseEntity %s for node %u",
 -- 
 2.18.0
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to