Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1685059

Summary: After running cl-dump dbdir/cldb/*ldif.done are not deleted
Product: Red Hat Enterprise Linux 7 Reporter: German Parente <gparente>
Component: 389-ds-baseAssignee: Simon Pichugin <spichugi>
Status: CLOSED ERRATA QA Contact: RHDS QE <ds-qe-bugs>
Severity: unspecified Docs Contact: Marc Muehlfeld <mmuehlfe>
Priority: high    
Version: 7.7CC: lkrispen, mreynolds, msauton, nkinder, pasik, sgouvern, spichugi, tbordaz, vashirov
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 389-ds-base-1.3.10.1-2.el7 Doc Type: Bug Fix
Doc Text:
.The `cl-dump.pl` and `cl-dump` utilities now remove temporary files after exporting the change log Previously, the `cl-dump.pl` and `cl-dump` utilities in Directory Server created temporary LDIF files in the `/var/lib/dirsrv/slapd-<instance_name>/changelogdb/` directory. After the change log was exported, the utilities renamed the temporary files to `*.done`. As a consequence, if the temporary files were large, this could result in low free disk space. With this update, by default, `cl-dump.pl` and `cl-dump` now delete the temporary files at the end of the export. Additionally, the `-l` option has been added to both utilities to manually preserve the temporary files. As a result, `cl-dump.pl` and `cl-dump` free the disk space after exporting the change log or user can optionally enforce the old behavior by using the `-l` option.
Story Points: ---
Clone Of:
: 1801700 (view as bug list) Environment:
Last Closed: 2020-03-31 19:46:14 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:
Bug Depends On:    
Bug Blocks: 1801700    

Description German Parente 2019-03-04 09:39:40 UTC
Description of problem:

cl-dump utility generates *.ldif files in the changelog directory. At the end, they are renamed to *ldif.done but they are never deleted.

And in some cases, these files can be very large which is provoking an issue at a customer.




Version-Release number of selected component (if applicable):


How reproducible: very simple by running cl-dump.pl

Comment 2 mreynolds 2019-03-15 16:36:56 UTC
Not sure I fully understand what the problem is.   Does the customer want the script to remove existing changelog LDIF files after creating a new one?  So this is a RFE not a bug, correct?

Comment 4 Simon Pichugin 2019-08-29 14:03:01 UTC
Upstream issue: 
https://pagure.io/389-ds-base/issue/50572

Comment 5 Simon Pichugin 2019-09-03 16:38:09 UTC
So by default now, we remove ldif.done files after running cl-dump.
And if we specify an option '-l', it will allow us to preserve the files.
Man pages were updated too.

Comment 7 sgouvern 2019-11-07 13:51:14 UTC
Verified with 389-ds-base-1.3.10.1-4.el7.x86_64 - automated test ds/dirsrvtests/tests/suites/replication/changelog_test.py::test_cldump_files_removed

[root@cypher upstream]# py.test -v ds/dirsrvtests/tests/suites/replication/changelog_test.py
======================================================= test session starts =======================================================
platform linux -- Python 3.6.3, pytest-5.2.2, py-1.8.0, pluggy-0.13.0 -- /opt/rh/rh-python36/root/usr/bin/python3
cachedir: .pytest_cache
metadata: {'Python': '3.6.3', 'Platform': 'Linux-3.10.0-1108.el7.x86_64-x86_64-with-redhat-7.8-Maipo', 'Packages': {'pytest': '5.2.2', 'py': '1.8.0', 'pluggy': '0.13.0'}, 'Plugins': {'metadata': '1.8.0', 'html': '2.0.0'}}
389-ds-base: 1.3.10.1-4.el7
nss: 3.44.0-4.el7
nspr: 4.21.0-1.el7
openldap: 2.4.44-21.el7_6
cyrus-sasl: 2.1.26-23.el7
FIPS: disabled
rootdir: /mnt/tests/rhds/tests/upstream/ds/dirsrvtests, inifile: pytest.ini
plugins: metadata-1.8.0, html-2.0.0
collected 9 items                                                                                                                 

ds/dirsrvtests/tests/suites/replication/changelog_test.py::test_cldump_files_removed PASSED                                 [ 11%]
ds/dirsrvtests/tests/suites/replication/changelog_test.py::test_dsconf_dump_changelog_files_removed PASSED                  [ 22%]


Man pages verified sanity only with 389-ds-base-1.3.10.1 checkout :
/home/fedora/clone/389-ds-base/389-ds-base-1.3.10.1/man/man1/cl-dump.1

20 .SH SYNOPSIS
21 .B cl\-dump
22 [\fI\-h host\fR] [\fI\-p port\fR] [\fI\-D bind\(hydn\fR] \-w bind\(hypassword | \-P bind\(hycert
23        [\fI\-r replica\(hyroots\fR] [\fI\-o output\(hyfile\fR] [\fI\-c\fR] [\fI\-l\fR] [\fI\-v\fR]
24 
25 .PP

50 .B \-l
51 Preserve generated ldif.done files from changelogdir
52 .TP

72 .B \-v
73 Print the version of this script.

Comment 12 errata-xmlrpc 2020-03-31 19:46:14 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/RHBA-2020:1064