Templates are not really user-editable

Bug #1382177 reported by Christian Reis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Invalid
High
Unassigned

Bug Description

While the content in /etc/maas/templates is in theory modifiable by the end-user, it is not actually an "etc-file" in its strictest definition, and it's probably not something we want to encourage users to edit (because if they do and it breaks, boom). We should allow for:

   - Fragments that can be included in the DHCP and DNS configurations
   - Additional templates that are user-provided, if that's somehow possible

The stuff in templates should probably go to /var/lib/maas/templates, with the power drivers probably going to /var/lib/maas/drivers

Revision history for this message
Gavin Panella (allenap) wrote :

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.

Revision history for this message
Julian Edwards (julian-edwards) wrote : Re: [Bug 1382177] Re: Move templates to /var/lib/maas

We're damned if we do and damned if we don't. We used to have templates
elsewhere and users still edited them. They were moved to /etc so at least
dpkg warned them that there was a conflict to resolve.

summary: - Move templates to /var/lib/maas
+ Templates are not really user-editable
Changed in maas:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

Addressing bug 1185164 may make this less of an issue.

Revision history for this message
Andres Rodriguez (andreserl) wrote :

Hi!

We believe this is no longer an issue in the latest MAAS releases. As such, we are marking this bug report as invalid. If you believe this is still an issue, please re-open this back report.

Thanks

Changed in maas:
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.