Hi Gary,

This V2 has fixed the error reported in V1, ack from me.

Thanks

Minh

On 12/9/19 5:20 pm, Gary Lee wrote:
If delayed failover is enabled, and a downgrade to a version without #3060 
occurs,
then the standby running a newer version with #3060 may complain about an out
of sync error during warm sync.
---
  src/amf/amfd/ckpt_dec.cc | 23 +++++++++++++++++++----
  1 file changed, 19 insertions(+), 4 deletions(-)

diff --git a/src/amf/amfd/ckpt_dec.cc b/src/amf/amfd/ckpt_dec.cc
index 6288b4f..75213f8 100644
--- a/src/amf/amfd/ckpt_dec.cc
+++ b/src/amf/amfd/ckpt_dec.cc
@@ -2721,10 +2721,25 @@ uint32_t avd_dec_warm_sync_rsp(AVD_CL_CB *cb, 
NCS_MBCSV_CB_DEC *dec) {
      if (updt_cnt->ng_updt != cb->async_updt_cnt.ng_updt)
        LOG_ER("ng_updt counters mismatch: Active: %u Standby: %u",
               updt_cnt->ng_updt, cb->async_updt_cnt.ng_updt);
-    if (updt_cnt->failover_updt != cb->async_updt_cnt.failover_updt)
-      LOG_ER("failover_updt counters mismatch: Active: %u Standby: %u",
-             updt_cnt->failover_updt, cb->async_updt_cnt.failover_updt);
-
+    if (updt_cnt->failover_updt != cb->async_updt_cnt.failover_updt) {
+      if (dec->i_peer_version >= AVD_MBCSV_SUB_PART_VERSION_10) {
+        LOG_ER("failover_updt counters mismatch: Active: %u Standby: %u",
+               updt_cnt->failover_updt, cb->async_updt_cnt.failover_updt);
+      } else {
+        // Versions before 10 did not support failover_updt
+        // After a downgrade scenario, where the active is < v10
+        // and this node is >= v10, then there will be failover_updt mismatch
+        // If so, just set the value to what's on the older active
+        cb->async_updt_cnt.failover_updt = updt_cnt->failover_updt;
+
+        // check again
+        if (0 == memcmp(updt_cnt, &cb->async_updt_cnt,
+                        sizeof(AVSV_ASYNC_UPDT_CNT))) {
+          cb->stby_sync_state = AVD_STBY_IN_SYNC;
+          return status;
+        }
+      }
+    }
      LOG_ER("Out of sync detected in warm sync response, exiting");
      osafassert(0);


_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to