On Fri, Feb 21, 2020 at 6:00 PM James Cassell <fedoraproject@cyberpear.com> wrote:
On Fri, Feb 21, 2020, at 4:46 PM, Benjamin Gilbert wrote:
> In general, Ignition is intended to run exactly once per system, and
> running it more than once is not supported. (There is a limited
> exception for live ISO/PXE systems, where, arguably, every boot is the
> first boot.) Why do you want to run Ignition more than once?

How does one reprovision an existing machine without losing its data? How can one update a machine's config when the canonical config is the ignition?

Ah, that makes sense.  We don't usually think of reprovisioning as "re-executing Ignition", but your use case matches the live ISO/PXE one I mentioned.

Your config is basically right.  With wipe_filesystem: false, Ignition should reuse an existing filesystem if it finds one with the specified properties.  If you want to allow room for expansion of the root filesystem, you can set the start_mib of the DATA partition to a suitable value.  What error are you getting from Ignition when you apply your config?

If you put the data partition on a second disk, this approach should work today.  It won't work for the boot disk right now because reprovisioning with coreos-installer will wipe the entire disk.  We should fix that.

For the latter, I hope to write an ansible role that takes an .fcc as input and enforces it on a host. Obviously doesn't work with arbitrary scripts, but anything declarative should work in concept...

In principle this can work.  (Though you'd want to transpile the FCC to Ignition and apply the Ignition config to the host.)  In general, though, our recommendation is to reprovision the machine, rather than trying to keep it in sync after the fact.

--Benjamin Gilbert