Skip to content

Commit 782f6e8

Browse files
committed
[fpga/wiki] Fix wiki:gen for servan
1 parent ef812ae commit 782f6e8

File tree

8 files changed

+48
-187
lines changed

8 files changed

+48
-187
lines changed

data/grid5000/sites/grenoble/clusters/servan/nodes/servan-1.json

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@
277277
{
278278
"device": "fpga0",
279279
"enabled": true,
280-
"interface": "Ethernet",
280+
"interface": "Ethernet-fpga",
281281
"ip": "172.16.23.11",
282282
"ip6": "2001:660:4406:100:8:1:0:1",
283283
"kavlan": true,
@@ -287,13 +287,15 @@
287287
"mounted": false,
288288
"network_address": "servan-1-fpga0.grenoble.grid5000.fr",
289289
"rate": 100000000000,
290+
"sriov": false,
291+
"sriov_totalvfs": 0,
290292
"switch": "gw",
291293
"switch_port": "ethernet1/1/97"
292294
},
293295
{
294296
"device": "fpga1",
295297
"enabled": true,
296-
"interface": "Ethernet",
298+
"interface": "Ethernet-fpga",
297299
"ip": "172.16.23.21",
298300
"ip6": "2001:660:4406:100:8:2:0:1",
299301
"kavlan": true,
@@ -303,6 +305,8 @@
303305
"mounted": false,
304306
"network_address": "servan-1-fpga1.grenoble.grid5000.fr",
305307
"rate": 100000000000,
308+
"sriov": false,
309+
"sriov_totalvfs": 0,
306310
"switch": "gw",
307311
"switch_port": "ethernet1/1/98"
308312
}
@@ -315,6 +319,13 @@
315319
"pstate_governor": "performance",
316320
"turboboost_enabled": true
317321
},
322+
"other_devices": {
323+
"fpga0": {
324+
"model": "Alveo U200",
325+
"type": "fpga",
326+
"vendor": "Xilinx"
327+
}
328+
},
318329
"performance": {
319330
"core_flops": 36800000000,
320331
"node_flops": 1766400000000

data/grid5000/sites/grenoble/clusters/servan/nodes/servan-2.json

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@
277277
{
278278
"device": "fpga0",
279279
"enabled": true,
280-
"interface": "Ethernet",
280+
"interface": "Ethernet-fpga",
281281
"ip": "172.16.23.12",
282282
"ip6": "2001:660:4406:100:8:1:0:2",
283283
"kavlan": true,
@@ -287,13 +287,15 @@
287287
"mounted": false,
288288
"network_address": "servan-2-fpga0.grenoble.grid5000.fr",
289289
"rate": 100000000000,
290+
"sriov": false,
291+
"sriov_totalvfs": 0,
290292
"switch": "gw",
291293
"switch_port": "ethernet1/1/99"
292294
},
293295
{
294296
"device": "fpga1",
295297
"enabled": true,
296-
"interface": "Ethernet",
298+
"interface": "Ethernet-fpga",
297299
"ip": "172.16.23.22",
298300
"ip6": "2001:660:4406:100:8:2:0:2",
299301
"kavlan": true,
@@ -303,6 +305,8 @@
303305
"mounted": false,
304306
"network_address": "servan-2-fpga1.grenoble.grid5000.fr",
305307
"rate": 100000000000,
308+
"sriov": false,
309+
"sriov_totalvfs": 0,
306310
"switch": "gw",
307311
"switch_port": "ethernet1/1/100"
308312
}
@@ -315,6 +319,13 @@
315319
"pstate_governor": "performance",
316320
"turboboost_enabled": true
317321
},
322+
"other_devices": {
323+
"fpga0": {
324+
"model": "Alveo U200",
325+
"type": "fpga",
326+
"vendor": "Xilinx"
327+
}
328+
},
318329
"performance": {
319330
"core_flops": 36800000000,
320331
"node_flops": 1766400000000

data/grid5000/sites/grenoble/clusters/servan/servan.json

Lines changed: 0 additions & 176 deletions
Original file line numberDiff line numberDiff line change
@@ -336,182 +336,6 @@
336336
"source": {
337337
"protocol": "network_equipment"
338338
}
339-
},
340-
{
341-
"description": "Input byte counter for the network device port",
342-
"labels": {
343-
"interface": "fpga0"
344-
},
345-
"name": "network_ifacein_bytes_total",
346-
"period": 15000,
347-
"source": {
348-
"protocol": "network_equipment"
349-
}
350-
},
351-
{
352-
"description": "Output byte counter for the network device port",
353-
"labels": {
354-
"interface": "fpga0"
355-
},
356-
"name": "network_ifaceout_bytes_total",
357-
"period": 15000,
358-
"source": {
359-
"protocol": "network_equipment"
360-
}
361-
},
362-
{
363-
"description": "Input packet counter for the network device port",
364-
"labels": {
365-
"interface": "fpga0"
366-
},
367-
"name": "network_ifacein_packets_total",
368-
"period": 15000,
369-
"source": {
370-
"protocol": "network_equipment"
371-
}
372-
},
373-
{
374-
"description": "Output packet counter for the network device port",
375-
"labels": {
376-
"interface": "fpga0"
377-
},
378-
"name": "network_ifaceout_packets_total",
379-
"period": 15000,
380-
"source": {
381-
"protocol": "network_equipment"
382-
}
383-
},
384-
{
385-
"description": "Input counter of discarded packets for the network device port",
386-
"labels": {
387-
"interface": "fpga0"
388-
},
389-
"name": "network_ifacein_packets_discard_total",
390-
"period": 15000,
391-
"source": {
392-
"protocol": "network_equipment"
393-
}
394-
},
395-
{
396-
"description": "Output counter of discarded packets for the network device port",
397-
"labels": {
398-
"interface": "fpga0"
399-
},
400-
"name": "network_ifaceout_packets_discard_total",
401-
"period": 15000,
402-
"source": {
403-
"protocol": "network_equipment"
404-
}
405-
},
406-
{
407-
"description": "Input counter of packet errors for the network device port",
408-
"labels": {
409-
"interface": "fpga0"
410-
},
411-
"name": "network_ifacein_packets_error_total",
412-
"period": 15000,
413-
"source": {
414-
"protocol": "network_equipment"
415-
}
416-
},
417-
{
418-
"description": "Output counter of packet errors for the network device port",
419-
"labels": {
420-
"interface": "fpga0"
421-
},
422-
"name": "network_ifaceout_packets_error_total",
423-
"period": 15000,
424-
"source": {
425-
"protocol": "network_equipment"
426-
}
427-
},
428-
{
429-
"description": "Input byte counter for the network device port",
430-
"labels": {
431-
"interface": "fpga1"
432-
},
433-
"name": "network_ifacein_bytes_total",
434-
"period": 15000,
435-
"source": {
436-
"protocol": "network_equipment"
437-
}
438-
},
439-
{
440-
"description": "Output byte counter for the network device port",
441-
"labels": {
442-
"interface": "fpga1"
443-
},
444-
"name": "network_ifaceout_bytes_total",
445-
"period": 15000,
446-
"source": {
447-
"protocol": "network_equipment"
448-
}
449-
},
450-
{
451-
"description": "Input packet counter for the network device port",
452-
"labels": {
453-
"interface": "fpga1"
454-
},
455-
"name": "network_ifacein_packets_total",
456-
"period": 15000,
457-
"source": {
458-
"protocol": "network_equipment"
459-
}
460-
},
461-
{
462-
"description": "Output packet counter for the network device port",
463-
"labels": {
464-
"interface": "fpga1"
465-
},
466-
"name": "network_ifaceout_packets_total",
467-
"period": 15000,
468-
"source": {
469-
"protocol": "network_equipment"
470-
}
471-
},
472-
{
473-
"description": "Input counter of discarded packets for the network device port",
474-
"labels": {
475-
"interface": "fpga1"
476-
},
477-
"name": "network_ifacein_packets_discard_total",
478-
"period": 15000,
479-
"source": {
480-
"protocol": "network_equipment"
481-
}
482-
},
483-
{
484-
"description": "Output counter of discarded packets for the network device port",
485-
"labels": {
486-
"interface": "fpga1"
487-
},
488-
"name": "network_ifaceout_packets_discard_total",
489-
"period": 15000,
490-
"source": {
491-
"protocol": "network_equipment"
492-
}
493-
},
494-
{
495-
"description": "Input counter of packet errors for the network device port",
496-
"labels": {
497-
"interface": "fpga1"
498-
},
499-
"name": "network_ifacein_packets_error_total",
500-
"period": 15000,
501-
"source": {
502-
"protocol": "network_equipment"
503-
}
504-
},
505-
{
506-
"description": "Output counter of packet errors for the network device port",
507-
"labels": {
508-
"interface": "fpga1"
509-
},
510-
"name": "network_ifaceout_packets_error_total",
511-
"period": 15000,
512-
"source": {
513-
"protocol": "network_equipment"
514-
}
515339
}
516340
],
517341
"model": "Dell PowerEdge R7525",

