ack, code review only/Thanks HansN

On 01/13/2016 01:41 PM, [email protected] wrote:
>   osaf/services/saf/amf/amfd/sg_nway_fsm.cc |  3 +--
>   osaf/services/saf/amf/amfd/si.cc          |  2 +-
>   2 files changed, 2 insertions(+), 3 deletions(-)
>
>
> In the application, compcstype is not configured for csi of one si(say SI6).
> Unlock-in and unlock of sg leads to only active assignments for Si execpt
> SI6.
>
> In assignment function avd_sg_nway_si_assign(), AMF tries to first assign
> active HA state for SIs. If atleast one active assignment is given, standby
> assignments are skipped. When all the active assignments are over same 
> function
> tries to assign standby HA state. This decision is taken based on one of the 
> flags
> is_act_ass_sent. Every time above function is invoked it tries to issue active
> assignments by setting flag is_act_ass_sent to true and then it creates SUSI.
> But this flag is not set to false when no SUSI (assignment) is created 
> successfully.
> In the issue, all SIs execpt SI6 are assigned active HA state. In SI6, CSIs 
> could not
> be assigned because compcstype is not configured for its CSI. So the flag 
> remains true
> even though no SUSI for SI6 was created. This function is invoked two times 
> a)when SG
> is unlocked and b) when AMF gets active assignment responses for other SIs.
> Since SI6 is unassigned, function will always try for active assignments for 
> SI6 and flag
> is_act_ass_sent will remain true in each invocation of this function. Because 
> of this
> function will always return wihtout trying for standby assignments for other 
> SIs.
>
> In the same configuration if one tries to lock and unlock SIs other than SI6, 
> then
> lock operation will fail because avd_sg_nway_si_assign() will try for 
> assignments
> for both locked SI and SI6. Failure of active assignment for Si6 will change 
> the return
> status of function which, eventually, results in failure of lock operation.
>
> Patch fixes the problem to set is_act_ass_sent true only when SUSI for 
> atleast one SI
> is created successfully. Also patch fixes the problem related to SI lock by 
> checking
> the SUSI creation for the 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
> @@ -1385,8 +1385,6 @@ uint32_t avd_sg_nway_si_assign(AVD_CL_CB
>   
>               /* if found, send active assignment */
>               if (curr_su) {
> -                     /* set the flag */
> -                     is_act_ass_sent = true;
>   
>                       TRACE("send active assignment to %s", 
> curr_su->name.value);
>   
> @@ -1395,6 +1393,7 @@ uint32_t avd_sg_nway_si_assign(AVD_CL_CB
>                               /* add su to the su-oper list & change the fsm 
> state to sg-realign */
>                               avd_sg_su_oper_list_add(cb, curr_su, false);
>                               m_AVD_SET_SG_FSM(cb, sg, AVD_SG_FSM_SG_REALIGN);
> +                             is_act_ass_sent = true;
>                       } else {
>                               LOG_ER("%s:%u: %s (%u)", __FILE__, __LINE__, 
> curr_si->name.value, curr_si->name.length);
>                       }
> diff --git a/osaf/services/saf/amf/amfd/si.cc 
> b/osaf/services/saf/amf/amfd/si.cc
> --- a/osaf/services/saf/amf/amfd/si.cc
> +++ b/osaf/services/saf/amf/amfd/si.cc
> @@ -866,7 +866,7 @@ static void si_admin_op_cb(SaImmOiHandle
>                       goto done;
>               }
>   
> -             if (err != NCSCC_RC_SUCCESS) {
> +             if ((err != NCSCC_RC_SUCCESS) && (si->list_of_sisu == NULL)) {
>                       report_admin_op_error(immOiHandle, invocation, 
> SA_AIS_ERR_BAD_OPERATION, nullptr,
>                                       "SI unlock of %s failed", 
> objectName->value);
>                       si->set_admin_state(SA_AMF_ADMIN_LOCKED);


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to