1
0
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:
juanmont 2018-01-29 13:37:12 +01:00 committed by Ruben S. Montero
parent 152189215e
commit d9ca11088f

View File

@ -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|