Bug 805956

Summary: SE doesn't provide a way how to refresh imported repositories
Product: Red Hat Satellite Reporter: Ivan Necas <inecas>
Component: Content ManagementAssignee: Ivan Necas <inecas>
Status: CLOSED ERRATA QA Contact: Og Maciel <omaciel>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.0.1CC: achan, cpelland, dmacpher, mmccune, omaciel
Target Milestone: UnspecifiedKeywords: Triaged, ZStream
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
System Engine did not automatically detect new repositories released by a Content Provider. This fix creates a scheduled check of the repositories. This checks when new content is available and refreshes System Engine with the content. Administrators also refresh the content manually using the command: # katello provider refresh_products --name 'Red Hat' --org [Organization_Name]
Story Points: ---
Clone Of:
: 827527 (view as bug list) Environment:
Last Closed: 2012-12-04 19:43:30 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: 827527    

Description Ivan Necas 2012-03-22 14:39:05 UTC
Description of problem:
When CDN releases new version (let's say of RHEL), Katello should provide a way how to pull the new repositories from the CDN.

How reproducible:
Always

Steps to Reproduce:
1. update "Red Hat" provider url to 
   http://inecas.fedorapeople.org/fakerepos/cds_fast_old/
   
   this fake cds has only 15 version of zoo product
2. import manifest available on 
  http://inecas.fedorapeople.org/fakerepos/cds_fast_old/fake-manifest-syncable.zip
3. update "Red Hat" provider url to 
  http://inecas.fedorapeople.org/fakerepos/cds_fast/
  this fake cds has new verzion 16 of zoo product
  
Actual results:
No way how to get the new repository from CDS.

Expected results:
Cli and UI feature to refresh "Red Hat" provider repositories from CDS.

Comment 4 Ivan Necas 2012-03-23 12:28:41 UTC
The support for refreshing the content repositories from CDN in CLI/API added in commit cbc446b97ac8f19e7f2f8d29370776aabe370486:

In case new repository is added in CDN (e.g. when new releasever or
architecture support is released), there is a command that is able to retrieve
this new repositories:

  katello provider refresh_products --name "Provider" --org "Organization"

It works only for Red Hat provider

There is still needed to add this support into UI as well.

Comment 5 Ivan Necas 2012-05-04 08:07:37 UTC
After discussion with Mike it seems more reasonable to create a periodic task that would check if something changes at the CDN regularly. However we need some mechanism for scheduling regular tasks.

Comment 6 Ivan Necas 2012-05-21 14:17:30 UTC
I will add a script to katello source that will be executable by cron.daily that will check changes on CDN periodically.

Comment 7 Ivan Necas 2012-05-29 14:57:22 UTC
Solved by a cron script run daily, in commit 06b352511b398e072e67295484d80ec34844750e

Comment 11 Og Maciel 2012-10-03 02:29:06 UTC
@Ivan, I followed the steps mentioned in the issue on how to verify and ran the command:

  katello provider refresh_products --name "Provider" --org "Organization"

However, you also mention a cron job that would this every so often. Is there a better way to verify this issue?

Comment 12 Ivan Necas 2012-10-03 06:49:46 UTC
There is a script `/etc/cron.daily/katello-refresh-cdn` which does the trick. So it's possible to check this by either

   1. running this script manually
   2. moving to cron.hourly, which is a bit better to verify

Comment 13 Og Maciel 2012-10-03 19:10:53 UTC
Verified using:

* candlepin-0.7.8-1.el6cf.noarch
* candlepin-selinux-0.7.8-1.el6cf.noarch
* candlepin-tomcat6-0.7.8-1.el6cf.noarch
* katello-1.1.12-12.el6cf.noarch
* katello-all-1.1.12-12.el6cf.noarch
* katello-candlepin-cert-key-pair-1.0-1.noarch
* katello-certs-tools-1.1.8-1.el6cf.noarch
* katello-cli-1.1.8-6.el6cf.noarch
* katello-cli-common-1.1.8-6.el6cf.noarch
* katello-common-1.1.12-12.el6cf.noarch
* katello-configure-1.1.9-6.el6cf.noarch
* katello-glue-candlepin-1.1.12-12.el6cf.noarch
* katello-glue-pulp-1.1.12-12.el6cf.noarch
* katello-qpid-broker-key-pair-1.0-1.noarch
* katello-qpid-client-key-pair-1.0-1.noarch
* katello-selinux-1.1.1-1.el6cf.noarch
* pulp-1.1.12-1.el6cf.noarch
* pulp-common-1.1.12-1.el6cf.noarch
* pulp-selinux-server-1.1.12-1.el6cf.noarch

Comment 15 errata-xmlrpc 2012-12-04 19:43:30 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 16 Mike McCune 2013-08-16 18:13:28 UTC
getting rid of 6.0.0 version since that doesn't exist