diff options
author | Garming Sam <garming@catalyst.net.nz> | 2016-07-20 12:47:11 +1200 |
---|---|---|
committer | Garming Sam <garming@samba.org> | 2016-07-21 06:37:08 +0200 |
commit | 56771ec6d0b01590caa702708a56d1e68e0dc70a (patch) | |
tree | e1ce23969fda3065b1830f02f661e7b2afa6a533 | |
parent | 5d470d2886a782ad887a3d290d600c5dfa244fc0 (diff) | |
download | samba-56771ec6d0b01590caa702708a56d1e68e0dc70a.tar.gz |
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 <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 files changed, 36 insertions, 0 deletions
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 |