Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1250104 - [RFE] pulp-admin tasks list filter output on state and time
[RFE] pulp-admin tasks list filter output on state and time
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Pulp (Show other bugs)
6.1.0
Unspecified Unspecified
unspecified Severity low (vote)
: Beta
: Unused
Assigned To: satellite6-bugs
Katello QA List
: FutureFeature, Triaged
Depends On:
Blocks: 1122832 260381
  Show dependency treegraph
 
Reported: 2015-08-04 10:10 EDT by Peter Vreman
Modified: 2018-09-19 11:21 EDT (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-27 05:17:07 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Pulp Redmine 851 Normal CLOSED - CURRENTRELEASE As a user, I can see tasks in particular states 2016-02-08 14:00 EST
Red Hat Product Errata RHBA-2016:1501 normal SHIPPED_LIVE Red Hat Satellite 6.2 Capsule and Server 2016-07-27 08:28:58 EDT

  None (edit)
Description Peter Vreman 2015-08-04 10:10:41 EDT
Description of problem:
The output of of pulp-admin tasks lists contains many successful runs of the past days. In many cases the engineer is only interrested in the current running or waiting tasks. And in troubleshooting for Failed tasks. And to limit the output also a filter on the last X day(s).

The current command always retruns everything resulting in 1+MB text output

# pulp-admin tasks list > pulp.tasks.list.`date '+%Y%m%d%H%M'`
# ls -l pulp.tasks.list.*
-rw-r--r-- 1 root root 1301224 Aug  4 13:54 pulp.tasks.list.201508041354

# grep State: $(ls -1 pulp.tasks.list.* | tail -n1) |sort |uniq -c
      2 State:       Running
   3516 State:       Successful
      2 State:       Waiting




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


How reproducible:


Steps to Reproduce:
1. 
Have system with load running for at least a week including 50 RedHat repo syncs for 7 days. 
3. List pulp tasks

Actual results:
All tasks returned for 7 Days


Expected results:
Able to filter State:
- Waiting, Running, Failed, Successful
Able to limit timerange:
- E.g. Last 24h, last 4h


Additional info:
Comment 2 Michael Hrivnak 2015-10-26 13:19:49 EDT
This is done in pulp 2.7.0.
Comment 3 Brad Buckingham 2015-10-26 13:42:30 EDT
Satellite 6.2 is currently targeted to include pulp 2.8.0 or later; therefore, aligning this bug to that release for verification.
Comment 5 Brad Buckingham 2015-10-26 13:49:20 EDT
For anyone that may come across this bugzilla and are unfamiliar with the pulp-admin-client, you may find the following KCS useful:

https://access.redhat.com/solutions/1295653
Comment 6 pulp-infra@redhat.com 2015-10-26 13:55:44 EDT
The Pulp upstream bug status is at ON_QA. Updating the external tracker on this bug.
Comment 7 pulp-infra@redhat.com 2015-10-26 13:55:48 EDT
The Pulp upstream bug priority is at Normal. Updating the external tracker on this bug.
Comment 8 Bryan Kearney 2016-01-04 10:36:33 EST
moving this to post. Please verify once 2.7 or later is incorporated into the build.
Comment 9 pulp-infra@redhat.com 2016-02-08 14:00:52 EST
The Pulp upstream bug status is at CLOSED - CURRENTRELEASE. Updating the external tracker on this bug.
Comment 12 Lukas Pramuk 2016-07-25 11:48:24 EDT
VERIFIED.

@satellite-6.2.0-21.1.el7sat.noarch
pulp-admin-client-2.8.3.3-1.el7sat.noarch

# pulp-admin tasks list -h
Command: list
Description: lists tasks queued (waiting) or running on the server

Available Arguments:

  --all, -a   - if specified, all tasks in all states are shown
  --state, -s - comma-separated list of tasks states desired to be shown.
                Example: "running,waiting,canceled,successful,failed". Do not
                include spaces.

>>> new options to filter the output were added

# pulp-admin tasks list --all |sort |uniq -c|grep State:
    111 State:       Successful
      1 State:       Waiting

# pulp-admin tasks list --state waiting  |sort |uniq -c|grep State:
      1 State:       Waiting
# pulp-admin tasks list --state successful  |sort |uniq -c|grep State:
    111 State:       Successful

# pulp-admin tasks list --state waiting,successful  |sort |uniq -c|grep State:
    111 State:       Successful
      1 State:       Waiting

# pulp-admin tasks list |sort |uniq -c|grep State:
      1 State:       Waiting

>>> by default it lists waiting and running tasks only
Comment 14 errata-xmlrpc 2016-07-27 05:17:07 EDT
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-2016:1501

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