Bump version to 1.4.3.39-19
- Resolves: RHEL-117759 - Replication online reinitialization of a large database gets stalled. [rhel-8.10.z]
This commit is contained in:
parent
fdae42c596
commit
cd1fe41d86
143
0073-Issue-7056-DSBLE0007-doesn-t-generate-remediation-st.patch
Normal file
143
0073-Issue-7056-DSBLE0007-doesn-t-generate-remediation-st.patch
Normal file
@ -0,0 +1,143 @@
|
||||
From 106cd8af10368dac8f1c3897436f9ca32bc13685 Mon Sep 17 00:00:00 2001
|
||||
From: Viktor Ashirov <vashirov@redhat.com>
|
||||
Date: Tue, 4 Nov 2025 12:05:51 +0100
|
||||
Subject: [PATCH] Issue 7056 - DSBLE0007 doesn't generate remediation steps for
|
||||
missing indexes
|
||||
|
||||
Bug Description:
|
||||
dsctl healthcheck doesn't generate remediation steps for missing
|
||||
indexes, instead it prints an error message:
|
||||
|
||||
```
|
||||
- Unable to check index ancestorId: No object exists given the filter criteria: ancestorId (&(&(objectclass=nsIndex))(|(cn=ancestorId)))
|
||||
```
|
||||
|
||||
Fix Description:
|
||||
Catch `ldap.NO_SUCH_OBJECT` when index is missing and generate
|
||||
remediation instructions.
|
||||
Update remediation instructions for missing index.
|
||||
Fix failing tests due to missing idlistscanlimit.
|
||||
|
||||
Fixes: https://github.com/389ds/389-ds-base/issues/7056
|
||||
|
||||
Reviewed by: @progier389, @droideck (Thank you!)
|
||||
|
||||
(cherry picked from commit 0a85d7bcca0422ff1a8e20b219727410333c1a4f)
|
||||
Signed-off-by: Masahiro Matsuya <mmatsuya@redhat.com>
|
||||
---
|
||||
.../healthcheck/health_system_indexes_test.py | 9 ++++--
|
||||
src/lib389/lib389/backend.py | 28 ++++++++++++-------
|
||||
2 files changed, 24 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/dirsrvtests/tests/suites/healthcheck/health_system_indexes_test.py b/dirsrvtests/tests/suites/healthcheck/health_system_indexes_test.py
|
||||
index 61972d60c..6293340ca 100644
|
||||
--- a/dirsrvtests/tests/suites/healthcheck/health_system_indexes_test.py
|
||||
+++ b/dirsrvtests/tests/suites/healthcheck/health_system_indexes_test.py
|
||||
@@ -171,7 +171,8 @@ def test_missing_parentid(topology_st, log_buffering_enabled):
|
||||
|
||||
log.info("Re-add the parentId index")
|
||||
backend = Backends(standalone).get("userRoot")
|
||||
- backend.add_index("parentid", ["eq"], matching_rules=["integerOrderingMatch"])
|
||||
+ backend.add_index("parentid", ["eq"], matching_rules=["integerOrderingMatch"],
|
||||
+ idlistscanlimit=['limit=5000 type=eq flags=AND'])
|
||||
|
||||
run_healthcheck_and_flush_log(topology_st, standalone, json=False, searched_code=CMD_OUTPUT)
|
||||
run_healthcheck_and_flush_log(topology_st, standalone, json=True, searched_code=JSON_OUTPUT)
|
||||
@@ -259,7 +260,8 @@ def test_usn_plugin_missing_entryusn(topology_st, usn_plugin_enabled, log_buffer
|
||||
|
||||
log.info("Re-add the entryusn index")
|
||||
backend = Backends(standalone).get("userRoot")
|
||||
- backend.add_index("entryusn", ["eq"], matching_rules=["integerOrderingMatch"])
|
||||
+ backend.add_index("entryusn", ["eq"], matching_rules=["integerOrderingMatch"],
|
||||
+ idlistscanlimit=['limit=5000 type=eq flags=AND'])
|
||||
|
||||
run_healthcheck_and_flush_log(topology_st, standalone, json=False, searched_code=CMD_OUTPUT)
|
||||
run_healthcheck_and_flush_log(topology_st, standalone, json=True, searched_code=JSON_OUTPUT)
|
||||
@@ -443,7 +445,8 @@ def test_multiple_missing_indexes(topology_st, log_buffering_enabled):
|
||||
|
||||
log.info("Re-add the missing system indexes")
|
||||
backend = Backends(standalone).get("userRoot")
|
||||
- backend.add_index("parentid", ["eq"], matching_rules=["integerOrderingMatch"])
|
||||
+ backend.add_index("parentid", ["eq"], matching_rules=["integerOrderingMatch"],
|
||||
+ idlistscanlimit=['limit=5000 type=eq flags=AND'])
|
||||
backend.add_index("nsuniqueid", ["eq"])
|
||||
|
||||
run_healthcheck_and_flush_log(topology_st, standalone, json=False, searched_code=CMD_OUTPUT)
|
||||
diff --git a/src/lib389/lib389/backend.py b/src/lib389/lib389/backend.py
|
||||
index e74d1fbf9..14b64d1d3 100644
|
||||
--- a/src/lib389/lib389/backend.py
|
||||
+++ b/src/lib389/lib389/backend.py
|
||||
@@ -541,8 +541,8 @@ class Backend(DSLdapObject):
|
||||
# Default system indexes taken from ldap/servers/slapd/back-ldbm/instance.c
|
||||
expected_system_indexes = {
|
||||
'entryrdn': {'types': ['subtree'], 'matching_rule': None},
|
||||
- 'parentId': {'types': ['eq'], 'matching_rule': 'integerOrderingMatch', 'scanlimit': 'limit=5000 type=eq flags=AND'},
|
||||
- 'ancestorId': {'types': ['eq'], 'matching_rule': 'integerOrderingMatch', 'scanlimit': 'limit=5000 type=eq flags=AND'},
|
||||
+ 'parentid': {'types': ['eq'], 'matching_rule': 'integerOrderingMatch', 'scanlimit': 'limit=5000 type=eq flags=AND'},
|
||||
+ 'ancestorid': {'types': ['eq'], 'matching_rule': 'integerOrderingMatch', 'scanlimit': 'limit=5000 type=eq flags=AND'},
|
||||
'objectClass': {'types': ['eq'], 'matching_rule': None},
|
||||
'aci': {'types': ['pres'], 'matching_rule': None},
|
||||
'nscpEntryDN': {'types': ['eq'], 'matching_rule': None},
|
||||
@@ -584,15 +584,24 @@ class Backend(DSLdapObject):
|
||||
for attr_name, expected_config in expected_system_indexes.items():
|
||||
try:
|
||||
index = indexes.get(attr_name)
|
||||
+ except ldap.NO_SUCH_OBJECT:
|
||||
+ # Index is missing
|
||||
+ index = None
|
||||
+ except Exception as e:
|
||||
+ self._log.debug(f"_lint_system_indexes - Error getting index {attr_name}: {e}")
|
||||
+ discrepancies.append(f"Unable to check index {attr_name}: {str(e)}")
|
||||
+ continue
|
||||
+
|
||||
+ try:
|
||||
# Check if index exists
|
||||
if index is None:
|
||||
discrepancies.append(f"Missing system index: {attr_name}")
|
||||
# Generate remediation command
|
||||
- index_types = ' '.join([f"--add-type {t}" for t in expected_config['types']])
|
||||
+ index_types = ' '.join([f"--index-type {t}" for t in expected_config['types']])
|
||||
cmd = f"dsconf YOUR_INSTANCE backend index add {bename} --attr {attr_name} {index_types}"
|
||||
- if expected_config['matching_rule']:
|
||||
- cmd += f" --add-mr {expected_config['matching_rule']}"
|
||||
- if expected_config['scanlimit']:
|
||||
+ if expected_config.get('matching_rule'):
|
||||
+ cmd += f" --matching-rule {expected_config['matching_rule']}"
|
||||
+ if expected_config.get('scanlimit'):
|
||||
cmd += f" --add-scanlimit {expected_config['scanlimit']}"
|
||||
remediation_commands.append(cmd)
|
||||
reindex_attrs.add(attr_name) # New index needs reindexing
|
||||
@@ -616,7 +625,7 @@ class Backend(DSLdapObject):
|
||||
reindex_attrs.add(attr_name)
|
||||
|
||||
# Check matching rules
|
||||
- expected_mr = expected_config['matching_rule']
|
||||
+ expected_mr = expected_config.get('matching_rule')
|
||||
if expected_mr:
|
||||
actual_mrs_lower = [mr.lower() for mr in actual_mrs]
|
||||
if expected_mr.lower() not in actual_mrs_lower:
|
||||
@@ -638,7 +647,6 @@ class Backend(DSLdapObject):
|
||||
remediation_commands.append(cmd)
|
||||
reindex_attrs.add(attr_name)
|
||||
|
||||
-
|
||||
except Exception as e:
|
||||
self._log.debug(f"_lint_system_indexes - Error checking index {attr_name}: {e}")
|
||||
discrepancies.append(f"Unable to check index {attr_name}: {str(e)}")
|
||||
@@ -907,11 +915,11 @@ class Backend(DSLdapObject):
|
||||
|
||||
if idlistscanlimit is not None:
|
||||
scanlimits = []
|
||||
- for scanlimit in idlistscanlimit:
|
||||
+ for scanlimit in idlistscanlimit:
|
||||
scanlimits.append(scanlimit)
|
||||
# Only add if there are actually limits in the list.
|
||||
if len(scanlimits) > 0:
|
||||
- props['nsIndexIDListScanLimit'] = mrs
|
||||
+ props['nsIndexIDListScanLimit'] = scanlimits
|
||||
|
||||
new_index.create(properties=props, basedn="cn=index," + self._dn)
|
||||
|
||||
--
|
||||
2.51.1
|
||||
|
||||
@ -52,7 +52,7 @@ ExcludeArch: i686
|
||||
Summary: 389 Directory Server (base)
|
||||
Name: 389-ds-base
|
||||
Version: 1.4.3.39
|
||||
Release: %{?relprefix}18%{?prerel}%{?dist}
|
||||
Release: %{?relprefix}19%{?prerel}%{?dist}
|
||||
License: GPL-3.0-or-later WITH GPL-3.0-389-ds-base-exception AND (0BSD OR Apache-2.0 OR MIT) AND (Apache-2.0 OR Apache-2.0 WITH LLVM-exception OR MIT) AND (Apache-2.0 OR BSD-2-Clause OR MIT) AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR LGPL-2.1-or-later OR MIT) AND (Apache-2.0 OR MIT OR Zlib) AND (Apache-2.0 OR MIT) AND (MIT OR Apache-2.0) AND Unicode-3.0 AND (MIT OR Unlicense) AND Apache-2.0 AND BSD-3-Clause AND MIT AND MPL-2.0
|
||||
URL: https://www.port389.org
|
||||
Group: System Environment/Daemons
|
||||
@ -370,6 +370,7 @@ Patch69: 0069-Issue-6947-Revise-time-skew-check-in-healthcheck-too.patc
|
||||
Patch70: 0070-Issue-6901-Update-changelog-trimming-logging-7102.patch
|
||||
Patch71: 0071-Issue-7007-Improve-paged-result-search-locking.patch
|
||||
Patch72: 0072-Issue-6966-2nd-On-large-DB-unlimited-IDL-scan-limit-.patch
|
||||
Patch73: 0073-Issue-7056-DSBLE0007-doesn-t-generate-remediation-st.patch
|
||||
|
||||
|
||||
#Patch100: cargo.patch
|
||||
@ -995,6 +996,9 @@ exit 0
|
||||
%doc README.md
|
||||
|
||||
%changelog
|
||||
* Fri Dec 05 2025 Masahiro Matsuya <mmatsuya@redhat.com> - 1.4.3.39-19
|
||||
- Resolves: RHEL-117759 - Replication online reinitialization of a large database gets stalled. [rhel-8.10.z]
|
||||
|
||||
* Wed Dec 03 2025 Masahiro Matsuya <mmatsuya@redhat.com> - 1.4.3.39-18
|
||||
- Reverts: RHEL-123241 - Attribute uniqueness is not enforced upon modrdn operation [rhel-8.10.z]
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user