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 1170592 - rpm.rpmva only working when --verify set, should be documented
Summary: rpm.rpmva only working when --verify set, should be documented
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: sos
Version: 7.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Pavel Moravec
QA Contact: Miroslav Hradílek
URL:
Whiteboard:
Depends On:
Blocks: 1298112 1313485 1382018
TreeView+ depends on / blocked
 
Reported: 2014-12-04 12:25 UTC by Martin Frodl
Modified: 2016-11-04 04:52 UTC (History)
6 users (show)

Fixed In Version: sos-3.3-0.el7
Doc Type: Bug Fix
Doc Text:
Prior to this update, the rpm.rpmva sos option was applied only in conjunction to --verify option. This was confusing for users wanting to collect "rpm -Va" command output. With this update, it is sufficient to provide rpm.rpmva option alone to let sos invoke that command.
Clone Of:
: 1382018 (view as bug list)
Environment:
Last Closed: 2016-11-04 04:52:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
sos.log (930 bytes, text/plain)
2014-12-04 13:00 UTC, Martin Frodl
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2380 0 normal SHIPPED_LIVE sos bug fix and enhancement update 2016-11-03 13:52:35 UTC

Description Martin Frodl 2014-12-04 12:25:59 UTC
Description of problem:

The -k command-line option should set plugin-specific options to desired values. However, at least in some cases, it fails to do so.

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

How reproducible:
100%

Steps to Reproduce:
# sosreport -o rpm -k rpm.rpmva --batch
...
Your sosreport has been generated and saved in:
  /var/tmp/sosreport-sheep-9.lab.eng.brq.redhat.com-20141204130904.tar.xz
...
# tar -xf /var/tmp/sosreport-sheep-9.lab.eng.brq.redhat.com-20141204130904.tar.xz
# tree sosreport-sheep-9.lab.eng.brq.redhat.com-20141204130904


Actual results:

sosreport-sheep-9.lab.eng.brq.redhat.com-20141204130904/
|-- installed-rpms -> sos_commands/rpm/sh_-c_rpm_--nodigest_-qa_--qf_NAME_-_VERSION...
|-- sos_commands
|   `-- rpm
|       `-- sh_-c_rpm_--nodigest_-qa_--qf_NAME_-_VERSION_-_RELEASE_._ARCH_INSTALLTIME...
|-- sos_logs
|   |-- sos.log
|   `-- ui.log
|-- sos_reports
|   |-- sos.html
|   `-- sos.txt
`-- version.txt

Expected results:

File rpm_-Va present in sos_commands/rpm directory.

Additional info:

The reproducer behaves correctly on RHEL 6. Since both RHEL 6 & 7 man pages for sosreport say basically the same thing about -k, the behaviour should also be identical.

Comment 2 Bryn M. Reeves 2014-12-04 12:51:02 UTC
Could you attach the sos.log (or the whole tarball)?

Comment 3 Martin Frodl 2014-12-04 13:00:36 UTC
Created attachment 964632 [details]
sos.log

Sure, here you are.

Comment 4 Bryn M. Reeves 2014-12-04 14:29:34 UTC
Thanks - just wanted to check that nothing else was going on here.

In sos-3.2 no verification happens unless the global '--verify' option is enabled.

Since 'rpm.rpmva' turns on *additional* verification (i.e. "rpm -Va" rather than the targeted package verify list) it will not do anything unless you also specify verify.

This is not a bug but we should probably improve the documentation of this behavior.

E.g.:
# sosreport -v --verify --batch --debug -o rpm -k rpm.rpmva

sosreport (version 3.2)

[...]
  Running 1/1: rpm...        
[plugin:rpm] collecting output of 'rpm -Va'

Comment 5 Martin Frodl 2014-12-05 15:47:01 UTC
It still seems to me the option -k is not working as expected. When testing bug 1084990, I tried to enable the option docker.all which should collect the output of 'docker ps -a' command, as opposed to 'docker ps' when this option is not set. In both cases, I only found 'docker ps' output in the archive.

Also, sosreport with '-o apache' results in httpd's access_log and error_log files being included in the archive, no matter whether the '-k apache.log' option is present or not.

Comment 6 Bryn M. Reeves 2014-12-05 16:27:55 UTC
The docker plugin is working fine for me. The behaviour of 'docker.all' as implemented is to collect *logs* for all containers (active and inactive). It does not collect the output of "docker ps -a" and store it in the report (although I think you can argue that it should).

This is how it behaves:

# sosreport -v --batch --debug --build -o docker -k docker.all

sosreport (version 3.2)
[...]
 Setting up plugins ...
[plugin:docker] added copyspec '/var/lib/docker/repositories-*'
[plugin:docker] added cmd output 'docker info'
[plugin:docker] added cmd output 'docker ps'
[plugin:docker] added cmd output 'docker images'
[plugin:docker] added cmd output 'docker logs 9b8f61c09dba'
[plugin:docker] added cmd output 'docker logs 6f46267c91d6'
[plugin:docker] added cmd output 'docker logs '
[plugin:docker] added copyspec '/etc/udev/rules.d/80-docker.rules'
 Running plugins. Please wait ...


# sosreport -v --batch --debug --build -o docker

sosreport (version 3.2)
[...]
 Setting up plugins ...
[plugin:docker] added copyspec '/var/lib/docker/repositories-*'
[plugin:docker] added cmd output 'docker info'
[plugin:docker] added cmd output 'docker ps'
[plugin:docker] added cmd output 'docker images'
[plugin:docker] added cmd output 'docker logs '
[plugin:docker] added copyspec '/etc/udev/rules.d/80-docker.rules'
 Running plugins. Please wait ...

Without 'docker.all' we do not generate the two additional 'docker logs <container ID>' commands.

This patch came from one of our Ubuntu developers and imho the plugin should *also* store the 'docker ps -a' - I'll file an issue and send a patch upstream for that but otherwise the plugin is currently working as designed.

> Also, sosreport with '-o apache' results in httpd's access_log and error_log
> files being included in the archive, no matter whether the '-k apache.log' 
> option is present or not.

That's not what the option does. The plugin will always attempt to collect up to 5M each of access_log, error_log, ssl_access_log, ssl_error_log. If the apache.log option is given then *all* files under /var/log/httpd (including custom logs defined in httpd.conf or elsewhere) are collected without any size limitations.

This option should probably be merged with the global '--all-logs' but it is working as designed currently.

Comment 7 Martin Frodl 2014-12-08 10:26:18 UTC
Point taken, thanks for your kind explanation.

To sum things up: what needs to be changed is the documentation which should make clear that rpm.rpmva only works when the --verify option is set. I am changing the bug's summary in order to make this request more explicit. Please remember to include the information both in online help and man page; currently, the --verify option is only present in online help (this issue has been reported as bug 1171658).

Comment 17 Brad Hubbard 2016-02-06 00:59:10 UTC
The requirement for --verify to be set for rpmva to work has been removed upstream with this commit.

https://github.com/sosreport/sos/commit/56614f20abb22e7e6c891fc83a9f2c9149646586

Comment 19 Mike McCune 2016-03-28 23:20:28 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 25 errata-xmlrpc 2016-11-04 04:52:59 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://rhn.redhat.com/errata/RHBA-2016-2380.html


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