{{ message }}
Repository navigation
ipmasq: Start the agent from its own cell, drop it from the IPAM path - #48949
Merged
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
tamilmani1989
approved these changes
Sep 22, 2026
tamilmani1989
left a comment
Contributor
There was a problem hiding this comment.
looks good from azure side
bimmlerd
approved these changes
Sep 24, 2026
HadrienPatte
force-pushed
the
pr/HadrienPatte/ip-masq
branch
from
September 27, 2026 20:26
881e988 to
1b6e568
Compare
The ip-masq-agent has no in-process consumer: it exists for its side effects on the BPF ipmasq map. Constructing it with a cell.Provide means it would only run as long as something else in the hive happened to depend on *ipmasq.IPMasqAgent, and hive constructors are lazy, so losing the last consumer would silently turn --enable-ip-masq-agent into a no-op. Construct and register it from a cell.Invoke instead. The agent is no longer part of the object graph, so the module no longer depends on an unrelated caller to stay loaded. Signed-off-by: Hadrien Patte <hadrien.patte@datadoghq.com>
With the CIDRs gone from the allocation result, the ip-masq-agent has no reader left in the IPAM path. Its only consumers were the two `NonMasqCIDRsFromConfig()` calls that appended to `AllocationResult.CIDRs`. Signed-off-by: Hadrien Patte <hadrien.patte@datadoghq.com>
HadrienPatte
force-pushed
the
pr/HadrienPatte/ip-masq
branch
from
September 27, 2026 20:30
1b6e568 to
d35ef14
Compare
HadrienPatte
enabled auto-merge
September 28, 2026 23:22
This comment has been minimized.
This comment has been minimized.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

The ip-masq-agent has no in-process consumer, it exists for its side effects on the BPF ipmasq map. Its only callers were the two
NonMasqCIDRsFromConfig()calls that appended toAllocationResult.CIDRs, and those CIDRs were removed in #48818.Removing
*ipmasq.IPMasqAgentfrom the IPAM cells would cause the ipmasqcell.Provideconstructor to no longer get called and lead the--enable-ip-masq-agentflag value to get ignored. To prevent this, this PR moves the ipmasq agent construction and registration from aProvideto anInvokeso that it always runs, even if nothing explicitely depends on any side effect it produces.