Skip to content

nvx-rs slimming 4.2.4: the exec engine, the process modules and the old layered init are gone #1123

Closed

Description

Parent: #1087, in #1076. Needs: #1105, #1111, #1112, #1116, #1117, #1119, #1120, #1122. Unblocks: #1127, #1130, #1131, #1132. No PR of this group merges before the API-ready commit.

Leaving code only. Every PR in this group changes only code that this workstream removes from NVX: the exec engine, the guest's process modules, their per-exec OS code, and the old layered init with the managed agent's sandbox mode, with the edits that remove references to it. Nothing that stays changes, and no later PR uses what these PRs change, so the size limits for kept code don't apply. Each PR still records its core lines and counted files, and its description opens with this note.

Goal. nvx::exec, guest::{exec, spawn, process, cgroup, entry}, guest::root::{bootstrap, Bootstrap, BootstrapStep, Resources}, the old layered init, the one-shot container helpers and the managed agent's sandbox mode are gone. SL6.11b also deletes the crate-private per-exec OS code that those removals leave unused: the per-exec parts of sys::entry, the spawn child, exec-only signal helpers, cgroup helpers and sealed per-exec configuration. The compiler finds any other unused private item.

Notes.

PRs, in order. Each PR has one goal, leaves dev green, and names in its description each old test of its area as kept, rewritten or retired, with each change that check_test_changes.py reports. Its tests follow the repository's test layout: a module's unit tests, and the code that only they use, sit in its tests.rs or tests/ and move with it. The estimates count core lines (code, not comments, docs or tests) and counted files; each PR records its measured values. Each PR does what its Scope says and no more: a case, input or layout that its Scope doesn't name, and whatever "Not in this PR" lists, is out of scope. Address every review comment within the scope, and ask before acting on one that asks for more.

  1. SL6.11a: The exec engine is gone.

    • Objective: No NVX binary uses the old exec engine or its guest binding. The engine, frames, binding and the later signal path are deleted with their references and tests.
    • Contents: Leaving code. Delete nvx::exec (Runner, Peer, the frames) and guest::exec::binding, with the signal path that dev added to them. No NVX binary uses them.
    • Scope:
      • Delete nvx-rs/src/exec/ and its Runner, Peer, frames and state machines.
      • Delete nvx-rs/src/guest/exec/binding.rs and the signal path attached to the old engine.
      • Remove the module declarations, exports and documentation references of the deleted engine and binding, with src/exec/tests/ and guest/exec/binding/tests.rs; the description retires each test that the Test changes report removes.
      • Leave the guest process modules for SL6.11b, which removes their remaining callers together.
    • Not in this PR:
      • Rewriting, refactoring or improving any retained protocol or guest code.
      • Re-homing the exec engine, binding or signal path elsewhere in NVX.
      • Adding a replacement execution API, frame protocol or compatibility facade.
      • Deleting the broader guest process modules; SL6.11b handles that dependency-closed deletion.
    • Approach: Delete the engine and binding modules as complete obsolete units, then remove only their exports, references and tests. Do not extract the signal addition or preserve the frame machinery for hypothetical callers.
    • Done when:
      • The exec engine and binding test suites are retired.
      • nvx::exec, guest::exec::binding and their signal path are absent.
      • No NVX binary or library module references the deleted engine.
    • Needs: SL5.2, in nvx-rs slimming 4.1.2: the test adapter is gone #1119.
    • Estimate: 0 core lines (deletions), 2 counted files.
  2. SL7.8b: The old layered init is gone.

    • Objective: Layered roots now boot through nvx-init, so the shell init, one-shot Azure Linux helpers and managed agent sandbox mode are unused. Those old paths and their build references are deleted while blockless snapshots and the managed agent's other modes remain.
    • Contents: Leaving code. Delete guest/common/nvx-init-agent, nvx-container-launch-azurelinux and nvx-container-enter-azurelinux, and their build steps, and the managed agent's sandbox mode, which only that init started: its root entry, barrier, cgroup placement and return to the init agent, with the agent's cgroup module. nvx-snapshot stays. The managed agent's mapping table stays for its other modes; only the sandbox mode's use of it goes.
    • Scope:
      • Delete guest/common/nvx-init-agent and the two Azure Linux one-shot container helpers with their build steps.
      • Delete the managed agent's sandbox mode: root entry, barrier, cgroup placement and return to the init agent, with managed_agent/cgroup.rs and cgroup/tests.rs, and sandbox_config with its three cases in the agent's tests.rs.
      • Remove the deleted helpers and sandbox mode from build, shellcheck, shfmt and test inventories.
      • Keep guest/common/nvx-snapshot for blockless snapshots, tests and benchmarks.
      • Keep the managed agent's mapping table and other modes; remove only the sandbox mode's use.
    • Not in this PR:
      • Rewriting, refactoring or improving nvx-init, blockless snapshot handling or retained managed agent modes.
      • Re-homing the old shell init, one-shot helpers or sandbox mode.
      • Adding replacement container helper scripts or a replacement managed sandbox lifecycle.
      • Deleting nvx-snapshot or the managed agent's mapping table.
      • Removing process modules or their OS support; SL6.11b does that with its merged deletion.
    • Approach: Delete the three obsolete guest programs, their inventory entries and the sandbox-mode branches that only the old init invoked. Keep the shared mapping table and other managed modes in place; do not consolidate or redesign their control flow.
    • Done when:
      • Shell-agent, one-shot-helper and managed sandbox-mode tests are retired.
      • Build, shellcheck and shfmt inventories no longer name the three deleted programs.
      • A guest image still builds and boots a layered root through nvx-init.
      • nvx-snapshot still builds and serves blockless snapshots.
    • Needs: SL7.8a, in nvx-rs slimming 3.3.3: nvx-init captures and restores, and boots the new launches' layered roots #1117; SL3.4b, in nvx-rs slimming 3.1.6: a managed sandbox run, and one exec at a time #1111; SL3.10b, in nvx-rs slimming 3.1.7: the CLI uses only the new interface #1112; SL6.3, in nvx-rs slimming 4.2.3: the old configs, the old launch code and bundled are gone #1122.
    • Estimate: 0 core lines (deletions), 9 counted files.
  3. SL6.11b: The process modules and cgroups are gone.

    • Objective: After the exec engine, old init and announcer spawner leave, the guest process, cgroup, per-exec entry and bootstrap code has no users. Delete it and the OS support left unused, while retaining the root switch and the rooted open's retry.
    • Contents: Leaving code. Delete guest::{exec, spawn, process, cgroup, entry}, guest::root::{bootstrap, Bootstrap, BootstrapStep, Resources}, the per-exec parts of sys::entry, the spawn child, the signal helpers that only exec used, every cgroup helper, the sealed per-exec configuration (fd's memfd and seals), and the crate-private code that these deletions leave unused. ingress::{Announcer, PROGRAM, StartError}, which spawned with them, went in SL6.13c. Root::switch keeps the move and the change of root that came from sys::entry; the rooted open's EAGAIN retry stays. The compiler's dead-code check finds the rest.
    • Scope:
      • Delete guest::{exec, spawn, process, cgroup, entry}, their submodules and tests, and guest::root::{bootstrap, Bootstrap, BootstrapStep, Resources} with its tests.
      • Delete the per-exec parts of guest::sys::entry, the spawn child, signal helpers used only by exec, every cgroup helper, and fd's per-exec memfd and seals.
      • Follow the compiler's dead-code check to delete crate-private code that these removals leave unused, including obsolete test support and re-exports.
      • Remove the deleted modules' declarations and seam entries; the description retires each test that the Test changes report removes.
      • Keep Root::switch, including its move and change of root, and keep the rooted open's EAGAIN retry.
    • Not in this PR:
      • Rewriting, refactoring or improving retained root, snapshot, activation, terminal or OS code.
      • Re-homing the deleted process, cgroup, entry, bootstrap or OS helpers, or adding replacements.
      • Deleting Root::switch or changing its one-root-switch behavior.
      • Deleting helpers with retained production callers or test support for those helpers.
      • Removing the rooted open's EAGAIN retry.
    • Approach: Delete the named guest modules and bootstrap surface, then their per-exec OS support and tests. Let the compiler's dead-code check identify crate-private items and re-exports whose last caller disappeared, and delete them in the same PR. Keep Root::switch, the low-level operations it uses and the rooted open's retry; do not conduct a broader audit.
    • Done when:
      • Tests of guest exec, spawn, process, cgroup, entry, root bootstrap and their deleted OS support are retired.
      • The named guest modules, bootstrap items, spawn child, exec-only signals, cgroup helpers, memfd creation and seal methods are absent.
      • Root::switch remains with its move and change-of-root behavior.
      • The rooted open still retries EAGAIN, and retained guest tests pass.
    • Needs: SL6.11a, above; SL7.3, in nvx-rs slimming 2.4.2: activation holds no fence, and a capture is one guest call #1105; SL6.13c, in nvx-rs slimming 4.2.1: the code that stays stops using what leaves #1120; SL7.6b, in nvx-rs slimming 3.3.2: the managed agent's direct mode runs on nvx-init's exec core #1116; SL7.8b, above.
    • Estimate: 0 core lines (deletions), 7 counted files.

Tests. Each PR retires the tests of what it deletes, while tests of every OS helper that stays remain. Shell, helper and managed-agent inventories no longer name deleted programs. The guest image builds and boots a layered root through nvx-init, and nvx-snapshot still builds and serves blockless snapshots.

Done when: every PR above has merged, with dev green; the exec engine, process modules, cgroups, old layered init, sandbox mode and their unused per-exec OS code are gone.

Activity

  1. esaurez commented on Nov 10, 2026

    @esaurez
    ContributorAuthor

    Workstream source/progress checkpoint - 2026-11-10 UTC

    Checked boxes below mean merged scope, not merely an implemented first iteration. Implementation branches are source checkpoints, not automatic qualification, Ready or merge approval. Some starting inputs are frozen/anonymous commits rather than standalone branches; their exact SHAs and known merged producer refs are recorded explicitly.

    • SL6.11a - no completed first-iteration handoff recorded. Inspect any preserved partial/prior work before implementing the issue's scope.

    • SL7.8b - no completed first-iteration handoff recorded. Inspect any preserved partial/prior work before implementing the issue's scope.

    • SL6.11b - no completed first-iteration handoff recorded. Inspect any preserved partial/prior work before implementing the issue's scope.

    The original technical scope remains authoritative, supplemented only by any portable technical clarification in this issue. No machine-specific execution policy is part of this checkpoint.

  2. ppenna commented on Nov 12, 2026

    @ppenna
    Contributor

    Follow-up K1, carried here from #1119 (#1119 (comment)), which is now closed: once SL6.11b deletes guest::sys::entry's per-exec parts, one pull request updates scripts/nvx_tools/kernel_features.py:

    That pull request decides the diagnostics feature's validator and its sysrq setting. An edit to this file changes the kernel cache key, so it should come once, with a single kernel rebuild.

  3. 15 remaining items

  4. ppenna commented on Nov 12, 2026

    @ppenna
    Contributor

    Completed on feature/nvx-refactor. Every slice of this group has merged:

    The push CI run at f859d5c74d6, which contains all of them, passed: https://github.com/microsoft/nvx/actions/runs/43276424267

    Follow-up K2, the sandbox-isolation kernel settings that no NVX component uses any more, stays outside #1076, as recorded above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions