Bug 753128 - Sync status remains in "error syncing" state even after successful sync of repo.
Summary: Sync status remains in "error syncing" state even after successful sync of repo.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: WebUI
Version: 6.0.1
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: Unspecified
Assignee: Eric Helms
QA Contact: Sachin Ghai
URL:
Whiteboard:
: 782458 (view as bug list)
Depends On: 772350 784686
Blocks: katello-sync-mgmt 826628
TreeView+ depends on / blocked
 
Reported: 2011-11-11 12:07 UTC by Sachin Ghai
Modified: 2019-09-26 17:46 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
After syncing to an invalid repository, the "error syncing" status remains in the System Engine User Interface (UI) even after a successful repository sync. This was caused because System Engine uses the same id for all pulp sync status objects. This fix ensures status updates to the sync management page are driven solely by data returned from the server. The UI now shows the correct status.
Clone Of:
: 826628 (view as bug list)
Environment:
Last Closed: 2012-12-04 19:41:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
status remains in "error syncing" state even after successful sync of repo. (36.61 KB, image/png)
2011-11-11 12:09 UTC, Sachin Ghai
no flags Details
'cancelled' sync for rhel6.2 option rpm repo (46.42 KB, image/png)
2012-09-24 04:28 UTC, Sachin Ghai
no flags Details
sync status changed to 'sync complete' for cancelled state repo (52.40 KB, image/png)
2012-09-24 04:31 UTC, Sachin Ghai
no flags Details
Sync status as 'Error syncing' for a custom repo (47.59 KB, image/png)
2012-09-24 04:35 UTC, Sachin Ghai
no flags Details
sync status changed to 'sync complete' from 'Error syncing' (39.36 KB, image/png)
2012-09-24 04:55 UTC, Sachin Ghai
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:1543 0 normal SHIPPED_LIVE Important: CloudForms System Engine 1.1 update 2012-12-05 00:39:57 UTC

Description Sachin Ghai 2011-11-11 12:07:12 UTC
Description of problem:
I Created a product and defined a repo under that. While defining the repo, I choose wrong URL. And when I start the sync, sync fails and UI displays "Error Syncing!" And it is expected.

Later, I edited the repo URL and corrected it. And start the sync. This repo is synced successfully but status on UI remains "Error Syncing".



Version-Release number of selected component (if applicable):
[root@dhcp201-198 ~]# rpm -qa | grep pulp
mod_wsgi-3.2-6.pulp.fc15.x86_64
pulp-0.0.244-5.fc15.noarch
m2crypto-0.21.1.pulp-5.fc15.x86_64
katello-glue-pulp-0.1.98-1.git.33.a663155.fc15.x86_64
pulp-common-0.0.244-5.fc15.noarch
[root@dhcp201-198 ~]# rpm -qa | grep katello
katello-common-0.1.98-1.git.33.a663155.fc15.noarch
katello-all-0.1.98-1.git.33.a663155.fc15.x86_64
katello-cli-0.1.11-1.git.0.facb3bb.fc15.noarch
katello-cli-common-0.1.10-1.git.1133.ea1fcc6.fc15.noarch
katello-glue-foreman-0.1.98-1.git.33.a663155.fc15.x86_64
katello-configure-0.1.10-1.git.0.78fbe70.fc15.noarch
katello-glue-pulp-0.1.98-1.git.33.a663155.fc15.x86_64
katello-0.1.101-1.git.6.83ea7cf.fc15.x86_64
katello-glue-candlepin-0.1.98-1.git.33.a663155.fc15.x86_64
katello-repos-0.1.3-1.git.0.db2bd1d.fc15.noarch
[root@dhcp201-198 ~]# 


How reproducible:
always

Steps to Reproduce:
1. Create a product
2. Add repo and define wrong URL, so that sync should fail
3. Edit the URL for created repo and correct it
4. Sync the repo again
  
Actual results:
sync status remains in "error syncing" state even after successful sync of repo.

Expected results:
Sync status should properly reflect on UI after correcting the repo URL.

Additional info:


Error in pulp.log during sync after passing the wrong URL:
============================================================

[root@dhcp201-198 ~]# tail -f /var/log/pulp/pulp.log 

  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1454, in <lambda>
    repoXML = property(fget=lambda self: self._getRepoXML(),

  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1450, in _getRepoXML
    raise Errors.RepoError, msg

RepoError: Cannot retrieve repository metadata (repomd.xml) for repository: . Please verify its path and try again



pulp.log after successfully syncing the repo's:
================================================
2011-11-11 17:06:09,618 6290:140309098903296: pulp.server.api.synchronizers:INFO: synchronizers:625 YumSynchronizer reported 19 successes, 19 downloads, 0 errors
2011-11-11 17:06:10,218 6290:140309098903296: pulp.server.api.synchronizers:INFO: synchronizers:303 No image files to import to repo..
2011-11-11 17:06:10,221 6290:140309098903296: pulp.server.api.synchronizers:INFO: synchronizers:283 No metadata for 'File Sync' present; no files to import to repo..
2011-11-11 17:06:10,235 6290:140309098903296: pulp.server.api.synchronizers:INFO: synchronizers:669 Running createrepo, this may take a few minutes to complete.
2011-11-11 17:06:10,236 6290:140309098903296: pulp.server.util:INFO: util:467 metadata found; taking backup.
2011-11-11 17:06:10,238 6290:140309098903296: pulp.server.util:INFO: util:441 Checking what metadata types are available: ['filelists', 'other', 'primary']
2011-11-11 17:06:10,242 6290:140309098903296: pulp.server.util:INFO: util:450 started repo metadata update: ['createrepo', '--database', '--checksum', 'sha256', '--update', '/var/lib/pulp//repos/ACME_Corporation/Locker/pulp/x86_64']
2011-11-11 17:06:13,290 6290:140309098903296: pulp.server.util:INFO: util:500 createrepo on /var/lib/pulp//repos/ACME_Corporation/Locker/pulp/x86_64 finished
2011-11-11 17:06:13,292 6290:140309098903296: pulp.server.api.synchronizers:INFO: synchronizers:673 Createrepo finished in 3.0558218956 seconds


[root@dhcp201-198 pulp]# pwd
/var/lib/pulp/repos/ACME_Corporation/Locker/pulp
[root@dhcp201-198 pulp]# cd x86_64/
[root@dhcp201-198 x86_64]# ls
gofer-0.54-1.el6.noarch.rpm
gofer-package-0.54-1.el6.noarch.rpm
grinder-0.0.127-1.el6.noarch.rpm
m2crypto-0.21.1.pulp-5.el6.x86_64.rpm
m2crypto-debuginfo-0.21.1.pulp-5.el6.x86_64.rpm
mod_wsgi-3.2-6.pulp.el6.x86_64.rpm
mod_wsgi-debuginfo-3.2-6.pulp.el6.x86_64.rpm
pulp-0.0.247-1.el6.noarch.rpm
pulp-admin-0.0.247-1.el6.noarch.rpm
pulp-cds-0.0.247-1.el6.noarch.rpm
pulp-client-lib-0.0.247-1.el6.noarch.rpm
pulp-common-0.0.247-1.el6.noarch.rpm
pulp-consumer-0.0.247-1.el6.noarch.rpm
python-gofer-0.54-1.el6.noarch.rpm
python-isodate-0.4.4-2.el6.noarch.rpm
python-oauth2-1.2.1-3.el6.noarch.rpm
python-qpid-0.7.946106-1.el6.noarch.rpm
python-rhsm-0.96.4-1.el6.noarch.rpm
python-webpy-0.32-8.el6.noarch.rpm
repodata
[root@dhcp201-198 x86_64]

Comment 1 Sachin Ghai 2011-11-11 12:09:41 UTC
Created attachment 533046 [details]
status remains in "error syncing" state even after successful sync of repo.

Comment 2 Sachin Ghai 2011-12-01 07:22:32 UTC
This issue is still reproducible on a fresh setup having builds:

[root@dhcp201-133 ~]# rpm -qa | grep pulp
pulp-0.0.244-5.fc15.noarch
katello-glue-pulp-0.1.117-1.fc15.x86_64
pulp-common-0.0.244-5.fc15.noarch
m2crypto-0.21.1.pulp-5.fc15.x86_64
mod_wsgi-3.2-6.pulp.fc15.x86_64
[root@dhcp201-133 ~]# rpm -qa | grep katello
katello-glue-pulp-0.1.117-1.fc15.x86_64
katello-common-0.1.117-1.fc15.noarch
katello-glue-candlepin-0.1.117-1.fc15.x86_64
katello-configure-0.1.21-1.fc15.noarch
katello-cli-common-0.1.18-1.fc15.noarch
katello-glue-foreman-0.1.117-1.fc15.x86_64
katello-all-0.1.117-1.fc15.x86_64
katello-cli-0.1.18-1.fc15.noarch
katello-repos-0.1.4-1.fc15.noarch
katello-0.1.117-1.fc15.x86_64
[root@dhcp201-133 ~]# 


And just to reproduce this, follow these steps:

1. Create a product ==> repo with incorrect URL and sync it ( error syncing will appear on UI)
2. Now delete the repo that we created in first step, since there is no way to edit the repo from UI. And recreate the repo with same name and with correct URL.
3. Sync the repo again. sync status remains in "error syncing" state even after successful sync of
repo.

Comment 3 Shannon Hughes 2012-01-19 20:54:24 UTC
taking a look at this one

Comment 4 Shannon Hughes 2012-01-25 19:05:25 UTC
this issue here is we use the same pulp id for the database. while the SE side of constraints works out since previous record was deleted, this is having a side effect of of looking at the older pulp sync status objects that use the same id since older id is equal to new id based on name. 

our clone_id would have to be reworked to support a unique lifetime id for repository objects. looking into the effort.

Comment 5 Shannon Hughes 2012-01-25 19:50:05 UTC
created pulp bug to allow us to delete sync history when deleting a repo object. added dependency on #784686

Comment 6 Mike McCune 2012-01-26 19:38:56 UTC
mass move to CFSE product.

Comment 7 Shannon Hughes 2012-01-30 20:59:51 UTC
this was partly fixed in pulp but still seeing stale history data so its blocking this bug. adding 772350 as a dependent.

Comment 8 Shannon Hughes 2012-02-02 18:56:04 UTC
just tested and this looks fixed after 772350 was fixed.

Comment 9 Shannon Hughes 2012-02-02 18:56:53 UTC
another note, this is fixed in pulp-0.0.264-1.fc15.noarch

Comment 10 Mike McCune 2012-02-11 00:03:15 UTC
*** Bug 782458 has been marked as a duplicate of this bug. ***

Comment 11 Sachin Ghai 2012-02-13 11:42:14 UTC
Verified with following katello build:
katello-cli-0.1.53-1.el6.noarch
candlepin-0.5.8-1.el6.noarch
pulp-0.0.265-1.el6.noarch
katello-glue-candlepin-0.1.226-1.el6.noarch
katello-0.1.226-1.el6.noarch


The reported issue has been fixed. Now if you resync the same repo with corrected URL, the status changes to 'Sync Complete' instead of 'Error syncing'.

Comment 12 Steve Reichard 2012-03-30 21:12:42 UTC
I am still seeing this.  


I am using the 2012-03-30.2 puddle.  Also saw it using the 2012-03-22.3 puddle.

The most recent case, I cancelled a sync because I wanted to include more channels.  Then I selected all my select repos and started the sync.  The new repos sync'd however the base which was cancelled says it is "Cancelled" but is still syncing if you look in the logs.

Comment 13 Steve Reichard 2012-03-30 21:16:46 UTC
Also I am not sure I agree with the priority & severity being low.

Comment 14 James Laska 2012-04-03 14:56:14 UTC
(In reply to comment #13)
> Also I am not sure I agree with the priority & severity being low.

Can you provide a customer impact statement that you feel is more accurate?

Comment 17 Eric Helms 2012-05-24 18:05:45 UTC
This issue has been addressed by letting the status be driven by the underlying services.  This means that in some cases, if a sync appears "close" to being finished, it may have in fact reached a no-return point where it is complete and a cancel will do nothing.  In this case, the sync status will show correctly that it in fact completed.

https://github.com/Katello/katello/pull/146

Comment 21 Sachin Ghai 2012-09-24 04:27:05 UTC
Verified this bug with following build:

katello-qpid-client-key-pair-1.0-1.noarch
katello-common-1.1.12-7.el6cf.noarch
katello-all-1.1.12-7.el6cf.noarch
katello-cli-1.1.8-4.el6cf.noarch
katello-certs-tools-1.1.8-1.el6cf.noarch
katello-glue-candlepin-1.1.12-7.el6cf.noarch
katello-selinux-1.1.1-1.el6cf.noarch
katello-configure-1.1.9-3.el6cf.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-cli-common-1.1.8-4.el6cf.noarch
katello-glue-pulp-1.1.12-7.el6cf.noarch
katello-1.1.12-7.el6cf.noarch
katello-qpid-broker-key-pair-1.0-1.noarch


This defect actually includes two different states to reproduce :
1) cancelled and 2 Error syncing

I started the sync for a custom repo/RHEL repos and cancelled before finishing the sync. The status changed to 'cancelled'. Later I added few more repos and started the sync again. After successful sync completion, the status changed from 'cancelled' to 'sync complete'.

Please see the attached screen shot ( Here sync cancelled for RHEL6.2 optional rpm repo).

Comment 22 Sachin Ghai 2012-09-24 04:28:53 UTC
Created attachment 616360 [details]
'cancelled' sync for rhel6.2 option rpm repo

Comment 23 Sachin Ghai 2012-09-24 04:31:28 UTC
Created attachment 616361 [details]
sync status changed to 'sync complete' for cancelled state repo

Comment 24 Sachin Ghai 2012-09-24 04:34:15 UTC
Then I tried to sync a repo with wrong URL and generated the sync status as 'Error Syncing'. But Later when I synced the same repo with correct URL, the sync finished with correct status as 'Sync complete'. Please see the attachments.

Comment 25 Sachin Ghai 2012-09-24 04:35:44 UTC
Created attachment 616363 [details]
Sync status as 'Error syncing' for a custom repo

Comment 26 Sachin Ghai 2012-09-24 04:55:58 UTC
Created attachment 616365 [details]
sync status changed to 'sync complete' from 'Error syncing'

Comment 27 Sachin Ghai 2012-09-24 04:56:40 UTC
As per comments 21-26. Moving this to verified.

Comment 29 errata-xmlrpc 2012-12-04 19:41:27 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.

http://rhn.redhat.com/errata/RHSA-2012-1543.html

Comment 30 Mike McCune 2013-08-16 18:02:23 UTC
getting rid of 6.0.0 version since that doesn't exist


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