Repository navigation
Conversation
Add a diego.rep.log_container_network_info property (default false). When enabled, the rep logs each container's internal (instance) IP under the "container-network-info" log key during container operations, providing a connection-independent way to correlate a container IP to its instance. Signed-off-by: Radkov <ivo.radkov@sap.com>
Keep the Windows rep job spec and config template in sync with the Linux rep job (resolves the windows-drift / rep-specs-drifted lint checks). Signed-off-by: Radkov <ivo.radkov@sap.com>
ameowlia
left a comment
There was a problem hiding this comment.
This provides a connection-independent way to correlate a container's overlay IP to its instance — useful for operators who want to attribute network activity (e.g. a DNS lookup captured elsewhere by its source IP) back to a specific LRP/instance without relying on the app opening a connection that would otherwise surface the mapping.
Yes I see how this would be helpful.
According to my AI, as written, this logs every ~30s for every container, not just on container operations. ContainerOperation.Execute() is also called by the bulker's periodic sync (BatchOperations → operationFromContainer, every polling_interval_in_seconds), so each container re-emits container-network-info on every sweep. Was that intended?
If you really want it every 30s then this should definitely be optional via config like you have already done. In that case I would update the config description to indicate this frequency.
However, if you want to limit it to only certain container actions like when it starts running, any change to readiness, exiting, then I think it would be a good idea to turn it on for everyone with no need for config.
Please ping me on slack when you want me to review this PR again.
…ption Describe explicitly that the container-network-info line is emitted on every container-operation sweep (per diego.rep.polling_interval_in_seconds, default 30s) for every container with an internal IP, so operators understand the per-poll frequency before enabling. No behavior change. Signed-off-by: Radkov <ivo.radkov@sap.com>
Summary
Adds a new
diego.rep.log_container_network_infoproperty (default false). When enabled, the rep logs each container's internal (instance) IP under thecontainer-network-infolog key during container operations.This provides a connection-independent way to correlate a container's overlay IP to its instance — useful for operators who want to attribute network activity (e.g. a DNS lookup captured elsewhere by its source IP) back to a specific LRP/instance without relying on the app opening a connection that would otherwise surface the mapping.
Details
diego.rep.log_container_network_info(defaultfalse) → rendered into the rep config aslog_container_network_info→RepConfig.LogContainerNetworkInfo→ threaded throughgenerator.NewtoContainerOperation.trueand the container has an internal IP, so there is no behavior/volume change by default.Testing
go build ./...andgo test ./generator/ ./cmd/rep/config/pass.