Hi Minh, Good patch. Ack from me. Thanks, Nagendra, 91-9866424860 High Availability Solutions Pvt. Ltd. (www.hasolutions.in) - OpenSAF Support and Services --------- Original Message --------- Subject: [PATCH 1/1] amfd: Set SA_AMF_READINESS_IN_SERVICE for qualified SU after cluster startup timeout [#2916] From: "Minh Chau" <minh.c...@dektech.com.au> Date: 8/22/18 3:53 pm To: hans.nordeb...@ericsson.com, gary....@dektech.com.au, nagen...@hasolutions.in Cc: opensaf-devel@lists.sourceforge.net, "Minh Chau" <minh.c...@dektech.com.au>
In the scenario of single step upgrade where the UNLOCK-IN/UNLOCK admin op are issued to a SU hosted on non-active node while cluster startup timer is active and not all ncs SU on that node are fully assigned. In such case, amfd currently accepts the UNLOCK admin op, change AdminState to UNLOCKED but the ReadinessState is still OUT_OF_SERVICE. When the cluster startup timeout, amfd is not giving assignment to this SU which is still OUT_OF_SERVICE. amfd should return TRY_AGAIN in the first place of UNLOCK command since the node is still DISABLED and ABSENT since all ncs SUs are not assigned, but it would cause the upgrade delays. When cluster startup timer expires, the patch checks if SU is qualified to be IN_SERVICE but its readiness state is still OUT_OF_SERVICE, set it to be IN_SERVICE before amfd starts assignments. --- src/amf/amfd/cluster.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/amf/amfd/cluster.cc b/src/amf/amfd/cluster.cc index 156c5c9..83fd47d 100644 --- a/src/amf/amfd/cluster.cc +++ b/src/amf/amfd/cluster.cc @@ -85,6 +85,19 @@ void avd_cluster_tmr_init_evh(AVD_CL_CB *cb, AVD_EVT *evt) { node->node_info.nodeId != cb->node_id_avd_other) avd_snd_set_leds_msg(cb, node); } + /* If the SU is qualified to be IN_SERVICE but its readiness state + * is still OUT_OF_SERVICE, set it to be IN_SERVICE. + * This scenario happens if the UNLOCK-in/UNLOCK admin op is issued + * to a SU hosted on non-active node while cluster startup timer is + * active and not all ncs SU on that node are fully assigned + */ + for (const auto &value : *su_db) { + AVD_SU *i_su = value.second; + if (i_su->is_in_service() && i_su->sg_of_su->sg_ncs_spec == false && + i_su->saAmfSuReadinessState == SA_AMF_READINESS_OUT_OF_SERVICE) { + i_su->set_readiness_state(SA_AMF_READINESS_IN_SERVICE); + } + } /* call the realignment routine for each of the SGs in the * system that are not NCS specific. -- 2.7.4 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel