Hi,
I am reviewing this patch.
Thanks
Praveen
On 28-Feb-17 8:19 AM, Minh Hon Chau wrote:
> src/amf/amfnd/comp.cc | 13 ++++++++++---
> 1 files changed, 10 insertions(+), 3 deletions(-)
>
>
> If node is shutting down, and csi is in assigning state, amfnd deletes cbk
> info which
> is waiting for response of pending callback. When component responds and cbk
> is deleted,
> amfnd can not remove csi assignment. Thus, amfnd gets stuck in shutting down.
>
> Patch makes amfnd not delete cbk info if csi is in assigning state,
> respectively variable
> pending_removal is true, and keep cbk info deleted in all other cases.
>
> diff --git a/src/amf/amfnd/comp.cc b/src/amf/amfnd/comp.cc
> --- a/src/amf/amfnd/comp.cc
> +++ b/src/amf/amfnd/comp.cc
> @@ -1727,7 +1727,7 @@ uint32_t avnd_comp_csi_remove_done(AVND_
> osafassert(m_AVND_SU_IS_PREINSTANTIABLE(comp->su));
>
> /* delete any pending cbk rec for csi assignment / removal */
> - avnd_comp_cbq_csi_rec_del(cb, comp, (csi) ? csi->name : "");
> +
>
> /* ok, time to reset CSi_ALL flag */
> if (!csi && m_AVND_COMP_IS_ALL_CSI(comp)) {
> @@ -1755,6 +1755,7 @@ uint32_t avnd_comp_csi_remove_done(AVND_
> */
> if (csi) {
> if (AVSV_SUSI_ACT_DEL == csi->single_csi_add_rem_in_si) {
> + avnd_comp_cbq_csi_rec_del(cb, comp, csi->name);
> /* csi belonging to the si are removed */
> rc = avnd_su_si_oper_done(cb, comp->su, csi->si);
>
> @@ -1762,6 +1763,11 @@ uint32_t avnd_comp_csi_remove_done(AVND_
> goto done;
> }
> else {
> + /* Delete cbk info if csi is not ASSIGNING state,
> @pending_removal will be true */
> + if (m_AVND_COMP_CSI_CURR_ASSIGN_STATE_IS_ASSIGNING(csi)
> == false) {
> + avnd_comp_cbq_csi_rec_del(cb, comp, csi->name);
> + }
> +
> for (curr_csi = (AVND_COMP_CSI_REC
> *)m_NCS_DBLIST_FIND_LAST(&csi->si->csi_list);
> curr_csi;
> curr_csi = (AVND_COMP_CSI_REC
> *)m_NCS_DBLIST_FIND_PREV(&curr_csi->si_dll_node)) {
> @@ -1770,7 +1776,7 @@ uint32_t avnd_comp_csi_remove_done(AVND_
> else if
> (m_AVND_COMP_CSI_CURR_ASSIGN_STATE_IS_REMOVING(curr_csi))
> break;
> else if
> (m_AVND_COMP_CSI_CURR_ASSIGN_STATE_IS_ASSIGNING(curr_csi)) {
> - TRACE("'%s' is getting assigned, remove
> it after assignment",
> + LOG_WA("'%s' is getting assigned,
> remove it after assignment",
> curr_csi->name.c_str());
> curr_csi->pending_removal = true;
> break;
> @@ -1787,7 +1793,8 @@ uint32_t avnd_comp_csi_remove_done(AVND_
> rc = avnd_su_si_oper_done(cb, comp->su,
> m_AVND_SU_IS_ALL_SI(comp->su) ?
> nullptr : csi->si);
> }
> - } else {
> + } else {
> + avnd_comp_cbq_csi_rec_del(cb, comp, "");
> /* Issue remove callback with TARGET_ALL for CSIs belonging to
> prv rank.*/
> for (curr_csi =
> m_AVND_CSI_REC_FROM_COMP_DLL_NODE_GET(m_NCS_DBLIST_FIND_FIRST(&comp->csi_list));
> curr_csi;
>
------------------------------------------------------------------------------
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