Skip to content

Commit

Permalink
endpoint: don't start DNS history trigger when parsing endpoint
Browse files Browse the repository at this point in the history
[ upstream commit 0bb676d ]

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 cilium#34059, which only fixed the new-endpoint
case.

Signed-off-by: Casey Callendrello <[email protected]>
Signed-off-by: David Bimmler <[email protected]>
  • Loading branch information
squeed committed Nov 12, 2024
1 parent 212a6ff commit ce744df
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions pkg/endpoint/endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit ce744df

Please sign in to comment.