Hi Minh, I am reviewing this patch.
Thanks, Praveen On 15-May-17 1:06 PM, Minh Chau wrote: > When amfnd-payload responds susi assignment response just before both SC > go down, and that response message does not come to director. Therefore, > the status of that assignment could be seen as "modifying" in IMM. When > SC comes back, active amfd will be waiting for that response forever. > > Patch checks if a susi assignment response is sent but not-ack just before > both SC come down, amfnd-payload will buffer it in a way as a susi get > assigned during SC absence > --- > src/amf/amfnd/di.cc | 53 > +++++++++++++++++++++++++++++++++++++++++++++-------- > 1 file changed, 45 insertions(+), 8 deletions(-) > > diff --git a/src/amf/amfnd/di.cc b/src/amf/amfnd/di.cc > index e06b9260d..3776a09dc 100644 > --- a/src/amf/amfnd/di.cc > +++ b/src/amf/amfnd/di.cc > @@ -1282,16 +1282,53 @@ void avnd_di_msg_ack_process(AVND_CB *cb, uint32_t > mid) { > Notes : None. > > ******************************************************************************/ > void avnd_diq_del(AVND_CB *cb) { > - AVND_DND_MSG_LIST *rec = 0; > > - do { > - /* pop the record */ > - m_AVND_DIQ_REC_POP(cb, rec); > - if (!rec) break; > + if ((cb->dnd_list.head != nullptr)) { > + AVND_DND_MSG_LIST *rec = 0; > + bool found = true; > + while (found) { > + found = false; > + for (rec = cb->dnd_list.head; rec != nullptr; > + rec = rec->next) { > + osafassert(rec->msg.type == AVND_MSG_AVD); > + // delete all pending messages that haven't been sent out > + if (rec->no_retries == 0) { > + m_AVND_DIQ_REC_POP(cb, rec); > + avnd_diq_rec_del(cb, rec); > + break; > + } else { > + // Assignment response had been sent, but not ack because last > + // controller go down, reset msg_id and will be resent later > + if (rec->msg.info.avd->msg_type == AVSV_N2D_INFO_SU_SI_ASSIGN_MSG) > { > + if (rec->msg.info.avd->msg_info.n2d_su_si_assign.msg_id != 0) { > + rec->msg.info.avd->msg_info.n2d_su_si_assign.msg_id = 0; > + found = true; > + LOG_NO( > + "Found not-ack su_si_assign msg for SU:'%s', " > + "SI:'%s', ha_state:'%u', msg_act:'%u', single_csi:'%u', " > + "error:'%u', msg_id:'%u'", > + osaf_extended_name_borrow(&rec->msg.info.avd->msg_info > + .n2d_su_si_assign.su_name), > + osaf_extended_name_borrow(&rec->msg.info.avd->msg_info > + .n2d_su_si_assign.si_name), > + rec->msg.info.avd->msg_info.n2d_su_si_assign.ha_state, > + rec->msg.info.avd->msg_info.n2d_su_si_assign.msg_act, > + rec->msg.info.avd->msg_info.n2d_su_si_assign > + .single_csi, > + rec->msg.info.avd->msg_info.n2d_su_si_assign.error, > + rec->msg.info.avd->msg_info.n2d_su_si_assign.msg_id); > + } > + } else { > + // delete other messages for now > + m_AVND_DIQ_REC_POP(cb, rec); > + avnd_diq_rec_del(cb, rec); > + break; > + } > + } > > - /* delete the record */ > - avnd_diq_rec_del(cb, rec); > - } while (1); > + } > + } > + } > > return; > } > ------------------------------------------------------------------------------ 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