Git Product home page Git Product logo

icvpn-scripts's People

Contributors

blackyfff avatar bwildenhain avatar fsteinel avatar jplitza avatar kerel-fs avatar kpcyrd avatar mweinelt avatar nurtic-vibe avatar ohrensessel avatar ranlvor avatar skorpy2009 avatar thomasdotwtf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

icvpn-scripts's Issues

minimal documentation

A little bit of documentation would be nice so newcomers can understand what the purpose of this repository is and have a chance to contribute. The documentation should contain a general section, a howto section and a section that encourages people to participate in the development.

mkbgp: Sporadic exceptions

Since merging #40, I seldom (once a week maybe? The script runs hourly) get tracebacks like the following from one of the five servers that run it (although different ones every time):

Exception in thread Thread-67 (most likely raised during interpreter shutdown):
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
  File "/usr/lib/python2.7/threading.py", line 763, in run
  File "/usr/lib/python2.7/multiprocessing/pool.py", line 102, in worker
  File "/usr/lib/python2.7/Queue.py", line 179, in get
  File "/usr/lib/python2.7/threading.py", line 384, in notifyException in thread Thread-95 (most likely raised during interpreter shutdown):

<type 'exceptions.TypeError'>: 'NoneType' object is not callable
Exception in thread Thread-24 (most likely raised during interpreter shutdown):
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
  File "/usr/lib/python2.7/threading.py", line 763, in run
  File "/usr/lib/python2.7/multiprocessing/pool.py", line 102, in worker
  File "/usr/lib/python2.7/Queue.py", line 179, in get
  File "/usr/lib/python2.7/threading.py", line 384, in notify
<type 'exceptions.TypeError'>: 'NoneType' object is not callable
Exception in thread Thread-74 (most likely raised during interpreter shutdown):
Traceback (most recent call last):Traceback (most recent call last):

  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
  File "/usr/lib/python2.7/threading.py", line 763, in run
  File "/usr/lib/python2.7/multiprocessing/pool.py", line 102, in worker
  File "/usr/lib/python2.7/Queue.py", line 179, in get
  File "/usr/lib/python2.7/threading.py", line 384, in notify
<type 'exceptions.TypeError'>: 'NoneType' object is not callable

  File "/usr/lib/python2.7/threading.py", line 763, in run
  File "/usr/lib/python2.7/multiprocessing/pool.py", line 102, in worker
  File "/usr/lib/python2.7/Queue.py", line 179, in get
  File "/usr/lib/python2.7/threading.py", line 384, in notify
<type 'exceptions.TypeError'>: 'NoneType' object is not callable

Any idea what causes them?

ideas for additional checks

  • check whether icvpn IPs are within transfer net
  • check whether BGP ipv4 and ipv6 "match"
  • check whether community range lies outside of transfer net

größere default_max_prefixlen in mkroa

Derzeit ist default_max_prefixlen in mkroa 0; sowohl für IPv4, als auch für IPv6. Vermutlich setzen viele communities, die mkroa überhaupt nutzen, das tool mit default-Einstellungen ein.

Es ist im ICVPN gängige Praxis (gerade für v6, aber auch für v4), das gesamte zugewiesene Netz im icvpn-meta anzugeben. Bei v4 ist das gewöhnlich /16, bei v6 oft /48. Auf der anderen Seite nutzen viele communities (vorerst) aber nur eines, oder einige Subnetze davon (z.B. /18, bzw. /64). Nur die genutzten Subnetze werden per BGP announce-t.
Diese Praxis ist IMHO auch nicht zu beanstanden. Sie erlaubt viel Flexibilität ohne ständige Änderungen im icvpn-meta. In meinen Augen ist die Nutzung genau so gedacht.

Wird mkroa mit default-Einstellungen betrieben, so werden alle diese beschriebenen Subnetze im BGP abgelehnt und nicht ins routing genommen.

Deshalb Vorschlag: der default-Wert für max_prefixlen in mkroa sollte IP-versionsabhängig /20 bzw. /64 betragen.

fix coding style

pep8 is quite unhappy with the current coding style:

