Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mailinabox
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
mailinabox
Commits
99d0afd6
Commit
99d0afd6
authored
Dec 07, 2016
by
Joshua Tauberer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
secondary nameserver check fails if domain has custom DNS (round-robin) multiple A records
fixes #834
parent
cd717ec9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
dns_update.py
management/dns_update.py
+2
-2
status_checks.py
management/status_checks.py
+2
-2
No files found.
management/dns_update.py
View file @
99d0afd6
...
...
@@ -881,10 +881,10 @@ def set_secondary_dns(hostnames, env):
return
do_dns_update
(
env
)
def
get_custom_dns_record
(
custom_dns
,
qname
,
rtype
):
def
get_custom_dns_record
s
(
custom_dns
,
qname
,
rtype
):
for
qname1
,
rtype1
,
value
in
custom_dns
:
if
qname1
==
qname
and
rtype1
==
rtype
:
return
value
yield
value
return
None
########################################################################
...
...
management/status_checks.py
View file @
99d0afd6
...
...
@@ -11,7 +11,7 @@ import dateutil.parser, dateutil.tz
import
idna
import
psutil
from
dns_update
import
get_dns_zones
,
build_tlsa_record
,
get_custom_dns_config
,
get_secondary_dns
,
get_custom_dns_record
from
dns_update
import
get_dns_zones
,
build_tlsa_record
,
get_custom_dns_config
,
get_secondary_dns
,
get_custom_dns_record
s
from
web_update
import
get_web_domains
,
get_domains_with_a_records
from
ssl_certificates
import
get_ssl_certificates
,
get_domain_ssl_files
,
check_certificate
from
mailconfig
import
get_mail_domains
,
get_mail_aliases
...
...
@@ -459,7 +459,7 @@ def check_dns_zone(domain, env, output, dns_zonefiles):
# half working.)
custom_dns_records
=
list
(
get_custom_dns_config
(
env
))
# generator => list so we can reuse it
correct_ip
=
get_custom_dns_record
(
custom_dns_records
,
domain
,
"A"
)
or
env
[
'PUBLIC_IP'
]
correct_ip
=
"; "
.
join
(
sorted
(
get_custom_dns_records
(
custom_dns_records
,
domain
,
"A"
))
)
or
env
[
'PUBLIC_IP'
]
custom_secondary_ns
=
get_secondary_dns
(
custom_dns_records
,
mode
=
"NS"
)
secondary_ns
=
custom_secondary_ns
or
[
"ns2."
+
env
[
'PRIMARY_HOSTNAME'
]]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment