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 1438257 - [regression] commands with return code 1 not further collected
Summary: [regression] commands with return code 1 not further collected
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: sos
Version: 7.4
Hardware: All
OS: Linux
high
medium
Target Milestone: rc
: ---
Assignee: Pavel Moravec
QA Contact: Miroslav Hradílek
URL: https://github.com/sosreport/sos/issu...
Whiteboard:
Depends On:
Blocks: 1443506
TreeView+ depends on / blocked
 
Reported: 2017-04-02 13:23 UTC by Pavel Moravec
Modified: 2017-08-01 23:10 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 23:10:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2203 0 normal SHIPPED_LIVE sos bug fix and enhancement update 2017-08-01 19:41:56 UTC

Description Pavel Moravec 2017-04-02 13:23:44 UTC
Description of problem:

rpm -Va is not further collected, in case it detects something( * ). The regression is introduced by reasonable upstream commit 77eb4ab and the fact that rpm -Va returns 1 if it reports something(*):

# rpm -Va 2>&1 > rpm.va
# echo $?
1
# wc rpm.va
  1546   3166 130196 rpm.va
# 

(*) "something" - I would expect rpm -V to return 0 regardless whatever it detects, until something is seriously broken (i.e. its database). It is possible it returns nonzero on some types of verify checks only, but that command "failed" the same way on multiple systems. And practically any system has something changed from installed packages (like config files).

As is, I would see it as rpm bug but impacting primarily sos.


Version-Release number of selected component (if applicable):
sos-3.4-1.el7.noarch


How reproducible:
100%


Steps to Reproduce:
1. Have a system with more changes from installed packages (but I guess almost any system can be used). Ensure "rpm -Va" is completed within 180seconds (to prevent command timeout in sos)
2. sosreport --only-plugins rpm -k rpm.rpmva -vv --batch
3. check if resulted tarball contains file sos_commands/rpm/rpm-Va


Actual results:
No such file collected


Expected results:
The file shall be collected.


Additional info:

Comment 2 Bryn M. Reeves 2017-04-19 13:58:38 UTC
This is a much more serious regression than the title implies: this affects all commands that return a non-zero status but still produce output (it turns out there are a lot of them).

This change was made to address a problem in a single plugin: it's safer at this point to undo this and to deal with the problem in that plugin instead.

Comment 5 errata-xmlrpc 2017-08-01 23:10:42 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-2017:2203


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