Merge pull request #293 from matter-labs/tdx_wait_for_vector

feat(tdx_google): add iproute2 and vector initialization wait
This commit is contained in:
Harald Hoyer 2025-03-21 13:26:34 +01:00 committed by GitHub
commit 6c3bd96617
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -15,10 +15,19 @@
User = "root"; User = "root";
EnvironmentFile = "-/run/env/env"; EnvironmentFile = "-/run/env/env";
}; };
path = [ pkgs.docker pkgs.teepot.teepot.tdx_extend ]; path = [ pkgs.docker pkgs.teepot.teepot.tdx_extend pkgs.iproute2 ];
script = '' script = ''
set -eu -o pipefail set -eu -o pipefail
# wait for vector to initialize itself
for i in {1..30}; do
if [[ $(ss -H -t -l -n sport = 4318) ]]; then
break
fi
echo "Waiting for vector to initialize itself..." >&2
sleep 1
done
DIGEST=''${CONTAINER_DIGEST#sha256:} DIGEST=''${CONTAINER_DIGEST#sha256:}
echo "Measuring $DIGEST" >&2 echo "Measuring $DIGEST" >&2
test -c /dev/tdx_guest && tdx-extend --digest "$DIGEST" --rtmr 3 test -c /dev/tdx_guest && tdx-extend --digest "$DIGEST" --rtmr 3