Bug 961915 - Fedora 19: jruby expects JRE 1.6
Summary: Fedora 19: jruby expects JRE 1.6
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: puppet
Version: 19
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Mo Morsi
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-10 18:15 UTC by deesto
Modified: 2013-07-20 19:23 UTC (History)
11 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-05-13 08:46:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description deesto 2013-05-10 18:15:53 UTC
Description of problem:
Puppet depends on ruby, which has moved to jruby, which depends on java. jruby seems to expect and require JRE 1.6, while 1.7 is installed instead by default.

Version-Release number of selected component (if applicable):
puppet-3.1.1-3.fc19
jruby-1.7.2-1.fc19
java-1.7.0-openjdk-1.7.0.19-2.3.9.6.fc19

How reproducible:
Install and run puppet or jruby.

Steps to Reproduce:
1. yum -y install puppet (installs jruby dependency)
2. puppet agent --test (or simply try to run jruby or ruby)
  
Actual results:
/usr/bin/jruby: line 405: /usr/lib/jvm/java-6-openjdk/jre/bin/java: No such file or directory

Expected results:
{a puppet run)

Additional info:
Latest Fedora 19 alpha with latest updates.
A quick hack attempt to link JRE 1.7 to 1.6 ends up with:
Error: Could not find or load main class org.jruby.Main

Comment 1 deesto 2013-05-10 20:13:03 UTC
I think this is a self-inflicted error: jruby was assuming the 1.6 path due to a user-set $JAVA_HOME; unsetting this alleviated the above error.

But in a new development:
$ puppet --version
LoadError: no such file to load -- puppet/util/command_line
  require at org/jruby/RubyKernel.java:1027
  require at /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:45
   (root) at /usr/bin/puppet:3

$ ll /usr/share/ruby/vendor_ruby/puppet/util/command_line/
total 44
drwxr-xr-x.  2 root root  4096 May  9 15:23 ./
drwxr-xr-x. 12 root root  4096 May  9 15:23 ../
-rw-r--r--.  1 root root  3201 Mar  8 18:03 puppet_option_parser.rb
-rw-r--r--.  1 root root 28859 Mar  8 18:03 trollop.rb

Not sure whether this is a legitimate system problem (and whether it's ruby/jruby/puppet) or also self-inflicted.

Comment 2 Vít Ondruch 2013-05-13 08:46:11 UTC
1. I cannot confirm that puppet would require JRuby, nor I could reproduce it.
2. Installing JRuby, it seems to work just fine.

Here is my log:

http://paste.fedoraproject.org/11772/43461113/

Comment 3 deesto 2013-05-13 14:51:47 UTC
Hi Vit,

(In reply to comment #2)
> 1. I cannot confirm that puppet would require JRuby, nor I could reproduce
> it.
> 2. Installing JRuby, it seems to work just fine.
> 
> Here is my log:
> 
> http://paste.fedoraproject.org/11772/43461113/

I mentioned that although I no longer believe this is solely due to jruby, certainly something still seems wrong:

$ rpm -q puppet
puppet-3.1.1-3.fc19.noarch
$ rpm -q jruby
jruby-1.7.2-1.fc19.noarch
$ rpm -q java
package java is not installed
$ rpm -q java-1.7.0-openjdk
java-1.7.0-openjdk-1.7.0.19-2.3.9.6.fc19.x86_64
$ puppet --version
LoadError: no such file to load -- puppet/util/command_line
  require at org/jruby/RubyKernel.java:1027
  require at /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:45
   (root) at /usr/bin/puppet:3

Perhaps you could point this ticket in the proper direction?

Thanks!

Comment 4 deesto 2013-05-13 20:47:48 UTC
The puppet package installs jruby as a dependency, but it does not also install the ruby 'stub', which puppet seems to require and which results in this error. I'm a bit surprised that 'ruby' is not part of the base OS install, especially since `ruby --version` does not fail and responds with the jruby version, unless the 'ruby' stub package is installed.

BTW, I just tried to revisit your log paste to verify whether ruby was preinstalled in your test system, but it looks like Varnish has a problem.

Error 503 Service Unavailable
Service Unavailable
Guru Meditation:
XID: 1759763300

Comment 5 Bohuslav "Slavek" Kabrda 2013-05-15 08:14:29 UTC
> $ ll /usr/share/ruby/vendor_ruby/puppet/util/command_line/

JRuby doesn't touch Ruby's vendor dir so it can't see those files. It's probably caused by Puppet being built for MRI only (we don't have any viable JRuby-specific packaging guidelines yet, so there is no usable vendor JRuby dir right now...)

Comment 6 John Florian 2013-07-20 19:23:27 UTC
(In reply to deesto from comment #3)

I just stumbled upon this exact error:

> LoadError: no such file to load -- puppet/util/command_line
>   require at org/jruby/RubyKernel.java:1027
>   require at /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:45
>    (root) at /usr/bin/puppet:3


I got there with a Fedora 19 minimal install.  After that completed I did the following:

yum -y update && yum -y install puppet && reboot

My next step was to run 'puppet agent --test' to sent the certificate signing request to my master so that I could let puppet finish configuring this host.  I've never had such an issue before.  In fact, this is actually the 3rd F19 host I've put together this way.  The first two went without a hitch.  Has something changed that needs to be fixed?

I think this BZ needs to be reopened, personally.  Fortunately, from the above, I was able to guess a workaround of:

yum install ruby

This action brought in ruby and rubygem-bigdecimal (for dependencies) and all seems okay now.  I this just a case of the puppet package needing a 'Requires: ruby'?


Note You need to log in before you can comment on or make changes to this bug.