Hi,

well, no, there is currently no way to implement effective subtypes or
create an inheritance hierarchy at this point. Not that it's not wanted
- we could have made good use of such a for years. Some things are
really hard to solve with the current RAL model.

Fortunately, purging is usually not one of them. You may want to take a
closer look at the resources type, rather than the mount type. Its
purging works by just collecting the list of instances, as gathered by
the respective type's provider. It is quite possible to apply special
filters, e.g. target only mount resources with an fstype of nfs.

It should be much simpler to build your own specialized mount purger as
a clone of the resources type, rather than cloning the mount type for
better purging through the resources type proper.

I hope this makes sense. Cheers,
Felix

On 09/09/2014 02:57 PM, Andreas Zuber wrote:
> Hello
>
> I just came across an interesting problem with the mount provider. We
> try to manage NFS mounts on the servers and purge all instances which
> are not in the catalog.
>
> Since the mount type/provider collects all the mounts it would simply
> destroy the system if we activate purging. So I started to look into
> different ways how this could be done right.
>
> Unfortunately I did not find a solution which is very attractive.
> Currently I simply copied the puppet mount type and provider and created
> a modified version of it under a different name. This is very ugly as it
> basically c&p some hundred lines of code to add a few lines which reject
> all non NFS mounts in the instances method.
>
> Is there a better way to do this? Is there some way I can limit the
> purging to a set of parameters or a specific provider for the mount
> type? Or is there a way to inherit a type and to inherit providers from
> such inherited types?
>
> Greetings
> Andreas

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/540F8D5D.3010001%40Alumni.TU-Berlin.de.
For more options, visit https://groups.google.com/d/optout.

Reply via email to