Session creation not validating minimum resource requirements at enqueue time
- Dominant language
- Python
- Stars
- 670
- Forks
- 183
- Avg merge
- 15h 13m
- Merged PRs (30d)
- 368
Description
## Problem Description
When creating a session without specifying required resources that have minimum limits, the session is not immediately rejected at enqueue time. Instead, it cycles between "creating" and "scheduled" states indefinitely.
## Current Behavior
- Image: `cr.backend.ai/testing/atom-inference:3.10-ubuntu22.04-mockup@x86_64`
- Image resource limit includes: `atom.device` with min=1, max=Infinity
- Session ID `fbd97ac1-0173-4b47-bbf6-c6aea5bc6f45` was created without specifying `atom.device`
- Session cycles between "creating" and "scheduled" states instead of failing immediately
## Expected Behavior
Sessions that don't meet minimum resource requirements should be rejected immediately at enqueue time with an appropriate error message.
## Root Cause Analysis
The `atom.device` resource type appears to not be configured in `known_slots`, which prevents validation from catching this missing requirement at the enqueue stage.
## Impact
- Poor user experience with sessions stuck in state transitions
- Wasted scheduler cycles attempting to schedule impossible sessions
- Unclear error reporting for users
JIRA Issue: BA-2420
Contributor guide
Research direction
Start by tracing enqueue-time session validation and the known_slots configuration, using the reported image and missing atom.device requirement to reproduce the behavior. Done means a session that omits a resource with a configured minimum is rejected immediately with an appropriate error instead of cycling between creating and scheduled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, distributed-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100