Description of problem: The dsconf command to export the replication changelog is failing due to a missing Python module ( logging ). Version-Release number of selected component (if applicable): $ cat /etc/redhat-release Red Hat Enterprise Linux release 8.5 (Ootpa) $ $ rpm -qa | grep 389 cockpit-389-ds-1.4.3.27-2.module+el8dsrv+12690+c6df6d1b.noarch 389-ds-base-1.4.3.27-2.module+el8dsrv+12690+c6df6d1b.x86_64 python3-lib389-1.4.3.27-2.module+el8dsrv+12690+c6df6d1b.noarch 389-ds-base-libs-1.4.3.27-2.module+el8dsrv+12690+c6df6d1b.x86_64 $ How reproducible: Always. Steps to Reproduce: 1. Run the export command. Eg: $ dsconf --verbose -D "cn=Directory Manager" ldaps://localhost:636 replication dump-changelog -o /tmp/changelog.ldif 2. Check the output 3. Add the missing import and retry ==> success Actual results: The export command fails. Expected results: Command should work. Additional info: Hereunder is the list of issues. 1) The "logging" module is missing: $ dsconf --verbose -D "cn=Directory Manager" ldaps://localhost:636 replication dump-changelog -o /tmp/changelog.ldif DEBUG: The 389 Directory Server Configuration Tool ... DEBUG: Retrieved entry [dn: vendorVersion: 389-Directory/1.4.3.27 B2021.263.1550 ] DEBUG: name 'logging' is not defined Traceback (most recent call last): File "/usr/sbin/dsconf", line 134, in <module> result = args.func(inst, None, log, args) File "/usr/lib/python3.6/site-packages/lib389/cli_conf/replication.py", line 1082, in dump_cl fh = logging.FileHandler(args.output_file, mode='w') NameError: name 'logging' is not defined ERROR: Error: name 'logging' is not defined $ Once the file is edited to import the missing module, the command works fine: $ dsconf -D "cn=Directory Manager" ldaps://localhost:636 replication dump-changelog -o /tmp/changelog.ldif Enter password for cn=Directory Manager on ldaps://localhost:636: ... # Replica Root: dc=example,dc=com # LDIF File: /var/lib/dirsrv/slapd-<INSTANCE>/changelogdb/XXX.ldif changetype: add replgen: 60411dc0000000010000 csn: 60411e8d000000010000 ... $ 2) When using the option "-o ", the custom output file will still refer to the default (non-existing) LDIF file(s): $ dsconf -D "cn=Directory Manager" ldaps://localhost:636 replication dump-changelog -o /tmp/changelog.ldif ... # LDIF File: /var/lib/dirsrv/slapd-<INSTANCE>/changelogdb/99ead603-7b4b11eb-85ced62f-d1e2ee00.ldif ... $ $ ll /var/lib/dirsrv/slapd-<INSTANCE>/changelogdb/ | grep -c ldif 0 $ $ file /tmp/changelog.ldif /tmp/changelog.ldif: ASCII text $ wc -l /tmp/changelog.ldif 88 /tmp/changelog.ldif $ $ grep LDIF /tmp/changelog.ldif # LDIF File: /var/lib/dirsrv/slapd-<INSTANCE>/changelogdb/99ead603-7b4b11eb-85ced62f-d1e2ee00.ldif # LDIF File: /var/lib/dirsrv/slapd-<INSTANCE>/changelogdb/43d77b83-f07411eb-a1e8d62f-d1e2ee00.ldif $ 3) The last line in the output file is "Command successful." I think it should be commented: $ tail -5 /tmp/changelog.ldif - # Replica Root: dc=test,dc=com # LDIF File: /var/lib/dirsrv/slapd-<INSTANCE>/changelogdb/43d77b83-f07411eb-a1e8d62f-d1e2ee00.ldif Command successful. $
Upstream ticket: https://github.com/389ds/389-ds-base/issues/5202
With 389-ds-base-1.4.3.29-3.module+el8dsrv+14615+a86efbbf.x86_64 running # dsconf --verbose -D "cn=directory manager" -w secret12 inst1 replication dump-changelog -o /tmp/changelog.ldif 1. No more missing python module, the command works 2. The LDIF file mentionned is the one set with the -o option : # LDIF File: /tmp/changelog.ldif 3. There is no more 'Command successful' mentionned at the end of the output ldif file => marking as verified
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 (Moderate: redhat-ds:11 security and bug fix update), 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-2022:2210