Blog · 14

Un clúster Slurm real en Docker Compose, con health checks de GPUA real Slurm cluster in Docker Compose, with GPU health checks

Drain, requeue y validate, y cuatro iteraciones de CI para que funcionen los cgroups v2.Drain, requeue and validate, and four CI iterations to get cgroups v2 working.

Por qué este laboratorio

Se apoya en la administración de servidores Linux (Red Hat). Muchos clústeres de GPU usan Slurm en lugar de Kubernetes, así que este laboratorio lleva la política XID del laboratorio 09 a un Slurm real.

Qué he hecho

  • Slurm 23.11 con paquetes de Ubuntu 24.04 en Docker Compose: MariaDB, slurmdbd, slurmctld y 4 nodos con 4 GPU simuladas cada uno.
  • gpuops health como HealthCheckProgram cada 10 segundos: cordon (drenar y dejar que acaben los trabajos), drain (drenar y reencolar) o cuarentena. Nunca reactiva un nodo y respeta el motivo de un drain puesto por una persona.
  • gpuops validate: reserva de mantenimiento, resume, burn-in en todas las GPU y después libera o vuelve a drenar.
  • Un entrenamiento de dos nodos con checkpoints en almacenamiento compartido que se cuelga, en lugar de fallar, ante un XID de hardware.
  • gpuops events une sacct, el log del trabajo y el del health check en el formato de eventos del laboratorio 12.

Cómo se prueba

CI: 36 comprobaciones en unos 7 minutos. El XID 79 drena el nodo en 2 segundos y reencola el trabajo; el trabajo termina sus 150 pasos; sacct muestra REQUEUED, REQUEUED, COMPLETED. Los ficheros reales de esa ejecución se guardan como fixtures.

Qué aprendí

Hicieron falta cuatro iteraciones de CI para que funcionaran los cgroups v2 sin systemd, y el reencolado tardaba entre 60 y 80 segundos. Las dos cosas están en docs/design.md.

Siguientes pasos

  • En nodos reales, cambiar la fuente de salud a nvidia-smi y el log del kernel.
  • Activar el aislamiento por cgroups de las GPU.
  • Ejecutar NHC (Node Health Check) junto al chequeo de salud de GPU.

¿Quieres llevarlo a tu entorno o adaptarlo a tu caso? Escríbeme y lo vemos.

Why this lab

Builds on running Linux (Red Hat) servers. Many GPU clusters run Slurm rather than Kubernetes, so this lab brings the XID policy from lab 09 to a real Slurm cluster.

What I built

  • Slurm 23.11 from Ubuntu 24.04 packages in Docker Compose: MariaDB, slurmdbd, slurmctld and 4 nodes with 4 simulated GPUs each.
  • gpuops health as the HealthCheckProgram every 10 seconds: cordon (drain and let jobs finish), drain (drain and requeue) or quarantine. It never resumes a node and respects a drain reason set by a human.
  • gpuops validate: a maintenance reservation, resume, a burn-in on every GPU, then release or drain again.
  • A two-node training job with checkpoints on shared storage that hangs, rather than fails, on a hardware XID.
  • gpuops events joins sacct, the job log and the health-check log into lab 12's event format.

How it is tested

CI: 36 checks in about 7 minutes. XID 79 drains the node in 2 seconds and requeues the job; the job finishes its 150 steps; sacct shows REQUEUED, REQUEUED, COMPLETED. The real files from that run are kept as fixtures.

What I learned

It took four CI iterations to get cgroups v2 working without systemd, and the requeue delay was 60 to 80 seconds. Both are written up in docs/design.md.

Next steps

  • On real nodes, switch the health source to nvidia-smi and the kernel log.
  • Enable cgroup isolation for the GPUs.
  • Run NHC (Node Health Check) alongside the GPU health check.

Want to bring it to your environment or adapt it to your case? Get in touch and we can look at it together.

Tech Career Lab · newsletter

¿Te ha servido? Cada dos semanas envío una idea práctica para perfiles IT: LinkedIn, proyectos, networking y procesos de selección.Found this useful? Every two weeks I send one practical idea for IT professionals: LinkedIn, projects, networking and hiring processes.

Apúntate y llévate las 33 ideasSign up and get the 33 ideas →