volcano-job-diagnose
Skill235 starsChanged 6 months agoApache-2.0View on GitHub
Diagnose Volcano Job status and issues. Check Job phases, task statuses, PodGroup associations, and overall job health.
In this repository30 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- kbc/CLAUDE.mdCLAUDE.md
- cluster-eventsSkill
- deployment-rollout-debugSkill
- dns-debugSkill
- gateway-diagnosticsSkill
- hpa-debugSkill
- http-log-statsSkill
- image-pull-debugSkill
- ingress-debugSkill
- job-debugSkill
- networkpolicy-debugSkill
- node-health-checkSkill
- node-logsSkill
- pod-crash-debugSkill
- pod-pending-debugSkill
- pvc-debugSkill
- quota-debugSkill
- service-debugSkill
- statefulset-debugSkill
- volcano-diagnose-podSkill
- volcano-gang-schedulingSkill
- volcano-node-resourcesSkill
- volcano-queue-diagnoseSkill
- volcano-resource-insufficientSkill
- volcano-scheduler-configSkill
- volcano-scheduler-logsSkill
- manage-skillSkill
- skill-authoringSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 134
Next step: If PodGroup status is problematic, use volcano-diagnose-pod for detailed PodGroup analysis.
- Distinctive: line 167
Check the reason and message for failure details.
- Distinctive: line 170
Check the restart policy and previous failure reason.
- Distinctive: line 284
Look for mismatched events/actions that could cause unexpected restarts or premature completion.
- Distinctive: line 288
Use this skill in combination with others:
≈ “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.
Files
Volcano Job Diagnosis
Diagnose Volcano Job (batch.volcano.sh/v1beta1) status and issues. This skill checks Job phases, task statuses, PodGroup associations, and overall job health.
Scope: This skill is for diagnosis only. Once you identify the root cause, report it to the user and stop. Do NOT attempt to modify job specs or restart jobs — that should be left to the user.
Usage
bash skills/core/volcano-job-diagnose/scripts/diagnose-job.sh --job <job-name> --namespace <namespace>Parameters
| Parameter | Required | Description |
--job JOB | yes | Job name to diagnose |
--namespace NS | no | Namespace (default: default) |
--verbose | no | Show detailed task and pod information |
Examples
Diagnose a Volcano Job:
bash skills/core/volcano-job-diagnose/scripts/diagnose-job.sh --job my-training-job --namespace trainingVerbose mode with task details:
bash skills/core/volcano-job-diagnose/scripts/diagnose-job.sh --job my-training-job --namespace training --verboseUnderstanding Volcano Jobs
Job Structure
apiVersion: batch.volcano.sh/v1beta1
kind: Job
spec:
schedulerName: volcano
tasks:
- name: worker
replicas: 4
template:
spec:
containers:
- name: worker
resources:
requests:
cpu: "4"
memory: "8Gi"
maxRetry: 3 # Max retries before job is Aborted
policies:
- event: PodFailed
action: RestartJobNote: Volcano Jobs can also be queried using the short name
vcjob(e.g.,kubectl get vcjob). This is an alias forjob.batch.volcano.sh. Be careful not to confuse with native Kubernetesbatch/v1 Job— always usejob.batch.volcano.shorvcjobfor Volcano Jobs.
Job Phases
| Phase | Meaning |
Pending | Job is waiting for resources or admission |
Running | Job is executing |
Completing | Job tasks are completing |
Completed | Job finished successfully |
Failed | Job failed |
Restarting | Job is being restarted due to policy |
Terminating | Job is being terminated |
Aborted | Job was aborted |
Task Statuses
Each task within a job has its own status:
Pending- Task pods not yet scheduledRunning- Task pods are runningCompleted- Task finishedFailed- Task failed
Diagnostic Flow
Step 1: Job Overview
Get the Job status:
kubectl get job.batch.volcano.sh <job-name> -n <namespace> -o yamlKey fields to check:
status.state.phase- Current job phasestatus.failed- Number of failed tasksstatus.succeeded- Number of succeeded tasksstatus.running- Number of running tasksstatus.pending- Number of pending tasks
Step 2: Check Tasks
List all tasks and their statuses:
kubectl get pods -n <namespace> -l volcano.sh/job-name=<job-name> -o wideWhat to look for:
- Pod phases (Pending, Running, Completed, Failed)
- Pod restart counts
- Node assignments
Step 3: Check PodGroup Association
Find the PodGroup created for this Job:
kubectl get podgroups -n <namespace> -l volcano.sh/job-name=<job-name>Or check the Job's tasks for PodGroup annotations:
kubectl get pods -n <namespace> -l volcano.sh/job-name=<job-name> \
-o jsonpath='{.items[0].metadata.annotations.scheduling\.volcano\.sh/pod-group}'Next step: If PodGroup status is problematic, use volcano-diagnose-pod for detailed PodGroup analysis.
Step 4: Check Policies
Review job policies that may affect behavior:
kubectl get job.batch.volcano.sh <job-name> -n <namespace> -o jsonpath='{.spec.policies}'Common policies:
PodFailed→RestartJob- Restart entire job on any pod failurePodFailed→RestartTask- Restart only the failed taskPodEvicted→RestartTask- Restart evicted tasksPodEvicted→AbortJob- Abort entire job when a pod is evicted (can cause unexpected aborts during preemption)TaskCompleted→CompleteJob- Complete job when task finishes
Also check maxRetry — when retries are exhausted the job moves to Aborted:
kubectl get job.batch.volcano.sh <job-name> -n <namespace> -o jsonpath='{.spec.maxRetry}'Step 5: Events Analysis
Check job-related events:
kubectl get events -n <namespace> --field-selector involvedObject.name=<job-name>Common event patterns:
JobFailed - Job has failed
Check the reason and message for failure details.
JobRestarting - Job is being restarted
Check the restart policy and previous failure reason.
TaskFailed - Individual task failed
May or may not cause entire job to fail depending on policy.
Common Issues
Issue 1: Job Stuck in Pending
Symptom: Job phase is Pending, no pods created.
Check:
- PodGroup status:
kubectl get podgroups -n <ns> - Queue state:
kubectl get queue <queue> - Events:
kubectl get events -n <ns> | grep <job-name>
Likely causes:
- Queue is Closed
- PodGroup cannot be enqueued (resource shortage)
- Admission webhook rejection
Issue 2: Some Tasks Running, Others Pending
Symptom: Partial task scheduling (e.g., 2/4 tasks running).
Check:
- PodGroup minMember vs actual pod count
- Gang scheduling constraints
- Resource availability
Likely causes:
- Gang constraint not satisfied (use
volcano-gang-scheduling) - Resource fragmentation
- Queue quota exhausted
Issue 3: Job Restarting Repeatedly
Symptom: Job keeps restarting, never completes.
Check:
- Restart policy:
kubectl get job.batch.volcano.sh -o jsonpath='{.spec.policies}' - Pod failure reasons:
kubectl describe pod <pod> - Container logs:
kubectl logs <pod>
Likely causes:
- Application crashing (check container logs)
- Resource pressure causing evictions
- Misconfigured restart policy
Issue 4: Job Failed After Some Tasks Completed
Symptom: Some tasks succeeded, but job marked as Failed.
Check:
- Failed task details
- Job completion policy
- Task lifecycle policies
Likely causes:
- One critical task failed
- Completion policy is strict (all tasks must succeed)
- Lifecycle policy triggered premature job failure
Issue 5: Job Aborted Unexpectedly
Symptom: Job was Running, then moved to Aborted.
Check:
# Check maxRetry
kubectl get job.batch.volcano.sh <job> -n <ns> -o jsonpath='{.spec.maxRetry}'
# Check for preemption/eviction events
kubectl get events -n <ns> --field-selector reason=Preempted
kubectl get events -n <ns> --field-selector reason=Evicted
# Check if running pod count dropped below minMember (Gang breakage)
kubectl get podgroup -n <ns> -l volcano.sh/job-name=<job> -o jsonpath='{"running: "}{.items[0].status.running}{"\nminMember: "}{.items[0].spec.minMember}'Likely causes:
maxRetryexhausted — job restarted too many times- Preemption by higher-priority job — pods evicted, triggering
PodEvicted → AbortJobpolicy - Gang breakage — pod eviction caused running count to drop below
minMember, tearing down the entire group - Lifecycle policy mismatch — e.g.,
PodEvicted → AbortJobwhenRestartTaskwould be more appropriate
Task Lifecycle Policies
Volcano controls task coordination through lifecycle policies, not explicit task dependencies.
spec:
tasks:
- name: master
replicas: 1
policies:
- event: TaskCompleted
action: CompleteJob
- name: worker
replicas: 4
policies:
- event: PodFailed
action: RestartTaskDiagnosis:
# Check per-task status counts
kubectl get job.batch.volcano.sh <job> -o jsonpath='{.status.taskStatusCount}'
# Check configured policies
kubectl get job.batch.volcano.sh <job> -o jsonpath='{.spec.tasks[*].policies}'Look for mismatched events/actions that could cause unexpected restarts or premature completion.
Integration with Other Skills
Use this skill in combination with others:
# 1. Job-level diagnosis
bash skills/core/volcano-job-diagnose/scripts/diagnose-job.sh --job my-job --namespace training
# 2. If PodGroup issues found → Pod-level diagnosis
bash skills/core/volcano-diagnose-pod/scripts/diagnose-pod.sh --pod my-job-worker-0 --namespace training
# 3. If Gang issues → Gang scheduling analysis
# (refer to volcano-gang-scheduling skill)
# 4. If Queue issues → Queue diagnosis
bash skills/core/volcano-queue-diagnose/scripts/diagnose-queue.sh --queue training-queue
# 5. Check scheduler logs for decisions
bash skills/core/volcano-scheduler-logs/scripts/get-scheduler-logs.sh --pod my-job-worker-0 --since 1hEnvironment Variables
| Variable | Default | Description |
VOLCANO_NAMESPACE | default | Default namespace for job lookup |
See Also
volcano-diagnose-pod- Pod-level scheduling diagnosisvolcano-gang-scheduling- Gang scheduling constraint analysisvolcano-queue-diagnose- Queue resource analysisvolcano-scheduler-logs- Scheduler decision logsdeployment-rollout-debug- (Similar concept for Deployments)
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
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.

