One error (during test upgrade from 5.4.0 to 5.4.1)

it looks like somehow the franken-nebula-db in one of the test clusters was missing a column in logdb…

[oneadmin@s04 ~]$ onedb upgrade -v --server localhost --username oneadmin --password onepassword --dbname opennebula
Version read:
Shared tables 5.4.0 : Database migrated from 5.3.80 to 5.4.0 (OpenNebula 5.4.0) by onedb command.
Local tables  5.4.0 : Database migrated from 5.3.80 to 5.4.0 (OpenNebula 5.4.0) by onedb command.

MySQL dump stored in /var/lib/one/mysql_localhost_opennebula_2017-9-20_13:0:33.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.0_to_5.4.1.rb
  > Done in 0.00s

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

>>> Running migrators for local tables
  > Running migrator /usr/lib/one/ruby/onedb/local/5.4.0_to_5.4.1.rb

Mysql2::Error: Key column 'fed_index' doesn't exist in table
/usr/local/share/gems/gems/mysql2-0.4.6/lib/mysql2/client.rb:120:in `_query'
/usr/local/share/gems/gems/mysql2-0.4.6/lib/mysql2/client.rb:120:in `block in query'
/usr/local/share/gems/gems/mysql2-0.4.6/lib/mysql2/client.rb:119:in `handle_interrupt'
/usr/local/share/gems/gems/mysql2-0.4.6/lib/mysql2/client.rb:119:in `query'
/usr/local/share/gems/gems/sequel-4.38.0/lib/sequel/adapters/mysql2.rb:137:in `block in _execute'
/usr/local/share/gems/gems/sequel-4.38.0/lib/sequel/database/logging.rb:44:in `log_connection_yield'
/usr/local/share/gems/gems/sequel-4.38.0/lib/sequel/adapters/mysql2.rb:132:in `_execute'
/usr/local/share/gems/gems/sequel-4.38.0/lib/sequel/adapters/utils/mysql_mysql2.rb:36:in `block in execute'
/usr/local/share/gems/gems/sequel-4.38.0/lib/sequel/database/connecting.rb:251:in `block in synchronize'
/usr/local/share/gems/gems/sequel-4.38.0/lib/sequel/connection_pool/threaded.rb:107:in `hold'
/usr/local/share/gems/gems/sequel-4.38.0/lib/sequel/database/connecting.rb:251:in `synchronize'
/usr/local/share/gems/gems/sequel-4.38.0/lib/sequel/adapters/utils/mysql_mysql2.rb:36:in `execute'
/usr/local/share/gems/gems/sequel-4.38.0/lib/sequel/adapters/mysql2.rb:71:in `execute_dui'
/usr/local/share/gems/gems/sequel-4.38.0/lib/sequel/database/query.rb:45:in `execute_ddl'
/usr/local/share/gems/gems/sequel-4.38.0/lib/sequel/adapters/utils/split_alter_table.rb:37:in `block (2 levels) in apply_alter_table'
/usr/local/share/gems/gems/sequel-4.38.0/lib/sequel/adapters/utils/split_alter_table.rb:37:in `each'
/usr/local/share/gems/gems/sequel-4.38.0/lib/sequel/adapters/utils/split_alter_table.rb:37:in `block in apply_alter_table'
/usr/local/share/gems/gems/sequel-4.38.0/lib/sequel/adapters/utils/split_alter_table.rb:35:in `each'
/usr/local/share/gems/gems/sequel-4.38.0/lib/sequel/adapters/utils/split_alter_table.rb:35:in `apply_alter_table'
/usr/local/share/gems/gems/sequel-4.38.0/lib/sequel/database/schema_methods.rb:425:in `apply_alter_table_generator'
/usr/local/share/gems/gems/sequel-4.38.0/lib/sequel/database/schema_methods.rb:81:in `alter_table'
/usr/lib/one/ruby/onedb/local/5.4.0_to_5.4.1.rb:47:in `add_ha_indexes'
/usr/lib/one/ruby/onedb/local/5.4.0_to_5.4.1.rb:39:in `up'
/usr/lib/one/ruby/onedb/onedb.rb:232:in `apply_migrators'
/usr/lib/one/ruby/onedb/onedb.rb:179:in `upgrade'
/bin/onedb:381:in `block (2 levels) in <main>'
/usr/lib/one/ruby/cli/command_parser.rb:449:in `call'
/usr/lib/one/ruby/cli/command_parser.rb:449:in `run'
/usr/lib/one/ruby/cli/command_parser.rb:76:in `initialize'
/bin/onedb:286:in `new'
/bin/onedb:286:in `<main>'


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

After an quick fix the DB upgrade completed.

MariaDB [opennebula]> alter table logdb add fed_index int(11) default null after timestamp;
Query OK, 2 rows affected (0.10 sec)               
Records: 2  Duplicates: 0  Warnings: 0

Another note - only some yaml files were updated in /etc/one/* after the upgrade. oned.conf is untouched.

Edit: changed the topic because it is most probably caused by a previous broken upgrade in my testing lab.

BR,
Anton

I can at least confirm that my update went fine on a standalone opennebula master.

The fed_index column where included in 5.4.0 final release. Maybe this is a 5.4.0 beta, I think the first beta release did not include fed_index.