dbcheck/release-4-1-0rc3: Add a check regarding replica locations
authorGarming Sam <garming@catalyst.net.nz>
Wed, 20 Jul 2016 00:47:11 +0000 (12:47 +1200)
committerGarming Sam <garming@samba.org>
Thu, 21 Jul 2016 04:37:08 +0000 (06:37 +0200)
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>
selftest/knownfail
source4/selftest/provisions/release-4-1-0rc3/expected-replica-locations-after-dbcheck.ldif [new file with mode: 0644]
source4/selftest/provisions/release-4-1-0rc3/expected-replica-locations-after-dbcheck2.ldif [new file with mode: 0644]
testprogs/blackbox/dbcheck-oldrelease.sh

index 1a92a5d3198fb137d00f04170905c349b300e613..ef98ecb959de9d444d7bbd4905da8c277056b4d8 100644 (file)
 
 # 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 (file)
index 0000000..ec91290
--- /dev/null
@@ -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 (file)
index 0000000..1e4b9a0
--- /dev/null
@@ -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
index 8041b67741c86bf7c3c4e03e43be6584300b366a..1efea67b56ca5af3f267405f6a2b610600309fdf 100755 (executable)
@@ -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