osaf/services/saf/amf/amfnd/sidb.cc | 3 ++-
osaf/services/saf/amf/amfnd/susm.cc | 14 +++++++++++++-
2 files changed, 15 insertions(+), 2 deletions(-)
SU moved to term-failed state and repair admin opreration does not work.
When SG is unlocked, AMFND initiates active assignments by instantiating the
only component. After instantiation failure, AMFND tries to clean up the
component.
Cleanup fails. AMFND marks comp and SU in TERM_FAILED state, but it neither
responds
to AMFD for the completion of assignment nor it sends any recovery request.
Because of this SG remains unstable in REALIGN state.In this state,
no admin operation is allowed.
Patch solves the problem to send a recovery request to AMFD, so that it
deletes the assignments and marks SG stable.
diff --git a/osaf/services/saf/amf/amfnd/sidb.cc
b/osaf/services/saf/amf/amfnd/sidb.cc
--- a/osaf/services/saf/amf/amfnd/sidb.cc
+++ b/osaf/services/saf/amf/amfnd/sidb.cc
@@ -181,8 +181,9 @@ AVND_SU_SI_REC *avnd_su_si_rec_add(AVND_
/*
* Update the rest of the parameters with default values.
*/
- TRACE("Marking curr assigned state of '%s' unassigned.",
si_rec->name.c_str());
+ TRACE("Marking curr and previous assigned state of '%s'
unassigned.",si_rec->name.c_str());
m_AVND_SU_SI_CURR_ASSIGN_STATE_SET(si_rec,
AVND_SU_SI_ASSIGN_STATE_UNASSIGNED);
+ m_AVND_SU_SI_PRV_ASSIGN_STATE_SET(si_rec,
AVND_SU_SI_ASSIGN_STATE_UNASSIGNED);
/*
* Add the csi records.
diff --git a/osaf/services/saf/amf/amfnd/susm.cc
b/osaf/services/saf/amf/amfnd/susm.cc
--- a/osaf/services/saf/amf/amfnd/susm.cc
+++ b/osaf/services/saf/amf/amfnd/susm.cc
@@ -1846,8 +1846,20 @@ uint32_t avnd_su_pres_st_chng_prc(AVND_C
/* Don't send su-oper state msg, just update su oper
state
* AMF has lost control over this component and the
operator needs
* to repair this node. Failover is not possible in
this state.
+ *
+ * There exists one case which is not related to
fail-over situation
+ * and related to fresh assignments in SU. When AMFD
sends fresh assignments
+ * for a SU to AMFND, a SU can go into term-failed
state during
+ * instantiation. In TERM-FAILED state, AMFND cleans up
all the comps
+ * of SU. So AMFND can send su-oper state message so
that AMFD can
+ * mark SG stable and make way for admin repair.
*/
- avnd_di_uns32_upd_send(AVSV_SA_AMF_SU,
saAmfSUOperState_ID, su->name, su->oper);
+ if ((si != nullptr) && (si->prv_assign_state ==
AVND_SU_SI_ASSIGN_STATE_UNASSIGNED)) {
+ rc = avnd_di_oper_send(cb, su,
AVSV_ERR_RCVR_SU_FAILOVER);
+ avnd_su_si_del(avnd_cb, su->name);
+ } else {
+ avnd_di_uns32_upd_send(AVSV_SA_AMF_SU,
saAmfSUOperState_ID, su->name, su->oper);
+ }
}
if ((prv_st == SA_AMF_PRESENCE_INSTANTIATED) &&
------------------------------------------------------------------------------
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel