1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

Bug fsck: Update message on wrong AR SIZE

This commit is contained in:
Ruben S. Montero 2018-01-29 19:01:13 +01:00
parent 99e82ac0e3
commit 44cba6f2fe

View File

@ -226,9 +226,13 @@ 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")
log_error("VNet #{oid} AR #{ar_id} allocated leases "\
"(#{leases.length}) is greater than the AR size (#{size}"\
"). SIZE can be increased with onevnet updatear"\
" #{oid} #{ar_id}")
error = true
net_ar.at_xpath("SIZE").content = leases.length.to_s
end