osaf/services/saf/amf/amfnd/di.cc             |  36 +++++++++++++++++++++++++
 osaf/services/saf/amf/amfnd/include/avnd_di.h |   1 +
 osaf/services/saf/amf/amfnd/verify.cc         |  38 +--------------------------
 3 files changed, 38 insertions(+), 37 deletions(-)


If SC comes back from headless, currently protection group information
will be lost at amfd.

Patch resends protection group information, which is similiar to failover

diff --git a/osaf/services/saf/amf/amfnd/di.cc 
b/osaf/services/saf/amf/amfnd/di.cc
--- a/osaf/services/saf/amf/amfnd/di.cc
+++ b/osaf/services/saf/amf/amfnd/di.cc
@@ -1260,6 +1260,8 @@ void avnd_diq_rec_del(AVND_CB *cb, AVND_
                                avnd_diq_rec_send(cb, pending_rec);
                        }
                }
+               /* resend pg start track */
+               avnd_di_resend_pg_start_track(cb);
        }
 
        /* free the avnd message contents */
@@ -1459,6 +1461,40 @@ uint32_t avnd_evt_avd_role_change_evh(AV
        return rc;
 }
 
+/****************************************************************************
+  Name          : avnd_di_resend_pg_start_track
+
+  Description   : This routing will get called on AVD fail-over or coming back
+                  from headless to send the PG start messages to the new AVD.
+
+  Arguments     : cb  - ptr to the AvND control block
+
+  Return Values : NCSCC_RC_SUCCESS/NCSCC_RC_FAILURE
+
+  Notes         : None.
+******************************************************************************/
+uint32_t avnd_di_resend_pg_start_track(AVND_CB *cb)
+{
+       uint32_t rc = NCSCC_RC_SUCCESS;
+       AVND_PG *pg = 0;
+       SaNameT csi_name;
+       TRACE_ENTER();
+
+       memset(&csi_name, '\0', sizeof(SaNameT));
+
+       while (nullptr != (pg = m_AVND_PGDB_REC_GET_NEXT(cb->pgdb, csi_name))) {
+               rc = avnd_di_pg_act_send(cb, &pg->csi_name, 
AVSV_PG_TRACK_ACT_START, true);
+
+               if (NCSCC_RC_SUCCESS != rc)
+                       break;
+
+               csi_name = pg->csi_name;
+       }
+
+       TRACE_LEAVE();
+       return rc;
+}
+
 /**
  * The SC absence timer expired. Reboot this node.
  * @param cb
diff --git a/osaf/services/saf/amf/amfnd/include/avnd_di.h 
b/osaf/services/saf/amf/amfnd/include/avnd_di.h
--- a/osaf/services/saf/amf/amfnd/include/avnd_di.h
+++ b/osaf/services/saf/amf/amfnd/include/avnd_di.h
@@ -83,6 +83,7 @@ uint32_t avnd_diq_rec_send(struct avnd_c
 uint32_t avnd_di_reg_su_rsp_snd(struct avnd_cb_tag *cb, SaNameT *su_name, 
uint32_t ret_code);
 uint32_t avnd_di_ack_nack_msg_send(struct avnd_cb_tag *cb, uint32_t rcv_id, 
uint32_t view_num);
 extern void avnd_di_uns32_upd_send(int class_id, int attr_id, const SaNameT 
*dn, uint32_t value);
+extern uint32_t avnd_di_resend_pg_start_track(struct avnd_cb_tag *);
 void avnd_sync_sisu(struct avnd_cb_tag *cb);
 void avnd_sync_csicomp(struct avnd_cb_tag *cb);
 
diff --git a/osaf/services/saf/amf/amfnd/verify.cc 
b/osaf/services/saf/amf/amfnd/verify.cc
--- a/osaf/services/saf/amf/amfnd/verify.cc
+++ b/osaf/services/saf/amf/amfnd/verify.cc
@@ -34,42 +34,6 @@
 
 #include "avnd.h"
 
-static uint32_t avnd_send_pg_start_on_fover(AVND_CB *cb);
-
-/****************************************************************************
-  Name          : avnd_send_pg_start_on_fover
- 
-  Description   : This routing will get called on AVD fail-over to send the
-                  PG start messages to the new AVD.
- 
-  Arguments     : cb  - ptr to the AvND control block
- 
-  Return Values : NCSCC_RC_SUCCESS/NCSCC_RC_FAILURE
- 
-  Notes         : None.
-******************************************************************************/
-static uint32_t avnd_send_pg_start_on_fover(AVND_CB *cb)
-{
-       uint32_t rc = NCSCC_RC_SUCCESS;
-       AVND_PG *pg = 0;
-       SaNameT csi_name;
-       TRACE_ENTER();
-
-       memset(&csi_name, '\0', sizeof(SaNameT));
-
-       while (nullptr != (pg = m_AVND_PGDB_REC_GET_NEXT(cb->pgdb, csi_name))) {
-               rc = avnd_di_pg_act_send(cb, &pg->csi_name, 
AVSV_PG_TRACK_ACT_START, true);
-
-               if (NCSCC_RC_SUCCESS != rc)
-                       break;
-
-               csi_name = pg->csi_name;
-       }
-
-       TRACE_LEAVE();
-       return rc;
-}
-
 /****************************************************************************
   Name          : avnd_evt_avd_verify_message
  
@@ -173,7 +137,7 @@ uint32_t avnd_evt_avd_verify_evh(AVND_CB
        /* 
         * Send PG tracking (START) message to new Active.
         */
-       avnd_send_pg_start_on_fover(cb);
+       avnd_di_resend_pg_start_track(cb);
 
 
        TRACE_LEAVE();

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to