Bug 729760 - Repo Sync - seems to be hung and status is confusing
Summary: Repo Sync - seems to be hung and status is confusing
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: user-experience
Version: 1.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: ---
Assignee: John Matthews
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-10 18:31 UTC by Brad Buckingham
Modified: 2013-09-09 16:34 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-24 20:13:27 UTC


Attachments (Terms of Use)

Description Brad Buckingham 2011-08-10 18:31:50 UTC
Description of problem:


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

Started a sync from Katello of RHEL 6 content.  After about 2 hours, Katello indicated that sync was still in progress, so checked status using pulp-admin.  The response indicates that the number of packages is 0, yet it says the sync is 100% done with 3485 of 3486 packages downloaded.  This seems confusing.  Is the sync really done?

Pulp packages in use are:
pulp-0.0.223-1.fc15.noarch
pulp-consumer-0.0.223-1.fc15.noarch
pulp-admin-0.0.223-1.fc15.noarch
pulp-common-0.0.223-1.fc15.noarch
pulp-client-lib-0.0.223-1.fc15.noarch

How reproducible:


Steps to Reproduce:
1. initiated a sync from katello
2. after about 2 hours...
3. ran: pulp-admin -u admin -p admin repo status --id=1312917341411-another_repo-ACME_Corporation
  
Actual results:
+------------------------------------------+
 Status for 1312917341411-another_repo-ACME_Corporation
+------------------------------------------+
Repository: 1312917341411-another_repo-ACME_Corporation
Number of Packages: 0
Last Sync: never
Currently syncing: 100% done (3485 of 3486 packages downloaded)


Expected results:


Additional info:

Comment 1 John Matthews 2011-12-13 20:45:25 UTC
There were a few issues here.

1)  The issue Brad saw with 100% being reported but progress not updating relates to an issue with our ProgressTracker handling retries.  This is common against the CDN with bad checksum data with distribution files.  A retry is triggered and grinder tries to refetch these files, the retry logic isn't working with our ProgressTracker.  A separate bz exists for this issue bz 765930

2) When an error did occur we were no longer displaying it with repo status.  I fixed this as can be seen with this example:


$ sudo pulp-admin repo status --id rhel6_1_x86_64_preserve
+------------------------------------------+
     Status for rhel6_1_x86_64_preserve
+------------------------------------------+
Repository: rhel6_1_x86_64_preserve
Number of Packages: 5609
Last Sync: 2011-12-13 15:04:45-05:00
Last Error: 2011-12-13 15:04:45-05:00

1 Tree_File Error(s):
	md5_missmatch on https://cdn.redhat.com/content/dist/rhel/server/6/6.1/x86_64/os//images/boot.iso



3) As to the status being confusing. During the sync we were not reporting what we were doing to the status command, so if we were importing packages and stuck in this state for 10 mins it wasn't being clearly displayed.  That is now fixed as seen with this example:



$ sudo pulp-admin repo status --id rhel6_1_x86_64_preserve
+------------------------------------------+
     Status for rhel6_1_x86_64_preserve
+------------------------------------------+
Repository: rhel6_1_x86_64_preserve
Number of Packages: 4170
Last Sync: 2011-12-13 11:37:23-05:00
Currently syncing: Importing data into pulp (5615 of 5615 items downloaded. 0.0 bytes remaining)



4) I also touched up regular status reporting to show the number of bytes left as seen with below:
 

$ sudo pulp-admin repo status --id rhel6_1_x86_64_preserve
+------------------------------------------+
     Status for rhel6_1_x86_64_preserve
+------------------------------------------+
Repository: rhel6_1_x86_64_preserve
Number of Packages: 4170
Last Sync: 2011-12-13 11:37:23-05:00
Currently syncing: Downloading Items or Verifying (5614 of 5615 items downloaded. 72642203.0 bytes remaining)


Commit here
http://git.fedorahosted.org/git/?p=pulp.git;a=commitdiff;h=4d8e39de4d67e1ac20ec6e681b0dc1b2fe62c705

