Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1882330

Summary: dsidm sends errors to stdout, not stderr
Product: Red Hat Directory Server Reporter: Graham Leggett <minfrin>
Component: 389-ds-baseAssignee: mreynolds
Status: CLOSED ERRATA QA Contact: LDAP QA Team <idm-ds-qe-bugs>
Severity: unspecified Docs Contact: Evgenia Martynyuk <emartyny>
Priority: high    
Version: 11.4CC: aadhikar, idm-ds-dev-bugs, jachapma, mreynolds, pasik, spichugi, tbordaz, vashirov
Target Milestone: DS12.2Keywords: Reopened, TestCaseProvided, Triaged
Target Release: dirsrv-12.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: sync-to-jira
Fixed In Version: redhat-ds-12-9020020230314150545.1674d574 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-30 09:40:35 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 Graham Leggett 2020-09-24 10:40:23 UTC
Description of problem:

dsidm sends errors to stdout, not stderr.

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

python3-lib389-1.4.2.4-10

How reproducible:

Always

Steps to Reproduce:
1. Issue this command twice:

[root@gatekeeper ~]# dsidm -b "cn=config" gatekeeper organizationalunit create --ou people 2> /dev/null

2.
3.

Actual results:

Error message goes to stdout, not suppressed.

Expected results:

Error message goes to stderr, as expected.

Additional info:

Comment 2 Simon Pichugin 2020-10-21 14:44:09 UTC
(In reply to Graham Leggett from comment #0)
> Description of problem:
> 
> dsidm sends errors to stdout, not stderr.
I can't reproduce the issue on a newer version.
Could you please check once again?

Version:
389-ds-base-1.4.2.16-1.fc31.x86_64
python3-lib389-1.4.2.16-1.fc31.noarch

$ dsidm localhost -b "cn=config" gatekeeper organizationalunit create --ou people 2> /dev/null

Result:
No output.

Comment 3 mreynolds 2021-03-15 20:34:43 UTC
I think this was fixed in a newer version as I also can not reproduce this problem.  Graham, have you been able to try a newer version since filing this bug?

Comment 4 thierry bordaz 2022-03-23 15:31:40 UTC
Closing it without feedback. Please reopen if not yet fixed.

Comment 5 mreynolds 2023-02-06 21:21:02 UTC
Upstream ticket:

https://github.com/389ds/389-ds-base/issues/5630

Comment 10 Viktor Ashirov 2023-05-04 13:50:09 UTC
Build tested:
389-ds-base-2.2.7-2.module+el9dsrv+18726+78959e84.x86_64

Using annotate-output to mark stderr as E and stdout as O:
# annotate-output dsidm -b "cn=config" localhost organizationalunit create --ou users
09:48:14 I: Started dsidm -b cn=config localhost organizationalunit create --ou users
09:48:15 O: Successfully created users
09:48:15 I: Finished with exitcode 0

Second time:
# annotate-output dsidm -b "cn=config" localhost organizationalunit create --ou users
09:48:18 I: Started dsidm -b cn=config localhost organizationalunit create --ou users
09:48:18 E: Error: Already exists
09:48:18 I: Finished with exitcode 1

Error output is printed to stderr, marking as VERIFIED.

Comment 12 errata-xmlrpc 2023-05-30 09:40:35 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 (redhat-ds:12 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-2023:3344