Hi,
I think there is no need to enter second for loop if SG is in lock-in state. 
Just continue in first for loop:
if (node_su->sg_of_su->saAmfSGAdminState == LOCK_IN)
    continue;

Thanks,
Praveen


---

** [tickets:#2324] amfd: SG admin state is nor honored during node group 
unlock_instantiation**

**Status:** unassigned
**Milestone:** 5.2.FC
**Created:** Fri Feb 24, 2017 07:20 AM UTC by Tai Dinh
**Last Updated:** Fri Feb 24, 2017 09:51 AM UTC
**Owner:** nobody


SG admin state is not honored during node group unlock_instantiation.

This can always be reproduced:
- Put the SG under locked_instantiation state. SU is now UNINSTANTIATED
- Lock/lock_in the node group that the SG or its SUs hosted on
- Unlock_in the node group, the expectation here is that SU should be kept as 
UNINSTANTIATED state but they're not.
- AMF always try to instantiate the SUs without checking their SG state.

            if ((su->saAmfSUAdminState != SA_AMF_ADMIN_LOCKED_INSTANTIATION) &&
                    (su->su_on_node->saAmfNodeAdminState != 
SA_AMF_ADMIN_LOCKED_INSTANTIATION) &&
                    (su->saAmfSUOperState == SA_AMF_OPERATIONAL_ENABLED) &&
                    (su->saAmfSUPresenceState == 
SA_AMF_PRESENCE_UNINSTANTIATED) &&
                    (su->su_on_node->saAmfNodeOperState == 
SA_AMF_OPERATIONAL_ENABLED)) {
                if ((su->saAmfSUPreInstantiable == false) ||
                        (su->su_on_node->node_state != AVD_AVND_STATE_PRESENT))
                    continue;

                if (sg->saAmfSGNumPrefInserviceSUs > su_try_inst) {
                    if (avd_snd_presence_msg(avd_cb, su, false) != 
NCSCC_RC_SUCCESS) {
                        LOG_NO("Failed to send Instantiation of '%s'", 
su->name.c_str());
                    } else {
                        su->su_on_node->su_cnt_admin_oper++;
                        su_try_inst++;
                    }
                }
            }
            


---

Sent from sourceforge.net because opensaf-tickets@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/opensaf/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/opensaf/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Opensaf-tickets mailing list
Opensaf-tickets@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets

Reply via email to