Comment 1 for bug 1382177

Revision history for this message
Gavin Panella (allenap) wrote : Re: Move templates to /var/lib/maas

I think we ought to simply put the templates in /usr/share/maas/templates and *not* provide any official mechanism to override them.

Most if not all of the code that loads the templates in MAAS is designed to work with a load path, i.e. a list of directories in which to search for templates. We could put the templates in /usr/share/maas/templates, for example, but always search /etc/maas/templates first, and document how one might go about overriding a template.

However, with or without that, any kind of template customisation is one more knob to twiddle that adds complexity, that is difficult to debug, and that we'll get blamed for when it doesn't work or doesn't upgrade smoothly.

We do have an internal-only plugin mechanism for power drivers that works nicely, but it's based on a general purpose plugin library. We could use that same mechanism for other parts of MAAS. If people desperately need to customise MAAS we can encourage them to write a plugin, to the extent of providing a skeleton and instructions. They can then explicitly choose to use that plugin when managing an aspect of some or all of their nodes.

A plugin in this form might be a candidate for pushing upstream (i.e. back to the MAAS project) so others can benefit from it, whereas a template "hack" is not likely to see daylight outside of the organisation that made it.