Changeset 13680 in genesis


Ignore:
Timestamp:
Jan 4, 2017, 9:41:53 PM (6 years ago)
Author:
rick
Message:

Control gateway routing using 'flagged' IP.

The use of specialized serviceid IP addresses for use in determining the
presence of a default gateway will allow us, to remove the IP if the gateway is
not functional, without affecting other functions of the node. The presence of
the unused entries allowes new gateways to be added without the need of
updating all configuration files.

Side-note: This is a workaround since default routing to pasted through
lvrouted using the '-g' parameter at gateways and leaving the '-z' parameter
empty other nodes. How-ever this setup is causing defaultgw 'loops' in the
network, yet need to be tested some more.

Files:
18 edited

Legend:

Unmodified
Added
Removed
  • nodes/DeClercq/wleiden.yaml

    r13210 r13680  
    55comment   : "None"
    66gateway   : "213.125.162.249"
     7serviceid : "172.31.254.1"
    78latitude  : "52.15060"
    89location  : "kantoor De Clercq, Hoge Rijndijk 306, 2314 AM, Leiden"
  • nodes/DimIns/wleiden.yaml

    r13651 r13680  
    55comment   : "None"
    66gateway   : "192.168.1.1"
     7serviceid : "172.31.254.2"
    78ileiden   : False
    89latitude  : "52.1592"
  • nodes/Henk/wleiden.yaml

    r13548 r13680  
    55comment   : "None"
    66gateway   : "192.168.0.225"
     7serviceid : "172.31.254.3"
    78latitude  : "52.17062"
    89location  : "Henk, Boddens Hosangweg 24 A, 2481 KZ, Woubrugge"
  • nodes/Herman/wleiden.yaml

    r13593 r13680  
    55comment   : "None"
    66gateway   : "192.168.1.1"
     7serviceid : "172.31.254.4"
    78ileiden   : False
    89latitude  : "52.25868"
  • nodes/JorisdeWitte/wleiden.yaml

    r13596 r13680  
    55comment   : "None"
    66gateway   : "213.124.17.161"
     7serviceid : "172.31.254.5"
    78latitude  : "52.1941"
    89location  : "Chr. Basisschool Joris de Witte, Jan Wolkerslaan 18, 2343BK, Oegstgeest"
  • nodes/Langevoort/wleiden.yaml

    r13469 r13680  
    55comment   : "None"
    66gateway   : "192.168.178.1"
     7serviceid : "172.31.254.6"
    78ileiden   : True
    89latitude  : "52.18620"
  • nodes/Leythenrode2/wleiden.yaml

    r13548 r13680  
    55comment   : " verbonden met 'vuil' internet van Zorggroep Rijnland lokaal ip en nameservers via dhcp LET OP: niet standaard configuratie ivm lokale ap's!"
    66gateway   : "192.168.200.1"
     7serviceid : "172.31.254.7"
    78latitude  : "52.15576"
    89location  : "Verpleeghuis Leythenrode, Hoogmadeseweg 55, 2351CP, Leiderdorp, werkkast begane grond"
  • nodes/Plantsoen/wleiden.yaml

    r13438 r13680  
    55comment   : "None"
    66gateway   : "192.168.178.1"
     7serviceid : "172.31.254.8"
    78latitude  : "52.15395"
    89location  : "CeTIM office, Plantsoen 97, 2311 KL, Leiden"
  • nodes/Rick/wleiden.yaml

    r13621 r13680  
    1010masterip  : "172.17.34.1"
    1111gateway   : "80.127.152.25"
     12serviceid : "172.31.254.9"
    1213monitoring_group: "wzoeterwoude"
    1314nodename  : "Rick"
  • nodes/Robijn/wleiden.yaml

    r13651 r13680  
    55externalif: "vr0"
    66gateway   : "192.168.178.1"
     7serviceid : "172.31.254.11"
    78latitude  : "52.15457"
    89location  : "Zorgcentrum Robijnhof, Robijnhof 1, 2332 KJ, Leiden"
  • nodes/Robijn2/wleiden.yaml

    r12871 r13680  
    55comment   : "None"
    66gateway   : "192.168.178.1"
     7serviceid : "172.31.254.10"
    78latitude  : "52.15457"
    89location  : "Zorgcentrum Robijnhof Recreatiezaal, Robijnhof 1, 2332 KJ, Leiden"
  • nodes/Rustdam2/wleiden.yaml

    r13646 r13680  
    55comment   : "None"
    66gateway   : "192.168.178.1"
     7serviceid : "172.31.254.12"
    78latitude  : "52.11082"
    89location  : "Kaasboerderij Rustdam, Zuidbuurtseweg 34, 2381 LG, Zoeterwoude "
  • nodes/StBavo1/wleiden.yaml

    r13579 r13680  
    55comment   : "None"
    66gateway   : "192.168.178.1"
     7serviceid : "172.31.254.13"
    78latitude  : "52.19183"
    89location  : "Sint Bavo Kerk, Leidse weg 6, 2374 AL, Oud-Ade"
  • nodes/StVictor/wleiden.yaml

    r13678 r13680  
    55comment   : "None"
    66gateway   : "192.168.178.1"
     7serviceid : "172.31.254.14"
    78latitude  : "52.25091"
    89location  : "Sint Victor kerk, St Victorlaan 11, 2211 RN, Noordwijkerhout"
  • nodes/TEYBestuurscentrum/wleiden.yaml

    r13548 r13680  
    55comment   : "None"
    66gateway   : "213.125.198.97"
     7serviceid : "172.31.254.17"
    78latitude  : "52.22313"
    89location  : "Bestuurscentrum, Raadhuisplein 1, 2215MA, Voorhout"
  • nodes/TestTienAlix3D/wleiden.yaml

    r13548 r13680  
    55comment   : "None"
    66gateway   : "192.168.3.1"
     7serviceid : "172.31.254.15"
    78latitude  : "52.17062"
    89location  : "Wouter thuis, Voorhout"
  • nodes/TestTienThuis/wleiden.yaml

    r13548 r13680  
    55comment   : "None"
    66gateway   : "192.168.3.254"
     7serviceid : "172.31.254.16"
    78latitude  : "52.17062"
    89location  : "Thuis, , 2311 EZ, Leiden"
  • tools/gformat.py

    r13676 r13680  
    5555
    5656from pprint import pprint
    57 from collections import defaultdict
     57from collections import defaultdict, OrderedDict
    5858from sys import stderr
    5959try:
     
    117117
    118118
    119 ileiden_proxies = []
     119ileiden_proxies = OrderedDict()
    120120normal_proxies = []
    121121datadump_cache = {}
     
    130130  interface_list_cache = {}
    131131  rc_conf_local_cache = {}
    132   ileiden_proxies = []
     132  ileiden_proxies = OrderedDict()
    133133  normal_proxies = []
    134134  nameservers_cache = []
     
    651651    addrs_list['lo0'].append((datadump['masterip'] + "/32", 'Master IP Not used in interface'))
    652652
     653  if 'serviceid' in datadump:
     654    addrs_list['lo0'].append((datadump['serviceid'] + "/32", 'Lvrouted GW IP'))
     655
    653656  for iface_key in get_interface_keys(datadump):
    654657    ifacedump = datadump[iface_key]
     
    739742  datadump['autogen_ileiden_enable'] = switchFormat(datadump['autogen_ileiden_enable'])
    740743
     744
     745  for i in range(1,50):
     746    ileiden_proxies['172.31.254.%i' % i] = {'nodename' : 'unused'}
     747
    741748  if not ileiden_proxies or not normal_proxies:
    742749    for host in get_hostlist():
     
    744751      if hostdump['status'] == 'up':
    745752        if hostdump['service_proxy_ileiden']:
    746           ileiden_proxies.append(hostdump)
     753          ileiden_proxies[hostdump['serviceid']] = hostdump
    747754        if hostdump['service_proxy_normal']:
    748755          normal_proxies.append(hostdump)
     
    750757  datadump['autogen_ileiden_proxies'] = ileiden_proxies
    751758  datadump['autogen_normal_proxies'] = normal_proxies
    752   datadump['autogen_ileiden_proxies_ips'] = ','.join([x['masterip'] for x in ileiden_proxies])
    753   datadump['autogen_ileiden_proxies_names'] = ','.join([x['autogen_item'] for x in ileiden_proxies])
    754759  datadump['autogen_normal_proxies_ips'] = ','.join([x['masterip'] for x in normal_proxies])
    755760  datadump['autogen_normal_proxies_names'] = ','.join([x['autogen_item'] for x in normal_proxies])
     
    798803  #
    799804  list_ileiden_proxies="
    800   {% for item in autogen_ileiden_proxies -%}
    801     {{ "%-16s"|format(item.masterip) }} # {{ item.nodename }}
     805  {% for serviceid,item in autogen_ileiden_proxies.iteritems() -%}
     806    {{ "%-16s"|format(serviceid) }} # {{ item.nodename }}
    802807  {% endfor -%}
    803808  "
    804809  list_normal_proxies="
    805810  {% for item in autogen_normal_proxies -%}
    806     {{ "%-16s"|format(item.masterip) }} # {{ item.nodename }}
     811    {{ "%-16s"|format(item.serviceid) }} # {{ item.nodename }}
    807812  {% endfor -%}
    808813  "
     
    993998    for config in configs:
    994999      ip_list.append(config['masterip'])
     1000      if 'serviceid' in config:
     1001        ip_list.append(config['serviceid'])
    9951002      for iface_key in get_interface_keys(config, True):
    9961003        l = config[iface_key]['ip']
Note: See TracChangeset for help on using the changeset viewer.