Skip to content

Commit 3395710

Browse files
feat: add CPU-32-HK runner test workflow
- Create test workflow for linux-amd64-cpu-32-hk label verification - Diagnose Vault certificate injection status - Verify buildctl installation and availability - Check token volume mount and cache volumes - Provide debugging output for runner pod inspection
1 parent ee3d363 commit 3395710

1 file changed

Lines changed: 222 additions & 0 deletions

File tree

Lines changed: 222 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,222 @@
1+
#
2+
# Copyright (c) 2025 Huawei Technologies Co., Ltd. All Rights Reserved.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
# This file is a part of the vllm-ascend project.
16+
#
17+
18+
name: Test CPU-32-HK Runner
19+
20+
on:
21+
pull_request:
22+
types:
23+
- opened
24+
- synchronize
25+
- reopened
26+
push:
27+
branches:
28+
- 'test-cpu-32-hk*'
29+
30+
defaults:
31+
run:
32+
shell: bash -el {0}
33+
34+
jobs:
35+
test-cpu-32-hk:
36+
runs-on: linux-amd64-cpu-32-hk
37+
steps:
38+
- name: Checkout code
39+
uses: actions/checkout@v7
40+
with:
41+
fetch-depth: 0
42+
43+
- name: System Info
44+
run: |
45+
echo "=========================================="
46+
echo "🔍 CPU-32-HK Runner Diagnostic Info"
47+
echo "=========================================="
48+
echo ""
49+
echo "System Information:"
50+
uname -a
51+
echo ""
52+
echo "CPU Cores: $(nproc)"
53+
echo "Memory: $(free -h | grep Mem | awk '{print $2}')"
54+
echo ""
55+
echo "Current User: $(whoami)"
56+
echo "Current Directory: $(pwd)"
57+
echo ""
58+
echo "Environment Variables:"
59+
env | grep -E "(BUILDKITD|DOCKER|HOME)" || echo "No buildkitd vars found"
60+
echo ""
61+
62+
- name: Verify Vault Certificates
63+
run: |
64+
echo "=========================================="
65+
echo "🔐 Checking Vault Certificate Injection"
66+
echo "=========================================="
67+
DOCKER_CONFIG="${DOCKER_CONFIG:-.docker}"
68+
echo "DOCKER_CONFIG path: $DOCKER_CONFIG"
69+
echo ""
70+
71+
if [ -f "$HOME/$DOCKER_CONFIG/ca.pem" ]; then
72+
echo "✅ ca.pem exists: $(ls -lh $HOME/$DOCKER_CONFIG/ca.pem)"
73+
else
74+
echo "⚠️ ca.pem NOT found at $HOME/$DOCKER_CONFIG/ca.pem"
75+
fi
76+
77+
if [ -f "$HOME/$DOCKER_CONFIG/cert.pem" ]; then
78+
echo "✅ cert.pem exists: $(ls -lh $HOME/$DOCKER_CONFIG/cert.pem)"
79+
else
80+
echo "⚠️ cert.pem NOT found at $HOME/$DOCKER_CONFIG/cert.pem"
81+
fi
82+
83+
if [ -f "$HOME/$DOCKER_CONFIG/key.pem" ]; then
84+
echo "✅ key.pem exists: $(ls -lh $HOME/$DOCKER_CONFIG/key.pem)"
85+
else
86+
echo "⚠️ key.pem NOT found at $HOME/$DOCKER_CONFIG/key.pem"
87+
fi
88+
89+
if [ -f "$HOME/$DOCKER_CONFIG/config.json" ]; then
90+
echo "✅ config.json exists: $(ls -lh $HOME/$DOCKER_CONFIG/config.json)"
91+
else
92+
echo "⚠️ config.json NOT found at $HOME/$DOCKER_CONFIG/config.json"
93+
fi
94+
95+
echo ""
96+
if [ -d "$HOME/$DOCKER_CONFIG" ]; then
97+
echo "Docker config directory contents:"
98+
ls -la "$HOME/$DOCKER_CONFIG/" || echo "Failed to list directory"
99+
else
100+
echo "❌ Docker config directory does not exist"
101+
fi
102+
echo ""
103+
104+
- name: Verify buildctl Installation
105+
run: |
106+
echo "=========================================="
107+
echo "🔨 Checking buildctl Installation"
108+
echo "=========================================="
109+
110+
if command -v buildctl &> /dev/null; then
111+
echo "✅ buildctl found in PATH"
112+
buildctl --version
113+
echo ""
114+
echo "buildctl location: $(which buildctl)"
115+
else
116+
echo "❌ buildctl NOT found in PATH"
117+
echo ""
118+
echo "Attempting to find buildctl in common locations:"
119+
find /usr/local/bin -name "buildctl*" 2>/dev/null || echo "Not in /usr/local/bin"
120+
find /usr/bin -name "buildctl*" 2>/dev/null || echo "Not in /usr/bin"
121+
find /home -name "buildctl*" 2>/dev/null -o -name "*buildkit*" 2>/dev/null | head -10 || echo "Not found in home"
122+
fi
123+
echo ""
124+
125+
- name: Verify Token Volume Mount
126+
run: |
127+
echo "=========================================="
128+
echo "🔑 Checking Token Volume Mount"
129+
echo "=========================================="
130+
131+
TOKEN_PATH="/var/run/secrets/tokens"
132+
133+
if [ -d "$TOKEN_PATH" ]; then
134+
echo "✅ Token directory exists: $TOKEN_PATH"
135+
echo ""
136+
echo "Directory contents:"
137+
ls -la "$TOKEN_PATH" || echo "Failed to list directory"
138+
139+
if [ -f "$TOKEN_PATH/token" ]; then
140+
echo ""
141+
echo "✅ Token file exists"
142+
echo "Token size: $(wc -c < $TOKEN_PATH/token) bytes"
143+
else
144+
echo ""
145+
echo "⚠️ Token file NOT found at $TOKEN_PATH/token"
146+
fi
147+
else
148+
echo "❌ Token directory does not exist: $TOKEN_PATH"
149+
fi
150+
echo ""
151+
152+
- name: Test buildkitd Connectivity
153+
continue-on-error: true
154+
run: |
155+
echo "=========================================="
156+
echo "🌐 Testing buildkitd Service Connectivity"
157+
echo "=========================================="
158+
159+
BUILDKITD_ADDR="${BUILDKITD_ADDR:-tcp://buildkitd-service.buildkitd:1234}"
160+
echo "BUILDKITD_ADDR: $BUILDKITD_ADDR"
161+
echo ""
162+
163+
if command -v buildctl &> /dev/null; then
164+
echo "Testing buildctl connection..."
165+
buildctl du || echo "buildctl du failed (expected if service not ready)"
166+
else
167+
echo "⚠️ buildctl not available, skipping connectivity test"
168+
fi
169+
echo ""
170+
171+
- name: Verify Cache Volumes
172+
run: |
173+
echo "=========================================="
174+
echo "💾 Checking Cache Volumes"
175+
echo "=========================================="
176+
177+
CACHE_DIR="/root/.cache"
178+
179+
if [ -d "$CACHE_DIR" ]; then
180+
echo "✅ Cache directory exists: $CACHE_DIR"
181+
echo "Directory size: $(du -sh $CACHE_DIR 2>/dev/null | cut -f1)"
182+
else
183+
echo "❌ Cache directory does not exist: $CACHE_DIR"
184+
fi
185+
echo ""
186+
187+
- name: Keep pod running for manual debugging (15 minutes)
188+
run: |
189+
echo "=========================================="
190+
echo "🛌 Pod Debug Session"
191+
echo "=========================================="
192+
echo ""
193+
echo "Pod is running for manual inspection."
194+
echo "Debug time limit: 15 minutes (900 seconds)"
195+
echo "Started: $(date)"
196+
echo ""
197+
echo "You can verify setup by running:"
198+
echo " - buildctl --version"
199+
echo " - ls ~/.docker/"
200+
echo " - cat /var/run/secrets/tokens/token"
201+
echo ""
202+
sleep 900
203+
echo "Debug session ended: $(date)"
204+
echo "=========================================="
205+
206+
- name: Final Summary
207+
if: always()
208+
run: |
209+
echo "=========================================="
210+
echo "✅ CPU-32-HK Runner Test Complete"
211+
echo "=========================================="
212+
echo ""
213+
echo "If this job reached this point, the runner"
214+
echo "successfully picked up the workflow and"
215+
echo "created the job pod."
216+
echo ""
217+
echo "Check the logs above for:"
218+
echo " ✓ Vault certificates injected"
219+
echo " ✓ buildctl installed and available"
220+
echo " ✓ Token volume mounted"
221+
echo " ✓ Cache volumes accessible"
222+
echo "=========================================="

0 commit comments

Comments
 (0)