mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
Bug fsck: Checked the number of allocated leases with the size of AR (#1691)
This commit is contained in:
parent
152189215e
commit
d9ca11088f
@ -225,6 +225,14 @@ module OneDBFsck
|
||||
|
||||
leases = allocated.scan(/(\d+) (\d+)/)
|
||||
|
||||
size = net_ar.at_xpath("SIZE").text.to_i
|
||||
if leases.length > size
|
||||
log_error("VNet #{oid} AR #{ar_id} has more allocated leases (#{used_leases}) than"<<
|
||||
"size (#{size}) that has the AR")
|
||||
error = true
|
||||
net_ar.at_xpath("SIZE").content = leases.length.to_s
|
||||
end
|
||||
|
||||
new_leases = []
|
||||
|
||||
leases.each do |lease_str|
|
||||
|
Loading…
x
Reference in New Issue
Block a user