Bug 1626294 - Forcing content view version repository regeneration does not actually regenerate some repositories
Summary: Forcing content view version repository regeneration does not actually regene...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Content Management
Version: Unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
medium vote
Target Milestone: 6.4.0
Assignee: Justin Sherrill
QA Contact: jcallaha
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-09-07 01:15 UTC by Justin Sherrill
Modified: 2019-11-05 23:34 UTC (History)
4 users (show)

Fixed In Version: tfm-rubygem-katello-3.7.0.35-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-16 19:13:41 UTC
Target Upstream Version:


Attachments (Terms of Use)
6.3 patch. (2.11 KB, patch)
2018-09-07 01:24 UTC, Justin Sherrill
no flags Details | Diff


Links
System ID Priority Status Summary Last Updated
Foreman Issue Tracker 24841 'Normal' 'Closed' 'Forcing content view version repository regeneration does not actually regenerate some repositories' 2019-12-05 23:26:19 UTC

Description Justin Sherrill 2018-09-07 01:15:52 UTC
Description of problem:

The force/force_full option is not properly used on some repositories (those that use the yum_clone_distributor), and pulp takes this option into consideration for all distributors. 

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

How reproducible:
Always

Steps to Reproduce:
1.  Create a content view, add a repo 'foo', publish it
2.  Look at the timestamps in /var/lib/pulp/published/yum/master/yum_distributor/*CV_LABEL*ENV_LABEL*/TIMESTAMP/repodata/
3.  Regenerate the repodata from the content > content views > click your view > click "regenerate repository Metadata" in the actions dropdown beside the version you just published.

Actual results:
metadata is not regenerated, timestamps are not updated


Expected results:
metadata is regenerated


Additional info:

Comment 1 Justin Sherrill 2018-09-07 01:16:21 UTC
Created redmine issue https://projects.theforeman.org/issues/24841 from this bug

Comment 2 Justin Sherrill 2018-09-07 01:24:02 UTC
Created attachment 1481455 [details]
6.3 patch.

Comment 3 Justin Sherrill 2018-09-07 01:24:32 UTC
Simply apply the patch to the tfm-rubygem-katello directory and restart httpd and foreman-tasks.

Comment 4 pm-sat@redhat.com 2018-09-07 14:09:18 UTC
Upstream bug assigned to jsherril@redhat.com

Comment 5 pm-sat@redhat.com 2018-09-07 14:09:20 UTC
Upstream bug assigned to jsherril@redhat.com

Comment 7 Brad Buckingham 2018-09-10 20:42:09 UTC
Moving to POST as upstream PR has been merged.

Comment 8 Patrick Creech 2018-09-20 19:27:30 UTC
Justin, this failed cherrypick downstream, can you take a look?

Comment 10 jcallaha 2018-09-27 15:42:15 UTC
Verified in satellite 6.4 Snap 24.

Followed the reproducer steps in the description.

result:

[root@hp-dl385gen8-01 yum_distributor]# pwd
/var/lib/pulp/published/yum/master/yum_distributor

Original V1
[root@hp-dl385gen8-01 yum_distributor]# ll 1-test-v1_0-1c82299a-0785-4c93-8080-3fac5a1e0b48/1538062464.3/repodata/
total 92
-rw-r--r--. 1 apache apache 20335 Sep 27 11:30 16df308b807d70c412c99a39b8900fac82fcdf78d7f684778080ec3373d6cf7a-other.xml.gz
-rw-r--r--. 1 apache apache   124 Sep 27 11:30 a27718cc28ec6d71432e0ef3e6da544b7f9d93f6bb7d0a55aacd592d03144b70-comps.xml
-rw-r--r--. 1 apache apache   790 Sep 27 11:30 b72a0f104f599b2753316ea94ca58f0fdca30e31f6b5a2a4234e3b7d4cc9a524-comps.xml
-rw-r--r--. 1 apache apache    92 Sep 27 11:30 d75950f7addae56ac6add712df25899d3298893554a7dc64e5388a32bfd74198-updateinfo.xml.gz
-rw-r--r--. 1 apache apache 32827 Sep 27 11:30 f029165c81d76966460b3b3ea81f434caca1c5a00d6072d8343aad49952cb9f3-filelists.xml.gz
-rw-r--r--. 1 apache apache 19328 Sep 27 11:30 f44b1f3ae8ead34e3dfee2230c14396eb9f54f12ee4d37b7be2d39f7549bddaf-primary.xml.gz
-rw-r--r--. 1 apache apache  2152 Sep 27 11:34 repomd.xml


After republishing repodata, original directory is destroyed
[root@hp-dl385gen8-01 yum_distributor]# ll 1-test-v1_0-1c82299a-0785-4c93-8080-3fac5a1e0b48/1538062464.3/repodata/
ls: cannot access 1-test-v1_0-1c82299a-0785-4c93-8080-3fac5a1e0b48/1538062464.3/repodata/: No such file or directory

And a new one is created with updated timestamps
[root@hp-dl385gen8-01 yum_distributor]# ll 1-test-v1_0-1c82299a-0785-4c93-8080-3fac5a1e0b48/1538062683.26/repodata/
total 88
-rw-r--r--. 1 apache apache 20335 Sep 27 11:38 501a42d38161f3b9df18af7c11c92a708710a6552695f959cd77383d5ebc79a2-other.xml.gz
-rw-r--r--. 1 apache apache 19328 Sep 27 11:38 97079145e312f73d90b803ed025ca879b5890e5da93594729c0cefe26b3b7f70-primary.xml.gz
-rw-r--r--. 1 apache apache   790 Sep 27 11:38 b72a0f104f599b2753316ea94ca58f0fdca30e31f6b5a2a4234e3b7d4cc9a524-comps.xml
-rw-r--r--. 1 apache apache    92 Sep 27 11:38 c2a33619974a87b8086808dac185f23c477e93b9f72a77203d131f690dd8769d-updateinfo.xml.gz
-rw-r--r--. 1 apache apache 32827 Sep 27 11:38 c988746ecc0d4318c35810eb0fc86e296704831e88eda6dcf72957dfb9dc9197-filelists.xml.gz
-rw-r--r--. 1 apache apache  2157 Sep 27 11:38 repomd.xml

Comment 11 Bryan Kearney 2018-10-16 19:13:41 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/RHSA-2018:2927


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