Hi Hans, 
Can you please apply the below patch and run on latest and confirm if it works. 
 
1. If it doesn't,  I will investigate further. 
2. If it works, can you please rerun your test on 5392 and confirm it works.

Thanks
-Nagu

diff --git a/osaf/services/saf/amf/amfd/sg_nway_fsm.cc 
b/osaf/services/saf/amf/amfd/sg_nway_fsm.cc
--- a/osaf/services/saf/amf/amfd/sg_nway_fsm.cc
+++ b/osaf/services/saf/amf/amfd/sg_nway_fsm.cc
@@ -1308,10 +1308,6 @@ uint32_t avd_sg_nway_si_assign(AVD_CL_CB
                                it = sirankedsu_db->begin(); it != 
sirankedsu_db->end(); it++) {
                        AVD_SUS_PER_SI_RANK *su_rank_rec = it->second;
                        {
-                               if 
(m_CMP_HORDER_SANAMET(su_rank_rec->indx.si_name, curr_si->name) != 0) {
-                                       continue;
-                               }
-
                                /* get the su & si */
                                curr_su = 
su_db->find(Amf::to_string(&su_rank_rec->su_name));
                                AVD_SI *si = 
avd_si_get(&su_rank_rec->indx.si_name);
@@ -1321,6 +1317,11 @@ uint32_t avd_sg_nway_si_assign(AVD_CL_CB
                                        continue;
                        }

+                       if (m_CMP_HORDER_SANAMET(su_rank_rec->indx.si_name, 
curr_si->name) != 0) {
+                               curr_su = 0;
+                               continue;
+                       }
+
                        if (!curr_su)
                                continue;

Thanks
-Nagu

> -----Original Message-----
> From: Hans Feldt [mailto:[email protected]]
> Sent: 03 July 2014 13:26
> To: Praveen Malviya
> Cc: [email protected]
> Subject: [devel] [PATCH 1 of 1] amfd: fix SI assign algorithm in Nway [#949]
> 
>  osaf/services/saf/amf/amfd/sg_nway_fsm.cc |  2 ++
>  osaf/services/saf/amf/amfd/su.cc          |  2 ++
>  2 files changed, 4 insertions(+), 0 deletions(-)
> 
> 
> More SIs then configured with saAmfSGMaxActiveSIsperSU can be assigned to
> an SU.
> 
> The algorithm in avd_sg_nway_si_assign() does not continue with the next SU
> after it has assigned the first SI. It keeps assigning the first SU with more
> SIs.
> 
> The patch resets the curr_su pointer to start over again for each SI.
> 
> diff --git a/osaf/services/saf/amf/amfd/sg_nway_fsm.cc
> b/osaf/services/saf/amf/amfd/sg_nway_fsm.cc
> --- a/osaf/services/saf/amf/amfd/sg_nway_fsm.cc
> +++ b/osaf/services/saf/amf/amfd/sg_nway_fsm.cc
> @@ -1394,6 +1394,8 @@ uint32_t avd_sg_nway_si_assign(AVD_CL_CB
>                       } else {
>                               LOG_ER("%s:%u: %s (%u)", __FILE__,
> __LINE__, curr_si->name.value, curr_si->name.length);
>                       }
> +
> +                     curr_su = NULL; // start over
>               } else
>                       break;
>       }                       /* for */
> diff --git a/osaf/services/saf/amf/amfd/su.cc
> b/osaf/services/saf/amf/amfd/su.cc
> --- a/osaf/services/saf/amf/amfd/su.cc
> +++ b/osaf/services/saf/amf/amfd/su.cc
> @@ -1610,6 +1610,7 @@ static void su_ccb_apply_cb(CcbUtilOpera
> 
>  void AVD_SU::inc_curr_act_si() {
>       saAmfSUNumCurrActiveSIs++;
> +     osafassert(saAmfSUNumCurrActiveSIs <= sg_of_su-
> >saAmfSGMaxActiveSIsperSU);
>       TRACE("%s saAmfSUNumCurrActiveSIs=%u", name.value,
>               saAmfSUNumCurrActiveSIs);
>       m_AVSV_SEND_CKPT_UPDT_ASYNC_UPDT(avd_cb, this,
> AVSV_CKPT_SU_SI_CURR_ACTIVE);
> @@ -1625,6 +1626,7 @@ void AVD_SU::dec_curr_act_si() {
> 
>  void AVD_SU::inc_curr_stdby_si() {
>       saAmfSUNumCurrStandbySIs++;
> +     osafassert(saAmfSUNumCurrStandbySIs <= sg_of_su-
> >saAmfSGMaxStandbySIsperSU);
>       TRACE("%s saAmfSUNumCurrStandbySIs=%u", name.value,
>               saAmfSUNumCurrStandbySIs);
>       m_AVSV_SEND_CKPT_UPDT_ASYNC_UPDT(avd_cb, this,
> AVSV_CKPT_SU_SI_CURR_STBY);
> 
> ------------------------------------------------------------------------------
> Open source business process management suite built on Java and Eclipse
> Turn processes into business applications with Bonita BPM Community Edition
> Quickly connect people, data, and systems into organized workflows
> Winner of BOSSIE, CODIE, OW2 and Gartner awards
> http://p.sf.net/sfu/Bonitasoft
> _______________________________________________
> Opensaf-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/opensaf-devel

------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to