mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
M #-: fix minor bug in cluster FSCK (#1631)
(cherry picked from commit ad1a5cbc1657d42dba81196b4b2eaaa4b8fa9d7c)
This commit is contained in:
parent
294362d96f
commit
3481115e15
@ -169,7 +169,9 @@ module OneDBFsck
|
||||
:cluster_datastore_relation_new)
|
||||
|
||||
@db.fetch('SELECT * from cluster_datastore_relation') do |row|
|
||||
if cluster[row[:cid]][:datastores].count(row[:oid]) != 1
|
||||
if !cluster[row[:cid]] || cluster[row[:cid]][:datastores].count(
|
||||
row[:oid]
|
||||
) != 1
|
||||
log_error('Table cluster_datastore_relation contains ' \
|
||||
"relation cluster #{row[:cid]}, datastore " \
|
||||
"#{row[:oid]}, but it should not")
|
||||
@ -190,7 +192,9 @@ module OneDBFsck
|
||||
:cluster_network_relation_new)
|
||||
|
||||
@db.fetch('SELECT * from cluster_network_relation') do |row|
|
||||
if cluster[row[:cid]][:vnets].count(row[:oid]) != 1
|
||||
if !cluster[row[:cid]] || cluster[row[:cid]][:vnets].count(
|
||||
row[:oid]
|
||||
) != 1
|
||||
log_error('Table cluster_network_relation contains ' \
|
||||
"relation cluster #{row[:cid]}, " \
|
||||
"vnet #{row[:oid]}, but it should not")
|
||||
|
Loading…
x
Reference in New Issue
Block a user