Ack, only code review. See inline for minor comments
/Hans

> -----Original Message-----
> From: praveen.malv...@oracle.com [mailto:praveen.malv...@oracle.com]
> Sent: den 30 maj 2014 07:52
> To: Hans Feldt; nagendr...@oracle.com
> Cc: opensaf-devel@lists.sourceforge.net
> Subject: [PATCH 1 of 1] amfd : update dependent dep_state if fail-over of 
> dependent fails [#692]
> 
>  osaf/services/saf/amf/amfd/si_dep.cc |  9 ++++++++-
>  1 files changed, 8 insertions(+), 1 deletions(-)
> 
> 
> During failover of dependent, if fault occurs in the SU receiving the active
> assignment then AMF is assigning only some SIs and SG remains unstable.
> 
> AMF performs failover of failed active SU1, first by sending active for 
> sponsor
> SI to the standby SU2 and it updates si_dep_state of dependents as
> FAIL_OVER_UNDER_PROGRESS. After successful fail-over of sponsor when AMF sends
> active for first level dependents to SU2 and iit updates second level 
> dependents
> to FAIL_OVER_UNDER_PROGRESS. Now if SU2 faults and then AMF deletes all the 
> SUSIs
> in both the SUs. When one the SUs is enabled, AMF screens SIs to update SI dep
> states of all the SIs before creating new SUSIs. Here 
> FAIL_OVER_UNDER_PROGRESS of
> some second level dependents is not updated which causes assignment of them 
> before
> their sposnors. This leads to assignment of few SIs only and leads to unstable
> SG.
> 
> Patch updates si_dep_state from FAIL_OVER_UNDER_PROGRESS to READY_TO_UNASSIGN
> if one of the sponsors is unassigned.
[Hans] and the consequence of that is?

> 
> diff --git a/osaf/services/saf/amf/amfd/si_dep.cc 
> b/osaf/services/saf/amf/amfd/si_dep.cc
> --- a/osaf/services/saf/amf/amfd/si_dep.cc
> +++ b/osaf/services/saf/amf/amfd/si_dep.cc
> @@ -2536,13 +2536,20 @@ void sidep_update_dependents_states(AVD_
>  void sidep_update_si_self_dep_state(AVD_SI *si)
>  {
>       bool all_sponsors_assgnd = false;
> +     AVD_SPONS_SI_NODE *spons;
[Hans] can be moved into the if statement

> 
>       TRACE_ENTER2("sponsor si:'%s'", si->name.value);
> 
>       /*Any dependent SI is never expcted in this state when screening is 
> going on.
>       In such situation do not update si_dep_state. It will be taken care 
> during failover*/
>       if (si->si_dep_state == AVD_SI_FAILOVER_UNDER_PROGRESS) {
> -             TRACE("si:'%s', si_dep_state:%u", si->name.value, 
> si->si_dep_state);
> +             /*If atleast one sponsor is unassigned, unassign the dependent*/
> +             for (spons = si->spons_si_list; spons; spons = spons->next) {
> +                     if (spons->si->list_of_sisu == NULL) {
> +                             avd_sidep_si_dep_state_set(si, 
> AVD_SI_READY_TO_UNASSIGN);
> +                             goto done;
> +                     }
> +             }
>               goto done;
>       }
> 

------------------------------------------------------------------------------
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
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to