osaf/services/saf/amf/amfd/cluster.cc | 2 +- osaf/services/saf/amf/amfd/sgproc.cc | 24 ++++++++++++++++++++---- 2 files changed, 21 insertions(+), 5 deletions(-)
At the state of AVD_INIT_DONE and standby controller has middleware SUs assigned, SC failover will leave transient assignments from headless stage unrecovered. The problem is when standy controller becomes new active one, new AMFD does not continue the headless recovery which is initiated under cluster initiation timeout. The patch continues the cluster initiation phase at new active AMFD after SC failover. diff --git a/osaf/services/saf/amf/amfd/cluster.cc b/osaf/services/saf/amf/amfd/cluster.cc --- a/osaf/services/saf/amf/amfd/cluster.cc +++ b/osaf/services/saf/amf/amfd/cluster.cc @@ -58,7 +58,7 @@ void avd_cluster_tmr_init_evh(AVD_CL_CB saflog(LOG_NOTICE, amfSvcUsrName, "Cluster startup timeout, assigning SIs to SUs"); osafassert(evt->info.tmr.type == AVD_TMR_CL_INIT); - LOG_NO("Cluster startup is done"); + LOG_NO("Cluster initiated"); if (avd_cluster->saAmfClusterAdminState != SA_AMF_ADMIN_UNLOCKED) { LOG_WA("Admin state of cluster is locked"); diff --git a/osaf/services/saf/amf/amfd/sgproc.cc b/osaf/services/saf/amf/amfd/sgproc.cc --- a/osaf/services/saf/amf/amfd/sgproc.cc +++ b/osaf/services/saf/amf/amfd/sgproc.cc @@ -1566,17 +1566,33 @@ void avd_su_si_assign_evh(AVD_CL_CB *cb, } done: - /* Free the messages */ - avsv_dnd_msg_free(n2d_msg); - evt->info.avnd_msg = nullptr; - if (su != nullptr) { if (su->sg_of_su->sg_ncs_spec == false) { if (su->sg_of_su->any_assignment_absent() == true) { su->sg_of_su->failover_absent_assignment(); } + } else { + // Running at this code line, that means 2N-MW SU has been assigned + // to ACTIVE (from STANDBY). + if (n2d_msg->msg_info.n2d_su_si_assign.msg_act == AVSV_SUSI_ACT_MOD && + n2d_msg->msg_info.n2d_su_si_assign.ha_state == SA_AMF_HA_ACTIVE) { + // The cb->init_state must be AVD_INIT_DONE or AVD_APP_STATE + // If AVD_INIT_DONE, there was a SC failover during cluster + // instantiation phase in cluster (after all NCS SU is assigned) + // If AVD_APP_STATE, this should be come from 2N-MW SI swap + if (cb->init_state >= AVD_INIT_DONE) { + if (cluster_su_instantiation_done(cb, nullptr) == true) { + cluster_startup_expiry_event_generate(cb); + } else { + m_AVD_CLINIT_TMR_START(cb); + } + } + } } } + /* Free the messages */ + avsv_dnd_msg_free(n2d_msg); + evt->info.avnd_msg = nullptr; TRACE_LEAVE(); } ------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today. http://sdm.link/xeonphi _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel