On Wed, 2008-10-15 at 22:13 +0100, Paul Nasrat wrote:
> >> For domain name resolution in particular, I see no reason to have all
> >> these independent resolutions with no confines, since we do want
> >> them to
> >> be executed in a fixed order. I provide a patch in #1654 that merges
> >> all
> >> these resolutions into one.

[ This was first bit was from Luke; for some reason, your reply didn't
make it to me, though I did remove you from my killfile a while ago ;) ]
 
> > I'm sure everyone wants them executed in a specific order, I'm just
> > not sure everyone wants them in the same order.

Agreed; but making the order of resolutions configurable seems like
quite a bit of work; for starters, you'd need a way to reference
existing resolutions and define an order for them after the fact - this
assumes that facter would ship with a bunch of resolutions, and users
would need to be able to rearrange existing resolutions.

> If it's well documented behaviour and obvious when people are writing
> new facts, then I'm not sure that having a hard rule (eg specific
> beats generic) would be that unpalatable. I'd not want to change that
> in a minor release, but for 2.0 or for 1.6 maybe.

Definitely, though it's not entirely easy to come up with a good rule,
since you need to define an ordering for resolutions in the same file
and for the order in which facts are loaded from files.

Would definitely be easiest to just stick an explicit 'order' or so
field into each resolution, e.g.

        Facter.add(:domain) do
            order 200
            setcode do
                ...
            end
        end

FWIW, the issue that I saw with domainname being used before other
domain resolutions was that (on a RHEL5 system with facter-1.5.2 from
RPM)
        facter domain
and
        RUBYLIB=/usr/lib/ruby/site_ruby/1.8 facter domain
gave different answers, one of which happened to be correct, though
obtained in the wrong way. 

What triggered the difference is that in the second form the default
facts are loaded twice (since /usr/lib/ruby/site_ruby/1.8/facter appears
on $: twice) - adding those additional facts seems to have changed the
order of the domain resolutions with no confines.

David


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to puppet-dev@googlegroups.com
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