Bug 2177858

Summary: OCP repositories duplicated in the manifest
Product: Red Hat Satellite Reporter: mithun kalyat <mkalyat>
Component: CandlepinAssignee: Barnaby Court <bcourt>
Status: CLOSED COMPLETED QA Contact: Satellite QE Team <sat-qe-bz-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.10.7CC: chrobert, jalbrech, nmoumoul
Target Milestone: UnspecifiedKeywords: 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: 2023-07-11 16:25:36 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:

Description mithun kalyat 2023-03-13 17:20:46 UTC
Description of problem:


It looks like the following RHEL 8 OCP 4.11 and 4.12 repositories are duplicated in the manifest.

============
[root@rhsat ~]# hammer repository-set list --product "Red Hat OpenShift Container Platform" --organization "RedHat" |grep 'Red Hat OpenShift Container Platform 4.11 for RHEL 8 x86_64 (RPMs)'
12405 | yum | Red Hat OpenShift Container Platform 4.11 for RHEL 8 x86_64 (RPMs)
12307 | yum | Red Hat OpenShift Container Platform 4.11 for RHEL 8 x86_64 (RPMs)

[root@rhsat ~]# hammer repository-set list --product "Red Hat OpenShift Container Platform" --organization "RedHat" |grep 'Red Hat OpenShift Container Platform 4.12 for RHEL 8 x86_64 (RPMs)'
13419 | yum | Red Hat OpenShift Container Platform 4.12 for RHEL 8 x86_64 (RPMs)
12753 | yum | Red Hat OpenShift Container Platform 4.12 for RHEL 8 x86_64 (RPMs)
=============

Due to this, enabling reposiory using Ansible script fails with the following error:

- name: "Enable RHEL8 repositories"
   include_role:
     name: redhat.satellite.repositories
   vars:
    satellite_organization: "{{ organization }}"
    satellite_products:
      - name: Red Hat OpenShift Container Platform
        repository_sets:
          - name: Red Hat OpenShift Container Platform 4.9 (RPMs)
            basearch: x86_64
          - name: Red Hat OpenShift Container Platform 4.8 (RPMs)
            basearch: x86_64
          - name: Red Hat OpenShift Container Platform 3.11 (RPMs)
            basearch: x86_64
          - name: Red Hat OpenShift Container Platform 4.9 for RHEL 8 x86_64 (RPMs)
          - name: Red Hat OpenShift Container Platform 4.10 for RHEL 8 x86_64 (RPMs)
          - name: Red Hat OpenShift Container Platform 4.11 for RHEL 8 x86_64 (RPMs)
          - name: Red Hat OpenShift Container Platform 4.12 for RHEL 8 x86_64 (RPMs)


After adding  Red Hat OpenShift Container Platform 4.11 for RHEL 8 x86_64 (RPMs)" and "Red Hat OpenShift Container Platform 4.12 for RHEL 8 x86_64 (RPMs)" getting the following error:

failed: [localhost] (item=[{'name': 'Red Hat OpenShift Container Platform'}, {'name': 'Red Hat OpenShift Container Platform 4.11 for RHEL 8 x86_64 (RPMs)'}]) => {"ansible_loop_var": "item", "changed": false, "item": [{"name": "Red Hat OpenShift Container Platform"}, {"name": "Red Hat OpenShift Container Platform 4.11 for RHEL 8 x86_64 (RPMs)"}], "msg": "Found too many (2) results while searching for repository_sets with name=\"Red Hat OpenShift Container Platform 4.11 for RHEL 8 x86_64 (RPMs)\""}
failed: [localhost] (item=[{'name': 'Red Hat OpenShift Container Platform'}, {'name': 'Red Hat OpenShift Container Platform 4.12 for RHEL 8 x86_64 (RPMs)'}]) => {"ansible_loop_var": "item", "changed": false, "item": [{"name": "Red Hat OpenShift Container Platform"}, {"name": "Red Hat OpenShift Container Platform 4.12 for RHEL 8 x86_64 (RPMs)"}], "msg": "Found too many (2) results while searching for repository_sets with name=\"Red Hat OpenShift Container Platform 4.12 for RHEL 8 x86_64 (RPMs)\""}

Comment 1 Brad Buckingham 2023-03-16 14:20:27 UTC
Has it been confirmed that these are indeed duplicates in the Manifest or is it duplication within Satellite?

Would it be possible to attach the manifest to the bugzilla?
Is there a reproducer environment?