Skip to content

Commit 6f3f814

Browse files
committed
fix(ci): wait for SPIRE Agent Workload API socket before SVID fetch
Step 10 was failing because fetch-sovereign-svid-grpc.py requires the Workload API socket at /tmp/spire-agent/public/api.sock. The Step 7 attestation loop breaks early via server-side check (agent attested on server) before the agent creates the socket. Add a 30s socket readiness wait before invoking the SVID fetch.
1 parent be565f1 commit 6f3f814

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

hybrid-cloud-poc/test_agents.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3097,6 +3097,23 @@ echo " (Reusing demo.sh to avoid code duplication)"
30973097
echo ""
30983098

30993099
# Unified-Identity: Reuse demo script for Step 7
3100+
# First ensure the SPIRE Agent Workload API socket is ready
3101+
# (Step 7 attestation may complete server-side before socket is created)
3102+
AGENT_SOCKET="/tmp/spire-agent/public/api.sock"
3103+
if [ ! -S "$AGENT_SOCKET" ]; then
3104+
echo " Waiting for SPIRE Agent Workload API socket..."
3105+
for i in {1..30}; do
3106+
if [ -S "$AGENT_SOCKET" ]; then
3107+
echo -e "${GREEN} ✓ Workload API socket ready${NC}"
3108+
break
3109+
fi
3110+
if [ $i -eq 30 ]; then
3111+
echo -e "${YELLOW} ⚠ Workload API socket not found after 30s — SVID fetch may fail${NC}"
3112+
fi
3113+
sleep 1
3114+
done
3115+
fi
3116+
31003117
if [ -f "${SCRIPT_DIR}/scripts/demo.sh" ]; then
31013118
# Call demo script in quiet mode (suppresses header, uses our step header)
31023119
"${SCRIPT_DIR}/scripts/demo.sh" --quiet || {

0 commit comments

Comments
 (0)