From ce744dff3b516ce01c7832d3d0e219c5f79bf910 Mon Sep 17 00:00:00 2001 From: Casey Callendrello Date: Mon, 11 Nov 2024 13:46:08 +0000 Subject: [PATCH] endpoint: don't start DNS history trigger when parsing endpoint [ upstream commit 0bb676dd9555dee688a42d6fc8a4afd8219137bd ] This trigger may be, well, triggered when reacting to a DNS request -- even when the agent is starting up. This could lead to a deadlock, as the datapath is not able to write the endpoint header file until the agent is started, but the agent cannot finish starting as the endpoint is locked. The fix for this is to remove the unnecessary trigger initialization on endpoint parsing; we will always start it on first regeneration. This catches a case missed in #34059, which only fixed the new-endpoint case. Signed-off-by: Casey Callendrello Signed-off-by: David Bimmler --- pkg/endpoint/endpoint.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkg/endpoint/endpoint.go b/pkg/endpoint/endpoint.go index 2f53d75c06a54..c3a58612016b1 100644 --- a/pkg/endpoint/endpoint.go +++ b/pkg/endpoint/endpoint.go @@ -943,8 +943,6 @@ func parseEndpoint(ctx context.Context, owner regeneration.Owner, policyGetter p return nil, fmt.Errorf("failed to parse restored endpoint: %w", err) } - ep.initDNSHistoryTrigger() - // Validate the options that were parsed ep.SetDefaultOpts(ep.Options)