(env)➜ icvpn-scripts git:(master) Ⓐ pep8 mkbgp mkdns mksmokeping 
mkbgp:11:1: E302 expected 2 blank lines, found 1
mkbgp:14:7: E111 indentation is not a multiple of four
mkbgp:20:1: E302 expected 2 blank lines, found 1
mkbgp:33:1: E302 expected 2 blank lines, found 1
mkbgp:33:80: E501 line too long (89 > 79 characters)
mkbgp:54:20: E713 test for membership should be 'not in'
mkbgp:59:24: E713 test for membership should be 'not in'
mkbgp:65:29: E128 continuation line under-indented for visual indent
mkbgp:77:9: E128 continuation line under-indented for visual indent
mkbgp:77:80: E501 line too long (128 > 79 characters)
mkbgp:78:9: E128 continuation line under-indented for visual indent
mkbgp:81:9: E128 continuation line under-indented for visual indent
mkbgp:83:9: E128 continuation line under-indented for visual indent
mkbgp:85:9: E128 continuation line under-indented for visual indent
mkbgp:86:9: E128 continuation line under-indented for visual indent
mkbgp:88:9: E128 continuation line under-indented for visual indent
mkbgp:88:80: E501 line too long (86 > 79 characters)
mkbgp:89:9: E128 continuation line under-indented for visual indent
mkbgp:91:9: E128 continuation line under-indented for visual indent
mkbgp:92:9: E128 continuation line under-indented for visual indent
mkbgp:94:9: E128 continuation line under-indented for visual indent
mkbgp:95:9: E128 continuation line under-indented for visual indent
mkbgp:97:9: E128 continuation line under-indented for visual indent
mkbgp:97:80: E501 line too long (100 > 79 characters)
mkbgp:98:9: E128 continuation line under-indented for visual indent
mkbgp:104:13: E128 continuation line under-indented for visual indent
mkbgp:105:13: E128 continuation line under-indented for visual indent
mkdns:10:1: E302 expected 2 blank lines, found 1
mkdns:17:1: E302 expected 2 blank lines, found 1
mkdns:28:1: E302 expected 2 blank lines, found 1
mkdns:40:1: E302 expected 2 blank lines, found 1
mkdns:61:80: E501 line too long (91 > 79 characters)
mkdns:93:9: E128 continuation line under-indented for visual indent
mkdns:93:80: E501 line too long (128 > 79 characters)
mkdns:94:9: E128 continuation line under-indented for visual indent
mkdns:97:9: E128 continuation line under-indented for visual indent
mkdns:98:9: E128 continuation line under-indented for visual indent
mkdns:100:9: E128 continuation line under-indented for visual indent
mkdns:101:9: E128 continuation line under-indented for visual indent
mkdns:103:9: E128 continuation line under-indented for visual indent
mkdns:103:80: E501 line too long (94 > 79 characters)
mkdns:104:9: E128 continuation line under-indented for visual indent
mkdns:108:80: E501 line too long (130 > 79 characters)
mksmokeping:11:1: E302 expected 2 blank lines, found 1
mksmokeping:14:7: E111 indentation is not a multiple of four
mksmokeping:22:34: E231 missing whitespace after ':'
mksmokeping:22:46: E231 missing whitespace after ':'
mksmokeping:25:7: E111 indentation is not a multiple of four
mksmokeping:53:20: E713 test for membership should be 'not in'
mksmokeping:60:62: E231 missing whitespace after ','
mksmokeping:74:9: E128 continuation line under-indented for visual indent
mksmokeping:74:80: E501 line too long (130 > 79 characters)
mksmokeping:75:9: E128 continuation line under-indented for visual indent
mksmokeping:78:9: E128 continuation line under-indented for visual indent
mksmokeping:79:9: E128 continuation line under-indented for visual indent
mksmokeping:81:9: E128 continuation line under-indented for visual indent
mksmokeping:81:80: E501 line too long (86 > 79 characters)
mksmokeping:82:9: E128 continuation line under-indented for visual indent
mksmokeping:86:52: E231 missing whitespace after ','

I suggest we stick with the recommendations from pep8 and use pep8 to lint our code? If nobody disagrees in the next weeks I will clean up the coding style.

add a license

We should add a licence (file) to this repository.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.