FAI going to the cloud

Derek Poon derekp+fai at ece.ubc.ca
Wed Sep 28 02:45:31 CEST 2016


On Sep 22, 2016, at 5:48 PM, Thomas Lange <lange at informatik.uni-koeln.de> wrote:
> 
>>>>>> On Thu, 22 Sep 2016 17:31:54 -0700, Derek Poon <derekp+fai at ece.ubc.ca> said:
> 
>> Instead of fai-diskimage as a separate command, have you considered making it a mode of the fai command itself, analogous to `fai dirinstall`?  It would be nice to be able to write hooks for diskimage installs.
> fai-diskimage is a seperate script which calls "fai install"
> internally. You can write hooks for fai-diskinstall the same way as in
> fai itself, because it uses the same config space as fai.


I was actually trying to make two observations.

The first issue is user experience consistency.  We have:

   fai install
   fai sysinfo
   fai dirinstall /path/to/target/directory
   fai-diskimage -S 32G /path/to/image

The last one seems conceptually similar to dirinstall.  Why should it invoked differently, as "fai-diskimage" rather than "fai diskimage"?  Furthermore, the fai-diskimage command is hard-coded to do the "install" action, so these choices are mutually exclusive.

To me, "fai-diskimage" is closer in nature to "fai install" than to "fai-cd" or "fai-kvm", and should therefore behave similarly.


The second issue is flexibility.  The fai-diskimage script doesn't really do that much: it creates and mounts an image at the beginning, then possibly converts the resulting image to QCOW2 format afterwards.  If the fai command were tweaked to allow a size to be specified, then the image creation could be accomplished with a hook for the partition task (or perhaps a new diskimage task).

Whether the format conversion is needed could be inferred from whether the image filename ends in ".qcow2".  The conversion to QCOW2 could be done using a hook for faiend.

Personally, I would prefer the configuration approach over the wrapper script, since it allows for customization better.  (For example, it would be easy to add support for image formats other than QCOW2.)


On top of that, there would be one fewer man page to write.

I hope you will give these thoughts some consideration before making the next FAI release.

Derek


More information about the linux-fai mailing list