From 6f8203131a2399dc66b804c07b34d60739a8a9c2 Mon Sep 17 00:00:00 2001 From: Le Zhang Date: Wed, 9 Oct 2024 16:31:53 -0400 Subject: [PATCH] Issue open-horizon#4158 - Bug: Intermittent panic on agent startup Signed-off-by: Le Zhang --- agreement/agreement.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/agreement/agreement.go b/agreement/agreement.go index 9a40195b3..303c20e58 100644 --- a/agreement/agreement.go +++ b/agreement/agreement.go @@ -352,7 +352,9 @@ func (w *AgreementWorker) reconcileNodePolicy() int { return 60 } - w.checkNodePolicyChanges() + if w.limitedRetryEC != nil { + w.checkNodePolicyChanges() + } return 60 } @@ -501,7 +503,9 @@ func (w *AgreementWorker) CommandHandler(command worker.Command) bool { w.checkNodeChanges() case *NodePolicyChangeCommand: - w.checkNodePolicyChanges() + if w.limitedRetryEC != nil { + w.checkNodePolicyChanges() + } case *NodeSvcConfigStateChangeCommand: w.checkServiceConfigStateChanges()