/usr/share/rubygems/rubygems/dependency.rb:296:in to_specs': Could not find 'json' (>= 2.0) - did find: [json-1.7.7] (Gem::LoadError) from /usr/share/rubygems/rubygems/dependency.rb:307:in to_spec’
from /usr/share/rubygems/rubygems/core_ext/kernel_gem.rb:47:in gem' from /bin/onecfg:49:in ’
System runs a CentOS-7.8.2003 and json version package is rubygem-json-1.7.7-36.el7.x86_64. YUM doesn’t get any update for this package.
I’m using Ruby gems bundled with Opennebula because my system has the “soft-link” from /usr/share/one/gems-dist to /usr/share/one/gems as you could see below:
Important
When **upgrading** an existing deployment which could be running OpenNebula older than 5.10.0 anytime in the past, you might need to upgrade also required Ruby dependencies with script `install_gems` if you are not yet using the shipped Ruby gems (i.e., when symbolic link `/usr/share/one/gems` doesn’t exist on your Front-end)!
Hello, after reading step-by-step this procedure Upgrading Single Front-end Deployments — OpenNebula 6.0.4 documentation, at step 7 (Upgrade the Database Version), when I run “onedb upgrade -v”, I receive these errors:
[oneadmin@localhost ~]$ onedb upgrade -v
Version read:
Shared tables 5.10.0 : OpenNebula 5.10.1 (45f6d6df) daemon bootstrap
Local tables 5.10.0 : OpenNebula 5.10.1 (45f6d6df) daemon bootstrap
Sqlite database backup stored in /var/lib/one/one.db_2021-4-14_15:59:13.bck
Use 'onedb restore' to restore the DB.
>>> Running migrators for shared tables
Database already uses version 5.10.0
>>> Running migrators for local tables
Database already uses version 5.10.0
Total time: 0.12s
ERROR: Database upgrade to the latest versions (local 5.10.0, shared 5.10.0)
wasn't successful due to missing migration descriptors. Migrators are
provided as part of Enterprise Edition for customers with active subscription.
For community with non-commercial deployments they are provided via a
dedicated migration package, which must be obtained separately.
The database will be restored
Sqlite database backup restored in /var/lib/one/one.db
Step 7 says:
Step 7. Upgrade the Database Version
Important
Users of the Community Edition of OpenNebula can upgrade from the previous stable version if they are running a non-commercial OpenNebula cloud. In order to access the migrator package a request needs to be made through this [online form](https://opennebula.io/get-migration).
Make sure at this point that OpenNebula is not running. If you installed from packages, the service may have been started automatically. Simply run the `onedb upgrade -v` command. The connection parameters are automatically retrieved from `oned.conf` .
I have downloaded opennebula-migration-community-6.0.0.zip, uncompressed and installed RPM from “centos7” folder… but I can continue the upgrade process…
unfortunately, there might a misunderstanding when asking for migrators. The migrators are provided for previous to latest version (i.e., from 5.12 to 6.0). Obviously, you have skipped upgrade to intermediate version 5.12, for which you need migrators as well.
Since final 5.12.0.4 CE release with full migrators is close and it will have all migrators, you can already take them from git and put on your front-end. This way you will have all intermediate migrators + opennebula-migration-community to migrate from 5.12 to 6.0. See:
Files from https://github.com/OpenNebula/one/tree/one-5.12/src/onedb/local/ put into /usr/lib/one/ruby/onedb/local
Files from https://github.com/OpenNebula/one/tree/one-5.12/src/onedb/shared put into /usr/lib/one/ruby/onedb/shared
Excuse me about my simple question… but… how can I download all files? one by one? how? there are not download button, only “raw” that allows me do a “copy-paste”… but is there any way for downloading all files?
after copying that files in “local” and “shared” folders, I have rerun upgrade process… but errors remain:
[root@localhost ~]# onedb upgrade -v
Version read:
Shared tables 5.10.0 : OpenNebula 5.10.1 (45f6d6df) daemon bootstrap
Local tables 5.10.0 : OpenNebula 5.10.1 (45f6d6df) daemon bootstrap
Sqlite database backup stored in /var/lib/one/one.db_2021-4-21_12:10:40.bck
Use 'onedb restore' to restore the DB.
>>> Running migrators for shared tables
> Running migrator /usr/lib/one/ruby/onedb/shared/5.10.0_to_5.12.0.rb
> Done in 0.02s
Database migrated from 5.10.0 to 5.12.0 (OpenNebula 5.12.0) by onedb command.
>>> Running migrators for local tables
> Running migrator /usr/lib/one/ruby/onedb/local/5.10.0_to_5.12.0.rb
All custom_attrs will be used as networks
> Done in 0.20s
Database migrated from 5.10.0 to 5.12.0 (OpenNebula 5.12.0) by onedb command.
Total time: 0.28s
ERROR: Database upgrade to the latest versions (local 5.12.0, shared 5.12.0)
wasn't successful due to missing migration descriptors. Migrators are
provided as part of Enterprise Edition for customers with active subscription.
For community with non-commercial deployments they are provided via a
dedicated migration package, which must be obtained separately.
The database will be restored
Sqlite database backup restored in /var/lib/one/one.db
Now, it seems process detects original version (5.10.0, really, 5.10.1) and future version (5.12.0… but really 6.0…), but ends with error and “database will be restored”.
Now, my system has installed all OpenNebula-6.0 RPMs (step 5).
I’m very sorry for confusion, I didn’t realize the types of migrators can’t be mixed. So, you need first to upgrade OpenNebula to 5.12 (use a recently released 5.12.0.4 CE which already contains migrators to 5.12) and migrate the database. After that, upgrade to 6.0 (and install additional community migrators from 5.12 to 6.0) and upgrade the database from 5.12 to 6.0.
You should better remove any migrators added manualy into /usr/lib/one/ruby/onedb/ from GitHub not to confuse onedb tool.
(Obivously, you can use a different machine with 5.12.0.4 CE to do a database migration only; just place there /var/lib/one/one.db from your current machine and after upgrade, copy it back to your current which might already have 6.0).
Hi, good to know that I can’t upgrade from 5.10 to 6.0, because I have been trying to upgrade for few hours.
Previously I’ve successfully upgraded from 5.12 to 6.0. It was few months ago on different machine so I needed to install opennebula again. I installed 6.0 and tried to remove it in order to install 5.12. I tried with apt get purge --auto-remove opennebula, but when after that I installed 5.12, a saw errors
The following packages have unmet dependencies:
opennebula : PreDepends: opennebula-common-onescape (= 5.12.0.4-1.ce) but it is not going to be installed
Depends: opennebula-common (= 5.12.0.4-1.ce) but 6.0.0-1.ce is to be installed
Depends: opennebula-tools (= 5.12.0.4-1.ce) but it is not going to be installed
Depends: ruby-opennebula (= 5.12.0.4-1.ce) but it is not going to be installed
Depends: opennebula-rubygems (= 5.12.0.4-1.ce) but 6.0.0-1.ce is to be installed
opennebula-flow : Conflicts: opennebula (< 6.0.0-1.ce) but 5.12.0.4-1.ce is to be installed
opennebula-gate : Conflicts: opennebula (< 6.0.0-1.ce) but 5.12.0.4-1.ce is to be installed
opennebula-libs : Breaks: opennebula (< 5.13.80) but 5.12.0.4-1.ce is to be installed
opennebula-rubygems : Conflicts: opennebula (< 6.0.0-1.ce) but 5.12.0.4-1.ce is to be installed
opennebula-sunstone : PreDepends: opennebula-common-onescape (= 5.12.0.4-1.ce) but it is not going to be installed
Depends: opennebula-common (= 5.12.0.4-1.ce) but 6.0.0-1.ce is to be installed
Depends: ruby-opennebula (= 5.12.0.4-1.ce) but it is not going to be installed
Depends: opennebula-tools (= 5.12.0.4-1.ce) but it is not going to be installed
Depends: opennebula-rubygems (= 5.12.0.4-1.ce) but 6.0.0-1.ce is to be installed
So, how can I remove opennebula properly? which directories I have to remove? I am facing problems all the time.