Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 75adea58 authored by Simon Delamare's avatar Simon Delamare
Browse files

[lib] Sort nodes when adding network metrics to ensure reproductibe generation

parent 0bef74a1
No related branches found
No related tags found
No related merge requests found
Pipeline #177945 passed
......@@ -238,7 +238,7 @@ def add_network_metrics(h)
cluster['metrics'] = cluster.fetch('metrics', []).reject {|m| m['name'] =~ /network_.*_bytes_total/}
# for each interface of a cluster's node
node_uid, node = cluster['nodes'].select { |k, v| v['status'] != 'retired' }.first
node_uid, node = cluster['nodes'].select { |k, v| v['status'] != 'retired' }.sort_by{ |k, v| k }.first
node["network_adapters"].each do |iface_uid, iface|
# get switch attached to interface
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment