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
John, we need you to weigh in on the priority for this.
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)
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.
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/
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.
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?