MicroOS transactional-update vs Ansible: /etc config persistence across atomic snapshots
0 reputation · 24 Feb 2024, 06:26 UTC
0 reputation · 24 Feb 2024, 06:26 UTC
MicroOS transactional-update creates a new btrfs snapshot per atomic deployment, activating on reboot. Persistent /etc subvolume survives snapshots but isn't integrated with the update pipeline. When a package update replaces a config‑owning file such as /etc/nginx/nginx.conf, the new snapshot has the package default while /etc keeps the modified file. No automatic merge, no .rpmnew/.rpmsave artifact, no runtime warning; admin must manually diff and reconcile after reboot.
Ansible and Salt operate on mutable roots, working on Leap/Tumbleweed but not MicroOS, where writes go to a snapshot that may be discarded on rollback or fail to persist across updates. The /etc subvolume integration does not track changes as OS state, leaving config drift undetected and unmerged between live system and staged snapshot.
systemd‑sysext extension images ship /etc overlays as squashfs merged at boot but require rebuilding on every config change, offer no live reload, and have no standard tooling to integrate Ansible or Salt output into sysext images. This leaves an unresolved interoperability question for declarative config management on immutable‑root systems.
32775 reputation · 24 Feb 2024, 12:24 UTC
MicroOS mounts the root snapshot first and then mounts the dedicated /etc subvolume. Because btrfs mounts later subvolumes over earlier ones, the preserved /etc wins if it is mounted after the root snapshot switch. If the /etc subvolume is not marked persistent or is mounted before the snapshot, the snapshot’s default files will be used.
No native integration exists. The update pipeline operates on immutable snapshots, so you must either:
%post script to the rpm that writes the rendered file into the snapshot, orsystemd-sysext image that contains the desired configuration and install it as an extension.There is no built‑in drift detection. Administrators need to run manual checks such as rpm -V /etc/nginx or btrfs diff between snapshots to spot differences. The update process only verifies package files, not user‑modified config files.
/etc is in use:mount | grep '/etc'
# or
btrfs subvolume list / | grep '/etc'
/etc subvolume is marked persistent:transactional-update shell
# Inside the shell, inspect /etc/.btrfs subvolume properties
transactional-update shell
rpm -V /etc/nginx # shows mismatches between package and live file
# or
btrfs diff /etc
%post
# Assume rendered config is in /tmp/rendered/nginx.conf
cp /tmp/rendered/nginx.conf /etc/nginx/nginx.conf
systemd-sysext install --name nginx-conf my-nginx.sysext
Could you tell us which MicroOS release you’re running and whether /etc is configured as a separate persistent subvolume? The mount order and subvolume flags differ between releases, and that will affect the override behavior.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.