From 3946aa728397beceb68dd47c1bc2ada75dc6c1fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Wed, 11 Sep 2024 09:31:43 +0200 Subject: [PATCH] ci: tdx: Adapt how we get the host IP MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In the process of switching the TDX CI machine we've noticed that `hostname -i` in one of the machines returns an one and only IP address, while in another machine it returns a full list of IPs. As we're only interested in the first one, let's adapt the code to always return the first one. Signed-off-by: Fabiano FidĂȘncio --- tests/integration/kubernetes/confidential_kbs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/kubernetes/confidential_kbs.sh b/tests/integration/kubernetes/confidential_kbs.sh index 916800a172..6d2fcd5ed9 100644 --- a/tests/integration/kubernetes/confidential_kbs.sh +++ b/tests/integration/kubernetes/confidential_kbs.sh @@ -311,7 +311,7 @@ function kbs_k8s_deploy() { echo "Setting up custom PCCS for TDX" cat <<- EOF > "${COCO_KBS_DIR}/config/kubernetes/custom_pccs/sgx_default_qcnl.conf" { - "pccs_url": "https://$(hostname -i):8081/sgx/certification/v4/", + "pccs_url": "https://$(hostname -i | grep -o "^[0-9.]*"):8081/sgx/certification/v4/", // To accept insecure HTTPS certificate, set this option to false "use_secure_cert": false