Bug 1773146 - comps.xml is missing environment groups information from the repositories inside content view in Satellite 6.6
Summary: comps.xml is missing environment groups information from the repositories ins...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Content Views
Version: 6.6.0
Hardware: All
OS: Linux
high
high
Target Milestone: 6.7.0
Assignee: Ian Ballou
QA Contact: Lai
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-11-16 01:48 UTC by Sayan Das
Modified: 2023-10-06 18:47 UTC (History)
13 users (show)

Fixed In Version: tfm-rubygem-katello-3.14.0-0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1791496 (view as bug list)
Environment:
Last Closed: 2020-04-14 13:27:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
tfm-rubygem-katello Hotfix RPM for Satellite 6.6.1 (15.66 MB, application/x-rpm)
2019-12-18 18:04 UTC, wclark
no flags Details
tfm-rubygem-runcible Hotfix RPM for Satellite 6.6.1 (91.91 KB, application/x-rpm)
2019-12-18 18:06 UTC, wclark
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 27395 0 Normal Closed Missing CentOS Environment Groups when client uses Content View 2021-01-18 16:43:41 UTC
Red Hat Knowledge Base (Solution) 5016571 0 None None None 2020-04-27 04:11:42 UTC
Red Hat Product Errata RHSA-2020:1454 0 None None None 2020-04-14 13:27:19 UTC

Description Sayan Das 2019-11-16 01:48:22 UTC
Description of problem:
When kickstart repositories will be synchronized, they will be downloaded inside "Default Organization View", and comps.xml inside those repositories will have environment groups i.e. "Server with GUI" etc., information present.

If we add the same repository to a content view and publish it, then inside the published version of the CV, if we check the metadata of the kickstart repository we won't be able to see any environment groups information available.


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

How reproducible:
Always

Steps to Reproduce:

1. Sync "Red Hat Enterprise Linux 7 Server RPMs x86_64 7Server" and kickstart 7.6 and 7.7 repositories.

2. Add these repositories inside the content view and publish the same.

3. Verify the comps.xml file of the repodata for each repository, inside the CV and outside the CV. A command to quickly check the same would be as below.

echo ; for file in $(find -L /var/lib/pulp/published/yum/https/repos/ -name "*comps.xml" -exec ls -d {} \;); do echo Checking "$file" :; echo -e "\n--------------------------------------------------------------------------------\n"; cat $file | xmllint --format - | grep -A3 "<environment>" | egrep -v "\--|display_order"  | paste - - -; echo -e "================================================================================\n\n"; done


Actual results:
Inside CV the environment groups information is not reflected but the same is present in the synced content i.e. Default Organization view.

Checking /var/lib/pulp/published/yum/https/repos/Default_Organization/Library/content/dist/rhel/server/7/7.6/x86_64/kickstart/repodata/041fe8dfd924212a1a0096eaa847bfb1d442a59294d5dca962015cd18793f911-comps.xml :

--------------------------------------------------------------------------------

  <environment>	    <id>file-print-server-environment</id>	    <name>File and Print Server</name>
  <environment>	    <id>minimal</id>	    <name>Minimal Install</name>
  <environment>	    <id>graphical-server-environment</id>	    <name>Server with GUI</name>
  <environment>	    <id>virtualization-host-environment</id>	    <name>Virtualization Host</name>
  <environment>	    <id>infrastructure-server-environment</id>	    <name>Infrastructure Server</name>
  <environment>	    <id>web-server-environment</id>	    <name>Basic Web Server</name>
================================================================================


Checking /var/lib/pulp/published/yum/https/repos/Default_Organization/Library/test_cv1/content/dist/rhel/server/7/7.6/x86_64/kickstart/repodata/2b287dade51260fe29d9b23274bdaa7243d6000b59a1f0a9bb861a23ed78c49d-comps.xml :

--------------------------------------------------------------------------------

================================================================================



Expected results:

It should generate the comps.xml file properly inside the content view for all applicable repodata.


Additional info:

On Satellite 6.5.1 this problem is not reproducible.

On Satellite 6.5.2, this problem is partially reproducible.

   --> If we add kickstart first in a CV and publish the same repodata will have proper comps.xml generated.

   --> If we add kickstart in an existing CV, and publish the same repodata won't have proper comps.xml generated.

This affects customer ability to perform OS deployments with "Server with GUI" group defined in kickstart template.

Comment 5 Ian Ballou 2019-12-04 17:11:57 UTC
This issue was fixed upstream in this redmine: https://projects.theforeman.org/issues/27395

The fix required an update to runcible to version 2.12.1 and a small change to the Pulp Yum Repository service class.

Looks like this is working fine in Satellite 6.7 as a result.

Comment 9 Bryan Kearney 2019-12-04 19:02:28 UTC
Upstream bug assigned to iballou

Comment 10 Bryan Kearney 2019-12-04 19:02:29 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/27395 has been resolved.

Comment 15 wclark 2019-12-18 18:04:37 UTC
Created attachment 1646144 [details]
tfm-rubygem-katello Hotfix RPM for Satellite 6.6.1

Comment 16 wclark 2019-12-18 18:06:32 UTC
Created attachment 1646147 [details]
tfm-rubygem-runcible Hotfix RPM for Satellite 6.6.1

Comment 17 wclark 2019-12-18 18:10:18 UTC
Hotfix is available for Satellite 6.6.1.

Installation instructions:

1. Download both hotfix RPMs from this BZ and copy them to Satellite server

2. # satellite-maintain packages unlock

3. # yum install ./tfm-rubygem-runcible-2.11.1-2.HOTFIXRHBZ1773146.el7sat.noarch ./tfm-rubygem-katello-3.12.0.29-2.HOTFIXRHBZ1773146.el7sat.noarch

4. # satellite-maintain packages lock

5. # satellite-maintain service restart

Comment 18 Andreas Bleischwitz 2019-12-19 11:57:49 UTC
I was able to validate that the <environment> tags are now included in the comps.xml after I installed the hotfix-packages and re-published a RHEL8 CV.

# less content/dist/rhel8/8/x86_64/appstream/os/repodata/d25711b9feab59b8c09057e461e806fab079aa353535b4a11315c42ef4077d43-comps.xml |grep -A1 '<environment>'
  <environment>
    <id>virtualization-host-environment</id>
--
  <environment>
    <id>workstation-product-environment</id>
--
  <environment>
    <id>server-product-environment</id>
--
  <environment>
    <id>graphical-server-environment</id>

The fix seems to solve that issue, as those tags were missing previously.

Comment 19 Sayan Das 2020-01-03 08:50:02 UTC
Yes this hotfix works for RHEL 7 as well.

Comment 26 errata-xmlrpc 2020-04-14 13:27:10 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-2020:1454


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