feat(driver-mxc): default MXC admission settings to what the driver can enforce
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 72/100
Direzione di ricerca
Start with MxcComputeConfig::default() in crates/openshell-driver-mxc/src/driver.rs and admission_config_from_context in crates/openshell-server/src/compute/driver_config.rs. Run the existing MXC default-rejection and lifecycle tests, then check the gateway-config.mdx and sandbox-compute-drivers.mdx documentation. Done means omitted MXC settings allow creation, explicit admission remains rejecting, tests pass, and both docs explain the exception.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
User Story
As an operator running the MXC compute driver on Windows, I want a fresh install or upgrade to start creating sandboxes without hand-editing admission settings, so that MXC keeps working out of the box after #3538 lands.
Problem Statement
#3538 makes external-resource admission on by default for every compute driver and disables caller-supplied template.driver_config by default. Both defaults are correct for the Linux and Kubernetes drivers, but they make the MXC driver reject every sandbox create under a default configuration:
- MXC requires
template.driver_config.mxcwith a non-emptycommand, soallow_driver_config = falserejects every request. - Every MXC workload grants access to existing host filesystem objects, and MXC has no trusted label resolver, so
resource_admission.enabled = truealso rejects every request viareject_unlabelable.
An MXC gateway only works once the operator adds this to gateway.toml:
[openshell.drivers.mxc]
allow_driver_config = true
[openshell.drivers.mxc.resource_admission]
enabled = false
The docs (crates/openshell-driver-mxc/README.md, docs/reference/sandbox-compute-drivers.mdx) say this in prose, but the MXC example in docs/reference/gateway-config.mdx does not include it, and the failure surfaces as a per-create FailedPrecondition rather than at gateway startup.
Impact / Why This Matters
Anyone upgrading an MXC gateway across #3538 will see every sandbox create fail until they find the two settings. The workaround is a two-line config change, but it is undiscoverable from the error and undocumented in the main config example. MXC is not in scope for 0.1.0, so this is a fast-follow rather than a blocker.
Proposed Design
Make the MXC driver's default admission posture match what MXC can actually enforce, while still honoring explicit operator settings:
- With no
allow_driver_configorresource_admissionkeys under[openshell.drivers.mxc], the gateway starts with caller driver config allowed and label admission disabled for MXC, and logs the existing "admission is DISABLED" warning at startup. - An operator who explicitly sets
resource_admission.enabled = truefor MXC still gets today's behavior (every create is rejected with a clear message), so the exception is opt-out only by omission, never by overriding an explicit setting. - Docs state that MXC is the one driver whose defaults differ, and why.
Implementation sketch (two touch points, because the gateway independently derives the expected policy and compares it against the driver's acknowledgement):
crates/openshell-driver-mxc/src/driver.rs:MxcComputeConfig::default()setsallow_driver_config: trueand aResourceAdmissionConfigwithenabled: false.crates/openshell-server/src/compute/driver_config.rs:admission_config_from_contextapplies the same defaults for themxcdriver when the fields are absent, before thetry_into::<DriverAdmissionConfig>().
A cleaner but larger alternative is to let each driver registration declare its default admission policy, so the server does not hard-code a driver name.
Acceptance Criteria
- A gateway with
[openshell.drivers.mxc]and no admission keys starts, acknowledges a disabled policy, and creates sandboxes withtemplate.driver_config.mxc.command. - A gateway with
[openshell.drivers.mxc.resource_admission] enabled = truestill rejects sandbox creates with the existingreject_unlabelableerror. - The existing MXC default-rejection test becomes an explicit-enable test; MXC lifecycle tests no longer need a custom admission config.
-
docs/reference/gateway-config.mdxanddocs/reference/sandbox-compute-drivers.mdxdescribe the MXC default exception.
Alternatives Considered
- Docs only. Add the two TOML lines to the MXC example in
gateway-config.mdx. Cheapest, and worth doing regardless, but upgrades still break silently until the operator reads the docs. - Startup preflight. Fail gateway startup when MXC is selected with admission enabled, with a message naming the two settings. Better error, but still requires manual config for every MXC install.
- Driver-declared defaults. Add a default admission policy to the compute driver registration so the server never hard-codes
mxc. Preferred long-term shape; the sketch above is the minimal version and can be refactored into this later.
- Lingua principale
- Rust
- Stelle
- 8.7k
- Fork
- 1.3k
- Merge medio
- 2g 8h
- PR unite (30g)
- 271
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di NVIDIA/OpenShell
-
area:docs
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
-
state:triage-needed
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
area:cli state:validated
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
state:triage-needed
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
-
area:build spike state:review-ready state:stale
Difficoltà 2/5 Mezza giornata Idoneità per principianti 68/100
Tutte le issue di NVIDIA/OpenShell
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
agentic-workflows
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
web-infra-dev/rspack#15847 ·