Full implementation of the nginx dynamic module with: - SO_BINDTODEVICE-based per-interface traffic attribution - Per-worker lock-free counters flushed to shared memory - Prometheus text and JSON scrape endpoint at configurable location - UDP-only global logtail (ipng_stats_logtail) for fire-and-forget access log streaming - $ipng_source_tag nginx variable for use in log_format/map - Histogram buckets, EWMA rate gauges, zone meta-metrics - Debian packaging (libnginx-mod-http-ipng-stats) - Robot Framework end-to-end tests via containerlab - SPDX Apache-2.0 headers on all source files
24 lines
772 B
Bash
24 lines
772 B
Bash
#!/bin/bash
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
# Client container entrypoint: installs curl, waits for containerlab
|
|
# to attach the data-plane veth, configures the IP, removes the mgmt
|
|
# default route so traffic to the server goes through eth1 (data-plane),
|
|
# and stays alive for docker-exec commands from the Robot test.
|
|
|
|
apt-get update -qq
|
|
apt-get install -y -qq curl iproute2 > /dev/null 2>&1
|
|
|
|
# Wait for containerlab to attach eth1.
|
|
echo "Waiting for eth1 ..."
|
|
while ! ip link show eth1 > /dev/null 2>&1; do
|
|
sleep 0.2
|
|
done
|
|
ip link set eth1 up
|
|
ip addr add ${MY_IP} dev eth1
|
|
|
|
# Remove the default route so packets to 10.0.x.0/24 go out eth1
|
|
# (the connected route) instead of through the mgmt bridge.
|
|
ip route del default 2>/dev/null || true
|
|
|
|
exec sleep infinity
|