Thomas Waldmann
50f8d72408
adjust timeout / retry timing
...
resolver timeout 5 -> 10s (so it has more chances to query both nameservers alternatingly)
unavailable retry 300 -> 120s (so in case of a temporary problem, the outage is shorter)
2015-01-26 22:18:01 +01:00
Thomas Waldmann
b562c0fd7e
add the option to prefer the primary nameserver in query_ns, use it for domain checker,
2015-01-26 22:04:06 +01:00
Thomas Waldmann
0c95fbacaf
catch EOFError exception, add note about readable exception messages PR, fixes #197
2015-01-26 18:07:43 +01:00
Thomas Waldmann
0d8f6cc82e
catch socket.error (e.g. "connection refused"), fixes #195
2015-01-09 21:46:30 +01:00
Thomas Waldmann
0db2e60263
fix resolving to not add the service server's domain, but just "."
2014-11-27 20:03:34 +01:00
Thomas Waldmann
6261b64b72
catch more query_ns exceptions. try update/delete even if query_ns failed.
...
it could be maybe the secondary DNS that failed for query_ns, so we can still try talking to the primary.
2014-11-27 10:47:34 +01:00
Thomas Waldmann
032dd502e6
fix misleading exception handler for query_ns
2014-11-25 22:04:34 +01:00
Thomas Waldmann
2377cdbd85
merged changes from rel0.10 branch
2014-11-17 21:51:00 +01:00
Thomas Waldmann
c432e24c0d
add a managment command "domains" to check the domains, notify owner of domain, update admin docs
...
if a nameserver is not reachable or does not answer queries for the domain, the domain is flagged as not available (and also as not public).
also added catching of PeerBadKey exception.
2014-11-16 23:05:35 +01:00
Thomas Waldmann
11f9e8b3bf
fix pep8
2014-11-15 22:49:59 +01:00
Thomas Waldmann
536a5f5d9d
add secondary nameserver, prefer it for queries, add migration, fixes #175
2014-11-15 22:42:13 +01:00
Thomas Waldmann
ae06bb4f73
avoid sending delete updates to the master server - first check if there is something to delete
2014-11-15 17:53:38 +01:00
Thomas Waldmann
5fe8f13015
rename some model attributes, add migration
...
Domain.domain to Domain.name
Host.subdomain to Host.name
BlacklistedDomain.domain to BlacklistedDomain.name_re
2014-09-21 22:31:26 +02:00
Thomas Waldmann
804eda920c
catch dns.tsig.PeerBadTime
2014-09-08 02:44:12 +02:00
Thomas Waldmann
cf2c46e612
use FQDN typed params in api, remove unused parse_name (which was problematic anyway)
2014-08-30 18:27:21 +02:00
Thomas Waldmann
f13d985f4a
add FQDN type to use instead of str to keep host and domain separate
2014-08-30 16:08:10 +02:00
Thomas Waldmann
480dbd358c
update_ns: catch UnknownTSIGKey exception
2014-07-14 21:48:10 +02:00
Thomas Waldmann
16416cb2af
catch NoNameservers exception and show error msg on UI
2014-05-29 17:27:11 +02:00
Thomas Waldmann
24aaa0ff6b
ns_query: as we query the authoritative master dns directly, we switch off RD (recursion desired), fixes #142
2014-01-26 15:34:25 +01:00
Thomas Waldmann
38b37b132f
dnstools: reviewed/improved docstrings
2013-12-15 18:44:33 +01:00
Thomas Waldmann
cf6629a0a8
add/fix more docstrings
2013-12-15 17:29:55 +01:00
Thomas Waldmann
e2e07b60e3
dnstools: make timeouts configurable via ENV, travis: use longer timeouts
2013-12-13 03:04:00 +01:00
Thomas Waldmann
6b9c7e9511
add reverse dns lookup results for viewer's current IPs to session, show on hosts overview view (see panel at lower right)
...
not showing it in home view's jumbotron due to potential cosmetic issues
2013-11-27 08:16:49 +01:00
Thomas Waldmann
0e8f318628
add reverse dns lookup code
2013-11-27 07:14:39 +01:00
Thomas Waldmann
dd09b6b5af
nameserver update key / secret terminology cleanup
...
key = secret + algorithm
2013-11-24 05:04:07 +01:00
Thomas Waldmann
f6fb8b67bd
try to not write into session unless there is really a change or a refresh needed, reduce code duplication
...
move code from HomeView to context processor
2013-11-14 02:11:44 +01:00
Thomas Waldmann
24b687960e
deal with "nameserver not available" and "peer bad signature" in same way as with dns update errors,
2013-11-10 07:04:46 +01:00
Thomas Waldmann
bd3e7c80f7
if a dns update give a rcode != NOERROR, we log it and raise a DnsUpdateError, dyndns2 result code: "dnserr REASON" (also shown on web ui)
2013-11-10 06:29:33 +01:00
Thomas Waldmann
57641f3b9a
allow single-host update secrets, make dnstools tests work for everybody
...
the nsupdate.info zone is configured to allow updating test.nsupdate.info with a non-secret key used for the tests.
we also have a test that tries to update another host with that key and checks that this fails.
change the tests so they only use test.nsupdate.info (if possible).
single-host update secrets need a Domain record for the fqdn of this single host, the fqdn is tried first, before it tries the origin zone.
2013-11-10 05:52:41 +01:00
Thomas Waldmann
32d9f38837
when adding host, deal with Timeout and NameServerNotAvailable exceptions
...
don't add the host, in case of dns exceptions
2013-11-01 22:26:06 +01:00
Thomas Waldmann
275f0821ca
catch PeerBadSignature exception, log error, set ns to unavailable
2013-11-01 07:40:42 +01:00
Thomas Waldmann
252a7e5d0b
fix some stuff the pycharm code checker found
...
it also thought the db param of init_db is not needed, but it is, added a comment there
2013-10-27 13:34:56 +01:00
Thomas Waldmann
f30d283792
use empty search list, make sure query fqdn is really a absolute fqdn
2013-10-27 08:40:54 +01:00
Thomas Waldmann
724f35225e
move test settings to test_settings.py, add FIXME for resolver search list
...
make SECRET_KEY obviously non-secret and non-random + document it should be secret/random
2013-10-27 07:20:43 +01:00
Thomas Waldmann
6bf1f57fc1
deal with not responding nameservers (offline or unreachable)
...
if a nameserver does not respond, we flag it in the database
(available = False) and stop talking to it for 5 minutes.
after 5 minutes, we flag it available = True again and retry talking to it
(and if not successful, flag it as unavailable again).
this avoids a unresponsive UI as we do a lot of ns queries from the templates
to get v4 and v6 addresses of our hosts from master nameservers.
we log a warning when setting unavailable and a info when setting available.
2013-10-27 05:14:47 +01:00
Thomas Waldmann
49693121ea
use zones/nameserver IPs/update keys from DB, logging (thanks to asmaps)
...
remove unneeded stuff from settings
(we still need some in conftest.py for the tests, though)
init DB for tests via conftest.py
more update algorithm choices
give origin zone (if we already know it) to dnstools functions
new views: DomainOverview, DeleteDomain
unify deletion templates using delete_object.html
add django-extensions
2013-10-18 15:30:17 -07:00
Thomas Waldmann
7176599245
dnstools: add/delete/update pass-through origin now
2013-10-08 15:39:45 +02:00
Thomas Waldmann
ee4ca24f95
dnstools: fixed docstring
2013-10-08 15:20:08 +02:00
Thomas Waldmann
2dfc9707ca
dnstools: update docstrings about ValueError exceptions
2013-10-03 20:47:25 +02:00
Thomas Waldmann
2982bd6e30
new check_ip() validates if a str is a ip addr and also determines address family, deduplicate code
2013-10-03 20:39:55 +02:00
Thomas Waldmann
1924888b37
reorder imports: stdlib, other libs, django, nsupdate stuff (views, etc.)
2013-10-03 19:26:39 +02:00
Thomas Waldmann
a2afc6a253
add missing param to docstring
2013-10-03 17:59:55 +02:00
Thomas Waldmann
71e937c0da
use search list with basedomain from settings
2013-09-30 01:58:38 +02:00
Thomas Waldmann
02099fe810
prepare using multipe nameservers / basedomains
...
currently lookup is from a dict with just the values from settings.
2013-09-30 00:52:23 +02:00
Thomas Waldmann
074233430c
dnstools: implement additional functions: add and delete, with tests.
2013-09-29 17:21:22 +02:00
Thomas Waldmann
726a5696bd
added docstring
2013-09-29 02:00:15 +02:00
Thomas Waldmann
ac4860f54a
pep8 fixes
2013-09-29 01:23:27 +02:00
Thomas Waldmann
d558e2ece2
store update_secret as salted sha1 (use crypto code from django), fix bug: we also need to catch NoAnswer, not just NXDOMAIN.
...
NoAnswer == there is a record, but not of the type (A or AAAA) we requested.
NXDOMAIN == there is no record at all.
2013-09-29 00:34:47 +02:00
Thomas Waldmann
a769b4d8ed
cleanup settings access
2013-09-28 22:04:52 +02:00
Thomas Waldmann
add5e6a379
implemented update api (still without checking the DB), misc. cleanups
2013-09-28 20:39:33 +02:00