Hi Gary, Ack from me (Test only)
Regards, Quyen -----Original Message----- From: Gary Lee [mailto:[email protected]] Sent: Thursday, July 09, 2015 5:44 PM To: [email protected]; [email protected]; [email protected]; [email protected] Cc: [email protected] Subject: [PATCH 1 of 1] amfd: ignore invalid operations on nodegroup [#1389] osaf/services/saf/amf/amfd/nodegroup.cc | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) If a lock-in operation is ordered on a nodegroup, only perform this on a node if the node is in 'locked' state. diff --git a/osaf/services/saf/amf/amfd/nodegroup.cc b/osaf/services/saf/amf/amfd/nodegroup.cc --- a/osaf/services/saf/amf/amfd/nodegroup.cc +++ b/osaf/services/saf/amf/amfd/nodegroup.cc @@ -972,9 +972,9 @@ AVD_AVND *node = avd_node_get(*iter); node->su_cnt_admin_oper = 0; node->admin_ng = ng; - node_sus_termstate_set(node, true); if (node->saAmfNodeAdminState != SA_AMF_ADMIN_LOCKED) continue; + node_sus_termstate_set(node, true); node_admin_state_set(node, SA_AMF_ADMIN_LOCKED_INSTANTIATION); } for (std::set<std::string>::const_iterator iter = ng->saAmfNGNodeList.begin(); @@ -988,6 +988,12 @@ LOG_NO("'%s' LOCK_INSTANTIATION: AMF node oper state disabled", node->name.value); continue; } + if (node->saAmfNodeAdminState != SA_AMF_ADMIN_LOCKED_INSTANTIATION) { + // this failed the test above, where we check + // saAmfNodeAdminState == SA_AMF_ADMIN_LOCKED + LOG_NO("'%s' LOCK_INSTANTIATION: AMF node admin state is not LOCKED", node->name.value); + continue; + } avd_node_admin_lock_instantiation(node); TRACE("node:'%s', su_cnt_admin_oper:%u", node->name.value, node->su_cnt_admin_oper); @@ -1039,9 +1045,9 @@ AVD_AVND *node = avd_node_get(*iter); node->su_cnt_admin_oper = 0; node->admin_ng = ng; - node_sus_termstate_set(node, false); if (node->saAmfNodeAdminState != SA_AMF_ADMIN_LOCKED_INSTANTIATION) continue; + node_sus_termstate_set(node, false); node_admin_state_set(node, SA_AMF_ADMIN_LOCKED); } ng_admin_unlock_inst(ng); ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ _______________________________________________ Opensaf-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensaf-devel
