From a11254ae0b188972870b7477d8de279542941f98 Mon Sep 17 00:00:00 2001 From: John Watson Date: Thu, 11 Jan 2024 22:12:15 +0000 Subject: [PATCH] fix: docker was making a conflicting rule against otel/iptables, this resolves the prerouting --- .../src/instance/cyclone/firecracker-setup.sh | 4 ++-- prelude-si/rootfs/rootfs_build.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/deadpool-cyclone/src/instance/cyclone/firecracker-setup.sh b/lib/deadpool-cyclone/src/instance/cyclone/firecracker-setup.sh index 8987c2ee99..288c6524ac 100755 --- a/lib/deadpool-cyclone/src/instance/cyclone/firecracker-setup.sh +++ b/lib/deadpool-cyclone/src/instance/cyclone/firecracker-setup.sh @@ -221,8 +221,8 @@ execute_configuration_management() { # This permits NAT from within the Jail to access the otelcol running on the external interface of the machine. Localhost is `not` resolveable from # within the jail or the micro-vm directly due to /etc/hosts misalignment. Hardcoding the destination to 12.0.0.1 for the otel endpoint allows us to # ship a static copy of the rootfs but allow us to keep the dynamic nature of the machine hosting. - if ! iptables -t nat -C PREROUTING -p tcp --dport 4317 -d 1.0.0.1 -j DNAT --to-destination $(ip route get 8.8.8.8 | awk -- '{printf $7}'):4317; then - iptables -t nat -A PREROUTING -p tcp --dport 4317 -d 1.0.0.1 -j DNAT --to-destination $(ip route get 8.8.8.8 | awk -- '{printf $7}'):4317 + if ! iptables -t nat -C PREROUTING -p tcp --dport 4316 -d 1.0.0.1 -j DNAT --to-destination $(ip route get 8.8.8.8 | awk -- '{printf $7}'):4317; then + iptables -t nat -A PREROUTING -p tcp --dport 4316 -d 1.0.0.1 -j DNAT --to-destination $(ip route get 8.8.8.8 | awk -- '{printf $7}'):4317 fi else diff --git a/prelude-si/rootfs/rootfs_build.sh b/prelude-si/rootfs/rootfs_build.sh index f15b9ed56e..2cf47dc381 100755 --- a/prelude-si/rootfs/rootfs_build.sh +++ b/prelude-si/rootfs/rootfs_build.sh @@ -142,7 +142,7 @@ supervisor="supervise-daemon" pidfile="/cyclone/agent.pid" start(){ - export OTEL_EXPORTER_OTLP_ENDPOINT=http://1.0.0.1:4317 + export OTEL_EXPORTER_OTLP_ENDPOINT=http://1.0.0.1:4316 cyclone ${cyclone_args[*]} >> /var/log/cyclone.log 2>&1 && reboot & } EOF