Upgrade from 5.12.01CE to 6.2CE

Dear community,

is there a “direct” upgrade way from CE versions: 5.12 to 6.2 ?

or do i need to do the upgrade from 5.12 to 6.2 in two steps:

  • opennebula upgrade from 5.12 to 6.0 (onedb upgrade from 5.12 to 6.0)
  • opennebula upgrade from 6.0 to 6.2 (onedb upgrade from 6.0 to 6.2)

You don’t need to, please check the upgrade guide. There are multiple sections according to the version you are upgrading from.

Thx a lot Daniel four your answer & the upgrade link. I do appreciate.
I did study the upgrade guide for version 5.12 and it says to begin with:

Upgrading from 5.6.x+

i’ve got the migrator from 6.0 to 6.2 & tried to install:

[root@centos8]# rpm -iv opennebula-migration-community-6.2.0-2.ee.el8.noarch.rpm
error: Failed dependencies:
opennebula >= 6.2 is needed by opennebula-migration-community-6.2.0-2.ee.el8.noarch

ok - 1rst run the upgrade: (changed the /etc/yum.repos.d/opennebula from version 5.12.01 to version 6.2)

OK - upgrade to 6.2 is completed.

Content of:

[root@centos8]# ls -alth /usr/lib/one/ruby/onedb/local
total 184K
drwxr-xr-x. 2 root root 4.0K Apr 16 23:43 .
drwxr-xr-x. 6 root root 209 Apr 16 23:21 …

-rw-r–r–. 1 root root 7.8K Apr 16 23:07 5.10.0_to_5.12.0.rb
-rw-r–r–. 1 root root 5.9K Apr 16 23:07 5.12.0_to_6.0.0.rb

[root@centos8]# ls -alth /usr/lib/one/ruby/onedb/shared
total 332K
drwxr-xr-x. 2 root root 4.0K Apr 16 23:43 .
drwxr-xr-x. 6 root root 209 Apr 16 23:21 …

-rw-r–r–. 1 root root 3.8K Apr 16 23:07 5.10.0_to_5.12.0.rb
-rw-r–r–. 1 root root 1.4K Apr 16 23:07 5.12.0_to_6.0.0.rb

run:

[root@minione centos8]# onedb upgrade -v
Version read:
Shared tables 5.12.0 : OpenNebula 5.12.0.1 (54eb4054) daemon bootstrap
Local tables 5.12.0 : OpenNebula 5.12.0.1 (54eb4054) daemon bootstrap

MySQL dump stored in /var/lib/one/mysql_localhost_opennebula_2022-4-16_23:41:52.sql
Use ‘onedb restore’ or restore the DB using the mysql command:
mysql -u user -h server -P port db_name < backup_file

Running migrators for shared tables
Running migrator /usr/lib/one/ruby/onedb/shared/5.12.0_to_6.0.0.rb
Done in 0.00s

Database migrated from 5.12.0 to 6.0.0 (OpenNebula 6.0.0) by onedb command.

Running migrators for local tables
Running migrator /usr/lib/one/ruby/onedb/local/5.12.0_to_6.0.0.rb
Done in 0.60s

Database migrated from 5.12.0 to 6.0.0 (OpenNebula 6.0.0) by onedb command.

