]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Revert "dbcheck: disable fixing duplicate linked attributes until we can recover...
authorRalph Boehme <slow@samba.org>
Wed, 24 Jan 2018 10:34:43 +0000 (11:34 +0100)
committerStefan Metzmacher <metze@samba.org>
Mon, 5 Feb 2018 12:49:12 +0000 (13:49 +0100)
This reverts commit 43e3f79d54c5aeaea820865d298d4249cf47af99.

The real fix will follow in the next commits.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13228

Signed-off-by: Ralph Boehme <slow@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
python/samba/dbchecker.py
selftest/knownfail.d/dbcheck_duplicate_member [deleted file]

index 6e4c4401433729fe58ee0a0fb77fbda1742109e3..193374041fe64d5bd43287434d1cfe83fd5f6b1e 100644 (file)
@@ -708,15 +708,9 @@ newSuperior: %s""" % (str(from_dn), str(to_rdn), str(to_base)))
                           "Failed to fix incorrect RMD_FLAGS %u" % rmd_flags):
             self.report("Fixed incorrect RMD_FLAGS %u" % (rmd_flags))
 
-    def err_orphaned_backlink(self, obj, attrname, val, link_name, target_dn, duplicate_links):
+    def err_orphaned_backlink(self, obj, attrname, val, link_name, target_dn):
         '''handle a orphaned backlink value'''
         self.report("ERROR: orphaned backlink attribute '%s' in %s for link %s in %s" % (attrname, obj.dn, link_name, target_dn))
-        if duplicate_links:
-            self.report("ERROR: FATAL! Most likely the corresponding forward link got lost!")
-            self.report("ERROR: FATAL! See https://bugzilla.samba.org/show_bug.cgi?id=13228")
-            self.report("Recovery handling will be implemented in a future version")
-            self.report("Not removing orphaned backlink %s" % attrname)
-            return
         if not self.confirm_all('Remove orphaned backlink %s' % attrname, 'fix_all_orphaned_backlinks'):
             self.report("Not removing orphaned backlink %s" % attrname)
             return
@@ -730,11 +724,6 @@ newSuperior: %s""" % (str(from_dn), str(to_rdn), str(to_base)))
     def err_duplicate_links(self, obj, attrname, vals):
         '''handle a duplicate links value'''
 
-        self.report("ERROR: FATAL! Most likely some forward link values for attribute '%s' in '%s' got lost!" % (attrname, obj.dn))
-        self.report("ERROR: FATAL! See https://bugzilla.samba.org/show_bug.cgi?id=13228")
-        self.report("Recovery handling will be implemented in a future version")
-        self.report("Not removing duplicate links in attribute '%s'" % attrname)
-        return
         if not self.confirm_all("Remove duplicate links in attribute '%s'" % attrname, 'fix_all_duplicate_links'):
             self.report("Not removing duplicate links in attribute '%s'" % attrname)
             return
@@ -907,7 +896,6 @@ newSuperior: %s""" % (str(from_dn), str(to_rdn), str(to_base)))
         else:
             reverse_syntax_oid = None
 
-        duplicate_links = False
         duplicate_dict = dict()
         duplicate_list = list()
         unique_dict = dict()
@@ -962,10 +950,6 @@ newSuperior: %s""" % (str(from_dn), str(to_rdn), str(to_base)))
             unique_dict[keystr] = dsdb_dn
 
         if len(duplicate_list) != 0:
-            duplicate_links = True
-            self.report("ERROR: FATAL! Most likely some forward link values for attribute '%s' in '%s' got lost!" % (attrname, obj.dn))
-            self.report("ERROR: FATAL! See https://bugzilla.samba.org/show_bug.cgi?id=13228")
-
             self.report("ERROR: Duplicate link values for attribute '%s' in '%s'" % (attrname, obj.dn))
             for keystr in duplicate_list:
                 d = duplicate_dict[keystr]
@@ -1164,7 +1148,7 @@ newSuperior: %s""" % (str(from_dn), str(to_rdn), str(to_base)))
                     error_count += 1
                     self.err_orphaned_backlink(obj, attrname,
                                                val, reverse_link_name,
-                                               dsdb_dn.dn, duplicate_links)
+                                               dsdb_dn.dn)
                     continue
                 # Only warn here and let the forward link logic fix it.
                 self.report("WARNING: Link (back) mismatch for '%s' (%d) on '%s' to '%s' (%d) on '%s'" % (
@@ -1196,7 +1180,7 @@ newSuperior: %s""" % (str(from_dn), str(to_rdn), str(to_base)))
                 else:
                     self.err_orphaned_backlink(res[0], reverse_link_name,
                                                obj.dn.extended_str(), attrname,
-                                               obj.dn, duplicate_links)
+                                               obj.dn)
                     diff_count += 1
 
 
diff --git a/selftest/knownfail.d/dbcheck_duplicate_member b/selftest/knownfail.d/dbcheck_duplicate_member
deleted file mode 100644 (file)
index 7ebb82b..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-^samba4.blackbox.dbcheck-links.release-4-5-0-pre1.dbcheck_duplicate_member
-^samba4.blackbox.dbcheck-links.release-4-5-0-pre1.check_expected_after_duplicate_links
-^samba4.blackbox.dbcheck-links.release-4-5-0-pre1.duplicate_clean
-^samba4.blackbox.dbcheck-links.release-4-5-0-pre1.dbcheck_clean2
-^samba4.blackbox.dbcheck-links.release-4-5-0-pre1.dbcheck_clean3