Bug 1556803
| Summary: | ds-replcheck command returns traceback errors against empty ldif files when run in offline mode | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Nikhil Dehadrai <ndehadra> |
| Component: | 389-ds-base | Assignee: | mreynolds |
| Status: | CLOSED ERRATA | QA Contact: | RHDS QE <ds-qe-bugs> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.6 | CC: | amsharma, nkinder, rmeggins |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| 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 10:13:31 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: | |||
[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
(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! Marking this bug as verified. New bug - https://bugzilla.redhat.com/show_bug.cgi?id=1597518 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 |
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.