Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Ignition should support filesystem reuse semantics for partitioning #2388
Container Linux Version
AWS with EBS data volume
Ignition should skip trying to partition the disk if it has already been partitioned but it is not doing this.
Per another issue I tried the
The first time Ignition runs, it creates the partition and everything works correctly.
The problem is when attempting to attach the EBS volume to a new instance after creating the partition table and directories, etc and then rerunning Ignition on the new server.
and later in the logs.
I have been able to get the server to boot correctly by removing everything in the
Here's basically what the configuration looks like.
I think this is the expected current behavior, but it's probably under-documented.
Yup, working on this now. The short explanation is we want to add the filesystem reuse symantics to the partitioning code on a partition by partition level, so you'll be able to say "create this if it doesn't exist and leave it alone if it does".
In the mean time, since it looks like you're not using it for the root partition, you could probably create do it with a systemd oneshot with ConditionFirstBoot with a script that manually implements the logic.
I'm hoping to have it up for review by end of week, maybe early next week. I'm pushing changes to my
Most of the implementation work is done, but there's still a lot of cleanup and testing work that needs to be done before we can merge it.
changed the title from
Issues attaching previously formatted/partitioned disk
Ignition should support filesystem reuse semantics for partitioning
Mar 28, 2018
If you're planning to reuse an EBS volume between different instances, personally I'd partition it "upfront" (perhaps manually, but you could script it). Then have ignition inject a systemd
@cgwalters A slightly cleaner approach is a service unit that conditionally formats the disk. Those sorts of workarounds often point to missing functionality in Ignition, though. Ignition should be able to provision the machine in entirety, not just be a piece of the provisioning workflow.
Adding on to what @bgilbert said, we also need to consider baremetal cases, including PXE cases where Ignition runs every boot. In those cases we need a way of allowing Ignition to partition something to be used as persistent storage but not scramble the guids every boot.