Ok, I installed Ruby/LDAP to try and get Puppet''s ldapnodes support working and despite doing this I am still getting errors from puppetmasterd "notice: Could not set up LDAP Connection: Missing ruby/ldap libraries" followed by "info: Skipping ldap source; no ldap connection". I traced down this particular message to: lib/puppet/parser/interpreter.rb and it appears that Puppet isn''t finding my ruby ldap libraries that I just installed. The Ruby/LDAP libraries were installed from the source into the following locations: /inst/pkg/ruby/lib/ruby/site_ruby/1.8/ldap and the ldap.so to: /inst/pkg/ruby/lib/ruby/site_ruby/1.8/sparc-solaris2.10 The puppet, ruby, and facter binaries are in: /inst/pkg/ruby/bin The puppet, ruby, and facter libraries are in: /inst/pkg/ruby/lib/ruby/site_ruby/1.8 Versions: -Ruby 1.8.6 -Ruby/LDAP 0.9.6 -Facter 1.3.7 -Puppet 0.23.0 -Solaris 10 Am I missing something that needs to be done to convince Puppet that I do indeed have the Ruby/LDAP libraries installed (I am a Ruby newbie so I may have missed something obvious)? Getting puppet to utilize our LDAP infrastructure for node information is critical for our Puppet rollout project to move forward as we don''t want to have to duplicate node information in manifests. Any pointers would be greatly appreciated, as I have not found anything (so far) that has helped resolve this issue. If I come across a solution, then I will update the Puppet wiki accordingly. Thanks, Thomas
On Oct 12, 2007, at 4:51 PM, Thomas Underhill wrote:> Am I missing something that needs to be done to convince Puppet > that I do indeed have the Ruby/LDAP libraries installed (I am a > Ruby newbie so I may have missed something obvious)? Getting > puppet to utilize our LDAP infrastructure for node information is > critical for our Puppet rollout project to move forward as we don''t > want to have to duplicate node information in manifests. > > Any pointers would be greatly appreciated, as I have not found > anything (so far) that has helped resolve this issue. If I come > across a solution, then I will update the Puppet wiki accordingly.Run this: ruby -lldap -e ''puts :yep'' If that throws an error, then Ruby is not finding your library, and thus neither will Puppet. If that does not throw an error but Puppet still can''t find the library, then it looks like a bug in Puppet. -- Nonreciprocal Laws of Expectations: Negative expectations yield negative results. Positive expectations yield negative results. --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
*snip*> >Run this: > >ruby -lldap -e ''puts :yep'' > >If that throws an error, then Ruby is not finding yourlibrary, and>thus neither will Puppet. If that does not throw an errorbut Puppet>still can''t find the library, then it looks like a bug in Puppet. >Thanks Luke. Here is the output of the above: # ruby -lldap -e ''puts :yep'' yep (no errors from ruby) -Thomas
On Oct 14, 2007, at 4:36 PM, Thomas Underhill wrote:> Here is the output of the above: > # ruby -lldap -e ''puts :yep'' > > yepAnd you''re sure that you''re using the same ruby there that Puppet is using? Many machines end up with multiple Ruby installs. -- There are no such things as applied sciences, only applications of science. -- Louis Pasteur --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
I forgot to CC: the list on my response. Sorry.> >I am certain that the only ruby on this box is the one that >puppet is using. We have barebones custom Solaris jumpstart >boxes with no ruby installations. We then manually installed >ruby/puppet into the same directory and then used graft to >create symbolic links under /usr/local. > >-Thomas > >---- Original message ---- >>Date: Mon, 15 Oct 2007 10:12:11 -0500 >>From: Luke Kanies <luke@madstop.com> >>Subject: Re: [Puppet-users] Puppet is reporting missing >libraries >>To: tunderhi@ucr.edu, Puppet User Discussion ><puppet-users@madstop.com> >> >>On Oct 14, 2007, at 4:36 PM, Thomas Underhill wrote: >> >>> Here is the output of the above: >>> # ruby -lldap -e ''puts :yep'' >>> >>> yep >> >>And you''re sure that you''re using the same ruby there that >Puppet is >>using? Many machines end up with multiple Ruby installs. >> >> -- >> There are no such things as applied sciences, only >applications of >> science. -- Louis Pasteur >> >--------------------------------------------------------------------- >> Luke Kanies | http://reductivelabs.com | http://madstop.com >> >>
On Oct 15, 2007, at 10:17 AM, Thomas Underhill wrote:> I am certain that the only ruby on this box is the one that > puppet is using. We have barebones custom Solaris jumpstart > boxes with no ruby installations. We then manually installed > ruby/puppet into the same directory and then used graft to > create symbolic links under /usr/local.Hmm. Looks like I gave you the wrong command. Try this: ruby -rldap -e ''puts :yep'' If that works, try this: ruby -rpuppet -e ''p Puppet.features.ldap?'' These are basically doing the same thing, so they should either both succeed or both fail, and if they both succeed, then ldap nodes should work. -- I never think of the future. It comes soon enough. --Albert Einstein --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
>Hmm. Looks like I gave you the wrong command. Try this: > >ruby -rldap -e ''puts :yep'' > >If that works, try this: > >ruby -rpuppet -e ''p Puppet.features.ldap?'' > >These are basically doing the same thing, so they shouldeither both>succeed or both fail, and if they both succeed, then ldap nodes >should work.# ruby -rldap -e ''puts :yep'' /inst/pkg-arch/ruby-1.8.6_facter-1.3.7_puppet-0.23.0+SunOS_5.10_sparc/lib/ruby/site_ruby/1.8/ldap.so: ld.so.1: ruby: fatal: relocation error: file /inst/pkg-arch/ruby-1.8.6_facter-1.3.7_puppet-0.23.0+SunOS_5.10_sparc/lib/ruby/site_ruby/1.8/ldap.so: symbol ber_pvt_opt_on: referenced symbol not found - /inst/pkg-arch/ruby-1.8.6_facter-1.3.7_puppet-0.23.0+SunOS_5.10_sparc/lib/ruby/site_ruby/1.8/ldap.so (LoadError) # ruby -rpuppet -e ''p Puppet.features.ldap?'' false # I''ll have to figure out why these errors are occurring because the ruby/ldap compile/build did not throw any errors. -Thomas
> # ruby -rldap -e ''puts :yep'' > /inst/pkg-arch/ruby-1.8.6_facter-1.3.7_puppet-0.23.0+SunOS_5.10_sparc/lib/ruby/site_ruby/1.8/ldap.so: > ld.so.1: ruby: fatal: relocation error: file > /inst/pkg-arch/ruby-1.8.6_facter-1.3.7_puppet-0.23.0+SunOS_5.10_sparc/lib/ruby/site_ruby/1.8/ldap.so: > symbol ber_pvt_opt_on: referenced symbol not found - > /inst/pkg-arch/ruby-1.8.6_facter-1.3.7_puppet-0.23.0+SunOS_5.10_sparc/lib/ruby/site_ruby/1.8/ldap.so > (LoadError) > # ruby -rpuppet -e ''p Puppet.features.ldap?'' > false > # > > I''ll have to figure out why these errors are occurring because > the ruby/ldap compile/build did not throw any errors. >I figured out why this errors were cropping up, but have not fixed the problem yet. I compiled ruby/ldap using gcc since that was the compiler hardcoded by the author and he used a bunch of flags not supported by the Sun compiler. Our LDAP installation was built using Sun''s compiler so that would explain why I was getting the errors above for ldap.so. I am going to try rebuilding LDAP using the gcc compiler to try and see if that resolves the issue since I could not get ruby/ldap to compile with the Sun compiler (I suppose I could have eventually figured it out, but rebuilding LDAP seems to be a quicker option). -Thomas