In SI dependency configuration that set NwayActive SI as dependent SI, which
is assigned to all SUs hosted on all nodes. After stop and restart SCs, the
NwayActive SI becomes PARTIALLY_ASSIGNED.

The reason of PARTIALLY_ASSIGNED SI is that the SI currently is not assigned
in SC nodes. This patch triggers assignment for dependent SI if the SI has
not had enough preferred active assignment.

Please note that the additional case in this patch only hits if the SC absence
feature is enabled. In normal cluster, the dependency state should firstly
go from READ_TO_ASSIGN and the SG procedure will create active assignments
up to the preferred number.
---
 src/amf/amfd/si_dep.cc | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/amf/amfd/si_dep.cc b/src/amf/amfd/si_dep.cc
index a4ccbe7..f63b1b0 100644
--- a/src/amf/amfd/si_dep.cc
+++ b/src/amf/amfd/si_dep.cc
@@ -799,7 +799,10 @@ void avd_sidep_assign_evh(AVD_CL_CB *cb, AVD_EVT *evt) {
   } else {
     /*Check sponsors state once agian then take action*/
     sidep_update_si_self_dep_state(dep_si);
-    if (dep_si->si_dep_state == AVD_SI_READY_TO_ASSIGN) {
+    if (dep_si->si_dep_state == AVD_SI_READY_TO_ASSIGN ||
+        (dep_si->si_dep_state == AVD_SI_ASSIGNED &&
+            dep_si->saAmfSINumCurrActiveAssignments <
+            dep_si->pref_active_assignments())) {
       if ((sidep_sg_red_si_process_assignment(avd_cb, dep_si) ==
            NCSCC_RC_FAILURE) &&
           (dep_si->num_dependents != 0)) {
@@ -980,6 +983,10 @@ void sidep_take_action_on_dependents(AVD_SI *si) {
       sidep_process_ready_to_unassign_depstate(dep_si);
     } else if (dep_si->si_dep_state == AVD_SI_READY_TO_ASSIGN) {
       sidep_si_dep_state_evt_send(avd_cb, dep_si, AVD_EVT_ASSIGN_SI_DEP_STATE);
+    } else if (dep_si->si_dep_state == AVD_SI_ASSIGNED &&
+        si->sg_of_si->sg_fsm_state == AVD_SG_FSM_STABLE &&
+        si->saAmfSINumCurrActiveAssignments < si->pref_active_assignments()) {
+      sidep_si_dep_state_evt_send(avd_cb, dep_si, AVD_EVT_ASSIGN_SI_DEP_STATE);
     }
   }
 
-- 
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

Reply via email to