Bug 1951537
Summary: | Import reports "successful" even if entries could not be added and import was incomplete | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Directory Server | Reporter: | Marc Muehlfeld <mmuehlfe> | ||||||
Component: | 389-ds-base | Assignee: | LDAP Maintainers <ldap-maint> | ||||||
Status: | CLOSED ERRATA | QA Contact: | RHDS QE <ds-qe-bugs> | ||||||
Severity: | unspecified | Docs Contact: | Marc Muehlfeld <mmuehlfe> | ||||||
Priority: | unspecified | ||||||||
Version: | 11.2 | CC: | bsmejkal, jachapma, ldap-maint, mreynolds, sgouvern, vashirov | ||||||
Target Milestone: | DS11.3 | ||||||||
Target Release: | dirsrv-11.4 | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | redhat-ds-11-8050020210827183202.d3df4063 | Doc Type: | If docs needed, set a value | ||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2021-10-25 06:36:13 UTC | Type: | Bug | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Attachments: |
|
Description
Marc Muehlfeld
2021-04-20 11:45:51 UTC
Created attachment 1773736 [details]
errors log
I tried to import the same file over and over and every time I get a different message: [root@server-f33 ds]# dsconf standalone1 backend import userRoot /var/lib/dirsrv/slapd-standalone1/ldif/syntax_err2.ldif The import task has finished successfully [root@server-f33 ds]# dsconf standalone1 backend import userRoot /var/lib/dirsrv/slapd-standalone1/ldif/syntax_err2.ldif The import task has finished successfully [root@server-f33 ds]# dsconf standalone1 backend import userRoot /var/lib/dirsrv/slapd-standalone1/ldif/syntax_err2.ldif The import task has finished successfully, with warning code 8, check the logs for more detail [root@server-f33 ds]# dsconf standalone1 backend import userRoot /var/lib/dirsrv/slapd-standalone1/ldif/syntax_err2.ldif The import task has finished successfully, with warning code 8, check the logs for more detail [root@server-f33 ds]# dsconf standalone1 backend import userRoot /var/lib/dirsrv/slapd-standalone1/ldif/syntax_err2.ldif The import task has finished successfully After adding this snippet from import_producer https://github.com/389ds/389-ds-base/pull/4476/files#diff-5e506a7236cddc035908095afb6a8a7b9a40a5062c0b4c3860352915ff915bc0 to import_foreman it seems to be always produce a warning. This is a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=1627645 Viktor, that diff shows the old change. Did you "remove" it from the producer into the foreman, or just copy it to the foreman? (In reply to mreynolds from comment #3) > This is a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=1627645 I don't think it's a duplicate, but rather a missed corner case. > > Viktor, that diff shows the old change. Did you "remove" it from the > producer into the foreman, or just copy it to the foreman? This is the diff, but I'm not sure if this is the right fix. But at least I'm getting a consistent warning when there are skipped entries. diff --git a/ldap/servers/slapd/back-ldbm/db-bdb/bdb_import_threads.c b/ldap/servers/slapd/back-ldbm/db-bdb/bdb_import_threads.c index b02b17f49..d0dd4a69f 100644 --- a/ldap/servers/slapd/back-ldbm/db-bdb/bdb_import_threads.c +++ b/ldap/servers/slapd/back-ldbm/db-bdb/bdb_import_threads.c @@ -2767,6 +2767,11 @@ import_foreman(void *param) if (job->flags & FLAG_ABORT) { goto error; } + /* capture skipped entry warnings for this task */ + if((job) && (job->skipped)) { + slapi_task_set_warning(job->task, WARN_SKIPPED_IMPORT_ENTRY); + } + } slapi_pblock_destroy(pb); Hi Viktor, Your fix is 100% correct. The initial commit that addressed an ldif import with skipped entries and no warning message focused on attribute syntax and schema violation, not a missing parent entry. The import_producer thread parses the import files, checking for schema and syntax violations, while the import_foreman thread catches a missing parent entry. I will commit your change and cherry pick it to the required branches. Thanks Build tested: 389-ds-base-1.4.3.26-1.module+el8dsrv+12420+cb9f0071.x86_64 # dsconf -D "cn=Directory Manager" ldap://localhost:389 backend import userroot /var/lib/dirsrv/slapd-localhost/ldif/example.ldif Enter password for cn=Directory Manager on ldap://localhost:389: The import task has finished successfully, with warning code 8, check the logs for more detail A warning is displayed, marking as VERIFIED. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Low: redhat-ds:11 security, bug fix, and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2021:3955 |