Skip to content

feat(observability): record which GPUs each Workload holds - #393

Merged
ShubyM merged 2 commits into
openrl-dev:mainfrom
ShubyM:observability/placements
Oct 30, 2026
Merged

ShubyM merged 2 commits into
openrl-dev:mainfrom
ShubyM:observability/placements

Conversation

@ShubyM

@ShubyM ShubyM commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Why

Phase 4 of #390. Nothing recorded which GPUs a run's workers held, or when. The scheduler knew, but the record disappeared when the Workload was deleted.

What changed

  • The scheduler stamps gpuUUIDs, placedAt and releasedAt on each Workload's status.
  • /api/v1/inspect/inventory gains placements: one entry per Workload holding GPUs now, with its runs, role, node, pod and GPU UUIDs. It reads Workload status, so a new placement shows within seconds.
  • When the API server releases a run's workers, it writes each Workload's final placement to Redis (open_rl:placements:<runtime>, newest 200, 7 days). The write runs in the background and cannot delay the release. Nothing reads it yet; /activity will in phase 5.

Scope

  • No GPU metrics and no openrl_gpu_held metric.
  • The sync Redis client now has a 5 s socket timeout. It only serves this write and runtime_of's GET, which could hang forever before.

Verification

  • make test and make lint pass. A Go test checks a placed Workload gets its UUIDs and placedAt, and a released one gets releasedAt.
  • The Go tests, fmt-check, vet and manifests-check passed in a local Linux container. The regenerated deepcopy matched the committed file.
  • The new placements code parses the live cluster's Workloads. The new status fields appear once a scheduler built from this PR runs.

The scheduler now records which GPUs a Workload holds and when. It resolves
the claim's allocated devices to the UUIDs their ResourceSlices publish, sets
placedAt when it sets nodeName, and sets releasedAt when the node clears, the
claim changes or teardown frees the seat. The API server can then tell which
run held which GPU from Workload status alone.
The inventory now has placements: each Workload that holds GPUs, with its
node, pod, GPU UUIDs, placement time and the runs it serves, read live from
Workload status. When the API server releases a run's workers, a background
thread saves each Workload's last placement to open_rl:placements:<runtime> so
it outlives the Workload. Nothing reads that history yet; the activity view
will.
@ShubyM
ShubyM force-pushed the observability/placements branch from 1404076 to 2aa061a Compare October 30, 2026 02:33
@ShubyM
ShubyM merged commit 66fb83d into openrl-dev:main Oct 30, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants