Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1098264

Summary: Syncing yum repo does not decrement size_left or items_left within task if packages have already been synced in another repo
Product: [Retired] Pulp Reporter: Justin Sherrill <jsherril>
Component: rpm-supportAssignee: pulp-bugs
Status: CLOSED DUPLICATE QA Contact: pulp-qe-list
Severity: unspecified Docs Contact:
Priority: medium    
Version: 2.4.0CC: mhrivnak, skarmark
Target Milestone: ---Keywords: Triaged
Target Release: 2.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-05-15 22:59:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 950743    
Attachments:
Description Flags
Task json none

Description Justin Sherrill 2014-05-15 15:37:20 UTC
Created attachment 895993 [details]
Task json

Description of problem:

Currently sync tasks do not seem to be incrementing size_left, items_left, or rpm_done.

This occurs both in the progress report and the 'result'

      "content": {
        "size_total": 88162120, 
        "items_left": 186, 
        "items_total": 186, 
        "state": "FINISHED", 
        "size_left": 88162120, 
        "details": {
          "rpm_total": 186, 
          "rpm_done": 0, 
          "drpm_total": 0, 
          "drpm_done": 0
        }, 


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

pulp-server-2.4.0-0.13.beta.el6.noarch

How reproducible:
Always

Steps to Reproduce:
1.  Create a yum repo with a feed url
2.  Sync the repo
3.  Examine the sync task (pulp-admin tasks details --task-id=b16f4fe9-1343-468c-a6f9-3a356a003368)

Actual results:
size_left, items_left, and rpm_done 

Expected results:
size_left, items_left, and rpm_done should all decrement as the sync progresses and should be 0 (assuming it did not error)


Attached full task object

Comment 1 Justin Sherrill 2014-05-15 15:55:12 UTC
Hrmmm, this may be a little more odd than i thought.  Syncing a new repo the sync seems to just be complete randomly before it is done.  See:


    "details": {
      "content": {
        "size_total": 3286182868, 
        "items_left": 1671, 
        "items_total": 3480, 
        "state": "FINISHED", 
        "size_left": 1506688624, 
        "details": {
          "rpm_total": 3480, 
          "rpm_done": 1809, 
          "drpm_total": 0, 
          "drpm_done": 0
        }, 
        "error_details": []
      }, 


In this case the task was complete (in fact it went on to publish the distributors), but there were no errors.

Comment 2 Justin Sherrill 2014-05-15 15:58:17 UTC
but note in the scenario of comment #1, all 3480 packages did actually sync.  Looking at the repo's packages afterwards seems to indicate that.

Comment 3 Justin Sherrill 2014-05-15 16:23:24 UTC
Ahh, I think i've figured this out.  If the package has already been synced, it and thus the packages do not need to be imported the rom_done count and size_left count will not decrement.  

So the reproduction steps should be:

1.  Create Repo A with a feed URL
2.  Sync Repo A
3.  Create Repo B with the SAME feed URL
4.  Sync Repo B

Result:  Repo B's counts will not be decremented.

Comment 4 Sayli Karmarkar 2014-05-15 22:59:21 UTC
This is a dup of https://bugzilla.redhat.com/show_bug.cgi?id=1095332 and I am already close to fixing it. Basically when we remove packages which are already downloaded from the to_be_downloaded list, we were not updating the progress for new number and size of packages. That is why the size and number of packages are reducing for the packages getting downloaded but do not reach zero at the end.

Comment 5 Sayli Karmarkar 2014-05-15 23:00:15 UTC
Meant to close it as a dup, not NOTABUG.

*** This bug has been marked as a duplicate of bug 1095332 ***