dns_hub: Add some debug as to what DNS proxying is happening
authorTim Beale <timbeale@catalyst.net.nz>
Wed, 20 Feb 2019 03:51:14 +0000 (16:51 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 6 Mar 2019 00:48:43 +0000 (00:48 +0000)
This should make it clear at run-time how dns_hub is actually proxying
DNS requests, which will hopefully aid in debugging problems (i.e.
forgetting to add a mapping when adding a new DNS realm).

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Mar  6 00:48:43 UTC 2019 on sn-devel-144

selftest/target/dns_hub.py

index f1a5eee2b54ce1d06361bd0b8a7f5ae2a69910fc..49fbeff7b9921dd0e98f7a62fa6fce7045459b24 100755 (executable)
@@ -174,6 +174,10 @@ def main():
     realm_mapping = dict(kv.split('=') for kv in sys.argv[3].split(','))
     server.realm_to_ip_mappings = realm_mapping
 
+    print("dns_hub will proxy DNS requests for the following realms:")
+    for realm, ip in server.realm_to_ip_mappings.items():
+        print("  {0} ==> {1}".format(realm, ip))
+
     t = server_thread(server)
     t.start()
     p = select.poll()