Skip to content

fix: preserve CAR recovery controls and rotate all DB instances - #494

Merged
cristibleotiu merged 3 commits into
developfrom
fix/car-init-crdb-rotation
Sep 7, 2026
Merged

cristibleotiu merged 3 commits into
developfrom
fix/car-init-crdb-rotation

Conversation

@cristibleotiu

Copy link
Copy Markdown
Contributor

Summary

Follow-up fixes for the two findings in the review of #492. This is a new branch
from current develop, which already contains #490 and #488.

  • Preserve fixed-volume cleanup -> system volume -> control directories -> stale
    request recovery -> environment setup after initial image-pull recovery. Reuse
    the same initialization block as cached-image startup; do not provision the
    control volume while waiting for the image.
  • Compute the request-wide CockroachDB certificate regeneration decision before
    any plugin updates shared allocation metadata, so every accepted database
    plugin rotates and replayed operation IDs remain no-ops.

Production scope is two files, seven net added lines. No API/schema, image,
workflow, dapp, volume format, or loop-device allocation changes.

Verification

  • Reproduced both findings with regression tests against the pre-fix code.
  • CAR suite: 466 passed, including WorkerAppRunner, sync, env overrides, reset,
    fixed volumes, cached startup, retry ordering, pause/restart deferral, semaphore
    readiness, restored control request files, and unavailable system volumes.
  • Deeploy suite: 262 passed, including real X.509 rotation for two plugins on
    all three nodes, root-client rotation, replay/new-operation behavior, preserved
    node environment, admission and update lifecycle tests.
  • Post-review focused lifecycle/create/update rerun: 252 passed.
  • Changed Python files compile; git diff --check passes. Final scoped critic
    review found no remaining blockers.

Commands: python -m unittest discover -s extensions/business/container_apps/tests -p 'test_*.py' and the equivalent under extensions/business/deeploy/tests.
Environment: existing Python 3.13.13 venv, cryptography 42.0.7; CAR diskapi tests
used the expected nested core path linked to the local core checkout at
ded22ead. No dependencies or test fixtures changed to hide failures.

Limits and Rollout

These are local regression/integration tests: real temporary control files and
generated certificates, mocked Docker/mount and external service boundaries.
No live local/hybrid cluster deployment or privileged mount test was performed.

The patched edge-node runtime must be deployed for the fixes to take effect.
This does not repair an already-running container's broken mount automatically.
No data migration is required. Reverting these commits restores the previous
behavior and its two defects.

What changed:
- Reuse the ordered data-volume, control-volume, recovery, and environment setup after initial image availability succeeds.
- Cover cached startup, delayed retries, paused and semaphore states, control request recovery, and unavailable system volumes.

Why:
- Fixed-volume stale-mount cleanup must run before provisioning /r1en_system, including after a recovered image pull, so the container does not lose its control volume.
What changed:
- Decide whether a certificate regeneration operation is pending before processing plugin instances that share allocation metadata.
- Verify all node and root-client bundles rotate for two plugins, repeated operation IDs preserve inputs, and new operation IDs rotate both again.

Why:
- The first plugin marked the shared operation complete and caused subsequent accepted plugins to keep their previous certificates.
@cristibleotiu
cristibleotiu merged commit 589a9f0 into develop Sep 7, 2026
@cristibleotiu
cristibleotiu deleted the fix/car-init-crdb-rotation branch September 7, 2026 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants