freifunk / icvpn-scripts Goto Github PK
View Code? Open in Web Editor NEWScripts for working with icvpn-meta
License: Other
Scripts for working with icvpn-meta
License: Other
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.
We should add a licence (file) to this repository.
.../icvpn-scripts/filereader.py:24: YAMLLoadWarning:
calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe.
Please read msg.pyyaml.org/load for full details.
data = yaml.load(f)
(I'd assign this to myself if I could, will do it.)
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.
The check script does not work with python 2.7, with python 3 it works perfect. Can you add a hint to use python3 or add compatibility for 2.7 ?
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.
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?
test against
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.