Repository navigation
Compact hotfix wiring: mount the supervisor runtime from the claim chart - #270
Merged
Merged
Conversation
The podbench-hotfix-claim chart now ships one Bash library, mounted at /podbench/runtime/podbench.sh. Workload args hold a one-line call, `podbench_supervise "$1" HEALTH SAFE`, instead of an inline supervisor loop, so regenerating wiring never nests supervisors and a runtime fix is a chart bump. The library keeps stop/start/restart, holds, ownership, Launch cancellation, health checks and child cleanup, snapshots the exported environment so its own variables cannot leak into the application, and preserves cwd, identity, umask, checkout PATH and an existing LD_PRELOAD. Startup helpers select an initialised checkout: podbench_python prefers the claim's interpreter, podbench_script runs an editable script when present. IOC and BlueAPI adapters keep their known paths; BlueAPI's wrapper calls the same mounted runtime. Closes #266. Co-Authored-By: Claude Fable 5.1 <[email protected]>
On P47, `hotfix enable` refused three of four services because their values already set keys it generates: BlueAPI's `debug`, an IOC's own `volumes`/`volumeMounts` for /dev/shm, fastcs's `args`. The documented fallback was to print `hotfix values` and merge by hand, which is exactly what the tool exists to avoid. Now `volumes` and `volumeMounts` keep the service's entries and gain the generated ones (names deduplicated), and every other generated key is replaced by the marked block. The same rule upgrades unmarked wiring from older releases without dropping user volumes. `hotfix values` with the ioc-instance prefix applies the same editable start-script helper as enable, so the two commands agree. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Only `hotfix init` installed .podbench-ptrace.so, so a claim initialised before the shim existed could never be debugged: on P47 the fastcs claim from August failed Attach with "debugpy injection failed; check ptrace permissions". Rebuilding the claim environment now refreshes the shim too, and the runtime preloads it on the restarted child. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Podbench's native Attach is a cppdbg launch-type session, and the C++ extension ends every such session, Stop or Disconnect, by sending gdb the console command `kill`, ignoring its result. On T11 that killed the attached IOC and restarted its container. The generated gdb script now defines hook-kill to detach first; `kill` then fails harmlessly with "The program is not being run" and the application keeps running. Verified on P47 bl47p-mo-ioc-01: two Stop presses, IOC pid and restart count unchanged, hold released. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Headroom requested 2 CPU and 4Gi as guaranteed requests on top of the target container's own. A 4-core beamline node with a namespace quota could not grant that, the resize sat Deferred and the seat never opened; without headroom the seat's server install starved a 1 s exec liveness probe and restarted the IOC. Request 500m and 1Gi with a 2 CPU / 4Gi ceiling: the seat's server idles well under the floor, language servers, debuggers and builds burst to the ceiling, and the LimitRange ratio logic still raises requests where a cluster demands it. A 2 CPU / 2000Mi resize was accepted immediately on P47 and carried a full native session. Co-Authored-By: Claude Fable 5.1 <[email protected]>
|
Warning Review limit reachedNext included review available in 40 minutes. View limit detailsLimit details: You’ve used the included review currently available. This review ran on the open-source allowance, not this organization's plan, because the pull request author doesn't have an assigned seat. Waiting won't change this — ask an organization admin to assign them a seat, or add seats in Billing if every seat is already assigned, then retry. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (14)
Comment |
Even 600m of extra CPU requests was refused on P47: other namespaces hold most of the single node's request budget (3610m of 3900m), so no request increment of useful size fits, while actual usage sits near 10 %. Ask for no extra requests and raise only the limits; where a LimitRange enforces a limit-to-request ratio the existing logic lifts requests just enough. On P47 that gives a 2.5 CPU / 4352Mi ceiling with a 250m / 435Mi request, which the node grants and which carried a full native session. Co-Authored-By: Claude Fable 5.1 <[email protected]>
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #266. The claim chart now ships the Bash supervisor as a ConfigMap mounted at
/podbench/runtime/podbench.sh, and workload args hold a one-line call into it instead of an inline loop. Regenerating wiring never nests supervisors, and a runtime fix becomes a chart bump.Six commits, each independently reviewable:
files/podbench.sh+templates/runtime.yaml,lifecycle_supervisor.pyreduced to invocation/mount generation,podbench_python/podbench_scriptstartup helpers, IOC and BlueAPI adapters, docs, new runtime and wiring tests.hotfix enableinstead of refusing:volumes/volumeMountskeep the service's entries and gain the generated ones; other generated keys are replaced by the marked block. Found on P47, where three of four real services were refused.hotfix restart --reinstall: claims initialised before the shim existed were undebuggable.hook-killin the generated gdb script; the C++ extension'skillon Stop no longer kills the IOC.Live test on P47 (2026-09-15)
Run with the
podbench-hotfix-e2eskill (#264) againstp47-beamline, using headless VS Code over Remote-SSH inside the agent sandbox. Service wiring regenerated from pre-hotfix values withhotfix enableand deployed through epics-containers/p47-services (e3cac83, 98f0c84, a48ac0b; the chart is vendored there with afile://dependency until this version is published).health_probe, hit by the kubelet probe)controllers.py:53, 0.2 s poll)pmacController::poll, 2697)simDetector::computeImage, 777)Detach fix validated twice on mo-ioc and three times on simdet: Stop →
kill→ "The program is not being run", IOC pid and restart count unchanged, hold released.Every rollout replacement pod carried the compact args and a mounted runtime whose sha256 matched the source; second
hotfix enablepasses reported every file unchanged.Findings recorded, not fixed here
statuslists every container of a pod as a hotfix target and prints the whole exec probe when a container is restarting.SEAT_HOME_VOLUMEinmodel.pyis dead code._formatcould round up to Mi); palette "Remove All Breakpoints" did not clear a function breakpoint while paused.Evidence (screenshots, reports, diffs, kubectl snapshots) is kept locally under the worktree's
tmp/hotfix-e2e/20260915-p47/.🤖 Generated with Claude Code