Bug 1327338 - Capsule sync redundantly generates metadata for all repos
Summary: Capsule sync redundantly generates metadata for all repos
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Content Management
Version: 6.1.6
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: Unspecified
Assignee: Tomas Strachota
QA Contact: Sanket Jagtap
URL:
Whiteboard:
Depends On: 1315326
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-14 20:22 UTC by Bryan Kearney
Modified: 2019-11-14 07:47 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 1315326
Environment:
Last Closed: 2016-05-17 05:33:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1084 0 normal SHIPPED_LIVE Satellite 6.1.9 bug fix update 2016-05-17 09:32:24 UTC

Comment 2 Mike McCune 2016-05-10 17:33:00 UTC
TESTING NOTES:


* Ensure that you can sync fresh content from Satellite to the Capsule
* Ensure you can sync all content types rpm, puppet, docker,, ISO
* Ensure that syncing a repo with *new* content that lands after the first sync can be synced to the capsule
* Ensure newly published content views that are promoted to lifecycle environments associated with the capsule show up
* Ensure clients can consume content from the capsule without error

Comment 4 Kedar Bidarkar 2016-05-13 15:40:46 UTC
repodata is not generated unless the repo had some changes, as seen below.

[root@sjagtap-capsule repodata]# pwd
/var/lib/pulp/published/yum/https/repos/Default_Organization/Library/rhel7_test_cv/custom/rhel7_sattools_prd/rhel7_sattools_repo/repodata
[root@sjagtap-capsule repodata]# cd /var/lib/pulp/published/yum/https/repos/Default_Organization/Dev/rhel7_test_cv/custom/rhel7_sattools_prd/rhel7_sattools_repo/repodata/
[root@sjagtap-capsule repodata]# ls
0a6ecd2e5098d28fa1dbcf66ff718819be0fdf5f7010f77d1d6280aee198cb06-comps.xml          7d80cf56e798d1f2cefc8fa4a4ca61a074c10a9e315c4cb1fd2223fab26833cd-primary.xml.gz
30215f052831e75a7f3698b61ccdcd946c3029201aa5c251d26e97909de02df1-updateinfo.xml.gz  a1846b979f4e8ef7f75240235a825a8315496a73ff449fffbb373be0ccc81c31-filelists.xml.gz
67f8c1caf8f037c3295354c85ddb8653450c3c78b899e2cb8cc08931b09e9305-other.xml.gz       repomd.xml
[root@sjagtap-capsule repodata]# ll
total 76
-rw-r--r--. 1 apache apache  1167 May 13 08:08 0a6ecd2e5098d28fa1dbcf66ff718819be0fdf5f7010f77d1d6280aee198cb06-comps.xml
-rw-r--r--. 1 apache apache    93 May 13 08:08 30215f052831e75a7f3698b61ccdcd946c3029201aa5c251d26e97909de02df1-updateinfo.xml.gz
-rw-r--r--. 1 apache apache 14338 May 13 08:08 67f8c1caf8f037c3295354c85ddb8653450c3c78b899e2cb8cc08931b09e9305-other.xml.gz
-rw-r--r--. 1 apache apache 13101 May 13 08:08 7d80cf56e798d1f2cefc8fa4a4ca61a074c10a9e315c4cb1fd2223fab26833cd-primary.xml.gz
-rw-r--r--. 1 apache apache 31976 May 13 08:08 a1846b979f4e8ef7f75240235a825a8315496a73ff449fffbb373be0ccc81c31-filelists.xml.gz
-rw-r--r--. 1 apache apache  2156 May 13 08:08 repomd.xml
[root@sjagtap-capsule repodata]# cd /var/lib/pulp/published/yum/https/repos/Default_Organization/Dev/
[root@sjagtap-capsule Dev]# ls
listing  rhel7_another_cv  rhel7_capsule_cv  rhel7_test_cv
[root@sjagtap-capsule Dev]# cd rhel7_capsule_cv
[root@sjagtap-capsule rhel7_capsule_cv]# ls
content  custom  listing
[root@sjagtap-capsule rhel7_capsule_cv]# cd custom/rhel7_sattools_prd/rhel7_sattools_repo/repodata/
[root@sjagtap-capsule repodata]# ls
0a6ecd2e5098d28fa1dbcf66ff718819be0fdf5f7010f77d1d6280aee198cb06-comps.xml          656d6ea64e82ace1758265e4b13fee240a214ecd08acb3bcbafb06205ff3448f-other.xml.gz       repomd.xml
11821cec3e88573f16f10500010efe5132d1fd4a7da4b88be5f52e82c20abeee-primary.xml.gz     beb92c2cc4848bd793188ddcc38c2c10917b2711cddd4adb21e7818bf721b60d-updateinfo.xml.gz
5833d09150639458e98e61b97a0abf595f6376acdabddf82e6796dcf9286717c-updateinfo.xml.gz  df095fad85669cf579226bb7f7e75863059a2fb87f0f1a5625d1d350c076f2b0-filelists.xml.gz
[root@sjagtap-capsule repodata]# ll
total 80
-rw-r--r--. 1 apache apache  1167 May 13 11:05 0a6ecd2e5098d28fa1dbcf66ff718819be0fdf5f7010f77d1d6280aee198cb06-comps.xml
-rw-r--r--. 1 apache apache 13101 May 13 11:05 11821cec3e88573f16f10500010efe5132d1fd4a7da4b88be5f52e82c20abeee-primary.xml.gz
-rw-r--r--. 1 apache apache    93 May 13 11:05 5833d09150639458e98e61b97a0abf595f6376acdabddf82e6796dcf9286717c-updateinfo.xml.gz
-rw-r--r--. 1 apache apache 14338 May 13 11:05 656d6ea64e82ace1758265e4b13fee240a214ecd08acb3bcbafb06205ff3448f-other.xml.gz
-rw-r--r--. 1 apache apache    93 May 12 08:42 beb92c2cc4848bd793188ddcc38c2c10917b2711cddd4adb21e7818bf721b60d-updateinfo.xml.gz
-rw-r--r--. 1 apache apache 31976 May 13 11:05 df095fad85669cf579226bb7f7e75863059a2fb87f0f1a5625d1d350c076f2b0-filelists.xml.gz
-rw-r--r--. 1 apache apache  2156 May 13 11:05 repomd.xml
[root@sjagtap-capsule repodata]# date
Fri May 13 11:37:36 EDT 2016
[root@sjagtap-capsule repodata]# pwd
/var/lib/pulp/published/yum/https/repos/Default_Organization/Dev/rhel7_capsule_cv/custom/rhel7_sattools_prd/rhel7_sattools_repo/repodata

