Skip to content

fix(selfupdate): same-schema Core updates skip the rollback snapshot #1159

Closed

Description

@frahlg

Same-schema Core updates skip the local rollback snapshot. A health-check failure then restores the image, not state.db. Any migration that ran at boot cannot be undone.

Found on master 6eadec3f. Schema is 2 today. Distinct from #989 (pin after Restart).

What happens

FullBackupRequired is true only when current and target schema differ (go/internal/selfupdate/selfupdate.go). Matching schema sets snapshotSkipped (go/internal/api/api_selfupdate.go).

Sidecar health failure rolls the image back. Docs still say a Core update always creates a rollback point (docs/backup-and-restore.md, docs/self-update.md).

A missing <!-- ftw-state-schema: --> comment sets TargetStateSchema = 0, which does require a backup, but the update is not refused.

Image-only downgrade to schema < 2 is blocked. That is the only schema guard.

What a fix needs

  • Always take a restorable snapshot before replacing a running Core, including same-schema updates (or document and implement “no snapshot ⇒ no automatic image rollback that leaves mutated state”).
  • Align the docs with the code, or the code with the docs.
  • Test: schema 2 → schema 2 update creates a snapshot that POST /api/version/rollback can restore.

Related: updater rollback files (hardcoded state.db path).

Activity

  1. added
    bug
    on Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions