lablup / lablup/backend.ai-webui

Show requested slots for terminating sessions in the admin session list

Open Beginner friendly
#9,632 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
133
Forks
81
Avg merge
1d 11h
Merged PRs (30d)
344

Description

## Problem

A 120-node batch session in `TERMINATING` shows **8 GPU / 64 CPU / 1544 GiB** in the admin session list, while the same session showed 960 / 7680 / 185280 GiB while `RUNNING`.

The manager's `ComputeSessionNode.occupied_slots` is the sum of kernel allocations that have **not been freed yet** (`resource_allocations.free_at IS NULL`). When 119 kernels are already reclaimed and one node is stuck, the session-level value shrinks to a single node's worth. The WebUI (`SessionSlotCell.tsx`) renders that value as-is and only falls back to `requested_slots` when `occupied_slots` is empty, so the list looks like the session lost its resources.

Reported in the Teams "AI FM" thread (see web link).

## Fix

In `SessionSlotCell`, prefer `requested_slots` over `occupied_slots` while the session is in a transitional status (`TERMINATING`, and the creating-phase statuses `PREPARING` / `PREPARED` / `PULLING` / `CREATING` / `SCHEDULED` / `PENDING` / `RESTARTING`), so the AI accelerator / CPU / memory columns keep showing the session's full request (960 GPU) until it is actually `TERMINATED`. Progress of the reclaim itself is surfaced by the status badge (follow-up issue).

## Acceptance

- A multi-node `TERMINATING` session shows the same accelerator / CPU / memory numbers it showed while `RUNNING`.
- `RUNNING` / `TERMINATED` sessions are unchanged.
- `bash scripts/verify.sh` passes.

JIRA Issue: FR-3922

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in SessionSlotCell.tsx and trace how slot values are selected for session statuses. Check the handling of TERMINATING and the listed creating-phase statuses against the unchanged RUNNING and TERMINATED cases. Confirm that multi-node terminating sessions retain their requested accelerator, CPU, and memory values, then run bash scripts/verify.sh.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
88/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.