[SOLVED] 5.8.2 onedb fsck error

onedb fsck -S localhost -u <db_user> -d <name_database>

undefined method `parent_vnet' for #
/usr/lib/one/ruby/onedb/fsck/network.rb:165:in `block (2 levels) in init_network_lease_counters'
/usr/local/share/gems/gems/nokogiri-1.6.8.1/lib/nokogiri/xml/node_set.rb:187:in `block in each'
/usr/local/share/gems/gems/nokogiri-1.6.8.1/lib/nokogiri/xml/node_set.rb:186:in `upto'
/usr/local/share/gems/gems/nokogiri-1.6.8.1/lib/nokogiri/xml/node_set.rb:186:in `each'
/usr/lib/one/ruby/onedb/fsck/network.rb:137:in `block in init_network_lease_counters'
/usr/local/share/gems/gems/sequel-5.17.0/lib/sequel/dataset/actions.rb:152:in `block in each'
/usr/local/share/gems/gems/sequel-5.17.0/lib/sequel/adapters/mysql2.rb:239:in `block (2 levels) in fetch_rows'
/usr/local/share/gems/gems/sequel-5.17.0/lib/sequel/adapters/mysql2.rb:239:in `each'
/usr/local/share/gems/gems/sequel-5.17.0/lib/sequel/adapters/mysql2.rb:239:in `block in fetch_rows'
/usr/local/share/gems/gems/sequel-5.17.0/lib/sequel/adapters/mysql2.rb:152:in `_execute'
/usr/local/share/gems/gems/sequel-5.17.0/lib/sequel/adapters/utils/mysql_mysql2.rb:39:in `block in execute'
/usr/local/share/gems/gems/sequel-5.17.0/lib/sequel/database/connecting.rb:253:in `block in synchronize'
/usr/local/share/gems/gems/sequel-5.17.0/lib/sequel/connection_pool/threaded.rb:92:in `hold'
/usr/local/share/gems/gems/sequel-5.17.0/lib/sequel/database/connecting.rb:253:in `synchronize'
/usr/local/share/gems/gems/sequel-5.17.0/lib/sequel/adapters/utils/mysql_mysql2.rb:39:in `execute'
/usr/local/share/gems/gems/sequel-5.17.0/lib/sequel/dataset/actions.rb:1087:in `execute'
/usr/local/share/gems/gems/sequel-5.17.0/lib/sequel/adapters/mysql2.rb:274:in `execute'
/usr/local/share/gems/gems/sequel-5.17.0/lib/sequel/adapters/mysql2.rb:237:in `fetch_rows'
/usr/local/share/gems/gems/sequel-5.17.0/lib/sequel/dataset/actions.rb:152:in `each'
/usr/local/share/gems/gems/sequel-5.17.0/lib/sequel/database/dataset.rb:51:in `fetch'
/usr/lib/one/ruby/onedb/fsck/network.rb:128:in `init_network_lease_counters'
/usr/lib/one/ruby/onedb/fsck.rb:452:in `fsck'
/usr/lib/one/ruby/onedb/onedb.rb:280:in `fsck'
/bin/onedb:405:in `block (2 levels) in '
/usr/lib/one/ruby/cli/command_parser.rb:470:in `call'
/usr/lib/one/ruby/cli/command_parser.rb:470:in `run'
/usr/lib/one/ruby/cli/command_parser.rb:84:in `initialize'
/bin/onedb:294:in `new'
/bin/onedb:294:in `'

Error running fsck version 5.6.0
The database will be restored 

