Blame SOURCES/0003-Issue-51091-healthcheck-json-report-fails-when-mappi.patch

a26cad
From 7a62e72b81d75ebb844835619ecc97dbf5e21058 Mon Sep 17 00:00:00 2001
a26cad
From: Mark Reynolds <mreynolds@redhat.com>
a26cad
Date: Thu, 14 May 2020 09:38:20 -0400
a26cad
Subject: [PATCH 03/12] Issue 51091 - healthcheck json report fails when
a26cad
 mapping tree is deleted
a26cad
a26cad
Description:  We were passing the bename in bytes and not as a utf8 string.
a26cad
              This caused the json dumping to fail.
a26cad
a26cad
relates: https://pagure.io/389-ds-base/issue/51091
a26cad
a26cad
Reviewed by: firstyear(Thanks!)
a26cad
---
a26cad
 src/lib389/lib389/backend.py | 6 +++---
a26cad
 1 file changed, 3 insertions(+), 3 deletions(-)
a26cad
a26cad
diff --git a/src/lib389/lib389/backend.py b/src/lib389/lib389/backend.py
a26cad
index e472d3de5..4f752f414 100644
a26cad
--- a/src/lib389/lib389/backend.py
a26cad
+++ b/src/lib389/lib389/backend.py
a26cad
@@ -11,7 +11,7 @@ import copy
a26cad
 import ldap
a26cad
 from lib389._constants import *
a26cad
 from lib389.properties import *
a26cad
-from lib389.utils import normalizeDN, ensure_str, ensure_bytes,  assert_c
a26cad
+from lib389.utils import normalizeDN, ensure_str, assert_c
a26cad
 from lib389 import Entry
a26cad
 
a26cad
 # Need to fix this ....
a26cad
@@ -488,10 +488,10 @@ class Backend(DSLdapObject):
a26cad
 
a26cad
         # Check for the missing mapping tree.
a26cad
         suffix = self.get_attr_val_utf8('nsslapd-suffix')
a26cad
-        bename = self.get_attr_val_bytes('cn')
a26cad
+        bename = self.get_attr_val_utf8('cn')
a26cad
         try:
a26cad
             mt = self._mts.get(suffix)
a26cad
-            if mt.get_attr_val_bytes('nsslapd-backend') != bename and mt.get_attr_val('nsslapd-state') != ensure_bytes('backend'):
a26cad
+            if mt.get_attr_val_utf8('nsslapd-backend') != bename and mt.get_attr_val_utf8('nsslapd-state') != 'backend':
a26cad
                 raise ldap.NO_SUCH_OBJECT("We have a matching suffix, but not a backend or correct database name.")
a26cad
         except ldap.NO_SUCH_OBJECT:
a26cad
             result = DSBLE0001
a26cad
-- 
a26cad
2.26.2
a26cad