Skip to content

Commit

Permalink
B #6790: Fix onehost show for single Hugepage (#3386)
Browse files Browse the repository at this point in the history
(cherry picked from commit a19325c)
  • Loading branch information
paczerny authored and rsmontero committed Jan 30, 2025
1 parent 9e1b8ad commit 631acb7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/cli/one_helper/onehost_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -800,9 +800,12 @@ def merge_numa_monitoring(numa_nodes, monitoring)
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
Expand Down

0 comments on commit 631acb7

Please sign in to comment.