Hello,
I’ve been trying to debug a problem for a few days. When deploying VMs, Disk resize is not being performed correctly.
After several tests, I was proposed to capture the standard error output when trying to create a VM. I attached the file with the standard error output, where references to the ruby versions of the system and the one installed by rvm are seen.
vm-4640-0.err (34,7 KB)
/usr/local/rvm/gems/ruby-2.5.1/gems/nokogiri-1.6.8.1/lib/nokogiri.rb:124: [BUG] Segmentation fault
ruby 2.0.0p598 (2014-11-13) [x86_64-linux]
...
-- C level backtrace information -------------------------------------------
/lib64/libruby.so.2.0(+0x17997b) [0x7fbb2e2e397b] re.c:2308
/lib64/libruby.so.2.0(+0x64afa) [0x7fbb2e1ceafa] compile.c:884
...
In the system (CentOS 7.0), there are several versions of ruby installed. 2.0 which is the one used by Chef and the 2.5.1 that is installed from rvm for OpenNebula. install_gems was run for version 2.5.1.
For the demons to use the correct version of ruby, the demon configuration files (opennebula.service and opennebula-sunstone.service) were modified as follows:
Environment=MY_RUBY_HOME=/usr/local/rvm/rubies/ruby-2.5.1
Environment=GEM_HOME=/usr/local/rvm/gems/ruby-2.5.1
Environment=GEM_PATH=/usr/local/rvm/gems/ruby-2.5.1:/usr/local/rvm/gems/ruby-2.5.1@global
Environment=PATH=/usr/local/rvm/gems/ruby-2.5.1/bin:/usr/local/rvm/gems/ruby-2.5.1@global/bin:/usr/local/rvm/rubies/ruby-2.5.1/bin:/usr/local/rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
ExecStart=/usr/local/rvm/rubies/ruby-2.5.1/bin/ruby /usr/lib/one/sunstone/sunstone-server.rb
gem env displays the following information for the oneadmin user:
RubyGems Environment:
- RUBYGEMS VERSION: 3.0.6
- RUBY VERSION: 2.5.1 (2018-03-29 patchlevel 57) [x86_64-linux]
- INSTALLATION DIRECTORY: /usr/local/rvm/gems/ruby-2.5.1
- USER INSTALLATION DIRECTORY: /var/lib/one/.gem/ruby/2.5.0
- RUBY EXECUTABLE: /usr/local/rvm/rubies/ruby-2.5.1/bin/ruby
- GIT EXECUTABLE: /usr/bin/git
- EXECUTABLE DIRECTORY: /usr/local/rvm/gems/ruby-2.5.1/bin
- SPEC CACHE DIRECTORY: /var/lib/one/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /usr/local/rvm/rubies/ruby-2.5.1/etc
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /usr/local/rvm/gems/ruby-2.5.1
- /usr/local/rvm/rubies/ruby-2.5.1/lib/ruby/gems/2.5.0
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /usr/local/rvm/gems/ruby-2.5.1/bin
- /usr/local/rvm/gems/ruby-2.5.1@global/bin
- /usr/local/rvm/rubies/ruby-2.5.1/bin
- /usr/local/sbin
- /usr/local/bin
- /usr/sbin
- /usr/bin
- /opt/ibutils/bin
- /usr/local/rvm/bin
- /root/bin
Would anyone know what I am doing wrong or where I am making a mistake?
Thanks in advance.