agentleFS
AWSKnown publisherawslabs/awsome-distributed-ai/architectures/sagemaker-hyperpod-eks/slinky-slurm/.opencode/skills/validate-deployment/SKILL.md

validate-deployment

Skill484 starsChanged 3 months agoMIT-0View on GitHub

Post-deployment health checks for slinky-slurm including pod status, Slurm node registration, SSH connectivity, and test job submission

  • Reads credentials

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 6 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use this skill after completing all deployment phases (deploy.sh, setup.sh/install.sh) to verify the Slurm cluster is healthy and …

    line 10
  2. Distinctive:

    All three deployment phases completed successfully

    line 18
  3. Distinctive:

    Check that all pods in the key namespaces are Running and Ready:

    line 27
  4. Distinctive:

    If SSH fails with "Connection refused" or timeout, the NLB may still be provisioning.

    line 121
  5. Distinctive:

    After SSH'ing into the login node:

    line 126
  6. Very specific:

    Only the ml.g5.8xlarge sbatch has been validated end-to-end:

    line 175
  7. Distinctive:

    Run this from your local machine (not the login node) for a rapid health check:

    line 197
  8. Distinctive:

    When issues arise, these are the most useful log sources:

    line 250

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Validate Deployment

Overview

Use this skill after completing all deployment phases (deploy.sh, setup.sh/install.sh) to verify the Slurm cluster is healthy and operational. This skill provides a systematic checklist that covers infrastructure, Kubernetes workloads, Slurm services, network access, and workload execution.

Prerequisites

  • All three deployment phases completed successfully
  • kubectl configured to point to the HyperPod EKS cluster
  • SSH key available at ~/.ssh/id_ed25519_slurm
  • NLB hostname available (printed by install.sh)

Steps

Step 1: Verify Kubernetes Pod Health

Check that all pods in the key namespaces are Running and Ready:

echo "=== cert-manager namespace ==="
kubectl -n cert-manager get pods -o wide

echo "=== kube-system (LB Controller) ==="
kubectl -n kube-system get pods -l app.kubernetes.io/name=aws-load-balancer-controller -o wide

echo "=== slurm namespace ==="
kubectl -n slurm get pods -o wide

echo "=== slinky namespace ==="
kubectl -n slinky get pods -o wide

echo "=== mariadb namespace ==="
kubectl -n mariadb get pods -o wide

Expected state:

NamespaceKey PodsStatus
cert-managercert-manager-*, cert-manager-webhook-*, cert-manager-cainjector-*Running
kube-systemaws-load-balancer-controller-* (x2)Running
slurmslurm-controller-*, slurm-slurmd-slinky-* (x replicas), slurm-login-slinky-*, slurm-restapi-*, slurm-accounting-*Running
slinkyslurm-operator-*Running
mariadbmariadb-operator-*, mariadb-*Running

The number of slurm-slurmd-slinky-* pods should match the --instance-count used during deployment (default: 4 for ml.g5.8xlarge, 2 for ml.p5.48xlarge).

If any pods are not Running:

# Get detailed pod status
kubectl -n slurm describe pod <pod-name>

# Check pod logs
kubectl -n slurm logs <pod-name> --tail=50

# Check events
kubectl -n slurm get events --sort-by='.lastTimestamp' | tail -20

Step 2: Verify Kubernetes Node Health

kubectl get nodes -o wide

Expected:

  • Management nodes: ml.m5.4xlarge, STATUS=Ready
  • Accelerated nodes: your chosen instance type (e.g., ml.g5.8xlarge), STATUS=Ready

If nodes show NotReady:

kubectl describe node <node-name>
# Check the Conditions section for issues

Step 3: Verify Login Service and NLB

kubectl get svc slurm-login-slinky -n slurm

Expected: An external hostname under EXTERNAL-IP, type LoadBalancer.

# Get the NLB hostname
SLURM_LOGIN=$(kubectl get svc slurm-login-slinky -n slurm \
    -o jsonpath='{.status.loadBalancer.ingress[0].hostname}')
echo "Login endpoint: ${SLURM_LOGIN}"

# Test DNS resolution
nslookup "${SLURM_LOGIN}"

# Test SSH port connectivity (port 22)
nc -zv "${SLURM_LOGIN}" 22

Step 4: SSH to Login Node

ssh -i ~/.ssh/id_ed25519_slurm root@<NLB_HOSTNAME>

Expected: Successful SSH login as root to the Slurm login node.

If SSH fails with "Connection refused" or timeout, the NLB may still be provisioning. Wait 2-3 minutes and retry.

Step 5: Verify Slurm Services (from login node)

After SSH'ing into the login node:

# Check Slurm controller status
scontrol show config | head -5

# Check Slurm version
sinfo --version

# Check registered nodes
sinfo
# Expected: Nodes in "idle" state under the correct partition

# Check partitions
scontrol show partitions

# Check node details
scontrol show nodes

# Verify Slurm accounting
sacctmgr show clusters

Expected sinfo output (example for ml.g5.8xlarge with 4 nodes):

