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

M #-: Fix CLI output for onehost (#2930)

* In case of incomplete monitoring data, the `onehost show` command shows error

(cherry picked from commit ff35f07fbaa9f734fc01e7c12936a33345b87153)
This commit is contained in:
Pavel Czerný 2024-02-12 09:49:07 +01:00 committed by Ruben S. Montero
parent b524135376
commit f42575a4c4
No known key found for this signature in database
GPG Key ID: A0CEA6FA880A1D87

View File

@ -794,6 +794,8 @@ class OneHostHelper < OpenNebulaHelper::OneHelper
numa_nodes.each do |node|
mon_node = monitoring.find {|x| x['NODE_ID'] == node['NODE_ID'] }
next if mon_node.nil?
node['MEMORY']['FREE'] = mon_node['MEMORY']['FREE']
node['MEMORY']['USED'] = mon_node['MEMORY']['USED']