Auto-Updates and Manual Rollbacks

Fedora CoreOS provides atomic updates and rollbacks via OSTree deployments.

By default, the OS performs continual auto-updates via two components:

  • rpm-ostree handles multiple on-disk OSTree deployments and can switch between them at boot-time.

  • Zincati continually checks for OS updates and applies them via rpm-ostree.

Wariness to updates

The local Zincati agent periodically checks with a remote service to see when updates are available. A custom "rollout wariness" value (see documentation) can be provided to let the server know how eager, or how risk-averse, the node is to receiving updates.

The rollout_wariness parameter can be set to a floating point value between 0.0 (most eager) and 1.0 (most conservative). In order to receive updates very early in the phased rollout cycle, a node can be configured with a low value (e.g. 0.001). This can be done during provisioning by using the Butane config snippet shown below:

Example: configuring Zincati rollout wariness
variant: fcos
version: 1.4.0
    - path: /etc/zincati/config.d/51-rollout-wariness.toml
        inline: |
          rollout_wariness = 0.001

OS update finalization

To finalize an OS update, the machine must reboot. As this is an invasive action which may cause service disruption, Zincati allows the cluster administrator to control when nodes are allowed to reboot for update finalization.

The following finalization strategies are available:

  • As soon as the update is downloaded and staged locally, immediately reboot to apply an update.

  • Use an external lock-manager to coordinate the reboot of a fleet of machines.

  • Allow reboots only within configured maintenance windows, defined on a weekly UTC schedule.

A specific finalization strategy can be configured on each node.

The Butane snippet below shows how to define two maintenance windows during weekend days, starting at 22:30 UTC and lasting one hour each:

Example: configuring Zincati updates strategy
variant: fcos
version: 1.4.0
    - path: /etc/zincati/config.d/55-updates-strategy.toml
        inline: |
          strategy = "periodic"
          days = [ "Sat", "Sun" ]
          start_time = "22:30"
          length_minutes = 60

For further details on updates finalization, check the Zincati documentation.

Retours en arrière manuel

Lorsqu’une mise à jour est réalisée, la version précédente reste sur le disque. Si la mise à jour provoque des problèmes, il est possible de l’utiliser comme point de restauration. Ceci est une opération manuelle qui nécessite une intervention humaine et un accès à la console.

Retour arrière temporaire

Pour démarrer sur une ancienne version, maintenir Shift pendant le démarrage du système. Quand le menu du chargeur de démarrage s’affiche, choisir l’entrée désirée.

Retour arrière définitif

Pour revenir à la version précédente de façon permanente, se connecter au nœud cible, et exécuter la commande rpm-ostree rollback -r. Cette opération marque la version précédente comme version par défaut, et redémarre immédiatement sur celle-ci.