input/grid5000/sites/grenoble/clusters/servan/nodes/servan-1.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,11 @@ servan-1:
101101
pstate_driver: acpi-cpufreq
102102
pstate_governor: performance
103103
turboboost_enabled: true
104+
other_devices:
105+
fpga0:
106+
model: Alveo U200
107+
type: fpga
108+
vendor: Xilinx
104109
processor:
105110
cache_l1d: 32768
106111
cache_l1i: 32768

input/grid5000/sites/grenoble/clusters/servan/nodes/servan-2.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,11 @@ servan-2:
101101
pstate_driver: acpi-cpufreq
102102
pstate_governor: performance
103103
turboboost_enabled: true
104+
other_devices:
105+
fpga0:
106+
model: Alveo U200
107+
type: fpga
108+
vendor: Xilinx
104109
processor:
105110
cache_l1d: 32768
106111
cache_l1i: 32768

input/grid5000/sites/grenoble/clusters/servan/servan.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,25 @@ nodes:
4040
mountable: false
4141
mounted: false
4242
fpga0:
43-
interface: Ethernet
43+
interface: Ethernet-fpga
4444
enabled: true
4545
management: false
4646
mountable: true
4747
mounted: false
4848
kavlan: true
4949
rate: 100000000000
50+
sriov: false
51+
sriov_totalvfs: 0
5052
fpga1:
51-
interface: Ethernet
53+
interface: Ethernet-fpga
5254
management: false
5355
enabled: true
5456
mountable: true
5557
mounted: false
5658
kavlan: true
5759
rate: 100000000000
60+
sriov: false
61+
sriov_totalvfs: 0
5862
storage_devices:
5963
pci-0000:c3:00.0-nvme-1:
6064
interface: NVME

