Bug 678119

Summary: Two fields from repo sync status are not being updated correctly
Product: [Retired] Pulp Reporter: John Matthews <jmatthew>
Component: z_otherAssignee: John Matthews <jmatthew>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: low Docs Contact:
Priority: medium    
Version: unspecifiedCC: shughes, skarmark
Target Milestone: ---Keywords: Triaged
Target Release: Sprint 21   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-16 12:09:47 UTC Type: ---
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: 647488    

Description John Matthews 2011-02-16 19:41:24 UTC
In the below:  "items_left": 500,   should be 0
and under details: size_left should be 0.

Need to verify rest of fields.  I think those are the only ones not correct.


{"scheduled_time": 0, 
"exception": null, 
"status_path": "/pulp/api/repositories/repo500/sync/346aa491-3a01-11e0-a0cd-0022157359f6/", 
"finish_time": {"$date": 1297865775645}, 
"start_time": {"$date": 1297865766991}, 
"traceback": null, 
"method_name": "_sync", 
"state": "finished", 
"result": null, 
"progress": 
  {"status": "FINISHED", 
   "num_success": 500, 
   "size_total": 8821483, 
   "num_download": 0, 
   "item_name": null, 
   "items_left": 500, 
   "items_total": 500, 
   "step": "Finished", 
   "size_left": 0, 
   "details": {
     "rpm": {"total_count": 500, "total_size_bytes": 8821483, "num_success": 500, "size_left": 19328, "items_left": 0}}, 
   "error_details": [], 
   "num_error": 0}, "id": "346aa491-3a01-11e0-a0cd-0022157359f6"}

Comment 1 John Matthews 2011-02-24 16:21:40 UTC
Yum sync has incorrect values for 'items_left' and 'size_left' under details.

Local sync is missing a few fields under details:
 - total_size_bytes
 - size_left

Yum sync is missing:
 - num_errors under details["rpm"]



Yum Sync;
{
 'status': 'FINISHED', 
 'num_success': 3, 
 'size_total': 6791, 
 'num_download': 3, 
 'item_name': None, 
 'items_left': 3, 
 'items_total': 3, 
 'step': 'Finished', 
 'size_left': 0, 
 'details': {
    'rpm': {
        'total_count': 3, 
        'total_size_bytes': 6791, 
        'num_success': 3, 
        'size_left': 2216, 
        'items_left': 0}}, 
 'error_details': [], 
 'num_error': 0
 }

Local Sync:
{
  'status': 'running', 
  'size_total': 6791, 
  'num_download': 3, 
  'items_left': 0, 
  'items_total': 3, 
  'step': 'Finished', 
  'items_remaining': 0, 
  'num_success': 3, 
  'item_name': None, 
  'size_left': 0, 
  'details': {
    'rpm': {
        'total_count': 3, 
        'num_error': 0, 
        'num_success': 3, 
        'items_left': 0}
        }, 
  'error_details': [], 
  'num_error': 0}
}

Comment 2 John Matthews 2011-02-24 19:06:46 UTC
QE: I am testing this functionality by using unit tests and examining the field returned in the JSON data against known data.  This is not something you can test with the CLI alone.  You need to make an API call and look at returned JSON data.

 
To test local syncs I am running:
cd test/unit
nosetests test_api.py:TestApi.test_local_sync_callback


To test yum syncs I am running:
cd test/integration
nosetests yum_repo_sync.py



Requires: Grinder 0.81
Fixed with 2 commits below in pulp:
http://git.fedorahosted.org/git/?
p=pulp.git;a=commitdiff;h=67142309182a1d4c5ec90dbee925f4baa7385b35

http://git.fedorahosted.org/git/?p=pulp.git;a=commitdiff;h=caa3e5462a57cf8b522a95835ead6f2cae250719

Comment 3 Jeff Ortel 2011-02-25 20:34:13 UTC
build: 0.143

Comment 4 Preethi Thomas 2011-03-07 19:20:12 UTC

[root@preethi unit]# nosetests test_api.py:TestApi.test_local_sync_callback
.
----------------------------------------------------------------------
Ran 1 test in 1.161s

OK
[root@preethi unit]# cd ..
[root@preethi test]# cd integration/
[root@preethi integration]# 
[root@preethi integration]# 
[root@preethi integration]# nosetests yum_repo_sync.py
.
----------------------------------------------------------------------
Ran 1 test in 2.514s

OK
[root@preethi integration]#

Comment 5 Preethi Thomas 2011-03-07 20:12:20 UTC
verified 


[root@preethi ~]# rpm -q pulp
pulp-0.0.144-1.fc14.noarch

Comment 6 Preethi Thomas 2011-08-16 12:09:47 UTC
Closing with Community Release 15

pulp-0.0.223-4.

Comment 7 Preethi Thomas 2011-08-16 12:22:07 UTC
Closing with Community Release 15

pulp-0.0.223-4.