Comment 2 Jeff Ortel 2011-12-15 20:18:04 UTC
build: 0.255

Comment 3 Preethi Thomas 2012-01-09 15:39:57 UTC
verified
[root@preethi CDN]# rpm -q pulp
pulp-0.0.256-1.fc15.noarch

[root@preethi CDN]# pulp-admin repo sync --id rhel6_x86_64_preserve 
Sync for repository rhel6_x86_64_preserve started
Use "repo status" to check on the progress
[root@preethi CDN]# 
[root@preethi CDN]# 
[root@preethi CDN]# pulp-admin repo status --id rhel6_x86_64_preserve
+------------------------------------------+
      Status for rhel6_x86_64_preserve
+------------------------------------------+
Repository: rhel6_x86_64_preserve
Number of Packages: 3391
Last Sync: 2012-01-09 10:36:58-05:00
Currently syncing: Downloading Metadata (0 of 0 items downloaded. 0.0 bytes remaining)

[root@preethi CDN]# pulp-admin repo status --id rhel6_x86_64_preserve
+------------------------------------------+
      Status for rhel6_x86_64_preserve
+------------------------------------------+
Repository: rhel6_x86_64_preserve
Number of Packages: 3391
Last Sync: 2012-01-09 10:36:58-05:00
Currently syncing: Downloading Items or Verifying (316 of 3397 items downloaded. 3169888282.0 bytes remaining)

[root@preethi CDN]# pulp-admin repo status --id rhel6_x86_64_preserve
+------------------------------------------+
      Status for rhel6_x86_64_preserve
+------------------------------------------+
Repository: rhel6_x86_64_preserve
Number of Packages: 3391
Last Sync: 2012-01-09 10:36:58-05:00
Currently syncing: Downloading Items or Verifying (1196 of 3397 items downloaded. 2067820808.0 bytes remaining)

[root@preethi CDN]# pulp-admin repo status --id rhel6_x86_64_preserve
+------------------------------------------+
      Status for rhel6_x86_64_preserve
+------------------------------------------+
Repository: rhel6_x86_64_preserve
Number of Packages: 3391
Last Sync: 2012-01-09 10:36:58-05:00
1 Tree_File Error(s):
	md5_missmatch on https://cdn.redhat.com/content/dist/rhel/rhui/server-6/releases/6Server/x86_64/os/images/boot.iso

Currently syncing: Purging Orphaned Packages (0 of 3397 items downloaded. 0.0 bytes remaining)


Currently syncing: Purging Orphaned Packages (0 of 3397 items downloaded. 0.0 bytes remaining)

[root@preethi CDN]# pulp-admin repo status --id rhel6_x86_64_preserve
+------------------------------------------+
      Status for rhel6_x86_64_preserve
+------------------------------------------+
Repository: rhel6_x86_64_preserve
Number of Packages: 3391
Last Sync: 2012-01-09 10:36:58-05:00
1 Tree_File Error(s):
	md5_missmatch on https://cdn.redhat.com/content/dist/rhel/rhui/server-6/releases/6Server/x86_64/os/images/boot.iso

Currently syncing: Purging Orphaned Packages (0 of 3397 items downloaded. 0.0 bytes remaining)

[root@preethi CDN]# pulp-admin repo status --id rhel6_x86_64_preserve
+------------------------------------------+
      Status for rhel6_x86_64_preserve
+------------------------------------------+
Repository: rhel6_x86_64_preserve
Number of Packages: 3391
Last Sync: 2012-01-09 10:50:19-05:00
Last Error: 2012-01-09 10:36:58-05:00

1 Tree_File Error(s):
	md5_missmatch on https://cdn.redhat.com/content/dist/rhel/rhui/server-6/releases/6Server/x86_64/os/images/boot.iso

Comment 4 Preethi Thomas 2012-02-24 20:13:27 UTC
Pulp v1.0 is released
Closed Current Release.


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