# \[SOLVED\] Database update not working from 5.4.12 to 5.6 RC

**URL:** <https://forum.opennebula.io/t/solved-database-update-not-working-from-5-4-12-to-5-6-rc/6117>\
**Category:** Product Support\
**Created:** [July 3, 2018, 2:18pm UTC](https://forum.opennebula.io/t/solved-database-update-not-working-from-5-4-12-to-5-6-rc/6117 "2018-07-03T14:18:33Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![angel\_ramiro](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@angel\_ramiro](https://forum.opennebula.io/u/angel_ramiro)\
**Post date:** [July 3, 2018, 2:18pm UTC](https://forum.opennebula.io/t/solved-database-update-not-working-from-5-4-12-to-5-6-rc/6117/1 "2018-07-03T14:18:34Z")

</div>

Please, describe the problem here and provide additional information below (if applicable) …

We are trying to test OpenNebula upgrade from v5.4.12 to v5.6 Release Candidate (5.5.90-1) on our testing environment, and all the upgrade proccess seems to run smoothly until we try to upgrade the database. We get this output:

_[root@opennebula ~]# onedb upgrade -v -S opennebula -u oneadmin -d opennebula_  
\_MySQL Password: \_  
_Version read:_  
_Shared tables 5.4.1 : OpenNebula 5.4.1 daemon bootstrap_  
_Local tables 5.4.1 : OpenNebula 5.4.1 daemon bootstrap_

_MySQL dump stored in /var/lib/one/mysql\_opennebula\_opennebula\_2018-7-3\_16:10:59.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.4.1\_to\_5.5.80.rb\_  
\_ \> Done in 0.00s\_

_Database migrated from 5.4.1 to 5.5.80 (OpenNebula 5.5.80) by onedb command._

_\>\>\> Running migrators for local tables_  
\_ \> Running migrator /usr/lib/one/ruby/onedb/local/5.4.1\_to\_5.5.80.rb\_  
\_ \> Old Az file not found, skipping Az host migration\_

_Mysql2::Error: Table ‘old\_vm\_pool’ already exists_  
_/usr/local/share/gems/gems/mysql2-0.5.1/lib/mysql2/client.rb:131:in `_query'_ _/usr/local/share/gems/gems/mysql2-0.5.1/lib/mysql2/client.rb:131:in`block in query’_  
_/usr/local/share/gems/gems/mysql2-0.5.1/lib/mysql2/client.rb:130:in `handle_interrupt'_ _/usr/local/share/gems/gems/mysql2-0.5.1/lib/mysql2/client.rb:130:in`query’_  
_/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/adapters/mysql2.rb:137:in `block in _execute'_ _/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/database/logging.rb:38:in`log\_connection\_yield’_  
_/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/adapters/mysql2.rb:132:in `_execute'_ _/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/adapters/utils/mysql_mysql2.rb:38:in`block in execute’_  
_/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/database/connecting.rb:264:in `block in synchronize'_ _/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/connection_pool/threaded.rb:91:in`hold’_  
_/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/database/connecting.rb:264:in `synchronize'_ _/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/adapters/utils/mysql_mysql2.rb:38:in`execute’_  
_/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/adapters/mysql2.rb:68:in `execute_dui'_ _/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/database/query.rb:43:in`execute\_ddl’_  
_/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/database/query.rb:76:in `run'_ _/usr/lib/one/ruby/onedb/local/5.4.1_to_5.5.80.rb:199:in`bug\_2189’_  
_/usr/lib/one/ruby/onedb/local/5.4.1\_to\_5.5.80.rb:40:in `up'_ _/usr/lib/one/ruby/onedb/onedb.rb:232:in`apply\_migrators’_  
_/usr/lib/one/ruby/onedb/onedb.rb:179:in `upgrade'_ _/usr/bin/onedb:389:in`block (2 levels) in ’_  
_/usr/lib/one/ruby/cli/command\_parser.rb:457:in `call'_ _/usr/lib/one/ruby/cli/command_parser.rb:457:in`run’_  
_/usr/lib/one/ruby/cli/command\_parser.rb:84:in `initialize'_ _/usr/bin/onedb:294:in`new’_  
_/usr/bin/onedb:294:in `’_

_The database will be restored_  
_MySQL DB opennebula at opennebula restored._

**Versions of the related components and OS (frontend, hypervisors, VMs):**  
Opennebula 5.5.90-1 + mariadb-5.5.56-2.el7.x86\_64 on same VMware VM on a CentOS 7.4  
**Steps to reproduce:**  
Migrate from a working OpenNebula v5.4.12 environment to OpenNebula v5.5.90-1 (release candidate)  
**Current results:**  
Database update not working  
**Expected results:**

---

<div class="post-metadata">

**Author:** ![atodorov\_storpool](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/atodorov_storpool/32/5327_2.png) [@atodorov\_storpool](https://forum.opennebula.io/u/atodorov_storpool)\
**Post date:** [July 3, 2018, 2:25pm UTC](https://forum.opennebula.io/t/solved-database-update-not-working-from-5-4-12-to-5-6-rc/6117/2 "2018-07-03T14:25:59Z")

</div>

> [@angel\_ramiro](#):
>
> _Mysql2::Error: Table ‘old\_vm\_pool’ already exists_

It looks like there are artifacts from previus (unsuccessful?) upgrade? You should try clean all `old_*` tables from the opennebula database and try again.

BR,  
Anton

---

<div class="post-metadata">

**Author:** ![angel\_ramiro](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@angel\_ramiro](https://forum.opennebula.io/u/angel_ramiro)\
**Post date:** [July 3, 2018, 2:32pm UTC](https://forum.opennebula.io/t/solved-database-update-not-working-from-5-4-12-to-5-6-rc/6117/3 "2018-07-03T14:32:44Z")

</div>

Thanks for your answer!

This error refers to a second attempt.

The first error was:

\*\*_undefined method `add_child' for nil:NilClass_** _/usr/lib/one/ruby/onedb/local/5.4.1_to_5.5.80.rb:212:in`block (2 levels) in bug\_2189’_  
_/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/dataset/actions.rb:151:in `block in each'_ _/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/adapters/mysql2.rb:238:in`block (2 levels) in fetch\_rows’_  
_/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/adapters/mysql2.rb:238:in `each'_ _/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/adapters/mysql2.rb:238:in`block in fetch\_rows’_  
_/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/adapters/mysql2.rb:152:in `_execute'_ _/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/adapters/utils/mysql_mysql2.rb:38:in`block in execute’_  
_/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/database/connecting.rb:264:in `block in synchronize'_ _/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/connection_pool/threaded.rb:87:in`hold’_  
_/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/database/connecting.rb:264:in `synchronize'_ _/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/adapters/utils/mysql_mysql2.rb:38:in`execute’_  
_/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/dataset/actions.rb:1082:in `execute'_ _/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/adapters/mysql2.rb:273:in`execute’_  
_/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/adapters/mysql2.rb:236:in `fetch_rows'_ _/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/dataset/actions.rb:151:in`each’_  
_/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/database/dataset.rb:51:in `fetch'_ _/usr/lib/one/ruby/onedb/local/5.4.1_to_5.5.80.rb:203:in`block in bug\_2189’_  
_/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/database/transactions.rb:204:in `_transaction'_ _/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/database/transactions.rb:179:in`block in transaction’_  
_/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/database/connecting.rb:264:in `block in synchronize'_ _/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/connection_pool/threaded.rb:91:in`hold’_  
_/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/database/connecting.rb:264:in `synchronize'_ _/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/database/transactions.rb:145:in`transaction’_  
_/usr/lib/one/ruby/onedb/local/5.4.1\_to\_5.5.80.rb:202:in `bug_2189'_ _/usr/lib/one/ruby/onedb/local/5.4.1_to_5.5.80.rb:40:in`up’_  
_/usr/lib/one/ruby/onedb/onedb.rb:232:in `apply_migrators'_ _/usr/lib/one/ruby/onedb/onedb.rb:179:in`upgrade’_  
_/usr/bin/onedb:389:in `block (2 levels) in <main>'_ _/usr/lib/one/ruby/cli/command_parser.rb:457:in`call’_  
_/usr/lib/one/ruby/cli/command\_parser.rb:457:in `run'_ _/usr/lib/one/ruby/cli/command_parser.rb:84:in`initialize’_  
_/usr/bin/onedb:294:in `new'_ _/usr/bin/onedb:294:in`’_

Thanks in advance.

Best regards.

---

<div class="post-metadata">

**Author:** ![mschau](https://avatars.discourse-cdn.com/v4/letter/m/46a35a/32.png) [@mschau](https://forum.opennebula.io/u/mschau)\
**Post date:** [July 3, 2018, 2:49pm UTC](https://forum.opennebula.io/t/solved-database-update-not-working-from-5-4-12-to-5-6-rc/6117/4 "2018-07-03T14:49:15Z")

</div>

Same here!  
First attempt:  
[root@LXLI03-T11 opennebula-5.5.90-1]# onedb upgrade -v -S localhost -u oneadmin -p XXXXXXXX -d opennebula  
Version read:  
Shared tables 5.4.1 : OpenNebula 5.4.6 daemon bootstrap  
Local tables 5.4.1 : OpenNebula 5.4.6 daemon bootstrap

```
MySQL dump stored in /var/lib/one/mysql_localhost_opennebula_2018-7-3_16:38:48.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.4.1_to_5.5.80.rb
  > Done in 0.00s

Database migrated from 5.4.1 to 5.5.80 (OpenNebula 5.5.80) by onedb command.

>>> Running migrators for local tables
  > Running migrator /usr/lib/one/ruby/onedb/local/5.4.1_to_5.5.80.rb
  > Old Az file not found, skipping Az host migration

undefined method `add_child' for nil:NilClass
/usr/lib/one/ruby/onedb/local/5.4.1_to_5.5.80.rb:212:in `block (2 levels) in bug_2189'
/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/dataset/actions.rb:151:in `block in each'
/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/adapters/mysql2.rb:238:in `block (2 levels) in fetch_rows'
/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/adapters/mysql2.rb:238:in `each'
/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/adapters/mysql2.rb:238:in `block in fetch_rows'
/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/adapters/mysql2.rb:152:in `_execute'
/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/adapters/utils/mysql_mysql2.rb:38:in `block in execute'
/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/database/connecting.rb:264:in `block in synchronize'
/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/connection_pool/threaded.rb:87:in `hold'
/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/database/connecting.rb:264:in `synchronize'
/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/adapters/utils/mysql_mysql2.rb:38:in `execute'
/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/dataset/actions.rb:1082:in `execute'
/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/adapters/mysql2.rb:273:in `execute'
/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/adapters/mysql2.rb:236:in `fetch_rows'
/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/dataset/actions.rb:151:in `each'
/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/database/dataset.rb:51:in `fetch'
/usr/lib/one/ruby/onedb/local/5.4.1_to_5.5.80.rb:203:in `block in bug_2189'
/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/database/transactions.rb:204:in `_transaction'
/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/database/transactions.rb:179:in `block in transaction'
/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/database/connecting.rb:264:in `block in synchronize'
/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/connection_pool/threaded.rb:91:in `hold'
/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/database/connecting.rb:264:in `synchronize'
/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/database/transactions.rb:145:in `transaction'
/usr/lib/one/ruby/onedb/local/5.4.1_to_5.5.80.rb:202:in `bug_2189'
/usr/lib/one/ruby/onedb/local/5.4.1_to_5.5.80.rb:40:in `up'
/usr/lib/one/ruby/onedb/onedb.rb:232:in `apply_migrators'
/usr/lib/one/ruby/onedb/onedb.rb:179:in `upgrade'
/usr/bin/onedb:389:in `block (2 levels) in <main>'
/usr/lib/one/ruby/cli/command_parser.rb:457:in `call'
/usr/lib/one/ruby/cli/command_parser.rb:457:in `run'
/usr/lib/one/ruby/cli/command_parser.rb:84:in `initialize'
/usr/bin/onedb:294:in `new'
/usr/bin/onedb:294:in `<main>'

The database will be restored
MySQL DB opennebula at localhost restored.

```

Second attempt:  
[root@LXLI03-T11 opennebula-5.5.90-1]# onedb upgrade -v -S localhost -u oneadmin -p XXXXXXX -d opennebula  
Version read:  
Shared tables 5.4.1 : OpenNebula 5.4.6 daemon bootstrap  
Local tables 5.4.1 : OpenNebula 5.4.6 daemon bootstrap

```
MySQL dump stored in /var/lib/one/mysql_localhost_opennebula_2018-7-3_16:39:40.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.4.1_to_5.5.80.rb
  > Done in 0.00s

Database migrated from 5.4.1 to 5.5.80 (OpenNebula 5.5.80) by onedb command.

>>> Running migrators for local tables
  > Running migrator /usr/lib/one/ruby/onedb/local/5.4.1_to_5.5.80.rb
  > Old Az file not found, skipping Az host migration

Mysql2::Error: Table 'old_vm_pool' already exists
/usr/local/share/gems/gems/mysql2-0.5.1/lib/mysql2/client.rb:131:in `_query'
/usr/local/share/gems/gems/mysql2-0.5.1/lib/mysql2/client.rb:131:in `block in query'
/usr/local/share/gems/gems/mysql2-0.5.1/lib/mysql2/client.rb:130:in `handle_interrupt'
/usr/local/share/gems/gems/mysql2-0.5.1/lib/mysql2/client.rb:130:in `query'
/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/adapters/mysql2.rb:137:in `block in _execute'
/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/database/logging.rb:38:in `log_connection_yield'
/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/adapters/mysql2.rb:132:in `_execute'
/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/adapters/utils/mysql_mysql2.rb:38:in `block in execute'
/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/database/connecting.rb:264:in `block in synchronize'
/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/connection_pool/threaded.rb:91:in `hold'
/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/database/connecting.rb:264:in `synchronize'
/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/adapters/utils/mysql_mysql2.rb:38:in `execute'
/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/adapters/mysql2.rb:68:in `execute_dui'
/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/database/query.rb:43:in `execute_ddl'
/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/database/query.rb:76:in `run'
/usr/lib/one/ruby/onedb/local/5.4.1_to_5.5.80.rb:199:in `bug_2189'
/usr/lib/one/ruby/onedb/local/5.4.1_to_5.5.80.rb:40:in `up'
/usr/lib/one/ruby/onedb/onedb.rb:232:in `apply_migrators'
/usr/lib/one/ruby/onedb/onedb.rb:179:in `upgrade'
/usr/bin/onedb:389:in `block (2 levels) in <main>'
/usr/lib/one/ruby/cli/command_parser.rb:457:in `call'
/usr/lib/one/ruby/cli/command_parser.rb:457:in `run'
/usr/lib/one/ruby/cli/command_parser.rb:84:in `initialize'
/usr/bin/onedb:294:in `new'
/usr/bin/onedb:294:in `<main>'

The database will be restored
MySQL DB opennebula at localhost restored.

```

[root@LXLI03-T11 opennebula-5.5.90-1]# onedb fsck -S localhost -u oneadmin -p XXXXXXX -d opennebula  
Version mismatch: fsck file is for version  
Shared: 5.5.80, Local: 5.5.80

Current database is version  
Shared: 5.4.1, Local: 5.4.1

---

<div class="post-metadata">

**Author:** ![atodorov\_storpool](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/atodorov_storpool/32/5327_2.png) [@atodorov\_storpool](https://forum.opennebula.io/u/atodorov_storpool)\
**Post date:** [July 3, 2018, 3:14pm UTC](https://forum.opennebula.io/t/solved-database-update-not-working-from-5-4-12-to-5-6-rc/6117/5 "2018-07-03T15:14:37Z")

</div>

It is a long shot, but could you try editing the migrator `/usr/lib/one/ruby/onedb/local/5.4.1_to_5.5.80.rb` line 212:

```auto
                doc.xpath("//SNAPSHOTS").first.add_child(doc.create_element("NEXT_SNAPSHOT")).content = next_snapshot

```

With (note that theyou should use \<tab\> to align the second line):

```auto
                if ( !doc.xpath("//SNAPSHOTS").first.nil? )
                    doc.xpath("//SNAPSHOTS").first.add_child(doc.create_element("NEXT_SNAPSHOT")).content = next_snapshot

```

It looks like there is no `//SNAPSHOTS` element in the VM’s metadata…

And then retry (dropping old\_vm\_pool manually first)?

BR,  
Anton

---

<div class="post-metadata">

**Author:** ![mschau](https://avatars.discourse-cdn.com/v4/letter/m/46a35a/32.png) [@mschau](https://forum.opennebula.io/u/mschau)\
**Post date:** [July 3, 2018, 3:44pm UTC](https://forum.opennebula.io/t/solved-database-update-not-working-from-5-4-12-to-5-6-rc/6117/6 "2018-07-03T15:44:40Z")

</div>

Hi!  
Thanks for the reply - I changed the line and tried again:

```
[root@LXLI03-T11 ~]# onedb upgrade -v -S localhost -u root -p test1234 -d opennebula
Version read:
Shared tables 5.4.1 : OpenNebula 5.4.6 daemon bootstrap
Local tables 5.4.1 : OpenNebula 5.4.6 daemon bootstrap

MySQL dump stored in /var/lib/one/mysql_localhost_opennebula_2018-7-3_18:19: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.4.1_to_5.5.80.rb
  > Done in 0.00s

Database migrated from 5.4.1 to 5.5.80 (OpenNebula 5.5.80) by onedb command.

>>> Running migrators for local tables
  > Running migrator /usr/lib/one/ruby/onedb/local/5.4.1_to_5.5.80.rb
  > Old Az file not found, skipping Az host migration
  > Done in 0.16s

Database migrated from 5.4.1 to 5.5.80 (OpenNebula 5.5.80) by onedb command.

Total time: 0.17s

[root@LXLI03-T11 ~]# onedb fsck -S localhost -u root -d opennebula
MySQL Password:
MySQL dump stored in /var/lib/one/mysql_localhost_opennebula_2018-7-3_18:22:48.sql
Use 'onedb restore' or restore the DB using the mysql command:
mysql -u user -h server -P port db_name < backup_file
incompatible character encodings: UTF-8 and ISO-8859-1
/usr/lib/one/ruby/onedb/fsck/host.rb:51:in `block in check_host_cluster'
/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/dataset/actions.rb:151:in `block in each'
/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/adapters/mysql2.rb:238:in `block (2 levels) in fetch_rows'
/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/adapters/mysql2.rb:238:in `each'
/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/adapters/mysql2.rb:238:in `block in fetch_rows'
/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/adapters/mysql2.rb:152:in `_execute'
/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/adapters/utils/mysql_mysql2.rb:38:in `block in execute'
/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/database/connecting.rb:264:in `block in synchronize'
/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/connection_pool/threaded.rb:91:in `hold'
/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/database/connecting.rb:264:in `synchronize'
/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/adapters/utils/mysql_mysql2.rb:38:in `execute'
/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/dataset/actions.rb:1082:in `execute'
/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/adapters/mysql2.rb:273:in `execute'
/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/adapters/mysql2.rb:236:in `fetch_rows'
/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/dataset/actions.rb:151:in `each'
/usr/local/share/gems/gems/sequel-5.7.1/lib/sequel/database/dataset.rb:51:in `fetch'
/usr/lib/one/ruby/onedb/fsck/host.rb:19:in `check_host_cluster'
/usr/lib/one/ruby/onedb/fsck.rb:288:in `fsck'
/usr/lib/one/ruby/onedb/onedb.rb:280:in `fsck'
/usr/bin/onedb:405:in `block (2 levels) in <main>'
/usr/lib/one/ruby/cli/command_parser.rb:457:in `call'
/usr/lib/one/ruby/cli/command_parser.rb:457:in `run'
/usr/lib/one/ruby/cli/command_parser.rb:84:in `initialize'
/usr/bin/onedb:294:in `new'
/usr/bin/onedb:294:in `<main>'

Error running fsck version 5.5.80
The database will be restored
MySQL DB opennebula at localhost restored.
```

---

<div class="post-metadata">

**Author:** ![mschau](https://avatars.discourse-cdn.com/v4/letter/m/46a35a/32.png) [@mschau](https://forum.opennebula.io/u/mschau)\
**Post date:** [July 4, 2018, 9:59am UTC](https://forum.opennebula.io/t/solved-database-update-not-working-from-5-4-12-to-5-6-rc/6117/7 "2018-07-04T09:59:15Z")

</div>

Still no glue - any hint on this?

Thanks!

---

<div class="post-metadata">

**Author:** ![ruben](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/ruben/32/19_2.png) [@ruben](https://forum.opennebula.io/u/ruben)\
**Post date:** [July 4, 2018, 10:24am UTC](https://forum.opennebula.io/t/solved-database-update-not-working-from-5-4-12-to-5-6-rc/6117/8 "2018-07-04T10:24:41Z")

</div>

Thanks guys for the feedback.

There are two issues here:

- missing snapshots, fixed with @atodorov_storpool patch. THANKS!!! 🙂
- Failing fsck becasue of UTF-8 and ISO-8859-1 (Something we tried to fix for 5.6, but obviously we failed).

I’m going to take care of patch for upgrade code right away. And we’ll look into the other issue.

@mschau, I’d try to procced with the testing as usually there should not be any inconsistencies in the DB.

Cheers

---

<div class="post-metadata">

**Author:** ![ruben](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/ruben/32/19_2.png) [@ruben](https://forum.opennebula.io/u/ruben)\
**Post date:** [July 4, 2018, 10:27am UTC](https://forum.opennebula.io/t/solved-database-update-not-working-from-5-4-12-to-5-6-rc/6117/9 "2018-07-04T10:27:18Z")

</div>

BTW @mschau, Do you have any non-ascii chars in the host/cluster names?.

We are looking to fsck issue here:

[https://github.com/OpenNebula/one/issues/1557](https://github.com/OpenNebula/one/issues/1557)

---

<div class="post-metadata">

**Author:** ![mschau](https://avatars.discourse-cdn.com/v4/letter/m/46a35a/32.png) [@mschau](https://forum.opennebula.io/u/mschau)\
**Post date:** [July 4, 2018, 10:45am UTC](https://forum.opennebula.io/t/solved-database-update-not-working-from-5-4-12-to-5-6-rc/6117/10 "2018-07-04T10:45:15Z")

</div>

Thanks for the quick replys - just proceeding did the trick 🙂  
At least it seems to work for now.

---

<div class="post-metadata">

**Author:** ![angel\_ramiro](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@angel\_ramiro](https://forum.opennebula.io/u/angel_ramiro)\
**Post date:** [July 4, 2018, 1:19pm UTC](https://forum.opennebula.io/t/solved-database-update-not-working-from-5-4-12-to-5-6-rc/6117/11 "2018-07-04T13:19:35Z")

</div>

Thank you Anton!

We made the change and it worked perfectly, including the fsck, Ruben.

Regards.
