1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-12 08:58:17 +03:00

B #6790: Fix onehost show for single Hugepage (#3386)

(cherry picked from commit a19325cbd5a3c4c7ffd810e847bf8980530529f2)
This commit is contained in:
Pavel Czerný 2025-01-30 11:29:44 +01:00 committed by Ruben S. Montero
parent 9e1b8ad7a3
commit 631acb7f48
No known key found for this signature in database
GPG Key ID: A0CEA6FA880A1D87

View File

@ -800,9 +800,12 @@ class OneHostHelper < OpenNebulaHelper::OneHelper
node['MEMORY']['FREE'] = mon_node['MEMORY']['FREE']
node['MEMORY']['USED'] = mon_node['MEMORY']['USED']
node['HUGEPAGE'] = [node['HUGEPAGE']].flatten.compact
mon_node['HUGEPAGE'] = [mon_node['HUGEPAGE']].flatten.compact
node['HUGEPAGE'].each do |hp|
mon_hp = mon_node['HUGEPAGE'].find {|x| x['SIZE'] == hp['SIZE'] }
hp['FREE'] = mon_hp['FREE']
hp['FREE'] = mon_hp['FREE'] unless mon_hp.nil?
end
end
end