> > From one perspective, perhaps.  But you can also look at it as a

> > simplification, in that it removes a number of tricky questions in an
> > elegant, easy to understand way.
> >
> > We can't, in the general case, tell if two regular expressions overlap.
> > So if we discover at run time that a node matches two regular
> > expressions, which one applies? Saying "both" cuts the knot in a way
> > that's easy to understand and could even be useful.
>
> To be honest - and please don't take offence - that's spoken like a
> developer.  :)
>

No offense taken.  But I'll return the serve.

> As a sysadmin and one of the people who spends a lot of time
> helping people with Puppet I sense huge potential for multiple
> matching node statements to trip people over and create
> mayhem and chaos.  But maybe I am just a cynic. :P

There are a few ways we could prevent it.  But none of them are that great.
Which of the following are you proposing:

    * Taking regexps out?
    * Imposing a limit of at most one node-regexp per environment?
    * Do you have a golden rule for which one to apply when two match?
        * The shorter regexp wins
        * The "most specific" wins
        * The first regexp in alphabets order wins
        * The newest wins
        * Pick one at random
        * Prompt the user
        * Add a priority field to the node definitions?
    * Or should it fail?
        * Just for that node, or is the whole configuration now suspect?
        * Should it wait to see if there's a conflict?
    * Require all node names to be registered in advance, and reject them if
they'd match two?
    * Water down the regexps to something more tractable (say like shell
glomming)?

If your plan is to just ignore the issue and hope it never comes up (or even
better, have a policy against it happening), well, I'd have to say that
that's sounding like something a sysadmin would do :).

But only to tweak you.

-- Markus

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to