Missing gems after OpenNebula upgrade from 5.10.5 to 6.6.0

Hello all!

I’ve just upgraded OpenNebula from 5.10.5 CE (CentOS 7.9.2009) to 6.6.0 CE (AlmaLinux 9.2). Everything went smoothly apart from issue related with the messages below in oned.log as well as during each one* command execution as oneadmin:

Wed Aug 9 11:22:37 2023 [Z0][MKP][I]: Ignoring augeas-0.6.4 because its extensions are not built. Try: gem pristine augeas --version 0.6.4
Wed Aug 9 11:22:37 2023 [Z0][MKP][I]: Ignoring curb-0.9.10 because its extensions are not built. Try: gem pristine curb --version 0.9.10
Wed Aug 9 11:22:37 2023 [Z0][MKP][I]: Ignoring eventmachine-1.2.7 because its extensions are not built. Try: gem pristine eventmachine --version 1.2.7
Wed Aug 9 11:22:37 2023 [Z0][MKP][I]: Ignoring ffi-1.11.1 because its extensions are not built. Try: gem pristine ffi --version 1.11.1
Wed Aug 9 11:22:37 2023 [Z0][MKP][I]: Ignoring mysql2-0.5.2 because its extensions are not built. Try: gem pristine mysql2 --version 0.5.2
Wed Aug 9 11:22:37 2023 [Z0][MKP][I]: Ignoring nokogiri-1.6.8.1 because its extensions are not built. Try: gem pristine nokogiri --version 1.6.8.1
Wed Aug 9 11:22:37 2023 [Z0][MKP][I]: Ignoring ox-2.11.0 because its extensions are not built. Try: gem pristine ox --version 2.11.0
Wed Aug 9 11:22:37 2023 [Z0][MKP][I]: Ignoring sqlite3-1.4.1 because its extensions are not built. Try: gem pristine sqlite3 --version 1.4.1
Wed Aug 9 11:22:37 2023 [Z0][MKP][I]: Ignoring thin-1.7.2 because its extensions are not built. Try: gem pristine thin --version 1.7.2

I’ve tried to install missing rubygem-* from OS repositories as below:

dnf install rubygem-ffi rubygem-curb rubygem-nokogiri rubygem-sqlite3 rubygem-mysql2

and restart OpenNebula services by

systemctl restart opennebula.service

but error messages still persist.

I have the following ruby* packages installed:

rpm -qa|grep -i ruby
warning: Signature not supported. Hash algorithm SHA1 not available.
ruby-libs-3.0.4-160.el9_0.x86_64
ruby-3.0.4-160.el9_0.x86_64
rubygem-bigdecimal-3.0.0-160.el9_0.x86_64
ruby-default-gems-3.0.4-160.el9_0.noarch
rubygem-bundler-2.2.33-160.el9_0.noarch
rubygem-io-console-0.5.7-160.el9_0.x86_64
rubygem-psych-3.3.2-160.el9_0.x86_64
rubygems-3.2.33-160.el9_0.noarch
ruby-devel-3.0.4-160.el9_0.x86_64
rubygem-json-2.5.1-160.el9_0.x86_64
rubygem-rake-13.0.3-160.el9_0.noarch
opennebula-rubygems-6.6.0-1.el9.x86_64
rubygem-rexml-3.2.5-160.el9_0.noarch
rubygem-racc-1.6.0-203.el9.x86_64
rubygem-nokogiri-1.13.6-1.el9.x86_64
rubygem-sqlite3-1.4.2-8.el9.x86_64
rubygem-ffi-1.15.5-3.el9.x86_64
rubygem-curb-1.0.5-1.el9.x86_64
rubygem-mysql2-0.5.3-11.el9_0.x86_64

I have a symlink in /usr/share/one/gems:

ls -lad /usr/share/one/gems*
lrwxrwxrwx 1 root root 24 Aug 9 11:49 /usr/share/one/gems → /usr/share/one/gems-dist
drwxr-xr-x 9 root root 4096 Aug 8 16:18 /usr/share/one/gems-dist

Not sure if one needs to execute

gem pristine --all

as it’s suggested on some forums.

Check this out Single Front-end Installation — OpenNebula 6.6.3 documentation

@dclavijo , thank you for prompt reply!

I saw that document before. As far as I understand if after OpenNebula upgrade I would like to use packaged version of ruby gems (i.e. what comes with opennebula-rubygems rpm) I need to have /usr/share/one/gems symlink (and I do). But there is an error appear as I wrote in my initial post in that thread. So the question is how should I properly migrate from system-wide installed ruby gems (i.e. via script install_gems) to packages ones if it’s possible at all.

running install_gems takes care of installing the gems and the build dependencies the require for their extensions to be built. The gem pristine command will rebuild the gem extensions that need compiling.

This being said, you are better off with opennebula-rubygems package as the exact gem versions required by OpenNebula are already provided. This will prevent gem not found problems, extensions not built, version not packaged by the distributions, etc.