Hi Praveen

If an amfd is available before MDS timer expires, we get NCSMDS_NEW_ACTIVE. 
That is the part I am changing.

The current code is:

                if (evt->info.mds.i_change == NCSMDS_NEW_ACTIVE && 
cb->is_avd_down) {
                        if (cb->led_state == AVND_LED_STATE_GREEN) {
                                LOG_NO("Sending node up due to 
NCSMDS_NEW_ACTIVE");

                                // node_up, sync sisu, compcsi info to AVND for 
recovery
                                avnd_sync_sisu(cb);
                                avnd_sync_csicomp(cb);
                                avnd_send_node_up_msg();
                        }
                }

The proposed code is:

                if (evt->info.mds.i_change == NCSMDS_NEW_ACTIVE && 
cb->is_avd_down) {
                        if (cb->led_state == AVND_LED_STATE_GREEN) {
                                // node_up, sync sisu, compcsi info to AVND for 
recovery
                                avnd_sync_sisu(cb);
                                avnd_sync_csicomp(cb);
                        }
                        LOG_NO("Sending node up due to NCSMDS_NEW_ACTIVE");
                        avnd_send_node_up_msg();
                }

The behaviour for recovering from headless is the same as before. led_state 
will be green, so amfnd will send sisu / csicomp messages.

The failover behaviour is also the same, as is_avd_down will be false, so the 
block of the code never runs in the old or new code.

I’m jmaking it also send node_up when led_state is red.

The scenario I’m trying to fix occurred on SC-2 during cluster startup:

- amfd on SC-1 starts
- amfnd on SC-2 receives NCSMDS_UP
- amfd on SC-1 amfd suddenly restarts (so quickly there is no failover)
- amfnd on SC-2 receives NCSMDS_NEW_ACTIVE, but because led_state is red, it 
doesn’t send node_up and the startup sequence stops entirely.

Thanks
Gary

> On 14 Nov. 2016, at 10:25 pm, praveen malviya <praveen.malv...@oracle.com> 
> wrote:
> 
> 
> 
> On 14-Nov-16 4:00 PM, Gary Lee wrote:
>> I just moved  avnd_send_node_up_msg() outside the if block. The compsci
>> and susi messages are sent in the same conditions as before?
> But when that if condition will hit. After headless state when first 
> controller comes up within MDS timer limit we Will get avd_up and we are 
> sending only MDS_UP event (If condition is not hit). So now we will not get 
> again node_up for same AVD? So how this AMFND will send sync information.
> 
> Thanks,
> Praveen
>> 
>> Quoting praveen malviya <praveen.malv...@oracle.com>:
>> 
>>> But still when AMFND will send the sync information to AMFD with this
>>> patch?
>>> Those are generally the first messages and they are still in that if
>>> block. Am I missing something?
>>> 
>>> Thanks,
>>> Praveen
>>> 
>>> On 14-Nov-16 2:26 PM, Gary Lee wrote:
>>>> Hi Praveen
>>>> 
>>>> I think it’s unlikely there is a set_leds in the queue. That would
>>>> have been sent from the ‘old’ amfd, before the ‘new’ amfd sends
>>>> node_up. So the set_leds would likely have been processed first.
>>>> 
>>>> The patch is just making the behaviour the same as receiving NCSMDS_UP.
>>>> 
>>>> Thanks
>>>> Gary
>>>> 
>>>>> On 14 Nov. 2016, at 5:48 pm, praveen malviya
>>>>> <praveen.malv...@oracle.com> wrote:
>>>>> 
>>>>> Hi Gary,
>>>>> 
>>>>> The reason for asking: patch is sending NODE UP event without
>>>>> sending sync information for COMPCSI and SUSI. AVD_UP event for both
>>>>> adest and vdest comes almost simultaneously. So this function will
>>>>> not get triggerd and this AMFND will remain never be able to sync
>>>>> its compcsi and susi.
>>>>> 
>>>>> Thanks,
>>>>> Praveen
>>>>> 
>>>>> On 14-Nov-16 11:44 AM, Gary Lee wrote:
>>>>>> Hi Praveen
>>>>>> 
>>>>>> I don’t have traces - both that is a possibility. If it is in the
>>>>>> mailbox, amfnd will still be stuck unless an amfd switchover occurs.
>>>>>> 
>>>>>> Thanks
>>>>>> Gary
>>>>>> 
>>>>>>> On 14 Nov. 2016, at 4:35 pm, praveen malviya
>>>>>>> <praveen.malv...@oracle.com> wrote:
>>>>>>> 
>>>>>>> Hi Gary,
>>>>>>> 
>>>>>>> One quick question: Is this that case when AMFD restarted before
>>>>>>> sending set_led to AMFND? I just want to know Is there any
>>>>>>> possibility that set_led message is present in AMFND mail box.
>>>>>>> 
>>>>>>> Thanks,
>>>>>>> Praveen
>>>>>>> 
>>>>>>> On 11-Nov-16 11:16 AM, Gary Lee wrote:
>>>>>>>> osaf/services/saf/amf/amfnd/di.cc |  5 ++---
>>>>>>>> 1 files changed, 2 insertions(+), 3 deletions(-)
>>>>>>>> 
>>>>>>>> 
>>>>>>>> if amfd restarts before set_leds is received by amfnd, then
>>>>>>>> amfnd will not send node_up. amfnd should send node_up
>>>>>>>> even if led state is not green.
>>>>>>>> 
>>>>>>>> diff --git a/osaf/services/saf/amf/amfnd/di.cc
>>>>>>>> b/osaf/services/saf/amf/amfnd/di.cc
>>>>>>>> --- a/osaf/services/saf/amf/amfnd/di.cc
>>>>>>>> +++ b/osaf/services/saf/amf/amfnd/di.cc
>>>>>>>> @@ -562,13 +562,12 @@ uint32_t avnd_evt_mds_avd_up_evh(AVND_CB
>>>>>>>>         */
>>>>>>>>        if (evt->info.mds.i_change == NCSMDS_NEW_ACTIVE &&
>>>>>>>> cb->is_avd_down) {
>>>>>>>>            if (cb->led_state == AVND_LED_STATE_GREEN) {
>>>>>>>> -                LOG_NO("Sending node up due to NCSMDS_NEW_ACTIVE");
>>>>>>>> -
>>>>>>>>                // node_up, sync sisu, compcsi info to AVND for
>>>>>>>> recovery
>>>>>>>>                avnd_sync_sisu(cb);
>>>>>>>>                avnd_sync_csicomp(cb);
>>>>>>>> -                avnd_send_node_up_msg();
>>>>>>>>            }
>>>>>>>> +            LOG_NO("Sending node up due to NCSMDS_NEW_ACTIVE");
>>>>>>>> +            avnd_send_node_up_msg();
>>>>>>>>        }
>>>>>>>>        cb->is_avd_down = false;
>>>>>>>>    }
>>>>>>>> 
>>>>>> 
>>>> 
>> 

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

Reply via email to