cat /etc/*release

CentOS Linux release 7.6.1810 (Core)

ruby -v

ruby 2.0.0p648 (2015-12-16) [x86_64-linux]

gem list

*** LOCAL GEMS ***

activesupport (4.2.11)
addressable (2.6.0, 2.5.2, 2.4.0)
amazon-ec2 (0.9.17)
aws-sdk (2.11.212, 2.11.39, 2.5.10)
aws-sdk-core (2.11.212, 2.11.39, 2.5.10)
aws-sdk-resources (2.11.212, 2.11.39, 2.5.10)
aws-sigv4 (1.0.3, 1.0.2)
azure (0.7.10, 0.7.6)
azure-core (0.1.15, 0.1.14, 0.1.4)
bigdecimal (1.2.0)
builder (3.2.3, 3.2.2)
bundler (1.15.3)
concurrent-ruby (1.1.4)
configparser (0.1.7, 0.1.4)
curb (0.9.8, 0.9.4, 0.9.3)
daemons (1.3.1, 1.2.6, 1.2.4)
eventmachine (1.2.7, 1.2.5, 1.2.0.1)
faraday (0.15.4, 0.15.0, 0.9.2)
faraday_middleware (0.13.0, 0.12.2, 0.10.0)
hashie (3.6.0, 3.5.7, 3.4.4)
highline (1.7.10)
i18n (0.9.5)
inflection (1.0.0)
io-console (0.4.2)
jmespath (1.4.0, 1.3.1)
json (1.8.3, 1.7.7)
memcache-client (1.8.5)
mime-types (3.2.2, 3.1, 2.99.2)
mime-types-data (3.2018.0812, 3.2016.0521)
mini_portile2 (2.1.0)
minitest (5.11.3)
multipart-post (2.0.0)
mysql2 (0.5.2, 0.5.1, 0.4.8)
net-ldap (0.16.1, 0.12.1)
nokogiri (1.6.8.1, 1.6.1)
ox (2.10.0, 2.9.2, 2.4.4)
parse-cron (0.1.4)
polyglot (0.3.5)
psych (2.0.0)
public_suffix (2.0.5)
rack (1.6.11, 1.6.10, 1.6.4)
rack-protection (1.5.5, 1.5.3)
rake (0.9.6)
rdoc (4.0.0)
scrub_rb (1.0.1)
sequel (5.17.0, 5.7.1, 4.38.0)
sinatra (1.4.8, 1.4.7)
sqlite3 (1.3.13, 1.3.11)
systemu (2.6.5)
thin (1.7.2, 1.7.0)
thor (0.20.3, 0.20.0, 0.19.1)
thread_safe (0.3.6)
tilt (2.0.9, 2.0.8, 2.0.5)
timfel-krb5-auth (0.8.3)
treetop (1.6.10, 1.6.8)
trollop (2.9.9, 2.1.2)
tzinfo (1.2.5)
uuidtools (2.1.5)
xml-simple (1.1.5)
zendesk_api (1.16.0, 1.13.4)

Hello @telecast

Thanks for the feedback! I have correct it, here you have the PR: https://github.com/OpenNebula/one/pull/3387/files the change is really simple, just change the dot by a comma.

Hello @ahuertas

For now is the other error:

undefined local variable or method `mac' for #
/usr/lib/one/ruby/onedb/fsck/network.rb:241:in `block in calculate_leases'
/usr/lib/one/ruby/onedb/fsck/network.rb:238:in `times'
/usr/lib/one/ruby/onedb/fsck/network.rb:238:in `calculate_leases'
/usr/lib/one/ruby/onedb/fsck/network.rb:165:in `block (2 levels) in init_network_lease_counters'
/usr/local/share/gems/gems/nokogiri-1.6.8.1/lib/nokogiri/xml/node_set.rb:187:in `block in each'
/usr/local/share/gems/gems/nokogiri-1.6.8.1/lib/nokogiri/xml/node_set.rb:186:in `upto'
/usr/local/share/gems/gems/nokogiri-1.6.8.1/lib/nokogiri/xml/node_set.rb:186:in `each'
/usr/lib/one/ruby/onedb/fsck/network.rb:137:in `block in init_network_lease_counters'
/usr/local/share/gems/gems/sequel-5.17.0/lib/sequel/dataset/actions.rb:152:in `block in each'
/usr/local/share/gems/gems/sequel-5.17.0/lib/sequel/adapters/mysql2.rb:239:in `block (2 levels) in fetch_rows'
/usr/local/share/gems/gems/sequel-5.17.0/lib/sequel/adapters/mysql2.rb:239:in `each'
/usr/local/share/gems/gems/sequel-5.17.0/lib/sequel/adapters/mysql2.rb:239:in `block in fetch_rows'
/usr/local/share/gems/gems/sequel-5.17.0/lib/sequel/adapters/mysql2.rb:152:in `_execute'
/usr/local/share/gems/gems/sequel-5.17.0/lib/sequel/adapters/utils/mysql_mysql2.rb:39:in `block in execute'
/usr/local/share/gems/gems/sequel-5.17.0/lib/sequel/database/connecting.rb:253:in `block in synchronize'
/usr/local/share/gems/gems/sequel-5.17.0/lib/sequel/connection_pool/threaded.rb:92:in `hold'
/usr/local/share/gems/gems/sequel-5.17.0/lib/sequel/database/connecting.rb:253:in `synchronize'
/usr/local/share/gems/gems/sequel-5.17.0/lib/sequel/adapters/utils/mysql_mysql2.rb:39:in `execute'
/usr/local/share/gems/gems/sequel-5.17.0/lib/sequel/dataset/actions.rb:1087:in `execute'
/usr/local/share/gems/gems/sequel-5.17.0/lib/sequel/adapters/mysql2.rb:274:in `execute'
/usr/local/share/gems/gems/sequel-5.17.0/lib/sequel/adapters/mysql2.rb:237:in `fetch_rows'
/usr/local/share/gems/gems/sequel-5.17.0/lib/sequel/dataset/actions.rb:152:in `each'
/usr/local/share/gems/gems/sequel-5.17.0/lib/sequel/database/dataset.rb:51:in `fetch'
/usr/lib/one/ruby/onedb/fsck/network.rb:128:in `init_network_lease_counters'
/usr/lib/one/ruby/onedb/fsck.rb:452:in `fsck'
/usr/lib/one/ruby/onedb/onedb.rb:280:in `fsck'
/bin/onedb:405:in `block (2 levels) in '
/usr/lib/one/ruby/cli/command_parser.rb:470:in `call'
/usr/lib/one/ruby/cli/command_parser.rb:470:in `run'
/usr/lib/one/ruby/cli/command_parser.rb:84:in `initialize'
/bin/onedb:294:in `new'
/bin/onedb:294:in `' 

Ok, I will take a look on that, sorry for that.

Hello @telecast

I fix it https://github.com/OpenNebula/one/pull/3391/files please try it and let me know if it works.

Thanks!

@ahuertas

Thank you for your help!
It’s work perfect without any error!

Solved.