Bug 1626294

Summary: Forcing content view version repository regeneration does not actually regenerate some repositories
Product: Red Hat Satellite Reporter: Justin Sherrill <jsherril>
Component: Content ManagementAssignee: Justin Sherrill <jsherril>
Status: CLOSED ERRATA QA Contact: jcallaha
Severity: medium Docs Contact:
Priority: unspecified    
Version: UnspecifiedCC: dgross, egolov, jsherril, pcreech
Target Milestone: 6.4.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tfm-rubygem-katello-3.7.0.35-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-16 19:13:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
6.3 patch. none

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 Satellite Program 2018-09-07 14:09:18 UTC
Upstream bug assigned to jsherril

Comment 5 Satellite Program 2018-09-07 14:09:20 UTC
Upstream bug assigned to jsherril

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