Total time: 1.36s
ERROR: Database upgrade to the latest versions (local 6.0.0, shared 6.0.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
MySQL DB opennebula at localhost restored.

[root@]# rpm -iv opennebula-migration-community-6.2.0-2.ee.el8.noarch.rpm
Verifying packages…
Preparing packages…

--------------------------------------------------------------------------

Copyright 2019-2021, OpenNebula Systems S.L.

Installation will automatically continue in 10 seconds …
opennebula-migration-community-6.2.0-2.ee.el8.noarch

Content of:

[root@centos8]# ls -alth /usr/lib/one/ruby/onedb/local
total 184K
drwxr-xr-x. 2 root root 4.0K Apr 16 23:43 .
drwxr-xr-x. 6 root root 209 Apr 16 23:21 …

-rw-r–r–. 1 root root 7.8K Apr 16 23:07 5.10.0_to_5.12.0.rb
-rw-r–r–. 1 root root 5.9K Apr 16 23:07 5.12.0_to_6.0.0.rb
-rw-r–r–. 1 root root 2.6K Nov 2 18:59 6.0.0_to_6.2.0.rbm

[root@centos8]# ls -alth /usr/lib/one/ruby/onedb/shared
total 332K
drwxr-xr-x. 2 root root 4.0K Apr 16 23:43 .
drwxr-xr-x. 6 root root 209 Apr 16 23:21 …

-rw-r–r–. 1 root root 3.8K Apr 16 23:07 5.10.0_to_5.12.0.rb
-rw-r–r–. 1 root root 1.4K Apr 16 23:07 5.12.0_to_6.0.0.rb
-rw-r–r–. 1 root root 1.8K Nov 2 18:59 6.0.0_to_6.2.0.rbm

run onedb upgrade again:

[root@minione centos8]# onedb upgrade -v
Version read:
Shared tables 5.12.0 : OpenNebula 5.12.0.1 (54eb4054) daemon bootstrap
Local tables 5.12.0 : OpenNebula 5.12.0.1 (54eb4054) daemon bootstrap

MySQL dump stored in /var/lib/one/mysql_localhost_opennebula_2022-4-16_23:43:38.sql
Use ‘onedb restore’ or restore the DB using the mysql command:
mysql -u user -h server -P port db_name < backup_file

Running migrators for shared tables
Running migrator /usr/lib/one/ruby/onedb/shared/5.12.0_to_6.0.0.rb
Done in 0.00s

Database migrated from 5.12.0 to 6.0.0 (OpenNebula 6.0.0) by onedb command.

Running migrators for local tables
Running migrator /usr/lib/one/ruby/onedb/local/5.12.0_to_6.0.0.rb
Done in 0.45s

Database migrated from 5.12.0 to 6.0.0 (OpenNebula 6.0.0) by onedb command.

Total time: 1.07s
ERROR: Database upgrade to the latest versions (local 6.0.0, shared 6.0.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
MySQL DB opennebula at localhost restored.

What is going wrong ?

btw - when i would rename the migrator: 6.0.0_to_6.2.0.rbm to 5.12.0_to_6.2.0.rbm the onedb upgrade -v would run in one touch (so it should be) …but i’m not sure if this right approach.

[root@centos8]# onedb upgrade -v
Version read:
Shared tables 5.12.0 : OpenNebula 5.12.0.1 (54eb4054) daemon bootstrap
Local tables 5.12.0 : OpenNebula 5.12.0.1 (54eb4054) daemon bootstrap

MySQL dump stored in /var/lib/one/mysql_localhost_opennebula_2022-4-17_0:23:26.sql
Use ‘onedb restore’ or restore the DB using the mysql command:
mysql -u user -h server -P port db_name < backup_file

Running migrators for shared tables
Running migrator /usr/lib/one/ruby/onedb/shared/5.12.0_to_6.2.0.rbm
Done in 0.16s

Database migrated from 5.12.0 to 6.2.0 (OpenNebula 6.2.0) by onedb command.

Running migrators for local tables
Running migrator /usr/lib/one/ruby/onedb/local/5.12.0_to_6.2.0.rbm
Done in 0.19s

Database migrated from 5.12.0 to 6.2.0 (OpenNebula 6.2.0) by onedb command.

Total time: 1.02s

[root@centos8]# onedb fsck
MySQL dump stored in /var/lib/one/mysql_localhost_opennebula_2022-4-17_0:25:26.sql
Use ‘onedb restore’ or restore the DB using the mysql command:
mysql -u user -h server -P port db_name < backup_file

Total errors found: 0
Total errors repaired: 0
Total errors unrepaired: 0
A copy of this output was stored in /var/log/one/onedb-fsck.log