Fix rsync retry logic for unreachable cluster 39/113439/1
authorEric Multanen <eric.w.multanen@intel.com>
Tue, 22 Sep 2020 18:10:32 +0000 (11:10 -0700)
committerEric Multanen <eric.w.multanen@intel.com>
Fri, 2 Oct 2020 04:18:03 +0000 (21:18 -0700)
Fix rsync to only retry reaching clusters until the
timeout occurs.

Issue-ID: MULTICLOUD-1226
Signed-off-by: Eric Multanen <eric.w.multanen@intel.com>
Change-Id: I5e8202358cfd8cdd15c9feb4fcbefe2683b7139a

src/rsync/pkg/context/context.go

index 35e6c4e..a277137 100644 (file)
@@ -252,7 +252,6 @@ Loop:
                                break Loop
                        } else {
                                logutils.Info("Cluster is not reachable - keep trying::", logutils.Fields{"cluster": cluster})
-                               go checkReachable()
                        }
                case <-ch:
                        statusFailed := resourcestatus.ResourceStatus{
@@ -279,6 +278,7 @@ Loop:
                                }
                                resStateUpdated = true
                        }
+                       go checkReachable()
                        break
                }
        }