Red Hat Satellite engineering is moving the tracking of its product development work on Satellite 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 "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. 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 "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-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 1019400 - RFE: Easier and quicker way to fetch last/current sync status for a large number of repositories
Summary: RFE: Easier and quicker way to fetch last/current sync status for a large num...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: API
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On: 1087998
Blocks: sat6-pulp-future 976275
TreeView+ depends on / blocked
 
Reported: 2013-10-15 15:56 UTC by Justin Sherrill
Modified: 2017-07-26 19:43 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-05-05 18:07:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Justin Sherrill 2013-10-15 15:56:00 UTC
Description of problem:

Currently in katello we want to display for a large set of repositories:

a) The current sync status if it is syncing now
b) The status of the last sync if the repository is not syncing

To get this we have to for each repository:

1) search for tasks by tag, for the repo and syncing tag
2) if nothing is returned, look up the repo's sync history

This is very time consuming for a large number of repositories, as worst case we have to go to the server 2x per repo.


Ideally we could pass a list of repo_ids and get all of the tasks we would want to fit this criteria.

Comment 1 Randy Barlow 2014-04-03 15:09:06 UTC
Since the two bugs that are listed here as dependencies as for future Satellite (I assume after 6.0.0), does that mean we can push this RFE off of our upcoming 2.4 release? We are building a beta, and we would like to avoid adding new features after we enter beta.

Comment 2 Justin Sherrill 2014-04-21 15:30:40 UTC
Randy,

sat6-pulp-future is currently designated for items desired for Sat 6.0 GA.  It's my understanding that Pulp 2.4 is the release slated for GA, so we would appreciate this not being pushed off of 2.4's release :)

-Justin

Comment 3 Michael Hrivnak 2014-04-21 16:17:01 UTC
We have a new task search API that might solve this. We have another BZ to document that API, at which point we can look at whether it provides what you need.

I suspect it can be used to search for tasks for a list of repos, which I think is all you need.

Comment 4 Brian Bouterse 2014-05-05 18:07:21 UTC
Here's an example request to get all running and finished tasks for two specific repos with 1 query using the search API.  The search API is located here:

http://pulp-dev-guide.readthedocs.org/en/latest/integration/rest-api/dispatch/task.html#searching-for-tasks


Here is the curl command I used:

curl -H "Accept: application/json" -X POST -k -u admin:admin -d @search.json 'https://localhost/pulp/api/v2/tasks/search/' | python -m json.tool


Here are the contents of search.json

{
 "criteria": {
   "filters": {"tags": {"$in": ["pulp:repository:zoo", "pulp:repository:sat6-tools"]}, "state": {"$in": ["running", "finished"]}},
   "skip": 0,
   "fields": ["id", "task_type", "tags", "state"]}
}


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