Bug #4884

onedb fsck crash following migration from 4.14.1 to 5.2.0

Added by Richard Stevenson over 4 years ago. Updated almost 4 years ago.

Status:ClosedStart date:10/27/2016
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-
Resolution:duplicate Pull request:
Affected Versions:OpenNebula 5.2

Description

Following a onedb upgrade, onedb fsck fails with the following trace. Logs of full db upgrade also attached.

undefined method `content' for nil:NilClass
/usr/lib/one/ruby/onedb/fsck.rb:2640:in `get_image_from_name'
/usr/lib/one/ruby/onedb/fsck.rb:2607:in `block in get_disk_id'
/usr/share/gems/gems/nokogiri-1.6.1/lib/nokogiri/xml/node_set.rb:237:in `block in each'
/usr/share/gems/gems/nokogiri-1.6.1/lib/nokogiri/xml/node_set.rb:236:in `upto'
/usr/share/gems/gems/nokogiri-1.6.1/lib/nokogiri/xml/node_set.rb:236:in `each'
/usr/lib/one/ruby/onedb/fsck.rb:2602:in `each_with_index'
/usr/lib/one/ruby/onedb/fsck.rb:2602:in `get_disk_id'
/usr/lib/one/ruby/onedb/fsck.rb:2158:in `block (3 levels) in fsck'
/usr/lib/one/ruby/onedb/fsck.rb:2144:in `each'
/usr/lib/one/ruby/onedb/fsck.rb:2144:in `block (2 levels) in fsck'
/usr/local/share/gems/gems/sequel-4.22.0/lib/sequel/dataset/actions.rb:139:in `block in each'
/usr/local/share/gems/gems/sequel-4.22.0/lib/sequel/adapters/sqlite.rb:334:in `block (2 levels) in fetch_rows'
/usr/local/share/gems/gems/sqlite3-1.3.10/lib/sqlite3/resultset.rb:138:in `each'
/usr/local/share/gems/gems/sequel-4.22.0/lib/sequel/adapters/sqlite.rb:325:in `block in fetch_rows'
/usr/local/share/gems/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:269:in `query'
/usr/local/share/gems/gems/sequel-4.22.0/lib/sequel/adapters/sqlite.rb:185:in `block (2 levels) in _execute'
/usr/local/share/gems/gems/sequel-4.22.0/lib/sequel/database/logging.rb:33:in `log_yield'
/usr/local/share/gems/gems/sequel-4.22.0/lib/sequel/adapters/sqlite.rb:185:in `block in _execute'
/usr/local/share/gems/gems/sequel-4.22.0/lib/sequel/database/connecting.rb:250:in `block in synchronize'
/usr/local/share/gems/gems/sequel-4.22.0/lib/sequel/connection_pool/threaded.rb:95:in `hold'
/usr/local/share/gems/gems/sequel-4.22.0/lib/sequel/database/connecting.rb:250:in `synchronize'
/usr/local/share/gems/gems/sequel-4.22.0/lib/sequel/adapters/sqlite.rb:178:in `_execute'
/usr/local/share/gems/gems/sequel-4.22.0/lib/sequel/adapters/sqlite.rb:128:in `execute'
/usr/local/share/gems/gems/sequel-4.22.0/lib/sequel/dataset/actions.rb:921:in `execute'
/usr/local/share/gems/gems/sequel-4.22.0/lib/sequel/adapters/sqlite.rb:319:in `fetch_rows'
/usr/local/share/gems/gems/sequel-4.22.0/lib/sequel/dataset/actions.rb:139:in `each'
/usr/lib/one/ruby/onedb/fsck.rb:2121:in `block in fsck'
/usr/local/share/gems/gems/sequel-4.22.0/lib/sequel/database/transactions.rb:134:in `_transaction'
/usr/local/share/gems/gems/sequel-4.22.0/lib/sequel/database/transactions.rb:108:in `block in transaction'
/usr/local/share/gems/gems/sequel-4.22.0/lib/sequel/database/connecting.rb:250:in `block in synchronize'
/usr/local/share/gems/gems/sequel-4.22.0/lib/sequel/connection_pool/threaded.rb:99:in `hold'
/usr/local/share/gems/gems/sequel-4.22.0/lib/sequel/database/connecting.rb:250:in `synchronize'
/usr/local/share/gems/gems/sequel-4.22.0/lib/sequel/database/transactions.rb:97:in `transaction'
/usr/lib/one/ruby/onedb/fsck.rb:2120:in `fsck'
/usr/lib/one/ruby/onedb/onedb.rb:280:in `fsck'
/bin/onedb:329: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:222:in `new'
/bin/onedb:222:in `<main>'

onedb_failed_db_migration.txt Magnifier (8.03 KB) Richard Stevenson, 10/27/2016 08:48 AM


Related issues

Duplicates Bug #4895: onedb fsck breaks with volatile disks Closed 11/03/2016

History

#1 Updated by Richard Stevenson over 4 years ago

This could be a side effect of the gem installation failing prior to this step of the upgrade:

Fetching: bundler-1.13.6.gem (100%)
Successfully installed bundler-1.13.6
Parsing documentation for bundler-1.13.6
Installing ri documentation for bundler-1.13.6
1 gem installed
lsb_release command not found. If you are using a RedHat based
distribution install redhat-lsb

Select your distribution or press enter to continue without
installing dependencies.

0. Ubuntu/Debian
1. CentOS/RedHat/Scientific

1
Distribution "redhat" detected.
About to install these dependencies:
  • ruby-devel
  • make

Press enter to continue...

yum install ruby-devel make
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile * base: centos.hyve.com * centosplus: centos.hyve.com * epel: mirrors.coreix.net * extras: centos.hyve.com * updates: mirror.sov.uk.goscomb.net
Package ruby-devel-2.0.0.598-25.el7_1.x86_64 already installed and latest version
Package 1:make-3.82-21.el7.x86_64 already installed and latest version
Nothing to do
sh: bundler: command not found
Error installing gems

#2 Updated by Richard Stevenson over 4 years ago

Tried again, this time with the 'rubygem-bundler' package installed from centos 7 base (1.7.8-3.el7). Still the same stack trace from onedb fsck.

#3 Updated by Javi Fontan over 4 years ago

I've just fixed the fsck problem in this issue:

http://dev.opennebula.org/issues/4895

Do you still have problems with install_gems?

#4 Updated by Javi Fontan almost 4 years ago

  • Duplicates Bug #4895: onedb fsck breaks with volatile disks added

#5 Updated by Javi Fontan almost 4 years ago

  • Status changed from Pending to Closed
  • Resolution set to duplicate

Also available in: Atom PDF