Hi all, I''m trying to get puppet working for the first time, and I''ve run into something that''s got me stumped. This is all on Solaris 10/x64. The initial startup of puppetmasterd wasn''t working, and it appeared to be related to the SSL certs not getting generated properly. I managed to trace that down to the fact that facter isn''t finding the hostname, among other things. Here''s the output of facter -d: value for kernelrelease is still nil value for hostname is still nil value for hostname is still nil value for ipaddress is still nil value for lsbdistdescription is still nil value for hostname is still nil value for hardwaremodel is still nil value for lsbrelease is still nil value for hostname is still nil value for kernel is still nil value for operatingsystem is still nil value for lsbdistrelease is still nil value for kernelrelease is still nil value for operatingsystemrelease is still nil value for lsbdistid is still nil value for hostname is still nil value for fqdn is still nil value for cfkey is still nil value for kernel is still nil value for lsbdistcodename is still nil value for kernel is still nil value for hostname is still nil value for hostname is still nil value for kernel is still nil value for operatingsystem is still nil domain => my.domain.com facterversion => 1.3.7 ps => ps -ef puppetversion => 0.22.4 rubysitedir => /usr/local/puppet/lib/ruby/site_ruby/1.8 rubyversion => 1.8.2 sshdsakey => (....the dsa key...) sshrsakey => (...the rsa key...) I couldn''t find any reference to this issue anywhere...if it''s documented or someone''s seen it and can point me in the right direction, I''d be most appreciative. Alternatively, if someone can point me in the right direction for debugging this, I''ll take that too. I''m brand new to Ruby as well as Puppet/Facter, so I don''t know if this is a ruby thing or a facter thing or what. I''ve tried both building ruby from source (versions 1.8.2 and 1.8.6) and installing it from sunfreeware. It always does this regardless of which build I use. I have not yet tried different versions of facter. - Chris Manly
On Wed, Aug 29, 2007 at 12:16:29PM -0400, Christopher Manly wrote:> Alternatively, if someone can point me in the right direction for > debugging this, I''ll take that too. I''m brand new to Ruby as well as > Puppet/Facter, so I don''t know if this is a ruby thing or a facter thing > or what.You can check facter.rb to see how it tries to get the hostname. Most often it''s the hostname command. What does hostname return when you run it from the command line? -- Valentin
Valentin Vidic wrote:> On Wed, Aug 29, 2007 at 12:16:29PM -0400, Christopher Manly wrote: > >> Alternatively, if someone can point me in the right direction for >> debugging this, I''ll take that too. I''m brand new to Ruby as well as >> Puppet/Facter, so I don''t know if this is a ruby thing or a facter thing >> or what. >> > > You can check facter.rb to see how it tries to get the hostname. Most > often it''s the hostname command. What does hostname return when you run > it from the command line? >Since I don''t fully grok ruby syntax, I may be missing something, but I don''t see any reference to /bin/hostname anywhere in the code. /bin/hostname does return the hostname properly. -- Chris
On Wed, Aug 29, 2007 at 01:05:18PM -0400, Christopher Manly wrote:> Since I don''t fully grok ruby syntax, I may be missing something, but I > don''t see any reference to /bin/hostname anywhere in the code. > /bin/hostname does return the hostname properly.I think this is were it calls hostname (it doesn''t use the full path): 790: name = Resolution.exec(''hostname'') or nil -- Valentin
Valentin Vidic wrote:> On Wed, Aug 29, 2007 at 01:05:18PM -0400, Christopher Manly wrote: > >> Since I don''t fully grok ruby syntax, I may be missing something, but I >> don''t see any reference to /bin/hostname anywhere in the code. >> /bin/hostname does return the hostname properly. >> > > I think this is were it calls hostname (it doesn''t use the full path): > > 790: name = Resolution.exec(''hostname'') or nil > >Aha! Yes, changing that to /bin/hostname worked, as did giving an absolute path to things like uname for other facts. Which makes me scratch my head over why ruby was not using any path to find executables, but I can chase that down another day. Thanks! - Chris