Bug 1874850

Summary: Publishing new CCV version after making changes in the underlying CVs' puppet modules does not check for conflicts before starting the publish task
Product: Red Hat Satellite Reporter: Joniel Pasqualetto <jpasqual>
Component: Content ViewsAssignee: James Jeffers <jjeffers>
Status: CLOSED ERRATA QA Contact: Danny Synk <dsynk>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.7.0CC: jjeffers, jsherril, mmccune, zhunting
Target Milestone: 6.9.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-04-21 13:17:42 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
tfm-rubygem-katello-3.16.0.26-3.HFRHBZ18748501908101.el7sat.noarch.rpm none

Description Joniel Pasqualetto 2020-09-02 12:47:38 UTC
Description of problem:

- Have at least 2 CVs containing puppet modules
- Have a CCV (published) containing the 2 CVs above
- Make changes in the underlying CVs and add the same puppet module in both
- Try publishing a new version of the CCV.

No error will be generate when starting the publish task, but the task will fail without specifying exactly why.

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

How reproducible:  Always


Steps to Reproduce:

1. Create and publish 2 CVs 
2. Create and publish a CCV containing the 2 CVs from step 1
3. Modify the 2 CVs from step 1 and add the same puppet module to both of them
4. Try publishing a new version of the CCV containing the CV versions generated on step 3

Actual results:

Publish starts and fails during publishing with unclear log messages.


Expected results: 

Before the publish starts, Satellite should perform a validation and do not allow the task to start, in the same way it does if you try to create a new CCV containing CVs that conflict.  

For example, if you get the 2 CVs that contain the same puppet module from step 3 above, and try to **CREATE** a CCV with them, you won't be able to and you will receive a pretty clear message saying:

~~~
An error occurred updating the Content View: Puppet module conflict: 'postfix' is in puppet1 1.0, puppet2 3.0.
~~~

This same validation would be interesting to have when publishing new version of the CCV, and not just when creating it.

Additional info:

Comment 1 Justin Sherrill 2021-01-27 17:36:00 UTC
proposing for 6.9 since this is merged upstream

Comment 2 Bryan Kearney 2021-01-31 06:52:19 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/31308 has been resolved.

Comment 4 Danny Synk 2021-02-22 19:29:55 UTC
Steps to test:

1. Deploy a Satellite 6.9, snap 14.

2. Synchronize some Red Hat repositories, create two content views using the repositories, and publish new versions of the two content views.

3. Create a composite content view (CCV) that includes the two content views created in step 2 and publish a new version of the CCV.

4. Create a custom product and add a repository of type `puppet` to the product.

5. Upload a Puppet module to the `puppet` repository in the custom product (for this test, I used the postgresql Puppet module).

6. Add the Puppet module to both content views created in step 2 and publish new versions of the content views.

7. Attempt to publish a new version of the CCV created in step 3.

Expected Results:
Publishing a new version of the CCV fails before a task is created and returns an error message indicating the cause of the issue.

Actual Results:
Publishing a new version of the CCV fails with the error "Puppet module conflict: 'postgresql' is in rhel_8_appstream_baseos 4.0, rhel_8_sat_tools 2.0." No CCV publish task is visible in the webUI on the Monitor > Tasks page.

Verified on Satellite 6.9, snap 14.

Comment 7 errata-xmlrpc 2021-04-21 13:17:42 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 (Moderate: Satellite 6.9 Release), 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-2021:1313

Comment 10 Mike McCune 2021-05-14 21:09:30 UTC
This is a follow-on hotfix as tfm-rubygem-katello-3.16.0.26-2.HFRHBZ1874850.el7sat.noarch.rpm was built incorrectly.

*** Satellite 6.8.6 Hotfix Available ***

This hotfix resolves this bugzilla as well as BZ# 1908101

1) Download tfm-rubygem-katello-3.16.0.26-3.HFRHBZ18748501908101.el7sat.noarch.rpm from this bugzilla to your Satellite

2) stop services:

satellite-maintain service stop

3) Install:

rpm -Uvh tfm-rubygem-katello-3.16.0.26-3.HFRHBZ18748501908101.el7sat.noarch.rpm

4) restart:

satellite-maintain service start

5) resume operations

Comment 11 Mike McCune 2021-05-14 21:14:33 UTC
Created attachment 1783343 [details]
tfm-rubygem-katello-3.16.0.26-3.HFRHBZ18748501908101.el7sat.noarch.rpm