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 1411081 - usage of abrt-cli is wrong in sosreport abrt plugin
Summary: usage of abrt-cli is wrong in sosreport abrt plugin
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: sos
Version: 7.3
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Pavel Moravec
QA Contact: BaseOS QE - Apps
URL: https://github.com/sosreport/sos/pull...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-08 09:17 UTC by David Kutálek
Modified: 2017-08-10 20:22 UTC (History)
9 users (show)

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


Attachments (Terms of Use)

Description David Kutálek 2017-01-08 09:17:01 UTC
Description of problem:

sosreports abrt plugin calls 'abrt-cli -lf', which is not correct abrt-cli usage.

# sosreport -o abrt -v --batch
...
[plugin:abrt] added cmd output 'abrt-cli -lf'
...
[plugin:abrt] collecting output of 'abrt-cli -lf'

# abrt-cli -lf
Usage: abrt-cli [--authenticate] [--version] COMMAND [DIR]...
# cat ./sosreport-localhost.localdomain-20170108093933/sos_commands/abrt/abrt-log 
Usage: abrt-cli [--authenticate] [--version] COMMAND [DIR]...

# abrt-cli --help
Usage: abrt-cli [--authenticate] [--version] COMMAND [DIR]...

    list, ls      List problems [in DIRs]
    remove, rm    Remove problem directory DIR
    report, e     Analyze and report problem data in DIR
    info, i       Print information about DIR
    status, st    Print the count of the recent crashes
    process, p    Process multiple problems

See 'abrt-cli COMMAND --help' for more information


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

sos-3.3-5.el7_3.noarch
abrt-2.1.11-45.el7.x86_64
abrt-cli-2.1.11-45.el7.x86_64

How reproducible:

Always

Steps to Reproduce:
1. sosreport -o abrt
2.
3.

Actual results:

No useful output from abrt-cli, effectively no useful output 
from abrt plugin at all with default config.


Expected results:

'abrt-cli list' gathered.
'abrt-cli status' could be also useful

Additional info:

Comment 1 Pavel Moravec 2017-01-09 08:45:58 UTC
Nothing from the plugin can work :(

1)
        result = self.call_ext_prog('sqlite3 '
                                    '/var/spool/abrt/abrt-db \'select UUID '
                                    'from abrt_v4\'')

returns error:

"Error: no such table: abrt_v4"


2)
                self.add_cmd_output("abrt-cli -ib %s" % uuid,
                                    suggest_filename=("backtrace_%s" % uuid))

returns error:

Usage: abrt-cli [--version] COMMAND [DIR]...


3)
        self.add_cmd_output("abrt-cli -lf", suggest_filename="abrt-log")

returns above error as well.



I guess abrt-cli -ib provided core_backtrace content - we can get the same (plus little more valuable info) from "abrt-cli info -d DIR" as well.

Comment 2 Bryn M. Reeves 2017-01-09 11:32:52 UTC
The -lf dates back to the original commit in 2010 (by Pierre Carrier, on behalf of Tomas Smetana). Was this syntax ever valid? (it's not on RHEL6.6 or anything newer).

The database stuff was also added by Pierre; I've no idea where the commands it uses came from, but it's pretty safe to assume they are all garbage.

It would help to get some input from the Abrt team to indicate what is actually useful to collect today for this plugin.

Comment 3 Pavel Moravec 2017-01-09 11:36:37 UTC
(In reply to Bryn M. Reeves from comment #2)
> The -lf dates back to the original commit in 2010 (by Pierre Carrier, on
> behalf of Tomas Smetana). Was this syntax ever valid? (it's not on RHEL6.6
> or anything newer).
> 
> The database stuff was also added by Pierre; I've no idea where the commands
> it uses came from, but it's pretty safe to assume they are all garbage.
> 
> It would help to get some input from the Abrt team to indicate what is
> actually useful to collect today for this plugin.

Jakub,
could you please review if

https://github.com/sosreport/sos/pull/911

collects reasonable info?

(and just out of curiosity, had the current commands from #c1 ever work?)

Comment 5 Matej Habrnal 2017-01-17 10:35:19 UTC
(In reply to Pavel Moravec from comment #3)

> Jakub,
> could you please review if
> 
> https://github.com/sosreport/sos/pull/911
> 
> collects reasonable info?

I looked at the pull request and it looks good to me as well as outputs the plugin provides.

> 
> (and just out of curiosity, had the current commands from #c1 ever work?)

I found the abrt-cli list worked with "-f" parameters (List reported problems too). abbreviated parameters like "-l" was introduced after the "-f" was removed. So I don't think the command worked.

Comment 6 Pavel Moravec 2017-02-20 21:38:03 UTC
Closed #911 via f866f75.

Comment 7 Pavel Moravec 2017-08-10 20:22:53 UTC
This bug shall be fixed in package:

sos-3.4-6.el7.noarch.rpm

available via errata:

https://access.redhat.com/errata/RHBA-2017:2331


Thus I am closing this bug report.


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