Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-18293

duplicate RH Ceph Tools 4 for RHEL 8 repos shown on Red Hat repositories

XMLWordPrintable

    • 0
    • False
    • Important
    • None
    • None
    • None
    • None

      Description of problem:
      During the upgrade of RHV Manager, we wanted to enable rhceph-4-tools-for-rhel-8-x86_64-rpms as a pre-requirement. As we enable repositories using Ansible Automation, we discovered an issue that Ansible reports there are more than one repository with the same name.

      Version-Release number of selected component (if applicable):
      rhceph-4-tools-for-rhel-8-x86_64-rpms
      RH Satellite v6.9.6
      Ansible 2.9

      How reproducible:
      Write an Ansible playbook and run it against to invetory.

      Steps to Reproduce:
      1. Add a task with loop like
      ```

      • name: Enable 8 repositories
        theforeman.foreman.repository_set:
        username: "{{ rhs_satellite_admin }}"
        password: "{{ rhs_satellite_admin_password }}"
        server_url: "{{ rhs_satellite_server_url }}"
        validate_certs: "{{ rhs_validate_certs }}"
        organization: "{{ rhs_org }}"
        label: "{{ item.label }}"
        repositories:
      • releasever: "{{ item.rel | default(omit) }}"
        state: "{{ item.state | default('enabled') }}"
        loop: "{{ rhs_repos_repolist }}"

      ```
      2. Add inventory to the list like

      ```
      rhs_repos_repolist:

      • label: "jb-eap-7.4-for-rhel-8-x86_64-rpms"
      • label: "ansible-2.9-for-rhel-8-x86_64-rpms"
      • label: "fast-datapath-for-rhel-8-x86_64-rpms"
      • label: "advanced-virt-for-rhel-8-x86_64-rpms"
      • label: "satellite-tools-6.9-for-rhel-8-x86_64-rpms"
      • label: "rhv-4-mgmt-agent-for-rhel-8-x86_64-rpms"
      • label: "rhvh-4-for-rhel-8-x86_64-rpms"
      • label: "rhv-4.4-manager-for-rhel-8-x86_64-rpms"
      • label: "rhceph-4-tools-for-rhel-8-x86_64-rpms"
        ```
        3. Add credentials and variables to use from the task 1.

      4. Run playbook to enable

      ```
      Actual results:
      TASK [satellite_enable_repos : Enable 8 repositories] *****************************************************************************************************************************************
      Wednesday 08 June 2022 13:57:01 +0200 (0:00:05.151) 0:00:05.499 ********
      ok: [satellite.example.com -> localhost] => (item=

      {'label': 'jb-eap-7.4-for-rhel-8-x86_64-rpms'}

      )
      ok: [satellite.example.com -> localhost] => (item=

      {'label': 'ansible-2.9-for-rhel-8-x86_64-rpms'}

      )
      ok: [satellite.example.com -> localhost] => (item=

      {'label': 'fast-datapath-for-rhel-8-x86_64-rpms'}

      )
      ok: [satellite.example.com -> localhost] => (item=

      {'label': 'advanced-virt-for-rhel-8-x86_64-rpms'}

      )
      ok: [satellite.example.com -> localhost] => (item=

      {'label': 'satellite-tools-6.9-for-rhel-8-x86_64-rpms'}

      )
      ok: [satellite.example.com -> localhost] => (item=

      {'label': 'rhv-4-mgmt-agent-for-rhel-8-x86_64-rpms'}

      )
      ok: [satellite.example.com -> localhost] => (item=

      {'label': 'rhvh-4-for-rhel-8-x86_64-rpms'}

      )
      ok: [satellite.example.com -> localhost] => (item=

      {'label': 'rhv-4.4-manager-for-rhel-8-x86_64-rpms'}

      )
      failed: [satellite.example.com -> localhost] (item=

      {'label': 'rhceph-4-tools-for-rhel-8-x86_64-rpms'}

      ) => {"ansible_loop_var": "item", "changed": false, "item":

      {"label": "rhceph-4-tools-for-rhel-8-x86_64-rpms"}

      , "msg": "Found too many (2) results while searching for repository_sets with label=\"rhceph-4-tools-for-rhel-8-x86_64-rpms\""}
      ok: [satellite.example.com -> localhost] => (item=

      {'label': 'openstack-16.2-cinderlib-for-rhel-8-x86_64-rpms'}

      )
      .....
      ```
      Expected results:
      Enablement of `rhceph-4-tools-for-rhel-8-x86_64-rpms` doesn't fail.

      Additional info:

              jira-bugzilla-migration RH Bugzilla Integration
              jira-bugzilla-migration RH Bugzilla Integration
              RH Bugzilla Integration RH Bugzilla Integration
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: