Bug 1250104 - [RFE] pulp-admin tasks list filter output on state and time
Summary: [RFE] pulp-admin tasks list filter output on state and time
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Pulp
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
low vote
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Katello QA List
Depends On:
Blocks: 1122832 260381
TreeView+ depends on / blocked
Reported: 2015-08-04 14:10 UTC by Peter Vreman
Modified: 2021-04-06 18:24 UTC (History)
14 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Last Closed: 2016-07-27 09:17:07 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Pulp Redmine 851 0 Normal CLOSED - CURRENTRELEASE As a user, I can see tasks in particular states 2016-02-08 19:00:50 UTC
Red Hat Product Errata RHBA-2016:1501 0 normal SHIPPED_LIVE Red Hat Satellite 6.2 Capsule and Server 2016-07-27 12:28:58 UTC

Description Peter Vreman 2015-08-04 14:10:41 UTC
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:
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 17:19:49 UTC
This is done in pulp 2.7.0.

Comment 3 Brad Buckingham 2015-10-26 17:42:30 UTC
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 17:49:20 UTC
For anyone that may come across this bugzilla and are unfamiliar with the pulp-admin-client, you may find the following KCS useful:


Comment 6 pulp-infra@redhat.com 2015-10-26 17:55:44 UTC
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 17:55:48 UTC
The Pulp upstream bug priority is at Normal. Updating the external tracker on this bug.

Comment 8 Bryan Kearney 2016-01-04 15:36:33 UTC
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 19:00:52 UTC
The Pulp upstream bug status is at CLOSED - CURRENTRELEASE. Updating the external tracker on this bug.

Comment 12 Lukas Pramuk 2016-07-25 15:48:24 UTC


# 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 09:17:07 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.


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