PARTITION  AVAIL  TIMELIMIT  NODES  STATE  NODELIST
slinky*    up     infinite   4      idle   slurm-slurmd-slinky-[0-3]

Node count should match --instance-count used during deployment.

Step 6: Submit a Test Job

From the login node, submit a basic test job:

# Simple test job
srun hostname

# Or submit a batch job
sbatch --wrap="hostname && nvidia-smi" --output=/tmp/test-%j.out
squeue  # Monitor job status
cat /tmp/test-*.out  # Check output after completion

Step 7: Submit a Training Job (Optional)

For a full end-to-end validation, submit the Llama2 7B training job. Only the ml.g5.8xlarge sbatch has been validated end-to-end:

For ml.g5.8xlarge:

sbatch sbatch/fsdp/g5-llama2_7b-training.sbatch
squeue  # Monitor

For ml.p5.48xlarge:

sbatch sbatch/fsdp/p5-llama2_7b-training.sbatch
squeue  # Monitor

These jobs run a distributed training workload using PyTorch FSDP and validate GPU compute, inter-node communication (EFA), and the shared filesystem (FSx Lustre).

Quick Validation Script

Run this from your local machine (not the login node) for a rapid health check:

#!/bin/bash
echo "=== cert-manager ==="
kubectl -n cert-manager get pods --no-headers | awk '{print $1, $3}'

echo ""
echo "=== LB Controller ==="
kubectl -n kube-system get pods -l app.kubernetes.io/name=aws-load-balancer-controller \
    --no-headers | awk '{print $1, $3}'

echo ""
echo "=== Pod Status ==="
kubectl -n slurm get pods -o custom-columns=\
'NAME:.metadata.name,STATUS:.status.phase,READY:.status.conditions[?(@.type=="Ready")].status'

echo ""
echo "=== Node Status ==="
kubectl get nodes -o custom-columns=\
'NAME:.metadata.name,STATUS:.status.conditions[?(@.type=="Ready")].status,TYPE:.metadata.labels.node\.kubernetes\.io/instance-type'

echo ""
echo "=== Login Service ==="
kubectl get svc slurm-login-slinky -n slurm \
    -o custom-columns='NAME:.metadata.name,TYPE:.spec.type,EXTERNAL:.status.loadBalancer.ingress[0].hostname'

echo ""
echo "=== Slurm Pods Count ==="
echo "Controller: $(kubectl -n slurm get pods -l app.kubernetes.io/name=controller --no-headers | wc -l)"
echo "Compute:    $(kubectl -n slurm get pods -l app.kubernetes.io/name=slurmd --no-headers | wc -l)"
echo "Login:      $(kubectl -n slurm get pods -l app.kubernetes.io/name=login --no-headers | wc -l)"

Troubleshooting

SymptomCauseFix
Pods in CrashLoopBackOffConfiguration error in values file or missing dependenciesCheck logs: kubectl -n slurm logs <pod> --previous
Pods in PendingInsufficient node resources or node selector mismatchCheck: kubectl -n slurm describe pod <pod> -- look at Events
Nodes in drain stateSlurm put nodes in drain due to health check failureOn login node: scontrol update nodename=<node> state=idle reason=""
Nodes in down stateSlurm controller cannot reach slurmdCheck slurmd logs: kubectl -n slurm logs slurm-slurmd-slinky-<n>
sinfo shows no nodesSlurm controller not yet synchronizedWait 1-2 minutes; check controller logs: kubectl -n slurm logs <controller-pod>
NLB not resolvingDNS propagation delayWait 2-5 minutes; verify with nslookup
SSH "Connection refused"NLB target not yet registered or SSH not startedCheck NLB targets in AWS console; verify login pod is Running
SSH "Permission denied"Wrong SSH keyVerify key matches: ssh -i ~/.ssh/id_ed25519_slurm -v root@<host>
nvidia-smi fails in jobGPU not available to podCheck pod resource requests and node GPU capacity
Training job fails immediatelyMissing NCCL/EFA librariesCheck container image has required libraries; review Dockerfile
squeue shows job stuck in PDResources unavailable or partition misconfiguredCheck: scontrol show job <jobid> for Reason field

Key Logs to Investigate

When issues arise, these are the most useful log sources:

# Slurm controller (manages scheduling)
kubectl -n slurm logs -l app.kubernetes.io/name=controller --tail=100

# Slurm compute nodes (slurmd)
kubectl -n slurm logs slurm-slurmd-slinky-0 --tail=100

# Slurm operator (manages CRDs)
kubectl -n slinky logs -l app.kubernetes.io/name=slurm-operator --tail=100

# MariaDB (accounting database)
kubectl -n slurm logs mariadb-0 --tail=50

References

  • install.sh -- Cluster installation script (produced the deployment)
  • sbatch/fsdp/g5-llama2_7b-training.sbatch -- g5 training job (4 nodes, 1 GPU each)
  • sbatch/fsdp/p5-llama2_7b-training.sbatch -- p5 training job (4 nodes, 8 GPUs each)
  • slurm-values.yaml -- Generated Helm values (runtime config)
  • slurm-login-service-patch.yaml -- Generated NLB service patch

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.