Set default NUMA topology distances

In case of one NUMA node `lstopo` doesn't return
information about distances, so by default distances
should be 2d array [["1.0"]]

Change-Id: I858c93e7f41b1a670bc72a80cd0c5b47fe63ef12
Partial-Bug: #1551955
This commit is contained in:
Artur Svechnikov 2016-03-02 12:25:59 +03:00
parent 01ec3c5501
commit 122f851295
1 changed files with 1 additions and 1 deletions

2
agent
View File

@ -864,7 +864,7 @@ class NodeAgent
# <page_type size="1073741824" count="8"/>
doc = Document.new `lstopo --no-caches --of xml`
topology = {:numa_nodes => [], :supported_hugepages => supported_hugepages, :distances => nil}
topology = {:numa_nodes => [], :supported_hugepages => supported_hugepages, :distances => [["1.0"]]}
doc.elements.each('/topology/object/distances/') do |dist|
topology[:distances] = dist.elements.collect{|v| v.attributes['value']}