[
https://issues.apache.org/jira/browse/TS-597?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Zhao Yongming updated TS-597:
-----------------------------
Attachment: TS-597.patch
I have removed the codes in SplitDNS which take care of the default server, and
now, SplitDNS just work when a hostname match in rule, and leave other request
to default dns processor.
this patch also removed the default domain config, as it should not be used.
the change passed regression test on trunk.
here is the debug log after change:
[Dec 19 00:14:40.182] Server {47460652300048} DEBUG: (hostdb) probe 127.0.0.1
F9D5E018CA21DEE0 0 [ignore_timeout = 0]
[Dec 19 00:14:40.182] Server {47460652300048} DEBUG: (hostdb) delaying force 0
answer for 127.0.0.1 [timeout 0]
[Dec 19 00:14:40.200] Server {47460652300048} DEBUG: (hostdb) probe 127.0.0.1
F9D5E018CA21DEE0 0 [ignore_timeout = 0]
[Dec 19 00:14:40.202] Server {47460652300048} DEBUG: (hostdb) DNS 127.0.0.1
[Dec 19 00:14:40.202] Server {47460652300048} DEBUG: (hostdb_insert) inserting
in bucket 5096
[Dec 19 00:14:40.202] Server {47460652300048} DEBUG: (hostdb) inserting for:
127.0.0.1: (md5: F9D5E018CA21DEE0) now: 1292688880 timeout: 2097151 ttl: 2097151
[Dec 19 00:14:40.202] Server {47460652300048} DEBUG: (hostdb) done 127.0.0.1
TTL 2097151
[Dec 19 00:14:40.202] Server {47460652300048} DEBUG: (hostdb) probe (null)
AA30DE0F80A82135 0 [ignore_timeout = 0]
[Dec 19 00:14:40.202] Server {47460652300048} DEBUG: (hostdb) delaying force 0
answer for (null)
[Dec 19 00:14:40.202] Server {47460643867456} DEBUG: (hostdb) probe
AA30DE0F80A82135 0 [ignore_timeout = 0]
[Dec 19 00:14:40.202] Server {47460643867456} DEBUG: (hostdb) DNS IP 127.0.0.1
[Dec 19 00:14:40.202] Server {47460643867456} DEBUG: (dns) received query
type = 12, timeout = 0
[Dec 19 00:14:40.203] Server {47460643867456} DEBUG: (dns) enqueing query
1.0.0.127.in-addr.arpa
[Dec 19 00:14:40.203] Server {47460643867456} DEBUG: (dns) adding first to
collapsing queue
[Dec 19 00:14:40.203] Server {47460643867456} DEBUG: (dns) send query for
1.0.0.127.in-addr.arpa to fd 33
[Dec 19 00:14:40.203] Server {47460643867456} DEBUG: (dns) sent qname =
1.0.0.127.in-addr.arpa, id = 51576, nameserver = 0
[Dec 19 00:14:40.203] Server {47460643867456} DEBUG: (dns) sent_one:
failover_number for resolver 0 is 1
[Dec 19 00:14:40.241] Server {47460643867456} DEBUG: (dns) received packet size
= 63
[Dec 19 00:14:40.241] Server {47460643867456} DEBUG: (dns) primary DNS response
code = 0
[Dec 19 00:14:40.241] Server {47460643867456} DEBUG: (dns) received PTR name =
localhost
[Dec 19 00:14:40.241] Server {47460643867456} DEBUG: (dns) SUCCESS result for
1.0.0.127.in-addr.arpa = localhost retry 0
[Dec 19 00:14:40.241] Server {47460643867456} DEBUG: (dns) called back
continuation for 1.0.0.127.in-addr.arpa
[Dec 19 00:14:40.241] Server {47460643867456} DEBUG: (hostdb) probe
AA30DE0F80A82135 0 [ignore_timeout = 1]
[Dec 19 00:14:40.241] Server {47460643867456} DEBUG: (hostdb_insert) inserting
in bucket 1017
[Dec 19 00:14:40.241] Server {47460643867456} DEBUG: (hostdb) inserting for: :
(md5: AA30DE0F80A82135) now: 1292688880 timeout: 86400 ttl: 86400
[Dec 19 00:14:40.241] Server {47460643867456} DEBUG: (hostdb) done 'localhost'
TTL 86400
[Dec 19 00:14:40.241] Server {47460643867456} DEBUG: (hostdb) hostname =
localhost
[Dec 19 00:14:40.247] Server {47460643867456} DEBUG: (hostdb) probe 127.0.0.1
F9D5E018CA21DEE0 1 [ignore_timeout = 0]
[Dec 19 00:14:40.247] Server {47460643867456} DEBUG: (hostdb) immediate setby
for 127.0.0.1
[Dec 19 00:14:50.254] Server {47460654405392} DEBUG: (hostdb) probe 127.0.0.1
F9D5E018CA21DEE0 1 [ignore_timeout = 0]
[Dec 19 00:14:50.254] Server {47460654405392} DEBUG: (hostdb) immediate answer
for 127.0.0.1
[Dec 19 00:14:50.254] Server {47460654405392} DEBUG: (hostdb) probe (null)
AA30DE0F80A82135 1 [ignore_timeout = 0]
[Dec 19 00:14:50.254] Server {47460654405392} DEBUG: (hostdb) immediate answer
for <addr>
[Dec 19 00:14:50.254] Server {47460654405392} DEBUG: (hostdb) hostname =
localhost
[Dec 19 00:14:55.501] Server {47460643867456} DEBUG: (splitdns) Called
SplitDNS::getDNSRecord(mail.google.com)
[Dec 19 00:14:55.501] Server {47460643867456} DEBUG: (splitdns_config) Matched
with 0xf0f0b8 dns node from line 3
[Dec 19 00:14:55.501] Server {47460643867456} DEBUG: (splitdns_config) Result
for mail.google.com was dns servers
[Dec 19 00:14:55.501] Server {47460643867456} DEBUG: (splitdns_config)
8.8.8.8:53
[Dec 19 00:14:55.501] Server {47460643867456} DEBUG: (hostdb) probe
mail.google.com 97B997D123D4D729 0 [ignore_timeout = 0]
[Dec 19 00:14:55.501] Server {47460643867456} DEBUG: (hostdb) delaying force 0
answer for mail.google.com
[Dec 19 00:14:55.501] Server {47460643867456} DEBUG: (hostdb) probe
mail.google.com 97B997D123D4D729 0 [ignore_timeout = 0]
[Dec 19 00:14:55.501] Server {47460643867456} DEBUG: (hostdb) DNS
mail.google.com
[Dec 19 00:14:55.501] Server {47460643867456} DEBUG: (dns) received query
mail.google.com type = 1, timeout = 0
[Dec 19 00:14:55.501] Server {47460643867456} DEBUG: (dns) enqueing query
mail.google.com
[Dec 19 00:14:55.501] Server {47460643867456} DEBUG: (dns) adding first to
collapsing queue
[Dec 19 00:14:55.501] Server {47460643867456} DEBUG: (dns) send query for
mail.google.com to fd 32
[Dec 19 00:14:55.501] Server {47460643867456} DEBUG: (dns) sent qname =
mail.google.com, id = 32942, nameserver = 0
[Dec 19 00:14:55.501] Server {47460643867456} DEBUG: (dns) sent_one:
failover_number for resolver 0 is 1
[Dec 19 00:14:55.570] Server {47460643867456} DEBUG: (dns) received packet size
= 124
[Dec 19 00:14:55.570] Server {47460643867456} DEBUG: (dns) primary DNS response
code = 0
[Dec 19 00:14:55.570] Server {47460643867456} DEBUG: (dns) received cname =
googlemail.l.google.com
[Dec 19 00:14:55.570] Server {47460643867456} DEBUG: (dns) received A name =
googlemail.l.google.com
[Dec 19 00:14:55.570] Server {47460643867456} DEBUG: (dns) SUCCESS result for
mail.google.com = 74.125.153.17 retry 0
[Dec 19 00:14:55.570] Server {47460643867456} DEBUG: (dns) called back
continuation for mail.google.com
[Dec 19 00:14:55.570] Server {47460643867456} DEBUG: (hostdb) probe
mail.google.com 97B997D123D4D729 0 [ignore_timeout = 1]
[Dec 19 00:14:55.570] Server {47460643867456} DEBUG: (hostdb_insert) inserting
in bucket 9
[Dec 19 00:14:55.570] Server {47460643867456} DEBUG: (hostdb) inserting for:
mail.google.com: (md5: 97B997D123D4D729) now: 1292688895 timeout: 300 ttl: 300
[Dec 19 00:14:55.570] Server {47460643867456} DEBUG: (hostdb) done
74.125.153.17 TTL 300
[Dec 19 00:14:55.570] Server {47460643867456} DEBUG: (hostdb) allocating 16600
bytes for 4 RR at 2B2A4CE3B018 -1
[Dec 19 00:14:55.570] Server {47460643867456} DEBUG: (hostdb) RR of 4 with 4
good, 1st IP = 11997D4A
[Dec 19 00:15:00.255] Server {47460652300048} DEBUG: (hostdb) probe 127.0.0.1
F9D5E018CA21DEE0 1 [ignore_timeout = 0]
[Dec 19 00:15:00.255] Server {47460652300048} DEBUG: (hostdb) immediate answer
for 127.0.0.1
[Dec 19 00:15:00.255] Server {47460652300048} DEBUG: (hostdb) probe (null)
AA30DE0F80A82135 1 [ignore_timeout = 0]
[Dec 19 00:15:00.255] Server {47460652300048} DEBUG: (hostdb) immediate answer
for <addr>
[Dec 19 00:15:00.255] Server {47460652300048} DEBUG: (hostdb) hostname =
localhost
[Dec 19 00:15:08.990] Server {47460653352720} DEBUG: (splitdns) Called
SplitDNS::getDNSRecord(www.sina.com.cn)
[Dec 19 00:15:08.990] Server {47460653352720} DEBUG: (splitdns) Fail to match a
valid splitdns rule, fallback to default dns resolver
[Dec 19 00:15:08.990] Server {47460653352720} DEBUG: (hostdb) probe
www.sina.com.cn 20A349D0968731F6 0 [ignore_timeout = 0]
[Dec 19 00:15:08.990] Server {47460653352720} DEBUG: (hostdb) delaying force 0
answer for www.sina.com.cn
[Dec 19 00:15:08.990] Server {47460643867456} DEBUG: (hostdb) probe
www.sina.com.cn 20A349D0968731F6 0 [ignore_timeout = 0]
[Dec 19 00:15:08.990] Server {47460643867456} DEBUG: (hostdb) DNS
www.sina.com.cn
[Dec 19 00:15:08.990] Server {47460643867456} DEBUG: (dns) received query
www.sina.com.cn type = 1, timeout = 0
[Dec 19 00:15:08.990] Server {47460643867456} DEBUG: (dns) enqueing query
www.sina.com.cn
[Dec 19 00:15:08.990] Server {47460643867456} DEBUG: (dns) adding first to
collapsing queue
[Dec 19 00:15:08.990] Server {47460643867456} DEBUG: (dns) send query for
www.sina.com.cn to fd 33
[Dec 19 00:15:08.990] Server {47460643867456} DEBUG: (dns) sent qname =
www.sina.com.cn, id = 19439, nameserver = 0
[Dec 19 00:15:08.990] Server {47460643867456} DEBUG: (dns) sent_one:
failover_number for resolver 0 is 1
[Dec 19 00:15:09.030] Server {47460643867456} DEBUG: (dns) received packet size
= 331
[Dec 19 00:15:09.030] Server {47460643867456} DEBUG: (dns) primary DNS response
code = 0
[Dec 19 00:15:09.030] Server {47460643867456} DEBUG: (dns) received cname =
jupiter.sina.com.cn
[Dec 19 00:15:09.030] Server {47460643867456} DEBUG: (dns) received cname =
libra.sina.com.cn
[Dec 19 00:15:09.030] Server {47460643867456} DEBUG: (dns) received A name =
libra.sina.com.cn
[Dec 19 00:15:09.030] Server {47460643867456} DEBUG: (dns) received A =
202.108.33.96
[Dec 19 00:15:09.030] Server {47460643867456} DEBUG: (dns) received A =
202.108.33.97
[Dec 19 00:15:09.030] Server {47460643867456} DEBUG: (dns) received A =
202.108.33.98
[Dec 19 00:15:09.030] Server {47460643867456} DEBUG: (dns) received A =
202.108.33.99
[Dec 19 00:15:09.030] Server {47460643867456} DEBUG: (dns) received A =
202.108.33.70
[Dec 19 00:15:09.030] Server {47460643867456} DEBUG: (dns) received A =
202.108.33.85
[Dec 19 00:15:09.030] Server {47460643867456} DEBUG: (dns) received A =
202.108.33.86
[Dec 19 00:15:09.030] Server {47460643867456} DEBUG: (dns) received A =
202.108.33.87
[Dec 19 00:15:09.030] Server {47460643867456} DEBUG: (dns) received A =
202.108.33.88
[Dec 19 00:15:09.030] Server {47460643867456} DEBUG: (dns) received A =
202.108.33.89
[Dec 19 00:15:09.030] Server {47460643867456} DEBUG: (dns) received A =
202.108.33.90
[Dec 19 00:15:09.030] Server {47460643867456} DEBUG: (dns) received A =
202.108.33.91
[Dec 19 00:15:09.030] Server {47460643867456} DEBUG: (dns) received A =
202.108.33.92
[Dec 19 00:15:09.030] Server {47460643867456} DEBUG: (dns) received A =
202.108.33.93
[Dec 19 00:15:09.030] Server {47460643867456} DEBUG: (dns) received A =
202.108.33.94
[Dec 19 00:15:09.030] Server {47460643867456} DEBUG: (dns) received A =
202.108.33.95
[Dec 19 00:15:09.030] Server {47460643867456} DEBUG: (dns) SUCCESS result for
www.sina.com.cn = 202.108.33.96 retry 0
[Dec 19 00:15:09.030] Server {47460643867456} DEBUG: (dns) called back
continuation for www.sina.com.cn
[Dec 19 00:15:09.030] Server {47460643867456} DEBUG: (hostdb) probe
www.sina.com.cn 20A349D0968731F6 0 [ignore_timeout = 1]
[Dec 19 00:15:09.030] Server {47460643867456} DEBUG: (hostdb_insert) inserting
in bucket 4896
[Dec 19 00:15:09.030] Server {47460643867456} DEBUG: (hostdb) inserting for:
www.sina.com.cn: (md5: 20A349D0968731F6) now: 1292688908 timeout: 15 ttl: 15
[Dec 19 00:15:09.030] Server {47460643867456} DEBUG: (hostdb) done
202.108.33.96 TTL 15
[Dec 19 00:15:09.030] Server {47460643867456} DEBUG: (hostdb) allocating 17176
bytes for 16 RR at 2B2A4CE3F0F0 -1
[Dec 19 00:15:09.030] Server {47460643867456} DEBUG: (hostdb) RR of 16 with 16
good, 1st IP = 60216CCA
[Dec 19 00:15:10.257] Server {47460654405392} DEBUG: (hostdb) probe 127.0.0.1
F9D5E018CA21DEE0 1 [ignore_timeout = 0]
[Dec 19 00:15:10.257] Server {47460654405392} DEBUG: (hostdb) immediate answer
for 127.0.0.1
[Dec 19 00:15:10.257] Server {47460654405392} DEBUG: (hostdb) probe (null)
AA30DE0F80A82135 1 [ignore_timeout = 0]
[Dec 19 00:15:10.257] Server {47460654405392} DEBUG: (hostdb) immediate answer
for <addr>
[Dec 19 00:15:10.257] Server {47460654405392} DEBUG: (hostdb) hostname =
localhost
> when using SplitDNS, the common dns setting is not honored
> ----------------------------------------------------------
>
> Key: TS-597
> URL: https://issues.apache.org/jira/browse/TS-597
> Project: Traffic Server
> Issue Type: Sub-task
> Components: DNS
> Affects Versions: 2.1.4
> Reporter: Zhao Yongming
> Attachments: TS-597.patch
>
>
> When using the trunk codes, and setup a splitdns.config without wild cast
> rule:
> dest_domain=yahoo.com named="68.180.131.16"
> dest_domain=inktomi.com named="68.180.131.16"
> dest_domain=google.com named="8.8.8.8"
> and records:
> CONFIG proxy.config.http.no_dns_just_forward_to_parent INT 0
> CONFIG proxy.config.dns.search_default_domains INT 1
> CONFIG proxy.config.dns.splitDNS.enabled INT 1
> CONFIG proxy.config.dns.max_dns_in_flight INT 2048
> CONFIG proxy.config.dns.url_expansions STRING NULL
> CONFIG proxy.config.dns.round_robin_nameservers INT 0
> CONFIG proxy.config.dns.nameservers STRING 202.106.0.20
> CONFIG proxy.config.dns.resolv_conf STRING NULL
> CONFIG proxy.config.dns.validate_query_name INT 0
> CONFIG proxy.config.diags.debug.tags STRING split.*|dns.*|hostdb.*
> splitdns will just make the default dns server as 127.0.0.1 regards of the
> setting from /etc/resolv.conf etc
> [Dec 17 21:11:10.792] Server {47027459007840} DEBUG: (dns)
> DNSHandler::startEvent_sdns: on thread 0
> [Dec 17 21:11:10.792] Server {47027459007840} DEBUG: (dns) open_con: opening
> connection 68.180.131.16:53
> [Dec 17 21:11:10.793] Server {47027459007840} DEBUG: (dns) random port = 51000
> [Dec 17 21:11:10.793] Server {47027459007840} DEBUG: (dns) opening connection
> 68.180.131.16:53 SUCCEEDED for 0
> [Dec 17 21:11:10.793] Server {47027459007840} DEBUG: (dns)
> DNSHandler::startEvent_sdns: on thread 0
> [Dec 17 21:11:10.793] Server {47027459007840} DEBUG: (dns) open_con: opening
> connection 68.180.131.16:53
> [Dec 17 21:11:10.793] Server {47027459007840} DEBUG: (dns) random port = 41996
> [Dec 17 21:11:10.793] Server {47027459007840} DEBUG: (dns) opening connection
> 68.180.131.16:53 SUCCEEDED for 0
> [Dec 17 21:11:10.793] Server {47027459007840} DEBUG: (dns)
> DNSHandler::startEvent_sdns: on thread 0
> [Dec 17 21:11:10.793] Server {47027459007840} DEBUG: (dns) open_con: opening
> connection 8.8.8.8:53
> [Dec 17 21:11:10.793] Server {47027459007840} DEBUG: (dns) random port = 26464
> [Dec 17 21:11:10.793] Server {47027459007840} DEBUG: (dns) opening connection
> 8.8.8.8:53 SUCCEEDED for 0
> [Dec 17 21:11:10.793] Server {47027459007840} DEBUG: (dns)
> DNSHandler::startEvent_sdns: on thread 0
> [Dec 17 21:11:10.793] Server {47027459007840} WARNING: bad
> '/etc/resolv.conf': no nameservers given
> [Dec 17 21:11:10.793] Server {47027459007840} DEBUG: (dns) open_con: opening
> connection 127.0.0.1:0
> [Dec 17 21:11:10.793] Server {47027459007840} DEBUG: (dns) random port = 50728
> [Dec 17 21:11:10.793] Server {47027459007840} DEBUG: (dns) opening connection
> 127.0.0.1:0 SUCCEEDED for 0
> [Dec 17 21:11:10.793] Server {47027459007840} DEBUG: (dns)
> DNSHandler::startEvent: on thread 0
> [Dec 17 21:11:10.793] Server {47027459007840} WARNING: bad configurations: no
> nameservers given
> [Dec 17 21:11:10.793] Server {47027459007840} DEBUG: (dns) open_con: opening
> connection 127.0.0.1:0
> [Dec 17 21:11:10.793] Server {47027459007840} DEBUG: (dns) random port = 55442
> [Dec 17 21:11:10.793] Server {47027459007840} DEBUG: (dns) opening connection
> 127.0.0.1:0 SUCCEEDED for 0
> [Dec 17 21:11:11.220] Server {47027467839248} NOTE: cache enabled
> that is confusing, should be fixed.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.