Ack with a comment.
Thanks,
Praveen
On 17-Apr-15 7:33 AM, Minh Hon Chau wrote:
> osaf/services/saf/amf/amfd/sg_2n_fsm.cc | 43
> +++++++++++++++++++++++++++-----
> 1 files changed, 36 insertions(+), 7 deletions(-)
>
>
> During si-swap, node-failover happens on the node which's su just finishes
> quiesced
> assignment, and su on the other node has not done active assignment. Then if
> the node
> comes up after reboot, SG will left as unstable.
>
> As node-failover happens, node_fail_su_oper() set the SG stable. Then all
> components
> reponse for active assignment, the susi_success() currently does nothing in
> SG stable
> state with susi modify action, so no active assignment as result. Then the
> standby node
> comes up, initiates the standby assignment but no active assignment.
> Therefore the SG
> is left as unstable at the end.
>
> Patch sets SG to re-align in node_fail_su_oper() as the other node fails
> over. At re-align
> state, SG currently can handle response from active assignment and standby
> assignment
> from the rebooted node. Note that if just leaves SG as su-oper state, once
> active assignment
> is done, the susi_success_su_oper() will send susi_modify for standby
> assignment. That
> could run into problem as there is no standby assignment at moment due to
> node reboot.
>
> diff --git a/osaf/services/saf/amf/amfd/sg_2n_fsm.cc
> b/osaf/services/saf/amf/amfd/sg_2n_fsm.cc
> --- a/osaf/services/saf/amf/amfd/sg_2n_fsm.cc
> +++ b/osaf/services/saf/amf/amfd/sg_2n_fsm.cc
> @@ -183,6 +183,27 @@ bool all_assignments_done(const AVD_SU *
>
> return true;
> }
> +
> +/**
> + * @brief Checks if modification of assignment is sent for
> + * any SUSI in SU.
> + *
> + * @param [in] su
> + *
> + * @returns true/false
> + */
> +bool any_susi_fsm_in_modify(const AVD_SU *su)
> +{
> + AVD_SU_SI_REL *susi;
> +
> + for (susi = su->list_of_susi; susi != NULL; susi = susi->su_next) {
> + if (susi->fsm == AVD_SU_SI_STATE_MODIFY)
> + return true;
> + }
> +
> + return false;
> +}
I think there is no need to rewrite this function as it already exists
in su.cc .
> +
> /**
> * @brief Checks if any assignment is changing into quiesced state.
> If yes, then return true.
> * If all are quisced then return false.
> @@ -2869,7 +2890,14 @@ void SG_2N::node_fail_su_oper(AVD_SU *su
>
> if (all_assignments_done(a_susi->su)) {
> /* Since Act assignment is completely done, so
> - we don't expect any response from Act su. */
> + we don't expect any response from Act su.
> + During si-swap while standby assignment is
> + going on, if Nodefailover or SU failover got
> + escalated then toggle SU switch state and
> make
> + SG stable. After SG becomes stable, spare SU
> + will be instantiated, if available, or same
> SU
> + will get standby assignment after repair.
> + */
> avd_sg_su_oper_list_del(cb, su, false);
> su->delete_all_susis();
> su->set_su_switch(AVSV_SI_TOGGLE_STABLE);
> @@ -2897,14 +2925,15 @@ void SG_2N::node_fail_su_oper(AVD_SU *su
> avd_sg_su_oper_list_add(cb, a_susi->su,
> false);
> m_AVD_SET_SG_FSM(cb, (su->sg_of_su),
> AVD_SG_FSM_SG_REALIGN);
> } else if (su->su_switch ==
> AVSV_SI_TOGGLE_SWITCH) {
> - /* During si-swap while standby
> assignment is going on, if Nodefailover
> - or SU failover got escalated then
> toggle SU switch state and make SG
> - stable. After SG becomes stable,
> spare SU will be instantiated,
> - if available, or same SU will get
> standby assignment after repair.
> + /* During si-swap, NodeFailover or
> SuFailover got escalated
> + * while the *su* just finishes
> quiesced assignment and
> + * *a_susi->su* starts active
> assignment.
> */
>
> su->set_su_switch(AVSV_SI_TOGGLE_STABLE);
> - m_AVD_SET_SG_FSM(cb, (su->sg_of_su),
> AVD_SG_FSM_STABLE);
> - complete_siswap(a_susi->su, SA_AIS_OK);
> + if (any_susi_fsm_in_modify(a_susi->su)
> == true) {
> + avd_sg_su_oper_list_add(cb,
> a_susi->su, false);
> + m_AVD_SET_SG_FSM(cb,
> (su->sg_of_su), AVD_SG_FSM_SG_REALIGN);
> + }
> } else {
> avd_sg_su_oper_list_add(cb, a_susi->su,
> false);
> m_AVD_SET_SG_FSM(cb, (su->sg_of_su),
> AVD_SG_FSM_SG_REALIGN);
>
------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel