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 1769296

Summary: cl-dump exit code is 0 even if command fails with invalid arguments
Product: Red Hat Enterprise Linux 7 Reporter: sgouvern
Component: 389-ds-baseAssignee: Simon Pichugin <spichugi>
Status: CLOSED ERRATA QA Contact: RHDS QE <ds-qe-bugs>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 7.8CC: mreynolds, nkinder, pasik, spichugi, tbordaz, vashirov
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 389-ds-base-1.3.10.2-1.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-09-29 19:46:50 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:

Description sgouvern 2019-11-06 10:39:36 UTC
Description of problem:
When running the cl-dump.pl script with invalid arguments, the exit code is always 0, even if an error message is reported


Version-Release number of selected component (if applicable):
389-ds-base-libs-1.3.10.1-4.el7.x86_64


How reproducible:
always, with invalid arguments passed to cl-dump

Steps to Reproduce:
1-a. run dirsrvtests/tests/suites/replication/changelog_test.py::test_cldump_files_removed pytest

Or

1-b. run cl-dump with for example invalid port num
# cl-dump -h localhost -p 2389 -D cn=directory\ manager -w secret12
"Can't connect to localhost:2389 as "cn=directory manager"
2-b. # echo $?
0


Actual results:
rc = 0


Expected results:
A non 0 rc code reflecting that the command couldn't be executed properly


Additional info:
We've seen that changing return for exit in cl-dump.pl cl_dump_and_decode function makes the rc be 255 ...

Comment 2 Simon Pichugin 2020-02-28 13:47:09 UTC
https://pagure.io/389-ds-base/issue/50920

Comment 5 sgouvern 2020-04-01 07:57:55 UTC
running dirsrvtests/tests/suites/replication/changelog_test.py::test_cldump_files_removed 
on 389-ds-base: 1.3.10.2-1.el7

================================================= test session starts =================================================
platform linux -- Python 3.6.8, pytest-5.4.1, py-1.8.1, pluggy-0.13.1 -- /usr/bin/python3
cachedir: .pytest_cache
metadata: {'Python': '3.6.8', 'Platform': 'Linux-3.10.0-1127.el7.x86_64-x86_64-with-redhat-7.8-Maipo', 'Packages': {'pytest': '5.4.1', 'py': '1.8.1', 'pluggy': '0.13.1'}, 'Plugins': {'metadata': '1.8.0', 'html': '2.1.1'}}
389-ds-base: 1.3.10.2-1.el7
nss: 3.44.0-7.el7_7
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.1.1
collected 1 item                                                                                                      

ds/dirsrvtests/tests/suites/replication/changelog_test.py::test_cldump_files_removed PASSED                     [100%]


=> marking as verified

Comment 7 errata-xmlrpc 2020-09-29 19:46:50 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 (389-ds-base bug fix and enhancement 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/RHBA-2020:3894