Bug 1223324 - oo-install-ose - "It seems your ruby installation is missing psych"
Summary: oo-install-ose - "It seems your ruby installation is missing psych"
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.4.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: 5.6.0
Assignee: Joe Rafaniello
QA Contact: Milan Falešník
URL:
Whiteboard: openshift:appliance:automate
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-05-20 10:45 UTC by Milan Falešník
Modified: 2019-08-15 04:36 UTC (History)
14 users (show)

Fixed In Version:
Doc Type: Known Issue
Doc Text:
In Red Hat CloudForms 3.2, the oo-install-ose command used to set up OpenShift on Red Hat CloudForms fails because the incorrect version of Ruby is installed. As a workaround, perform the following procedure: 1. Download and unpack the oo-install-ose * cd /root * wget -O oo-install-ose.tgz <the link from [2]> * tar xfv oo-install-ose.tgz * mv oo-install oo-install-ose 2. Install the SCL ruby * subscription-manager repos --enable rhel-server-rhscl-6-rpms * yum install ruby193-ruby-irb ruby193-ruby Verify that Ruby has been installed: scl enable ruby193 "ruby -v" 3. Create a shim that runs the oo-install-ose in ruby193 scl * cd oo-install-ose * mv oo-install-ose oo-install-ose-orig * vim oo-install-ose: #!/usr/bin/env bash scl enable ruby193 "./oo-install-ose-orig $@" * chmod +x oo-install-ose This issue will be resolved in a future release of Red Hat CloudForms.
Clone Of:
Environment:
Last Closed: 2016-07-28 16:45:32 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Milan Falešník 2015-05-20 10:45:03 UTC
Description of problem:
When trying to use the OSE Installer, this weird error happens. Not sure where to put this bug so placing it here.

Version-Release number of selected component (if applicable):
Appliance 5.4.0.1

How reproducible:
always

Steps to Reproduce:
1. Set up the OSE deployment like described in [1]
2. Request the service

Actual results:
Failure with the log (in /tmp) saying:
/opt/rh/ruby200/root/usr/share/ruby/yaml.rb:4:in `<top (required)>':
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.
/opt/rh/ruby200/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:53:in `require': cannot load such file -- psych (LoadError)
	from /opt/rh/ruby200/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:53:in `require'
	from /opt/rh/ruby200/root/usr/share/ruby/yaml.rb:5:in `<top (required)>'
	from /opt/rh/ruby200/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:53:in `require'
	from /opt/rh/ruby200/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:53:in `require'
	from /tmp/oo-install-ose-20140908-1720/lib/installer.rb:3:in `<top (required)>'
	from /opt/rh/ruby200/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:53:in `require'
	from /opt/rh/ruby200/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:53:in `require'
	from /tmp/oo-install-ose-20140908-1720/bin/oo-install:5:in `<main>'
oo-install exited; removing temporary assets.

Expected results:
Installation continues

Additional info:
Tried running it on appliance in shell, it appears to be using the appliance's ruby, but when I do require "yaml" or require "psych" and it worked. I suspected that it uses the non-SCL ruby 1.8.7 but it appears not when I echo the detected ruby version in the install script.

[1] https://access.redhat.com/documentation/en-US/Red_Hat_CloudForms/3.1/html/Management_Engine_5.3_OpenShift_Enterprise_Deployment_Guide/index.html#sect-Preparing_CloudForms_Management_Engine_for_OpenShift_Enterprise_Deployment

Comment 5 Dave Johnson 2015-05-22 15:49:56 UTC
John, we need you to weigh in on the priority for this.

Comment 6 Joe Rafaniello 2015-05-22 16:19:11 UTC
As Milan found, cloudforms 5.4 automatically sources in ruby200 into the shell so any ruby scripts users run in the shell use the ruby 2.0 we use for cloudforms.

If the attached ose-installer is not supported on ruby 2.0 with bundler ~>1.9.7 (it's hardcoded to use 1.3.5) [1], you would have to install ruby193 and scl enable ruby193 /bin/bash, install bundler 1.3.5, etc., and run the ose-installer in this subshell with ruby 1.9.3, very similar to what Milan found.

[1] The Gemfile.lock has this list of dependencies:
  bundler (= 1.3.5)
  highline (= 1.6.19)
  i18n (= 0.6.5)
  net-ssh (= 2.7.0)
  oo-install!
  rake (= 10.1.0)
  rspec (= 2.14.1)
  rspec-core (= 2.14.5)
  rspec-expectations (= 2.14.3)
  rspec-mocks (= 2.14.3)
  terminal-table (= 1.4.5)
  thor (= 0.19.1)

Comment 7 Joe Rafaniello 2015-05-22 16:20:58 UTC
Note, if there's a way to scl disable ruby200 /bin/bash, that would be nice as the users could just use the system ruby 1.8.7 on RHEL 6, install bundler 1.3.5 and run the ose-installer.  I don't know that there's a way to disable a scl once it's loaded into your shell though.

Comment 14 Joe Rafaniello 2015-07-14 14:05:38 UTC
Closing for now, the OSE installer needs to support newer rubies or you have to install the older ruby193 SCL and ensure it's loaded before running the OSE installer.  This latter option "may" work but it's not guaranteed.  The OSE installer should support ruby 2.0.0 especially since it's very compatible with ruby 1.9.3 (keyword arguments and Module#prepend are probably the only 2.0.0 only syntax that wont' be compatible with 1.9.3)

http://globaldev.co.uk/2013/03/ruby-2-0-0-in-detail/

Comment 15 Timothy Williams 2015-07-14 21:46:43 UTC
The openshift installer should work fine on Ruby 2.0. I was able to at least start an oo-install (build 20140908-1720) on a RHEL 6.6 system using the ruby200 ruby binary (couldn't finish due to some yum issues, but got past the reported error).

The issue appears to be that the psych gem is not installed in the ruby200 context. The error shows that the failure occurs while requiring libraries (5th line of oo-install) and even reports that psych is missing. Its a bit odd to me that the psych gem isn't installed when ruby200 is, since the psych gem is a dependency of the ruby200-rubygems rpm, so maybe there is a bigger problem here.

Can anyone do a 'scl enable ruby200 "gem list"' on the system experiencing the issue? On a 5.4.0.5 env, I can see:

  # scl enable ruby200 'gem list' | grep psych
  psych (2.0.13)

I unfortunately don't have the resources to actually create a vm and try out the openshift install through CFME. Running a simple 'scl enable ruby200 "gem install psych"' might resolve this issue.

Comment 17 Brenton Leanhardt 2015-08-11 20:51:18 UTC
Why can't the system ruby be used?  I'm fairly certain that was the ruby that was targeted originally:

https://access.redhat.com/documentation/en-US/OpenShift_Enterprise/2/html/Deployment_Guide/chap-Deployment_Methods.html#Using_the_Installation_Utility

The docs claim 1.8.7 or later but I know no one tested with the Ruby 2.0 SCL so it's probably a case where we need to update that to be more specific.

Can someone show me how oo-install-ose is being called?


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