Bug 1355752

Summary: content view publish may fail if 'publish via http' was changed to false on a repo
Product: Red Hat Satellite Reporter: Justin Sherrill <jsherril>
Component: PulpAssignee: Justin Sherrill <jsherril>
Status: CLOSED ERRATA QA Contact: jcallaha
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: andrew.schofield, bbuckingham, bkearney, cwelton, daniele, jcallaha, jhutar, jnikolak, mhrivnak, mmccune, oshtaier, pdwyer, zhunting
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/15649
Whiteboard:
Fixed In Version: pulp-katello-1.0.2-2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1417089 (view as bug list) Environment:
Last Closed: 2017-03-06 08:27:20 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: 1115190, 1417089    

Description Justin Sherrill 2016-07-12 12:36:16 UTC
There is a conflict in the way that $SUBJECTs work together, because:

1.  when setting a repo to not be published via http after it has been already been published leaves a dangling symlink
2.  the yum clone distributor first starts by using the http symlink to find the path to copy its content from

We can exploit this by:

1.  Create a repo with 'publish via http' set to true, url set to some upstream repo (https://jlsherrill.fedorapeople.org/fake-repos/needed-errata/)
2.  Sync the repo
3.  Set 'publish via http' to false
4.  Create a content view
5.  Add this repo to the content view
6.  Publish the content view

Your publish will fail on the yum clone distributor step.

Comment 1 Justin Sherrill 2016-07-12 12:36:17 UTC
Created from redmine issue http://projects.theforeman.org/issues/15649

Comment 2 Justin Sherrill 2016-07-12 12:36:20 UTC
Upstream bug assigned to jsherril

Comment 5 Bryan Kearney 2016-08-01 14:16:25 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/15649 has been closed

Comment 6 Bryan Kearney 2016-09-11 15:42:02 UTC
*** Bug 1222367 has been marked as a duplicate of this bug. ***

Comment 7 Brad Buckingham 2016-09-14 18:47:36 UTC
*** Bug 1219558 has been marked as a duplicate of this bug. ***

Comment 9 Perry Gagne 2016-10-20 20:09:03 UTC
I Verified this fix, but doing the steps Justin described above:

1.  Create a repo with 'publish via http' set to true, url set to some upstream repo (https://jlsherrill.fedorapeople.org/fake-repos/needed-errata/)
2.  Sync the repo
3.  Set 'publish via http' to false
4.  Create a content view
5.  Add this repo to the content view
6.  Publish the content view

And the content view was successfully published.

Verified in Satellite 6.3 Snap 5.0

Comment 10 jcallaha 2017-02-13 18:57:37 UTC
Verified in Satellite 6.2.8 Snap 2.

I followed the steps out lined in the initial bug report, and was able to publish the content view without any issues. Then I created a content view with mixed settings (some yes, some no) and was also able to publish the content views without any problems.

Comment 12 errata-xmlrpc 2017-03-06 08:27:20 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-2017:0447