Puppet: System Administration Automated

Support

Ticket #789 (new enhancement)

Opened 1 year ago

Last modified 6 months ago

Configurable automatic object's purging

Reported by: tim Assigned to: luke
Priority: normal Milestone: unplanned
Component: unknown Version:
Severity: normal Keywords: modules purging deletion ensure control
Cc: Triage Stage: Needs design decision
Attached Patches: None Complexity: Unknown

Description

While talking on IRC, Spike and I figured it could be worth while to make this a feature request.

The problem:

When you delete an object in your manifest, it's not handled anymore on the client. The best way at present to make it also delete the object on the client is to leave it in the manifest with some kind of "ensure => absent" declaration. Although this works in a lot of places, it can be very ugly and inconvenient, especially when you're building a module.

A solution:

Allow for a "control" parameter on object basis. Make it best practice to have this always default to something like "not-puppet". When the parameter is set to "puppet" *manually in the manifest*, allow puppet to run some pre-determined defined command to remove it. This would mean that puppet would need to check on each run if the list of available "puppet-controlled" objects has been changed in comparison with the last puppet run. If so, if any has been removed, run the pre-determined defined method with the name of the object to actually remove it.

Problems:

Lots. Even when not counting on sysadmin messing things up. Cache problems between runs could be one problem. I personally think that most problems could be solved by simply using sane defaults: If anything goes wrong, yell, but don't change anything.

I'd be happy if this feature was only available for puppet modules, but I can imagine further widespread usage of this. You also might want a global setting that simply disables this behaviour, even when control => puppet is explicitly set.

Change History

(in reply to: ↑ description ) 08/27/07 14:23:15 changed by DavidS

[repost via webinterface, since trac ate the mail]

I believe that this and other problems[1] are best solved by managing all existing objects of a type and (semi-)globally enabling purging for a type. By enumerating all objects and their intended state, complexity (caching, transient misconfigurations) is reduced, while knowledge about the whole system is increased.

Another example for this philosophy is managing a config file by copying/templating instead of file modification operations. The former brings absolute knowledge and control while the latter semantics are hard to define and brittle across target versions.

Regards, David

[1] e.g. unintentional removal of neccessary packages by ensure=>purge'ing a depended-upon package

09/06/07 19:14:29 changed by michael

  • stage changed from Unreviewed to Needs design decision.
  • milestone set to unplanned.

04/24/08 07:54:59 changed by luke

  • component changed from server to unknown.