mirror of
https://github.com/OpenNebula/one.git
synced 2026-12-02 05:06:14 +09:00
M #-: fix minor bug in cluster FSCK (#1631)
This commit is contained in:
1 parent
014447a3d6
commit
ad1a5cbc16
1 file changed
+6
-2
@@ -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")
|
||||
|
||||
Reference in new issue
Block a user