[Pkg-puppet-devel] Bug#1050340: Bug#1050340: puppetserver: incompatibility with system hiera-eyaml

Georg Faerber georg at debian.org
Tue Sep 19 11:19:57 BST 2023


Hi all,

I ran into this issue as well and debugged a bit:

On 23-08-23 12:16:10, Antoine Beaupré wrote:
> Same here, I was just curious if you thought the manual gem update
> fixed this because it's a new upstream or just because "some gem
> thing".

I believe the issue is not about the new upstream, as according to the
changelog there were no relevant changes in between 3.3.0 and 3.4.0, but rather
it's about the directories, which are searched and code is loaded from.

Due to this, initially, I took the "easy route" and did this:

+++ a/etc/puppet/puppetserver/conf.d/puppetserver.conf
+++ b/etc/puppet/puppetserver/conf.d/puppetserver.conf
@@ -11,7 +11,7 @@ jruby-puppet: {
     # This setting defines the complete "GEM_PATH" for jruby.  If set, it should include
     # the gem-home directory as well as any other directories that gems can be loaded
     # from (including the vendored gems directory for gems that ship with puppetserver)
-    gem-path: [${jruby-puppet.gem-home}, "/usr/lib/puppetserver/vendored-jruby-gems"]
+    gem-path: [${jruby-puppet.gem-home}, "/usr/lib/puppetserver/vendored-jruby-gems", "/usr/share/rubygems-integration/all"]
 
     # PLEASE NOTE: Use caution when modifying the below settings. Modifying
     # these settings will change the value of the corresponding Puppet settings

However, this leads to the following:

Exception in thread "main" java.lang.IllegalStateException: Unable to borrow JRubyInstance from pool
[...]
Caused by: org.jruby.embed.EvalFailedException: (LoadError) Java extensions are required for JRuby.
no such file to load -- concurrent/concurrent_ruby.jar

concurrent_ruby.jar is part of the puppetserver package and installed to
/usr/lib/puppetserver/vendored-jruby-gems/gems/concurrent-ruby-1.1.5/lib/concurrent/concurrent_ruby.jar.

The ordering of the directory paths in puppetserver.conf doesn't make a
difference, the error stays the same.

So, symlinks to the rescue:

ln -s /usr/share/rubygems-integration/all/gems/hiera-eyaml-3.3.0/ /usr/lib/puppetserver/vendored-jruby-gems/gems/hiera-eyaml-3.3.0
ln -s /usr/share/rubygems-integration/all/gems/optimist-3.0.0/ /usr/lib/puppetserver/vendored-jruby-gems/gems/optimist-3.0.0
ln -s /usr/lib/ruby/vendor_ruby/highline /usr/lib/puppetserver/vendored-jruby-gems/gems/highline
ln -s /usr/share/rubygems-integration/all/specifications/hiera-eyaml-3.3.0.gemspec /usr/lib/puppetserver/vendored-jruby-gems/specifications/hiera-eyaml-3.3.0.gemspec
ln -s /usr/share/rubygems-integration/all/specifications/optimist-3.0.0.gemspec /usr/lib/puppetserver/vendored-jruby-gems/specifications/optimist-3.0.0.gemspec
ln -s /usr/share/rubygems-integration/all/specifications/highline-2.0.3.gemspec /usr/lib/puppetserver/vendored-jruby-gems/specifications/highline-2.0.3.gemspec

This made the error go away.

Maybe that's helpful,
all the best,
Georg



More information about the Pkg-puppet-devel mailing list