-
Notifications
You must be signed in to change notification settings - Fork 49
[RFE] OS reset helper #869
Description
Current situation
Factory reset is something common for consumer devices but it also is useful for servers when we follow the idea of immutable infrastructure and want to "reprovision" to apply a config change but newly installing the OS takes too long or is too disruptive due to local data.
We have example usage with terraform helper scripts in the without-instance-replacement variants of https://github.com/flatcar/flatcar-terraform
Impact
It's not easy for users to discard local changes. The Ignition reformat hammer is not bad but requires special knowledge and a custom ignition config entry and loses local data.
Ideal future situation
We have a flatcar-reset helper that allows to either fully or selectively reset the OS.
The full reset is by wiping the rootfs (could be rm -r, or could be by triggering the systemd-repart factory reset mode with some special GPT disk uuid), and creates the first boot flag file for Ignition to run.
The partial reset is by doing a recommended wildcard removal before reboot (allow or deny mode, preferred is allow), then creating the first boot flag file for Ignition to run. It should preserve the machine id by writing it to grub.cfg because keeping /etc/machine-id is not allowed with Ignition.
Implementation options
Additional information
Metadata
Metadata
Assignees
Labels
Type
Projects
Status