I''ve run into an odd one on one of my new RHEL 6 boxes. Puppet and Facter seem to disagree about the value of a fact. Puppet version: 2.7.9 Facter version: 1.6.4 Module: puppetlabs-apache apache::params falls through its if structure: if $::osfamily == ''redhat'' or $::operatingsystem == ''amazon'' { ... } elsif $::osfamily == ''debian'' { ... } else { fail("Class[''apache::params'']: Unsupported operatingsystem: $::operatingsystem or osfamily: $::osfamily") } The module returns the following error: Error 400 on SERVER: Class[''apache::params'']: Unsupported operatingsystem: RedHat or osfamily: Linux Facter, however, seems to think osfamily is ''RedHat'' as it should be: facter -p osfamily RedHat It''s very strange. Have any of you seen this one before? -- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
CaSe SenSitiVe? RedHat vs. redhat? On Wed, Feb 20, 2013 at 6:37 PM, Aaron Grewell <aaron.grewell@gmail.com>wrote:> I''ve run into an odd one on one of my new RHEL 6 boxes. Puppet and Facter > seem to disagree about the value of a fact. > > Puppet version: 2.7.9 > Facter version: 1.6.4 > > Module: puppetlabs-apache > > apache::params falls through its if structure: > if $::osfamily == ''redhat'' or $::operatingsystem == ''amazon'' { > ... > } elsif $::osfamily == ''debian'' { > ... > } else { > fail("Class[''apache::params'']: Unsupported operatingsystem: > $::operatingsystem or osfamily: $::osfamily") > } > > The module returns the following error: > Error 400 on SERVER: Class[''apache::params'']: Unsupported operatingsystem: > RedHat or osfamily: Linux > > Facter, however, seems to think osfamily is ''RedHat'' as it should be: > facter -p osfamily > RedHat > > It''s very strange. Have any of you seen this one before? > > -- > 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+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > >-- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Nick Fagerlund
2013-Feb-21 01:12 UTC
Re: [Puppet Users] Facter & Puppet disagree on RHEL 6?
On Wednesday, February 20, 2013 5:08:27 PM UTC-8, LenR wrote:> > CaSe SenSitiVe? RedHat vs. redhat? > > >Puppet''s == operator is case-insensitive. http://docs.puppetlabs.com/puppet/3/reference/lang_expressions.html#equality If it''s a case issue, it''s a horrible compatibility-breaking bug. -- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
I wasn''t sure, too many different languages.... I guess for a test you could code it == RedHat, but we have a lot of RHEL 6 and I suspect would have hit this somewhere. On Wed, Feb 20, 2013 at 7:12 PM, Nick Fagerlund < nick.fagerlund@puppetlabs.com> wrote:> > > On Wednesday, February 20, 2013 5:08:27 PM UTC-8, LenR wrote: >> >> CaSe SenSitiVe? RedHat vs. redhat? >> >> >> > Puppet''s == operator is case-insensitive. > http://docs.puppetlabs.com/puppet/3/reference/lang_expressions.html#equality > > If it''s a case issue, it''s a horrible compatibility-breaking bug. > > -- > 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+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > >-- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Aaron Grewell
2013-Feb-21 02:11 UTC
Re: [Puppet Users] Facter & Puppet disagree on RHEL 6?
It''s not that simple. Puppet thinks osfamily is ''Linux'' whereas facter returns ''RedHat'' at the command prompt. On Feb 20, 2013 5:33 PM, "Len Rugen" <lenrugen@gmail.com> wrote:> I wasn''t sure, too many different languages.... I guess for a test you > could code it == RedHat, but we have a lot of RHEL 6 and I suspect would > have hit this somewhere. > > > On Wed, Feb 20, 2013 at 7:12 PM, Nick Fagerlund < > nick.fagerlund@puppetlabs.com> wrote: > >> >> >> On Wednesday, February 20, 2013 5:08:27 PM UTC-8, LenR wrote: >>> >>> CaSe SenSitiVe? RedHat vs. redhat? >>> >>> >>> >> Puppet''s == operator is case-insensitive. >> http://docs.puppetlabs.com/puppet/3/reference/lang_expressions.html#equality >> >> If it''s a case issue, it''s a horrible compatibility-breaking bug. >> >> -- >> 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+unsubscribe@googlegroups.com. >> To post to this group, send email to puppet-users@googlegroups.com. >> Visit this group at http://groups.google.com/group/puppet-users?hl=en. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > > -- > 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+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > >-- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
On Wednesday, February 20, 2013 8:11:20 PM UTC-6, Aaron Grewell wrote:> > It''s not that simple. Puppet thinks osfamily is ''Linux'' whereas facter > returns ''RedHat'' at the command prompt. > >I can only assume, then, that the facter you are running from the command line is not the same (or same-configured) facter that the agent is running. Perhaps it is using different libdirs in the two cases, or maybe you have two completely separate Facters on the system. John -- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Aaron Grewell
2013-Feb-21 17:08 UTC
Re: [Puppet Users] Facter & Puppet disagree on RHEL 6?
I''ve checked, but there''s only one set of RPMs installed and the facter binary points to those. # rpm -qa | grep puppet pe-puppet-enterprise-release-2.0.3-0.pe.el6.noarch pe-puppet-2.7.9-3.pe.el6.noarch pe-rubygem-puppet-module-0.3.4-2.pe.el6.noarch rpm -qa | grep facter pe-facter-1.6.4-2.pe.el6.noarch # which facter /usr/local/bin/facter # which puppet /usr/local/bin/puppet There''s nothing installed from tarball or gem, this is a newly built box with just our standard RPM setup on it. On Thu, Feb 21, 2013 at 8:57 AM, jcbollinger <John.Bollinger@stjude.org>wrote:> > > On Wednesday, February 20, 2013 8:11:20 PM UTC-6, Aaron Grewell wrote: >> >> It''s not that simple. Puppet thinks osfamily is ''Linux'' whereas facter >> returns ''RedHat'' at the command prompt. >> >> > I can only assume, then, that the facter you are running from the command > line is not the same (or same-configured) facter that the agent is > running. Perhaps it is using different libdirs in the two cases, or maybe > you have two completely separate Facters on the system. > > > John > > -- > 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+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > >-- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
On Thursday, February 21, 2013 11:08:18 AM UTC-6, Aaron Grewell wrote:> > I''ve checked, but there''s only one set of RPMs installed and the facter > binary points to those. > > # rpm -qa | grep puppet > pe-puppet-enterprise-release-2.0.3-0.pe.el6.noarch > pe-puppet-2.7.9-3.pe.el6.noarch > pe-rubygem-puppet-module-0.3.4-2.pe.el6.noarch > > rpm -qa | grep facter > pe-facter-1.6.4-2.pe.el6.noarch > > # which facter > /usr/local/bin/facter > > # which puppet > /usr/local/bin/puppet > > > There''s nothing installed from tarball or gem, this is a newly built box > with just our standard RPM setup on it. > >And I suppose "rpm -q -f /usr/local/bin/facter" tells you "pe-facter-1.6.4-2.pe.el6.noarch"? And "find / -name ''facter.rb''" doesn''t turn up any duplicates? Since Puppet and / or Facter are behaving abnormally, it is not safe to assume anything about the state of the box, particularly with regard to those components. Especially so if the Puppet and Facter RPMs you are using are part of your "standard RPM setup", such that you know they work correctly on others of your systems. You could consider installing custom facts with which to probe Facter''s own operating environment in the two cases. You should also snoop the agent''s catalog requests to compare the facts it sends with the ones command-line Facter reports. I think it''s likely that the problem is on the agent end, but this way you can verify that its not the master somehow mixing things up. John -- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Aaron Grewell
2013-Feb-21 18:23 UTC
Re: [Puppet Users] Facter & Puppet disagree on RHEL 6?
Argh, never mind. It''s a garden variety client-server version mismatch. I must''ve grabbed the wrong version when building the image. -- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.