summaryrefslogtreecommitdiff
path: root/source4/selftest/tests.py
diff options
context:
space:
mode:
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>2017-08-10 11:57:24 +1200
committerKarolin Seeger <kseeger@samba.org>2018-01-13 17:37:07 +0100
commitc6294c3c7b6c97f15daad7d463bda267726245c7 (patch)
tree06ab08dda8ab2ee28a8ea78f74d92180d8442f0a /source4/selftest/tests.py
parentba2306f00d32d2fc55685b388e03e28fd7d97fd7 (diff)
downloadsamba-c6294c3c7b6c97f15daad7d463bda267726245c7.tar.gz
samba-tool visualize for understanding AD DC behaviour
To work out what is happening in a replication graph, it is sometimes helpful to use visualisations. We introduce a samba-tool subcommand to write Graphviz dot output and generate text-based heatmaps of the distance in hops between DCs. There are two subcommands, two graphical modes, and (roughly) two modes of operation with respect to the location of authority. `samba-tool visualize ntdsconn` looks at NTDS Connections. `samba-tool visualize reps` looks at repsTo and repsFrom objects. In '--distance' mode (default), the distances between DCs are shown in a matrix in the terminal. With '--color=yes', this is depicted as a heatmap. With '--utf8' it is a lttle prettier. In '--dot' mode, Graphviz dot output is generated. When viewed using dot or xdot, this shows the network as a graph with DCs as vertices and connections edges. Certain types of degenerate edges are shown in different colours or line-styles. Normally samba-tool talks to one database; with the '-r' (a.k.a. '--talk-to-remote') option attempts are made to contact all the DCs known to the first database. This is necessary to get sensible results from `samba-tool visualize reps` because the repsFrom/To objects are not replicated, and it can reveal replication issues in other modes. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/selftest/tests.py')
-rwxr-xr-xsource4/selftest/tests.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/selftest/tests.py b/source4/selftest/tests.py
index 73bdce61873..f5ff906a4bc 100755
--- a/source4/selftest/tests.py
+++ b/source4/selftest/tests.py
@@ -584,6 +584,9 @@ planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.dcerpc.srvsvc")
planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.samba_tool.timecmd")
planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.samba_tool.join")
+planpythontestsuite("none", "samba.tests.samba_tool.visualize")
+
+
# test fsmo show
for env in ["ad_dc_ntvfs", "fl2000dc", "fl2003dc", "fl2008r2dc"]:
planpythontestsuite(env + ":local", "samba.tests.samba_tool.fsmo")
@@ -936,7 +939,7 @@ for env in ["ad_dc_ntvfs", "s4member", "rodc", "promoted_dc", "ad_dc", "ad_membe
#
# KDC Tests
#
-
+
# This test is for users cached at the RODC
plansmbtorture4testsuite('krb5.kdc', "rodc", ['ncacn_np:$SERVER_IP', "-k", "yes", '-Utestdenied%$PASSWORD',
'--workgroup=$DOMAIN', '--realm=$REALM',
@@ -984,6 +987,7 @@ for env in [
},
extra_path=[os.path.join(srcdir(), "samba/python"), ]
)
+ planpythontestsuite(env, "samba.tests.samba_tool.visualize_drs")
for env in [ "simpleserver", "fileserver", "nt4_dc", "ad_dc", "ad_dc_ntvfs", "ad_member"]:
planoldpythontestsuite(env, "netlogonsvc",