Patch keeps legacy behavior of SURestart recovery before 
saAmfSUMaintenanceCampaign feature
---
 src/amf/amfnd/err.cc | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/amf/amfnd/err.cc b/src/amf/amfnd/err.cc
index 2abaf2007..e4cb9f08b 100644
--- a/src/amf/amfnd/err.cc
+++ b/src/amf/amfnd/err.cc
@@ -707,8 +707,14 @@ uint32_t avnd_err_rcvr_su_restart(AVND_CB *cb, AVND_SU *su,
   uint32_t rc = avnd_comp_oper_state_avd_sync(cb, failed_comp);
   if (NCSCC_RC_SUCCESS != rc) goto done;
 
-  avnd_di_uns32_upd_send(AVSV_SA_AMF_SU, saAmfSUOperState_ID, su->name,
-                         su->oper);
+  /* Keep SURestart recovery not to always report OperState to amfd
+     as legacy recovery. Only report OperState if SU is under SMF maintenance
+     campaign
+   */
+  if (!su->suMaintenanceCampaign.empty()) {
+    avnd_di_uns32_upd_send(AVSV_SA_AMF_SU, saAmfSUOperState_ID, su->name,
+        su->oper);
+  }
 
   set_suRestart_flag(su);
 
-- 
2.11.0


------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to