From 44cba6f2fe940b0120da587eef438b1d0cf59047 Mon Sep 17 00:00:00 2001 From: "Ruben S. Montero" Date: Mon, 29 Jan 2018 19:01:13 +0100 Subject: [PATCH] Bug fsck: Update message on wrong AR SIZE --- src/onedb/fsck/network.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/onedb/fsck/network.rb b/src/onedb/fsck/network.rb index f364f4e404..659b39c46d 100644 --- a/src/onedb/fsck/network.rb +++ b/src/onedb/fsck/network.rb @@ -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