Repository navigation
fix(examples): diagnose incompatible EKS sandbox settings - #384
Conversation
## Problem EKS can accept a Job while discarding the sandbox settings Box requires. The example then exposes a proc mount error instead of the configuration gap. The guide lists tested versions without explaining older-cluster behavior. ## Solution Check the server dry-run response before creating a Job, then validate the created Job and actual Pods. Keep receipts and recovery details after creation. Document the tested baseline, separate feature gates, and worker/admission limits. No Box Core interfaces or containment grants change. ## Tests All 22 Python deployment tests pass. The dry-run, created-Job, and actual-Pod regressions each fail when the guard is disabled. All 27 site-manifest tests pass. Independent code and documentation reviews found no blocking change defects. The workspace suite ran with debug symbols disabled: the unchanged core library had 795 passes and 69 failures, predominantly invalid host mount-table errors. The full workspace suite is not green. No live EKS or older-cluster opt-in test ran.
|
Assessment: Comment At head Assumptions and rules checked that held
The table that maps each required setting to its reason gives users the right next step. |
|
Assessment: Comment
Assumptions and rules checked that held
|
|
Assessment: Comment
Assumptions and rules checked that held
|
|
Assessment: Approve
Assumptions and rules checked that held
Each case found during review now has a regression test. |
|
Assessment: Approve
Assumptions and rules checked that held
|
|
Assessment: Approve
Assumptions and rules checked that held
|
Human readable section
Problem: An EKS cluster can accept the example Job while removing settings Box needs, leaving users with an unexplained
/procmount failure.Solution: Check the settings returned by a server dry run before creating the Job, then verify the created Job and Pods. Add feature-gate hints and optional worker diagnostics. Document the tested cluster baseline and older-cluster limits. Put required setup and expected results before optional diagnostics and troubleshooting.
Trade-off: This diagnoses configuration changes; it does not enable cluster features or prove worker compatibility. Pods can start before the later inspection. Created Jobs remain available for inspection and cleanup.
The preflight reports missing settings before creating a Job. Editable diagram
Description
The EKS example checks
hostUsers: false,procMount: Unmasked, and the effectiveseccompProfile.type: Unconfined. A late failure retains the receipt, submitted Job, observed Pod configuration, and recovery command. Before it first observes a Pod, the script reads the Job’sFailedCreateevents and reports the controller’s message. Creation events and event-query errors remain warnings so the controller can retry. If the Job fails before creating a Pod or the wait expires, the receipt includes the last creation error. Configuration errors name the relevant feature gates as troubleshooting hints. After saving the workload receipt, an optional lookup records each assigned worker’s kubelet, kernel, container runtime, and architecture. Its separate ten-second budget cannot consume the Job monitoring deadline, and lookup failures do not change the workload result. Box Core and its sandbox configuration are unchanged.Related Issues
Addresses https://github.com/strands-agents/staging-boxy/issues/351.
Type of Change
Bug fix; documentation update.
Validation and contributor checklist
Testing
At
2f6b9c9, 39 deployment-script tests pass, including API errors/timeouts, altered settings, inherited seccomp, receipts, offline rendering, admission rejections, dry-run warnings, later Pod success after quota, webhook, admission, or event-access errors; and nonfatal worker lookups, malformed responses, multiple nodes, and monitoring-deadline isolation.Disabling the settings guard makes all three targeted regression cases fail. Restoring immediate failure on creation events breaks all three recovery cases; removing the final creation error breaks the deadline-receipt check. Reusing historical events after a Pod disappears breaks the stale-event regression. Moving worker lookups back into monitoring breaks the advancing-clock regression.
At
233174d, all 27 site-manifest tests pass. The tutorial also passes shell syntax and local-link checks; incoming anchors remain valid. Independent readability review found no material issues. Earlier, the hosted site-manifest check and cloud-example checks passed at2f6b9c9.CARGO_PROFILE_DEV_DEBUG=0 CARGO_PROFILE_TEST_DEBUG=0 CARGO_INCREMENTAL=0 cargo test --workspace --all-features: failed in the unchanged core library (795 passed, 69 failed). 66 failure sections containinvalid mount table for trusted executable aliases; the workspace run stops at this target. This is not a full-suite pass. Debug symbols were disabled after the first build exhausted available disk headroom.Independent code and documentation reviews: no blocking findings. The automated review of
2f6b9c9reported no correctness findings and confirmed 39 passing tests.Live EKS 1.31.14: the API removed
hostUsersand returnedprocMount: Default. Both the published69b3cb7script and2f6b9c9exited before Job creation; zero Jobs remained.Live EKS 1.33.13, Amazon Linux 2023 ARM64, kernel 6.12.113, containerd 2.3.7: both scripts passed all 11 checks. The updated script also recovered after an admission rejection was removed. A persistent admission rejection produced a failed receipt containing the controller’s Pod Security message; no Pod was created. These are tested configurations, not a minimum-version guarantee.
Live workloads used the sample’s pinned Box core (
f0dc6f4) and matching test script. Existing verified image layers were reused with the missing revision metadata added; this was not a fresh full image build.Diagram: pinned draw.io container, scale 2, border 20; zero layout errors and PNG visually inspected. New figure, so no prior-image control comparison applies.
I ran the relevant suites (
just check, orcargo test --workspace --all-features)If I touched Rust, I ran
cargo fmt --allandcargo clippy --workspace --all-targets --all-features -- -D warnings— not applicable; no Rust changed.Checklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.