Issue #1291 has been updated by brenton.
Robin wrote: > I'm still having issues with this in 1.5.2. > > Looking into it, the problem would seem to be more generic. In the 'add' > method for the Fact class, you're doing a sort to order by the number of > confines. This is currently using Ruby's built-in sort function, which is > implemented as a qsort and is therefore non-deterministic when multiple > entries have the same sort key. Since neither the "domainname", nor the > "dnsdomainname" facts have any confines, they're being ordered pretty > randomly (it actually seems to be biased towards the results from domainname, > but occasionally does return the dnsdommainname result). > > Changing this to use the (deterministic) sort_by function fixes the issue, > maintaining the original sort order in cases where the sort keys are > identical. The attach patched implements this (sorting by the negative of > the length to ensure the largest number of enclosures is first). For what it's worth, we hit this bug on RHEL 5 when upgrading to facter 1.5.2. This patch is working well for us. ---------------------------------------- Bug #1291: Facter is using the NIS domain name instead of DNS domain name in some cases http://projects.reductivelabs.com/issues/show/1291 Author: admin Status: Re-opened Priority: Normal Assigned to: luke Category: library Target version: Complexity: Unknown Keywords: It looks like the code around: * http://reductivelabs.com/cgi-bin/facter.cgi/browser/trunk/lib/facter.rb#L692 is looking for the DNS domain name, however that line invokes the "domainname" command, which at least the Debian GNU/Linux and AIX man pages make clear returns the NIS domain name (the Solaris man page is convoluted but seems to say that as well). In any case, at my site we have a historical NIS domainname that is totally different from our DNS domainname, so this makes things confusing. There are also cases where this would just break things (e.g. we have box.foo.com and box.bar.com both in the NIS domain baz.com, so the first puppetized machine would get a SSL cert for box.baz.com, and the second one would have problems) On Debian there is the dnsdomainname command, however the only thing I've found that works consistantly on all of my site's myriad operating system/version combinations is to do a double lookup (e.g. get the host's IP address, and then perform a lookup of that IP address); that way at least you'll get whatever nsswitch.conf or equivalent thinks your IP address resolves to, which is usualy what you'll be using when doing any debugging, and which is usually also resolvable by the other machines on the network. ---------------------------------------- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://reductivelabs.com/redmine/my/account --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Bugs" 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-bugs?hl=en -~----------~----~----~----~------~----~------~--~---
