DEBUG source4/torture/drs/python/fsmo.py
authorStefan Metzmacher <metze@samba.org>
Tue, 28 May 2019 12:52:14 +0000 (14:52 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 15 Oct 2019 07:36:38 +0000 (09:36 +0200)
source4/torture/drs/python/fsmo.py

index d3a46bf84d6173e02adcf76e9c82faf75acf2337..2e08bc5fcec83c1d1f76f08e763781559fbdd76c 100644 (file)
@@ -44,7 +44,7 @@ class DrsFsmoTestCase(drs_base.DrsBaseTestCase):
         super(DrsFsmoTestCase, self).setUp()
 
         # we have to wait for the replication before we make the check
-        self.fsmo_wait_max_time = 20
+        self.fsmo_wait_max_time = 5
         self.fsmo_wait_sleep_time = 0.2
 
         # cache some of RootDSE props
@@ -70,11 +70,14 @@ class DrsFsmoTestCase(drs_base.DrsBaseTestCase):
                                             "-H", "ldap://%s:389" % DC,
                                             cmd_line_auth)
 
-        res = self.ldb_dc1.search(base=self.forest_dns_dn,
+        print("DC[%s] role[%s]:" % (DC,role))
+        print("DC1:%s" % self.dsServiceName_dc1)
+        res = self.ldb_dc1.search(base=self.domain_dns_dn,
                                   scope=SCOPE_BASE)
         for msg in res:
             print(self.ldb_dc1.write_ldif(msg, CHANGETYPE_NONE))
-        res = self.ldb_dc2.search(base=self.forest_dns_dn,
+        print("DC2:%s" % self.dsServiceName_dc2)
+        res = self.ldb_dc2.search(base=self.domain_dns_dn,
                                   scope=SCOPE_BASE)
         for msg in res:
             print(self.ldb_dc2.write_ldif(msg, CHANGETYPE_NONE))
@@ -104,7 +107,16 @@ class DrsFsmoTestCase(drs_base.DrsBaseTestCase):
             # skip last sleep, if no need to wait anymore
             if i != (retries - 1):
                 # wait a little bit before next retry
+                print("waiting for %s:" % self.fsmo_wait_sleep_time)
                 time.sleep(self.fsmo_wait_sleep_time)
+                print("DC1:")
+                res = self.ldb_dc1.search(base=self.domain_dns_dn,
+                                          scope=SCOPE_BASE)
+                for msg in res:
+                    print(self.ldb_dc1.write_ldif(msg, CHANGETYPE_NONE))
+                print("DC2:")
+                res = self.ldb_dc2.search(base=self.domain_dns_dn,
+                                          scope=SCOPE_BASE)
         return (False, cur_master)
 
     def _role_transfer(self, role, role_dn):