Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1556803 - ds-replcheck command returns traceback errors against empty ldif files when run in offline mode
ds-replcheck command returns traceback errors against empty ldif files when r...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: 389-ds-base (Show other bugs)
7.6
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: mreynolds
RHDS QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2018-03-15 05:41 EDT by Nikhil Dehadrai
Modified: 2018-10-30 06:14 EDT (History)
3 users (show)

See Also:
Fixed In Version: 389-ds-base-1.3.8.4-1.el7
Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-10-30 06:13:31 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:3127 None None None 2018-10-30 06:14 EDT

  None (edit)
Description Nikhil Dehadrai 2018-03-15 05:41:07 EDT
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 04:03:42 EDT
[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 09:09:57 EDT
(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 02:48:00 EDT
Marking this bug as verified.
New bug - https://bugzilla.redhat.com/show_bug.cgi?id=1597518
Comment 7 errata-xmlrpc 2018-10-30 06:13:31 EDT
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.