Merge branch 'main' into test-cpu-32-runner #5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # Copyright (c) 2025 Huawei Technologies Co., Ltd. All Rights Reserved. | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, | |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| # See the License for the specific language governing permissions and | |
| # limitations under the License. | |
| # This file is a part of the vllm-ascend project. | |
| # | |
| name: Test CPU-16 Runner (Diagnostic) | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| - reopened | |
| push: | |
| branches: | |
| - 'test-cpu-32*' | |
| defaults: | |
| run: | |
| shell: bash -el {0} | |
| jobs: | |
| test-cpu-16: | |
| runs-on: linux-amd64-cpu-16-hk | |
| steps: | |
| - name: Job started - sleeping for debugging | |
| run: | | |
| echo "==========================================" | |
| echo "🔍 CPU-32 Runner Diagnostic Workflow" | |
| echo "==========================================" | |
| echo "" | |
| echo "Job has started successfully!" | |
| echo "This means the runner matched and pod was created." | |
| echo "" | |
| echo "Pod will sleep for 15 minutes for debugging." | |
| echo "You can now run:" | |
| echo "" | |
| echo " # Find the pod" | |
| echo " kubectl get pods -n vllm-project -o wide | grep test-cpu-32" | |
| echo "" | |
| echo " # View logs" | |
| echo " kubectl logs -f <pod-name> -n vllm-project -c runner" | |
| echo "" | |
| echo " # Enter the pod" | |
| echo " kubectl exec -it <pod-name> -n vllm-project -c runner -- bash" | |
| echo "" | |
| echo "==========================================" | |
| echo "Sleep will start now (900 seconds = 15 minutes)" | |
| echo "==========================================" | |
| - name: Checkout | |
| run: | | |
| echo "Checking out repository..." | |
| pwd | |
| ls -la | head -20 | |
| - name: Print environment info | |
| run: | | |
| echo "" | |
| echo "=== 📊 System Information ===" | |
| uname -a | |
| echo "" | |
| echo "=== 💻 CPU Information ===" | |
| nproc | |
| lscpu | head -15 | |
| echo "" | |
| echo "=== 💾 Memory Information ===" | |
| free -h | |
| echo "" | |
| echo "=== 👤 User and Groups ===" | |
| whoami | |
| id | |
| echo "" | |
| echo "=== 🔧 Available tools ===" | |
| which buildctl || echo "❌ buildctl not found" | |
| buildctl --version 2>/dev/null || echo "❌ buildctl not available" | |
| echo "" | |
| echo "=== 🌍 Environment Variables (BUILDKIT/DOCKER) ===" | |
| env | grep -E "BUILDKIT|DOCKER_CONFIG" || echo "❌ No BUILDKIT/DOCKER_CONFIG env vars found" | |
| echo "" | |
| echo "=== 📁 Home directory ===" | |
| ls -la ~/ | head -20 | |
| - name: Check Vault certificate injection | |
| run: | | |
| echo "" | |
| echo "=== 🔐 Checking Vault Certificate Injection ===" | |
| echo "Looking for Vault-injected certificates..." | |
| echo "" | |
| if [ -d "$HOME/.docker" ]; then | |
| echo "✅ $HOME/.docker exists" | |
| echo "Files:" | |
| ls -la "$HOME/.docker/" | |
| echo "" | |
| echo "File contents (first 50 chars):" | |
| for f in "$HOME/.docker"/*; do | |
| if [ -f "$f" ]; then | |
| echo "--- $(basename $f) ---" | |
| head -c 50 "$f" 2>/dev/null && echo " ..." | |
| fi | |
| done | |
| else | |
| echo "❌ $HOME/.docker does NOT exist" | |
| echo "This indicates Vault injection failed!" | |
| fi | |
| - name: Check buildctl availability | |
| continue-on-error: true | |
| run: | | |
| echo "" | |
| echo "=== 🚀 Checking buildctl at job start ===" | |
| # Check global buildctl | |
| which buildctl && echo "✅ buildctl found in PATH" || echo "❌ buildctl NOT found in PATH" | |
| # Check /tmp/buildkit/bin/buildctl (the download location) | |
| if [ -f "/tmp/buildkit/bin/buildctl" ]; then | |
| echo "✅ /tmp/buildkit/bin/buildctl exists" | |
| /tmp/buildkit/bin/buildctl --version | |
| else | |
| echo "❌ /tmp/buildkit/bin/buildctl NOT found" | |
| fi | |
| buildctl --version 2>/dev/null || echo "⏳ buildctl --version failed (may still be installing)" | |
| # Wait for buildctl if not available | |
| echo "" | |
| echo "Waiting for /tmp/buildkit/bin/buildctl to appear..." | |
| for i in {1..300}; do | |
| if [ -f "/tmp/buildkit/bin/buildctl" ]; then | |
| echo "✅ /tmp/buildkit/bin/buildctl appeared after $i seconds" | |
| /tmp/buildkit/bin/buildctl --version | |
| break | |
| fi | |
| if command -v buildctl &> /dev/null; then | |
| echo "✅ buildctl appeared in PATH after $i seconds" | |
| buildctl --version | |
| break | |
| fi | |
| [ $((i % 30)) -eq 0 ] && echo "Waiting... ($i/300 sec)" | |
| sleep 1 | |
| done | |
| # Final check | |
| echo "" | |
| echo "=== Final Status ===" | |
| if [ -f "/tmp/buildkit/bin/buildctl" ]; then | |
| echo "✅ /tmp/buildkit/bin/buildctl is available" | |
| /tmp/buildkit/bin/buildctl --version | |
| elif command -v buildctl &> /dev/null; then | |
| echo "✅ buildctl is available in PATH" | |
| buildctl --version | |
| else | |
| echo "⚠️ buildctl still not available after 5 minutes" | |
| echo "" | |
| echo "Diagnostics:" | |
| echo " - /tmp/buildkit/ contents:" | |
| ls -la /tmp/buildkit/ 2>/dev/null || echo " /tmp/buildkit/ does not exist" | |
| echo " - /tmp/buildkit/bin/ contents:" | |
| ls -la /tmp/buildkit/bin/ 2>/dev/null || echo " /tmp/buildkit/bin/ does not exist" | |
| echo " - /tmp/buildkit.tar.gz:" | |
| ls -la /tmp/buildkit.tar.gz 2>/dev/null || echo " /tmp/buildkit.tar.gz not found" | |
| echo "" | |
| echo "This may indicate:" | |
| echo " - postStart hook is taking too long" | |
| echo " - Network issue downloading buildkit binary" | |
| echo " - Vault certificate injection failed" | |
| echo " - Permission issue copying to /usr/local/bin" | |
| fi | |
| - name: Test buildkitd connection | |
| continue-on-error: true | |
| run: | | |
| echo "" | |
| echo "=== 🔌 Testing buildkitd connection ===" | |
| echo "BUILDKITD_ADDR: ${BUILDKITD_ADDR:-not set}" | |
| echo "DOCKER_CONFIG: ${DOCKER_CONFIG:-not set}" | |
| if [ -n "$BUILDKITD_ADDR" ]; then | |
| echo "Attempting to connect to buildkitd..." | |
| if command -v buildctl &> /dev/null; then | |
| buildctl du 2>&1 || echo "buildctl du failed (may need certificates)" | |
| else | |
| echo "buildctl not available yet" | |
| fi | |
| else | |
| echo "⚠️ BUILDKITD_ADDR not set" | |
| fi | |
| - name: Keep pod running for manual debugging (15 minutes) | |
| run: | | |
| echo "" | |
| echo "==========================================" | |
| echo "🛌 Pod is now sleeping for 15 minutes" | |
| echo "==========================================" | |
| echo "" | |
| echo "You have 15 minutes to:" | |
| echo " 1. Find the pod:" | |
| echo " kubectl get pods -n vllm-project -o wide" | |
| echo "" | |
| echo " 2. Check logs in real-time:" | |
| echo " kubectl logs -f <pod-name> -n vllm-project -c runner" | |
| echo "" | |
| echo " 3. Execute commands in the pod:" | |
| echo " kubectl exec <pod-name> -n vllm-project -c runner -- which buildctl" | |
| echo " kubectl exec <pod-name> -n vllm-project -c runner -- ls -la ~/.docker/" | |
| echo " kubectl exec <pod-name> -n vllm-project -c runner -- env | grep BUILDKIT" | |
| echo "" | |
| echo " 4. Open an interactive shell:" | |
| echo " kubectl exec -it <pod-name> -n vllm-project -c runner -- bash" | |
| echo "" | |
| echo "==========================================" | |
| echo "Sleep started: $(date)" | |
| sleep 900 | |
| echo "Sleep ended: $(date)" | |
| echo "==========================================" | |
| - name: Final status | |
| run: | | |
| echo "" | |
| echo "✅ Pod has completed 15-minute debug session" | |
| echo "Test workflow finished." |