From 122f851295e6fb5f8e04b997de7c262527392ceb Mon Sep 17 00:00:00 2001 From: Artur Svechnikov Date: Wed, 2 Mar 2016 12:25:59 +0300 Subject: [PATCH] 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 --- agent | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agent b/agent index d624d0a..f4b4eb1 100755 --- a/agent +++ b/agent @@ -864,7 +864,7 @@ class NodeAgent # 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']}