Comment 5 Kedar Bidarkar 2016-05-13 15:41:52 UTC
All the scenarios mentioned in comment 2 and as mentioned in initial bug description work.

Exception: We could not successful sync ISO's from sat6 to capsule.

Comment 6 Kedar Bidarkar 2016-05-13 15:42:33 UTC
VERIFIED with sat6.1.9 compose 1

Comment 8 errata-xmlrpc 2016-05-17 05:33:13 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.

https://access.redhat.com/errata/RHBA-2016:1084

Comment 9 Tomas Strachota 2016-05-18 07:16:20 UTC
Kedar, do we have a BZ with details about failing iso syncs mentioned in https://bugzilla.redhat.com/show_bug.cgi?id=1327338#c5 please?

Comment 10 Pavel Moravec 2016-06-16 15:29:35 UTC
Having an empty repo but with a repodata generated on Sat, this bugfix will cause this repo is _not_ synced to the capsule / its repodata isnt generated there, am I right?

This breaks "yum update" on client hosts that gets 404 error on the missing-on-Capsule-empty-on-Satellite repos.

Those repos are meant to be populated after a while but client machines and content views are intended to have the repos provisioned even now.

Is there an easy way how to resolve this corner case?

Comment 11 Tomas Strachota 2016-06-21 14:10:26 UTC
Correct, unfortunately this solution really doesn't work for promotion of empty repositories. As a workaround you can use this script to turn auto-publishing back on:
https://access.redhat.com/articles/2332681

Comment 12 Tomas Strachota 2017-01-30 15:57:36 UTC
Please note that this change requires connection on port 443 from the satellite server to capsules to retrieve details about repositories.

This requirement is for Satellite versions >= 6.1.9 and < 6.2 only. Satellite 6.2+ contains optimizations in Pulp, that implement equivalent functionality and therefore the patch isn't needed there.

Comment 13 Tomas Strachota 2017-01-30 16:05:53 UTC
One correction:
I found out even Satellite 6.2+ requires the direct connection to pulp nodes. It's only not used for this feature/fix specifically.


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