lib/refrepo/input_loader.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ def add_switch_port(h)
379379
hc['nodes'].each_pair do |node_uid, hn|
380380
next if hn['status'] == 'retired'
381381
hn['network_adapters'].each_pair do |iface_uid, iface|
382-
if (iface['mounted'] or iface['mountable']) and not iface['management'] and iface['interface'] == 'Ethernet'
382+
if (iface['mounted'] or iface['mountable']) and not iface['management'] and iface['interface'] =~ /(fpga|Ethernet)/
383383
switch, swport = net_switch_port_lookup(site, node_uid, iface_uid) || net_switch_port_lookup(site, node_uid)
384384
if used_ports[[switch, swport]]
385385
raise "Duplicate port assigned for #{node_uid} #{iface_uid}. Already assigned to #{used_ports[[switch, swport]]} Aborting."
@@ -421,7 +421,7 @@ def add_kavlan_ips(h)
421421
raise "Old kavlan data in input/ for #{node_uid}" if hn.has_key?('kavlan')
422422
node_id = node_uid.split('-')[1].to_i
423423
hn['kavlan'] = {}
424-
hn['network_adapters'].to_a.select { |i| i[1]['mountable'] and (i[1]['kavlan'] or not i[1].has_key?('kavlan')) and i[1]['interface'] == 'Ethernet' }.map { |e| e[0] }.each do |iface|
424+
hn['network_adapters'].to_a.select { |i| i[1]['mountable'] and (i[1]['kavlan'] or not i[1].has_key?('kavlan')) and i[1]['interface'] =~ /(Ethernet-fpga|Ethernet)/ }.map { |e| e[0] }.each do |iface|
425425
hn['kavlan'][iface] = {}
426426
vlan_base.each do |vlan, v|
427427
type = v['type']
@@ -454,7 +454,7 @@ def add_ipv4(h)
454454
node_id = node_uid.split('-')[1].to_i
455455
hn['network_adapters'].each_pair do |iface, v|
456456
# only allocate mountable ethernet interfaces
457-
next if not (v['mountable'] and v['interface'] == 'Ethernet')
457+
next if not (v['mountable'] and v['interface'] =~ /(Ethernet-fpga|Ethernet)/)
458458
k = [site_uid, cluster_uid, iface]
459459
if not iface_offsets.has_key?(k)
460460
raise "Missing IPv4 information for #{k}"
@@ -476,7 +476,7 @@ def add_ipv6(h)
476476
site_prefix = IPAddress hs['ipv6']['prefix']
477477
hs['clusters'].each_pair do |_cluster_uid, hc|
478478
hc['nodes'].each_pair do |node_uid, hn|
479-
ipv6_adapters = hn['network_adapters'].select { |_k,v| v['mountable'] and v['interface'] == 'Ethernet' }
479+
ipv6_adapters = hn['network_adapters'].select { |_k,v| v['mountable'] and v['interface'] =~ /(Ethernet-fpga|Ethernet)/ }
480480
if ipv6_adapters.length > 0
481481
if not ipv6_adapters.values[0]['mounted']
482482
raise "#{node_uid}: inconsistency: this code assumes first mountable ethernet adapter should be mounted: #{hn}"
@@ -542,7 +542,7 @@ def add_kavlan_ipv6s(h)
542542
hs['clusters'].each_pair do |_cluster_uid, hc|
543543
next if !hc['kavlan'] # skip clusters where kavlan is globally set to false (used for initial cluster installation)
544544
hc['nodes'].each_pair do |node_uid, hn|
545-
kvl_adapters = hn['network_adapters'].select { |_k,v| v['mountable'] and (v['kavlan'] or not v.has_key?('kavlan')) and v['interface'] == 'Ethernet' }
545+
kvl_adapters = hn['network_adapters'].select { |_k,v| v['mountable'] and (v['kavlan'] or not v.has_key?('kavlan')) and v['interface'] =~ /(Ethernet-fpga|Ethernet)/ }
546546
if kvl_adapters.length > 0
547547
if kvl_adapters.length != hn['kavlan'].length
548548
raise "#{node_uid}: inconsistency: num kvl_adapters = #{kvl_adapters.length}, num kavlan entries = #{hn['kavlan'].length}"

lib/refrepo/valid/input/schemas/schema-node.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ software:
111111
postinstall-version: string
112112
forced-deployment-timestamp: integer
113113
status: optional_string
114+
other_devices: optional
114115
storage_devices:
115116
<multi>:
116117
id: string

0 commit comments

Comments
 (0)