[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#843209: Please permit class directory-like feature for fai-diskimage

package: fai
version: 5.2
severity: wishlist.

FAI has a great feature in the class directory that allows a
configuration space to infer classes from things such as the installed
This is not currently available from fai-diskimage.
I'd really like to have a feature like that for fai-diskimage.

My recommendation is that the class script be run for fai-diskimage, and
that there be some way for a script to determine if it is producing a
diskimage so that scripts that do things like output classes based on
the current machine would not run.

An alternative would be to have a directory parallel to class that was
only used for diskimage.
A far less desirable alternative would be for the cloud team to wrap
fai-diskimage for this purpose.
We'll almost certainly wrap fai-diskimage, but I was hoping that our
wrappers would focus on things like uploading images, not on stuff like

You said you didn't see the point for disk-images.
You don't infer things from the current environment, but you infer
aspects of configuration from other aspects of configuration to improve
maintainability, and simplicity of calling the interface.
Here are examples where this is useful.

* inferring either GRUB_PC or GRUB_EFI from AMD64 and whether the
  provider in question currently uses EFI

* Any of GCE or EC2 implying CLOUD

* Implying classes from release.  For example, as we moved from wheezy
  to jessie, SYSTEMD might be implied.  It seems likely that there will
  be similar future-such that will be triggered either by Debian
  release, or by the time frame and provider

For non-cloud work, I think I'll want this feature in my own
fai-diskimage usage.
Inside my employer, Hadron, we'll have a number of classes related to
things like whether a desktop is installed, whether we're building an
installer image, or an image to be given to hardware vendors to be
burned into systems before they are delivered to us.
Only a couple of these configurations will be supported at any given
time, but to ease comprehension of the configuration space and to deal
with code evolution, these will be  split into classes.
I'd prefer that people calling fai-diskimage provide in one top-level
class corresponding to one of the supported top-level configurations.

I'm happy to work on an implementation once you figure out what
approaches you'd be willing to accept.

Reply to: