Mentions légales du service

Skip to content
Snippets Groups Projects
Commit ce120899 authored by Nicolas Perrin's avatar Nicolas Perrin
Browse files

Merge branch 'fakeswitch' into 'master'

[Rake] Do not apply network_monitoring and kwollectg5k to fake equipments and skip some network validation

See merge request !491
parents d2e6dc67 9f4a9ea1
No related branches found
No related tags found
1 merge request!491[Rake] Do not apply network_monitoring and kwollectg5k to fake equipments and skip some network validation
Pipeline #839224 passed
...@@ -49,6 +49,9 @@ def generate_puppet_kwollectg5k(options) ...@@ -49,6 +49,9 @@ def generate_puppet_kwollectg5k(options)
# Metrics configuration for network device # Metrics configuration for network device
site['network_equipments'].each { |neteq_uid, neteq| site['network_equipments'].each { |neteq_uid, neteq|
# do not apply to fake equipment
next if neteq_uid.include? 'fake'
output = ERB.new(File.read(File.expand_path('templates/kwollect-network.erb', File.dirname(__FILE__))), trim_mode: '-').result(binding) output = ERB.new(File.read(File.expand_path('templates/kwollect-network.erb', File.dirname(__FILE__))), trim_mode: '-').result(binding)
output_file = Pathname("#{options[:output_dir]}//platforms/production/modules/generated/files/grid5000/kwollect/#{site_uid}/#{neteq_uid}.conf") output_file = Pathname("#{options[:output_dir]}//platforms/production/modules/generated/files/grid5000/kwollect/#{site_uid}/#{neteq_uid}.conf")
output_file.dirname.mkpath() output_file.dirname.mkpath()
......
...@@ -28,7 +28,10 @@ def generate_puppet_network_monitoring(options) ...@@ -28,7 +28,10 @@ def generate_puppet_network_monitoring(options)
fqdn_eq_name = "#{eq_name}.#{s}.grid5000.fr" fqdn_eq_name = "#{eq_name}.#{s}.grid5000.fr"
# do not apply to HPC switch
next if eq_v['kind'] == 'hpcswitch' next if eq_v['kind'] == 'hpcswitch'
# do not apply to fake equipment
next if eq_name.include? "fake"
snmp_hosts << fqdn_eq_name unless snmp_hosts << fqdn_eq_name unless
snmp_hosts.find { |i| i == fqdn_eq_name } snmp_hosts.find { |i| i == fqdn_eq_name }
......
...@@ -230,7 +230,7 @@ def check_network_description(options) ...@@ -230,7 +230,7 @@ def check_network_description(options)
# find netnodes without connection # find netnodes without connection
# for routers, it's OK, because they would be connected to other G5K routers # for routers, it's OK, because they would be connected to other G5K routers
netnodes.select { |n| n['found'] == 0 and not n['kind'] == 'router' }.each do |n| netnodes.select { |n| n['found'] == 0 and not n['kind'] == 'router' and not n['uid'].include? "fake" }.each do |n|
if n['interface'] == 'InfiniBand' or n['interface'] == 'Myrinet' or n['interface'] == 'Omni-Path' or hpc_switch?(n) if n['interface'] == 'InfiniBand' or n['interface'] == 'Myrinet' or n['interface'] == 'Omni-Path' or hpc_switch?(n)
puts "WARNING: we did not find a corresponding entry on a network equipment for this InfiniBand node: #{n}" puts "WARNING: we did not find a corresponding entry on a network equipment for this InfiniBand node: #{n}"
else else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment