RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1556803 - ds-replcheck command returns traceback errors against empty ldif files when run in offline mode
Summary: ds-replcheck command returns traceback errors against empty ldif files when r...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: 389-ds-base
Version: 7.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: mreynolds
QA Contact: RHDS QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-03-15 09:41 UTC by Nikhil Dehadrai
Modified: 2020-09-13 22:08 UTC (History)
3 users (show)

Fixed In Version: 389-ds-base-1.3.8.4-1.el7
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of:
Environment:
Last Closed: 2018-10-30 10:13:31 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github 389ds 389-ds-base issues 2635 0 None closed ds-replcheck LDIF comparision fails when checking for conflicts 2020-10-30 04:40:19 UTC
Red Hat Product Errata RHSA-2018:3127 0 None None None 2018-10-30 10:14:55 UTC

Description Nikhil Dehadrai 2018-03-15 09:41:07 UTC
Description of problem:
ds-replcheck command returns traceback errors against empty ldif files when run in offline mode  

Version-Release number of selected component (if applicable):
389-ds-base-1.3.7.5-18.el7.x86_64

How reproducible:
Always

Steps to Reproduce:
1. On a RHEL75 system, Install latest package for 389-ds-base
2. Create 2 empty ldif files (In my case a.ldif and b.ldif)
3. Run the command:
#ds-replcheck -v -M a.ldif -R b.ldif

Actual results:
After step3, the command crashes

[root@auto-hv-01-guest05 ~]# ds-replcheck -v -M a.ldif -R b.ldif
Performing offline report...
Gathering all the DN's...
Gathering the database RUV's...
Traceback (most recent call last):
  File "/usr/bin/ds-replcheck", line 1113, in <module>
    main()
  File "/usr/bin/ds-replcheck", line 1103, in main
    do_offline_report(opts, OUTPUT_FILE)
  File "/usr/bin/ds-replcheck", line 430, in do_offline_report
    opts['master_ruv'] = get_ldif_ruv(MLDIF, opts)
  File "/usr/bin/ds-replcheck", line 280, in get_ldif_ruv
    result = ldif_search(LDIF, opts['ruv_dn'])
KeyError: 'ruv_dn'


Expected results:
The command should not report any trackback errors and report that the files are invalid or some proper error message.

Comment 3 Amita Sharma 2018-07-02 08:03:42 UTC
[root@ibm-x3650m4-01-vm-14 config]# ds-replcheck -v -M a.ldif -R b.ldif
Performing offline report...
LDIF file (a.ldif) does not exist
[root@ibm-x3650m4-01-vm-14 config]# touch a.ldif
[root@ibm-x3650m4-01-vm-14 config]# ds-replcheck -v -M a.ldif -R b.ldif
Performing offline report...
LDIF file (a.ldif) is empty
[root@ibm-x3650m4-01-vm-14 config]# vim a.ldif
[root@ibm-x3650m4-01-vm-14 config]# ds-replcheck -v -M a.ldif -R b.ldif
Performing offline report...
LDIF file (b.ldif) does not exist
[root@ibm-x3650m4-01-vm-14 config]# touch b.ldif
[root@ibm-x3650m4-01-vm-14 config]# ds-replcheck -v -M a.ldif -R b.ldif
Performing offline report...
LDIF file (b.ldif) is empty
[root@ibm-x3650m4-01-vm-14 config]# vim b.ldif 
[root@ibm-x3650m4-01-vm-14 config]# ds-replcheck -v -M a.ldif -R b.ldif
Performing offline report...
Gathering all the DN's...
Gathering the database RUV's...
Traceback (most recent call last):
  File "/usr/bin/ds-replcheck", line 1290, in <module>
    main()
  File "/usr/bin/ds-replcheck", line 1279, in main
    do_offline_report(opts, OUTPUT_FILE)
  File "/usr/bin/ds-replcheck", line 575, in do_offline_report
    opts['master_ruv'] = get_ldif_ruv(MLDIF, opts)
  File "/usr/bin/ds-replcheck", line 417, in get_ldif_ruv
    result = ldif_search(LDIF, opts['ruv_dn'])
KeyError: 'ruv_dn'

I am getting traceback if I have garbage in ldif files.
[root@ibm-x3650m4-01-vm-14 config]# cat a.ldif 
dsfcdfdfdef
dsfcdfdsfsfds

Comment 4 mreynolds 2018-07-02 13:09:57 UTC
(In reply to Amita Sharma from comment #3)
> [root@ibm-x3650m4-01-vm-14 config]# ds-replcheck -v -M a.ldif -R b.ldif
> Performing offline report...
> LDIF file (a.ldif) does not exist
> [root@ibm-x3650m4-01-vm-14 config]# touch a.ldif
> [root@ibm-x3650m4-01-vm-14 config]# ds-replcheck -v -M a.ldif -R b.ldif
> Performing offline report...
> LDIF file (a.ldif) is empty
> [root@ibm-x3650m4-01-vm-14 config]# vim a.ldif
> [root@ibm-x3650m4-01-vm-14 config]# ds-replcheck -v -M a.ldif -R b.ldif
> Performing offline report...
> LDIF file (b.ldif) does not exist
> [root@ibm-x3650m4-01-vm-14 config]# touch b.ldif
> [root@ibm-x3650m4-01-vm-14 config]# ds-replcheck -v -M a.ldif -R b.ldif
> Performing offline report...
> LDIF file (b.ldif) is empty
> [root@ibm-x3650m4-01-vm-14 config]# vim b.ldif 
> [root@ibm-x3650m4-01-vm-14 config]# ds-replcheck -v -M a.ldif -R b.ldif
> Performing offline report...
> Gathering all the DN's...
> Gathering the database RUV's...
> Traceback (most recent call last):
>   File "/usr/bin/ds-replcheck", line 1290, in <module>
>     main()
>   File "/usr/bin/ds-replcheck", line 1279, in main
>     do_offline_report(opts, OUTPUT_FILE)
>   File "/usr/bin/ds-replcheck", line 575, in do_offline_report
>     opts['master_ruv'] = get_ldif_ruv(MLDIF, opts)
>   File "/usr/bin/ds-replcheck", line 417, in get_ldif_ruv
>     result = ldif_search(LDIF, opts['ruv_dn'])
> KeyError: 'ruv_dn'
> 
> I am getting traceback if I have garbage in ldif files.
> [root@ibm-x3650m4-01-vm-14 config]# cat a.ldif 
> dsfcdfdfdef
> dsfcdfdsfsfds


This is a different issue, and a new bug should be filed as this has nothing to do with empty files. Thanks!

Comment 5 Amita Sharma 2018-07-03 06:48:00 UTC
Marking this bug as verified.
New bug - https://bugzilla.redhat.com/show_bug.cgi?id=1597518

Comment 7 errata-xmlrpc 2018-10-30 10:13:31 UTC
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, 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-2018:3127


Note You need to log in before you can comment on or make changes to this bug.