Re: [devel] [PATCH 1 of 1] amfd: do not send duplicate removal of assignment, N-Way model [#2022]

2016-09-19 Thread Hans Nordebäck
ack, code review only/Thanks HansN


On 09/19/2016 08:54 AM, praveen.malv...@oracle.com wrote:
>   osaf/services/saf/amf/amfd/sg_nway_fsm.cc |  6 --
>   1 files changed, 4 insertions(+), 2 deletions(-)
>
>
> AMFD asserted during lock operation on NG when its nodes are deplyed with
> N-WAY model application.
>
> When lock on NG operation is issued, AMFD sends quiesced state to active SIs 
> in all the
> three SUs. Responses for SU2 and SU3 comes and AMFD sends SU level deletion 
> to them.
> SU2 contains standby assignment of SI1 which is still getting quiesced in 
> SU1. Now
> SU1 faults with su-failover recovery when SU2 is still not responded for 
> deletion of
> assignments. AMFD tries to perform recovery of SU1 and tries to fail-over SI1 
> of SU1
> but could not find any valid standby in any other SU. Since failover is not
> possible, AMFD tries to delete all standby assignments of SI1. AMFD tries to 
> send
> deletion for SI1 to SU2 for which SU level deletion is already sent and it 
> asserts.
>
> Patch avoids sending duplicate deletion of assignments.
>
> 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
> @@ -3014,11 +3014,13 @@ void avd_sg_nway_node_fail_stable(AVD_CL
>   avd_sg_su_oper_list_add(cb, curr_sisu->su, 
> false);
>   } else {
>   /* As susi failover is not possible, delete all 
> the assignments
> -corresponding to curr_susi->si except on 
> failed node.
> +corresponding to curr_susi->si except on 
> failed node/su. Also skip
> +SISUs for which deletion is already sent on 
> healthy node.
>*/
>   for (curr_sisu = curr_susi->si->list_of_sisu ;
>   curr_sisu != nullptr; curr_sisu = 
> curr_sisu->si_next) {
> - if (curr_sisu != curr_susi) {
> + if ((curr_sisu != curr_susi) &&
> + (curr_sisu->fsm != 
> AVD_SU_SI_STATE_UNASGN)) {
>   rc = 
> avd_susi_del_send(curr_sisu);
>   if (NCSCC_RC_SUCCESS == rc)
>   
> avd_sg_su_oper_list_add(cb, curr_sisu->su, false);


--
___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


[devel] [PATCH 1 of 1] amfd: do not send duplicate removal of assignment, N-Way model [#2022]

2016-09-18 Thread praveen . malviya
 osaf/services/saf/amf/amfd/sg_nway_fsm.cc |  6 --
 1 files changed, 4 insertions(+), 2 deletions(-)


AMFD asserted during lock operation on NG when its nodes are deplyed with
N-WAY model application.

When lock on NG operation is issued, AMFD sends quiesced state to active SIs in 
all the
three SUs. Responses for SU2 and SU3 comes and AMFD sends SU level deletion to 
them.
SU2 contains standby assignment of SI1 which is still getting quiesced in SU1. 
Now
SU1 faults with su-failover recovery when SU2 is still not responded for 
deletion of
assignments. AMFD tries to perform recovery of SU1 and tries to fail-over SI1 
of SU1
but could not find any valid standby in any other SU. Since failover is not
possible, AMFD tries to delete all standby assignments of SI1. AMFD tries to 
send
deletion for SI1 to SU2 for which SU level deletion is already sent and it 
asserts.

Patch avoids sending duplicate deletion of assignments.

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
@@ -3014,11 +3014,13 @@ void avd_sg_nway_node_fail_stable(AVD_CL
avd_sg_su_oper_list_add(cb, curr_sisu->su, 
false);
} else {
/* As susi failover is not possible, delete all 
the assignments 
-  corresponding to curr_susi->si except on 
failed node.
+  corresponding to curr_susi->si except on 
failed node/su. Also skip
+  SISUs for which deletion is already sent on 
healthy node.
 */
for (curr_sisu = curr_susi->si->list_of_sisu ;
curr_sisu != nullptr; curr_sisu = 
curr_sisu->si_next) {
-   if (curr_sisu != curr_susi) {
+   if ((curr_sisu != curr_susi) &&
+   (curr_sisu->fsm != 
AVD_SU_SI_STATE_UNASGN)) {
rc = 
avd_susi_del_send(curr_sisu);
if (NCSCC_RC_SUCCESS == rc)

avd_sg_su_oper_list_add(cb, curr_sisu->su, false);

--
___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel