lablup / lablup/backend.ai

Session stop and resume

Open
#9,807 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
670
Forks
183
Avg merge
17h 7m
Merged PRs (30d)
358

Description

Implement session stop (pause) and resume functionality. Users can stop a running session to release compute resources (no billing) and resume it later, similar to AWS instance stop/start.

Stop flow:
- RUNNING → STOPPING (sokovan handler: destroy containers, release resources via free_at) → STOPPED
- Session metadata preserved (images, environ, vfolder_mounts, bootstrap_script, etc.)

Resume flow:
- STOPPED → PENDING (create new KernelRow + resource_allocation from existing SessionRow config) → existing scheduler handles PENDING → SCHEDULED → ... → RUNNING
- Resource availability not guaranteed on resume (same as new session creation)

Reference patterns:
- ModelDeploymentStatus already has STOPPING/STOPPED states
- DEPRIORITIZING handler pattern for transient state → PENDING return
- TerminateSessionsLifecycleHandler for stop handler structure
- CHECK_TERMINATING_PROGRESS PromotionSpec for CHECK_STOPPING_PROGRESS

JIRA Issue: BA-4955

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.