From 267dc72f4eb877bd9007fc803278ff8c2fe535a6 Mon Sep 17 00:00:00 2001 From: James Rasell Date: Tue, 2 Sep 2025 11:02:48 +0100 Subject: [PATCH] e2e: Correctly handle IMDSv2 when discovering UI proxy address. (#26674) The call to IMDSv1 has been failing since we switched to v2 which meant the UI e2e script attempted to use the service IP address for its tests. The service IP address is the Nomad client's private address which is not routable from the e2e test runner which means the test fails. This change updates the IP discovery to use IMDSv2 which means the address is correctly populated and routable. The change also makes this discovery method by a job action within the proxy job. This exercises that feature and utilizes it in a way for which it was designed. --- e2e/ui/input/proxy.nomad | 18 ++++++++++++++++++ e2e/ui/run.sh | 4 +--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/e2e/ui/input/proxy.nomad b/e2e/ui/input/proxy.nomad index b665a8d37..f87dddd2b 100644 --- a/e2e/ui/input/proxy.nomad +++ b/e2e/ui/input/proxy.nomad @@ -74,6 +74,24 @@ job "nomad-proxy" { memory = 128 } + action "get_proxy_public_address" { + command = "/bin/bash" + args = ["-c", "local/get_proxy_public_ip.sh"] + } + + template { + destination = "local/get_proxy_public_ip.sh" + perms = "0755" + data = <