Repository navigation
Description
User Story
I'm a senior engineer at VicOne. We run OpenShell on an EKS cluster to sandbox the AI agents our teams operate, and the cluster is shared with other workloads, so node capacity varies during the day. When openshell sandbox create timed out I spent the first round of debugging on sandbox configuration, because the only thing the CLI printed was ConfigurationPending. The pod had simply not been scheduled. I reproduced it twice on 0.1.6. As an operator on a shared cluster, I want the timeout message to tell me that the pod could not be scheduled and why, so that I go and check capacity instead of the sandbox configuration.
Problem Statement
When the sandbox pod cannot be scheduled, the gateway's sandbox status already carries the cause (PodScheduled: False (Unschedulable) with the scheduler's "0/N nodes are available" message), but the CLI timeout message only reports the first Ready=False condition, which the gateway has replaced with ConfigurationPending while no supervisor configuration report has arrived. The user sees a configuration placeholder, not the scheduling failure. About five minutes after creation the Kubernetes driver removes the stale bootstrap, so sandbox get is only useful for a short window and most users will only ever see the CLI error.
Related: #5028 covers the same symptom family for image pull failures. The difference here is that the scheduling cause is already present in the sandbox status returned by the gateway, so a CLI-only change surfaces it; #5028 needs the gateway to relay pod events.
Impact / Why This Matters
- On any shared or autoscaled cluster, "cannot schedule" is one of the most common reasons a create fails, and today it is invisible from the CLI.
- The hint in the error points at
image_preparation_timeout_seconds, which sends users in the wrong direction when the problem is capacity. - The sandbox is rolled back a few minutes later, so the CLI message is the only durable signal.
Acceptance Criteria
- When provisioning times out and the sandbox status contains a
PodScheduledcondition with statusFalse, the CLI error includes that condition's reason and message (for exampleUnschedulable: 0/11 nodes are available: 11 Insufficient cpu). - When no such condition exists, the message is unchanged.
PodScheduled=Truedoes not affect the message.- Covered by unit tests in the CLI crate; no gateway or driver behaviour change.
Reproduction Steps
- Kubernetes gateway on a cluster where no node can satisfy the request (or any cluster at autoscaler max size).
openshell sandbox create --name repro --cpu 4 --memory 2Gi- While it waits, in another shell:
openshell sandbox get repro - After 300 s the CLI exits 1 with the
ConfigurationPendingmessage below, whilesandbox getshowsPodScheduled: False (Unschedulable). About five minutes after creation the sandbox is removed by the driver.
Suggested UX (if applicable)
sandbox provisioning timed out after 300s. Last reported status:
Unschedulable: 0/11 nodes are available: 11 Insufficient cpu. ...
Implementation sketch (CLI only): in ready_false_condition_message (crates/openshell-cli/src/commands/common.rs), look for a PodScheduled condition with status False before falling back to the first Ready=False condition. I have this change with unit tests ready and will open the PR once the issue is accepted.
Environment
- Gateway / Helm chart: 0.1.6 (
helm-chart-0.1.6), Kubernetes driver on EKS, cluster-autoscaler at max node group size - CLI: 0.1.5; the message-building code was checked against current
mainand is unchanged - Platform: Linux nodes (Amazon Linux 2023, kernel 6.12), CLI on macOS
Logs
CLI after 300 s (exit 1):
sandbox provisioning timed out after 300s. Last reported status:
ConfigurationPending: Waiting for effective configuration validation before workload activation
openshell sandbox get repro during the same window:
Phase: Provisioning
Conditions:
- PodScheduled: False (Unschedulable) - 0/11 nodes are available: 11 Insufficient cpu. no new claims to deallocate, preemption: 0/11 nodes are available: 11 Preemption is not helpful for scheduling.
- Bootstrapping: True (SandboxRuntimeGenerationStarting)
- ConfigurationReady: False (ConfigurationPending) - Waiting for effective configuration validation before workload activation
- Ready: False (ConfigurationPending) - Waiting for effective configuration validation before workload activation
Gateway log about 5 minutes after creation:
rolled back stale fail-closed sandbox-runtime bootstrap
Activity
FrostGod commentedon Nov 6, 2026
working on it
u0324020 commentedon Nov 9, 2026
Hi @FrostGod , thanks for picking this up.
I filed this issue after hitting it on a real cluster, and I had already prototyped a fix before it was accepted. I don't want to duplicate your work, so I'm sharing it in case it's useful.
What my prototype does. When the 300-second wait times out, the CLI prints the scheduling failure reason the gateway already returns (PodScheduled=Unschedulable and the scheduler message) instead of only ConfigurationPending. The change is in crates/openshell-cli/src/commands/common.rs, with 3 unit tests. It is on our fork: VicOne-OSS-TW/OpenShell, branch fix/5230-cli-unschedulable-timeout-message/u0324020 (commit ac35c2c). Format, clippy and the CLI lib tests passed when I last ran them.
How I'd like to proceed. I'm not vouched yet, so I can't open a PR anyway. Two options, whichever you prefer:
Please let me know which works better, or if you'd rather I leave it entirely to you.
FrostGod commentedon Nov 9, 2026
@u0324020 , Thanks for filing the issue!
If you want to contribute on top of my PR, i am happy to accept it and review,
can you please raise a request to vouch yourself as a contributor
or you can just review this PR
#5344