Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

TELEICU/Rollback strategy: Difference between revisions

From OHC Network Wiki
Content deleted Content added
Create TELEICU rollback strategy reference (via create-page on MediaWiki MCP Server)
 
Automated edit (via update-page on MediaWiki MCP Server)
Line 64: Line 64:
| Granularity | Per-playbook or per-role | Full OS generation |
| Granularity | Per-playbook or per-role | Full OS generation |
| Safety | Can leave partial state | Atomic — all-or-nothing |
| Safety | Can leave partial state | Atomic — all-or-nothing |

{{Navbox TELEICU}}


{{Related}}
{{Related}}

Revision as of 08:40, 6 July 2026

referenceteleicuCARE 3.0+

How changes are rolled back in both migration paths.

Path A: Ansible

{{#mermaid:flowchart LR
    COMMIT["git revert<br/>offending commit"]
    PUSH["Push to repo"]
    PULL["ansible-pull<br/>picks up revert"]
    CONVERGE["Nodes converge<br/>to previous state"]

    COMMIT --> PUSH --> PULL --> CONVERGE
}}

Procedure:

  1. Identify the offending commit(s) in the ansible repo
  2. git revert <commit-hash>
  3. Push to the relevant branch
  4. Nodes apply on next ansible-pull run (default: 15-30 min timer)
  5. For urgent rollback: SSH into nodes and run ansible-pull -U <repo> immediately

Limitation: If the change modified system state that is not idempotent, a simple revert may not fully restore. Ansible roles should be written idempotently.

Path B: NixOS

{{#mermaid:flowchart LR
    subgraph Methods["Rollback Methods"]
        CLI["nixos-rebuild switch --rollback<br/>(instant, from CLI)"]
        BOOT["Boot menu<br/>(select prev generation<br/>at systemd-boot)"]
        COMIN["comin rollback<br/>(point flake back<br/>to prior revision)"]
    end

    CLI --> DONE["Node returns to<br/>previous generation"]
    BOOT --> DONE
    COMIN --> DONE
}}

Procedure:

  • CLI rollback: nixos-rebuild switch --rollback — switches to the previous generation immediately. No rebuild needed — the generation is already in the Nix store.
  • Boot rollback: Reboot and hold space during systemd-boot. Select the previous generation from the menu. Useful if the system is unbootable on the current generation.
  • comin rollback: Point the flake back to the previous revision in git. comin will pull and activate the older generation on next poll.

Key advantage: Every NixOS generation is atomic and bootable. Rollback is always available, even if the current generation is partially broken.

Comparison

| Dimension | Ansible | NixOS | |---|---|---| | Speed | Depends on pull interval | Instant (CLI) or at boot | | Completeness | Idempotency-dependent | Full — complete generation restore | | Offline rollback | Not possible (needs git access) | Yes — generation is in local store | | Granularity | Per-playbook or per-role | Full OS generation | | Safety | Can leave partial state | Atomic — all-or-nothing |