Bug 1685059 - After running cl-dump dbdir/cldb/*ldif.done are not deleted
Summary: After running cl-dump dbdir/cldb/*ldif.done are not deleted
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: 389-ds-base
Version: 7.7
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: rc
: ---
Assignee: Simon Pichugin
QA Contact: RHDS QE
Marc Muehlfeld
URL:
Whiteboard:
Depends On:
Blocks: 1801700
TreeView+ depends on / blocked
 
Reported: 2019-03-04 09:39 UTC by German Parente
Modified: 2020-03-31 19:46 UTC (History)
9 users (show)

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.
Clone Of:
: 1801700 (view as bug list)
Environment:
Last Closed: 2020-03-31 19:46:14 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:1064 None None None 2020-03-31 19:46:55 UTC

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


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