Hi

Please ignore this patch. After a second look, I don’t think this is enough to 
fix the problem.

It’s very hard to reproduce. I think the node up was sent from clm_track_cb().

Thanks
Gary

On 4/4/17, 6:12 pm, "Gary Lee" <[email protected]> wrote:

     src/amf/amfnd/clm.cc |   1 +
     src/amf/amfnd/di.cc  |  15 ++++++++++++---
     2 files changed, 13 insertions(+), 3 deletions(-)
    
    
    if SCs are rebooted repeatedly & quickly, it is possible to receive 
NEW_ACTIVE without
    a prior DOWN event. Currently, msg ids are only reset on DOWN.
    
    Thus we should also reset msg ids before sending node up after
    a SC absence event to avoid mismatch ids.
    
    diff --git a/src/amf/amfnd/clm.cc b/src/amf/amfnd/clm.cc
    --- a/src/amf/amfnd/clm.cc
    +++ b/src/amf/amfnd/clm.cc
    @@ -249,6 +249,7 @@ static void clm_track_cb(const SaClmClus
                                                sizeof(SaClmClusterNodeT_4));
                                        /*get the amf node from clm node name */
                                        clm_to_amf_node();
    +                                   TRACE("Sending node up due to CLM 
tracking");
                                        avnd_send_node_up_msg();
                                        avnd_cb->first_time_up = false;
                                }
    diff --git a/src/amf/amfnd/di.cc b/src/amf/amfnd/di.cc
    --- a/src/amf/amfnd/di.cc
    +++ b/src/amf/amfnd/di.cc
    @@ -63,6 +63,8 @@
        } else (o_rec) = 0; \
     }
     
    +void reset_msg_ids(AVND_CB *cb);
    +
     static uint32_t avnd_node_oper_req(AVND_CB *cb, AVSV_PARAM_INFO *param)
     {
        uint32_t rc = NCSCC_RC_FAILURE;
    @@ -554,6 +556,7 @@ uint32_t avnd_evt_mds_avd_up_evh(AVND_CB
                        if (cb->is_avd_down && cb->led_state == 
AVND_LED_STATE_GREEN) {
                                avnd_sync_sisu(cb);
                                avnd_sync_csicomp(cb);
    +                           reset_msg_ids(cb);
                        }
     
                        LOG_NO("Sending node up due to NCSMDS_UP");
    @@ -568,6 +571,7 @@ uint32_t avnd_evt_mds_avd_up_evh(AVND_CB
                                // node_up, sync sisu, compcsi info to AVND for 
recovery
                                avnd_sync_sisu(cb);
                                avnd_sync_csicomp(cb);
    +                           reset_msg_ids(cb);
                        }
                        LOG_NO("Sending node up due to NCSMDS_NEW_ACTIVE");
                        avnd_send_node_up_msg();
    @@ -697,9 +701,7 @@ uint32_t avnd_evt_mds_avd_dn_evh(AVND_CB
                        cb->scs_absence_max_duration, 0);
        }
     
    -   // reset msg_id counter
    -   cb->rcv_msg_id = 0;
    -   cb->snd_msg_id = 0;
    +   reset_msg_ids(cb);
        TRACE_LEAVE();
        return rc;
     }
    @@ -1752,3 +1754,10 @@ void avnd_sync_sisu(AVND_CB *cb)
     
        TRACE_LEAVE();
     }
    +
    +void reset_msg_ids(AVND_CB *cb)
    +{
    +   TRACE("reset msg ids");
    +   cb->rcv_msg_id = 0;
    +   cb->snd_msg_id = 0;
    +}
    \ No newline at end of file
    



------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to