Bug 1329980 - foreman-debug collects just few mongo task statuses
Summary: foreman-debug collects just few mongo task statuses
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Foreman Debug
Version: 6.1.7
Hardware: x86_64
OS: Linux
medium
low vote
Target Milestone: Unspecified
Assignee: Lukas Zapletal
QA Contact: Corey Welton
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-25 08:39 UTC by Pavel Moravec
Modified: 2019-04-01 20:27 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-16 19:00:42 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Foreman Issue Tracker 15967 None None None 2016-08-03 19:04:50 UTC
Red Hat Bugzilla 1583233 None None None Never

Internal Links: 1583233

Description Pavel Moravec 2016-04-25 08:39:03 UTC
Description of problem:
foreman-debug collects mongo collection task_status (worth used for investigating pulp task issues). BUT the command in

/usr/share/foreman/script/foreman-debug.d/katello-debug.sh

collects only 20 rows of that table/collection, due to the default (non-clever) limitation of mongo. Please collect _all_ the rows, by replacing:

add_cmd "mongo pulp_database --eval \"db.task_status.find().pretty().shellPrint()\"" "mongo-task_status"


by:

add_cmd "mongo pulp_database --eval \"DBQuery.shellBatchSize = 100000;; db.task_status.find().pretty().shellPrint()\"" "mongo-task_status"

(i.e. add "DBQuery.shellBatchSize = 100000;" there)


Version-Release number of selected component (if applicable):
katello-debug-2.2.0.19-1.el7sat.noarch


How reproducible:
100%


Steps to Reproduce:
1. foreman-debug
2. unpack collected f-d
3. check mongo-task_status


Actual results:
mongo-task_status has just 20 entries and the file ends with:

Type "it" for more



Expected results:
mongo-task_status to have all entries


Additional info:
Since the table/collection might be quite big and collecting it might not be necessary, isn't it better to collect e.g. all tasks from past one week or so? Or additionally older not finished tasks?

Comment 3 Bryan Kearney 2016-07-08 20:46:35 UTC
Per 6.3 planning, moving out non acked bugs to the backlog

Comment 5 Zach Huntington-Meath 2016-08-03 18:06:46 UTC
Created redmine issue http://projects.theforeman.org/issues/15967 from this bug

Comment 6 Bryan Kearney 2016-08-04 08:14:29 UTC
Upstream bug component is Content Management

Comment 7 Bryan Kearney 2016-08-24 20:15:11 UTC
Upstream bug component is Infrastructure

Comment 8 pm-sat@redhat.com 2017-10-17 08:16:44 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/15967 has been resolved.

Comment 9 Chris Brown 2018-07-11 18:53:47 UTC
Satellite 6.4 foreman-debug mongo-task_status output:

COMMAND> mongo pulp_database --eval "DBQuery.shellBatchSize = 200;; db.task_status.find().sort({finish_time: -1}).pretty().shellPrint()"

/usr/sbin/foreman-debug: line 79: mongo: command not found

Comment 10 Lukas Zapletal 2018-07-12 15:09:24 UTC
Chris, this is expected. When you install the command, it will work.

We cannot make mongo CLI a dependency of foreman-debug. If you really think the output must be always there, then file new BZ aganst Packaging to add this as Katello package RPM dependency.

Please confirm first that it works fine when the command is present. I think it is mongo-client RPM package, not sure.

Comment 13 Chris Brown 2018-08-24 19:45:43 UTC
Ok cool, confirmed and verified in Satellite 6.4

Comment 15 Bryan Kearney 2018-10-16 19:00: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/RHSA-2018:2927


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