From: Garming Sam Date: Wed, 20 Jul 2016 00:47:11 +0000 (+1200) Subject: dbcheck/release-4-1-0rc3: Add a check regarding replica locations X-Git-Tag: tdb-1.3.10~238 X-Git-Url: http://git.samba.org/samba.git/?a=commitdiff_plain;h=56771ec6d0b01590caa702708a56d1e68e0dc70a;p=kai%2Fsamba-autobuild%2F.git dbcheck/release-4-1-0rc3: Add a check regarding replica locations This DC has repsFrom for the DNS partitions, but not the corresponding link. This ensures that dbcheck has fixed them up. This will currently fail without the actual changes to dbcheck coming in the following commit. BUG: https://bugzilla.samba.org/show_bug.cgi?id=9200 Signed-off-by: Garming Sam Reviewed-by: Andrew Bartlett --- diff --git a/selftest/knownfail b/selftest/knownfail index 1a92a5d3198..ef98ecb959d 100644 --- a/selftest/knownfail +++ b/selftest/knownfail @@ -285,3 +285,4 @@ # fl2000dc doesn't support AES ^samba4.krb5.kdc.*as-req-aes.*fl2000dc +^samba4.blackbox.dbcheck.release-4-1-0rc3.check_expected_after_values diff --git a/source4/selftest/provisions/release-4-1-0rc3/expected-replica-locations-after-dbcheck.ldif b/source4/selftest/provisions/release-4-1-0rc3/expected-replica-locations-after-dbcheck.ldif new file mode 100644 index 00000000000..ec912909a75 --- /dev/null +++ b/source4/selftest/provisions/release-4-1-0rc3/expected-replica-locations-after-dbcheck.ldif @@ -0,0 +1,11 @@ +# record 1 +dn: CN=49a69498-9a85-48af-9be4-aa0b3e0054f9,CN=Partitions,CN=Configuration,DC=release-4-1-0rc3,DC=samba,DC=corp +msDS-NC-Replica-Locations: CN=NTDS Settings,CN=LOCALDC,CN=Servers,CN=Default-F + irst-Site-Name,CN=Sites,CN=Configuration,DC=release-4-1-0rc3,DC=samba,DC=corp +msDS-NC-Replica-Locations: CN=NTDS Settings,CN=PROMOTEDVDC,CN=Servers,CN=Defau + lt-First-Site-Name,CN=Sites,CN=Configuration,DC=release-4-1-0rc3,DC=samba,DC= + corp + +# returned 1 records +# 1 entries +# 0 referrals diff --git a/source4/selftest/provisions/release-4-1-0rc3/expected-replica-locations-after-dbcheck2.ldif b/source4/selftest/provisions/release-4-1-0rc3/expected-replica-locations-after-dbcheck2.ldif new file mode 100644 index 00000000000..1e4b9a01f29 --- /dev/null +++ b/source4/selftest/provisions/release-4-1-0rc3/expected-replica-locations-after-dbcheck2.ldif @@ -0,0 +1,11 @@ +# record 1 +dn: CN=7d2a15af-c0d4-487c-847e-e036292bcc65,CN=Partitions,CN=Configuration,DC=release-4-1-0rc3,DC=samba,DC=corp +msDS-NC-Replica-Locations: CN=NTDS Settings,CN=LOCALDC,CN=Servers,CN=Default-F + irst-Site-Name,CN=Sites,CN=Configuration,DC=release-4-1-0rc3,DC=samba,DC=corp +msDS-NC-Replica-Locations: CN=NTDS Settings,CN=PROMOTEDVDC,CN=Servers,CN=Defau + lt-First-Site-Name,CN=Sites,CN=Configuration,DC=release-4-1-0rc3,DC=samba,DC= + corp + +# returned 1 records +# 1 entries +# 0 referrals diff --git a/testprogs/blackbox/dbcheck-oldrelease.sh b/testprogs/blackbox/dbcheck-oldrelease.sh index 8041b67741c..1efea67b56c 100755 --- a/testprogs/blackbox/dbcheck-oldrelease.sh +++ b/testprogs/blackbox/dbcheck-oldrelease.sh @@ -208,6 +208,19 @@ check_expected_after_values() { if [ "$?" != "0" ]; then return 1 fi + # Check DomainDNS partition for replica locations + tmpldif=$PREFIX_ABS/$RELEASE/expected-replica-locations-after-dbcheck.ldif.tmp + $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb cn=49a69498-9a85-48af-9be4-aa0b3e0054f9 -s one -b CN=Partitions,CN=Configuration,DC=release-4-1-0rc3,DC=samba,DC=corp msDS-NC-Replica-Locations > $tmpldif + diff $tmpldif $release_dir/expected-replica-locations-after-dbcheck.ldif + if [ "$?" != "0" ]; then + return 1 + fi + # Check ForestDNS partition for replica locations + $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb cn=7d2a15af-c0d4-487c-847e-e036292bcc65 -s one -b CN=Partitions,CN=Configuration,DC=release-4-1-0rc3,DC=samba,DC=corp msDS-NC-Replica-Locations > $tmpldif + diff $tmpldif $release_dir/expected-replica-locations-after-dbcheck2.ldif + if [ "$?" != "0" ]; then + return 1 + fi elif [ x$RELEASE = x"release-4-5-0-pre1" ]; then echo $RELEASE checking after values tmpldif=$PREFIX_ABS/$RELEASE/expected-links-after-dbcheck.ldif.tmp