Bug 2121689

Summary: foreman-maintain still enables ansible-2.9-for-rhel-8-x86_64-rpms repository for running an update to 6.11.z when no packages are installed from that repository
Product: Red Hat Satellite Reporter: Dhaval Joshi <dhjoshi>
Component: Satellite MaintainAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Gaurav Talreja <gtalreja>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.11.0CC: ahumbe, apatel, egolov, jesper.schmidt, kgaikwad, lpramuk, pcreech
Target Milestone: 6.12.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rubygem-foreman_maintain-1.1.2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2131773 (view as bug list) Environment:
Last Closed: 2022-11-16 13:35:34 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 Dhaval Joshi 2022-08-26 09:04:10 UTC
Description of problem:

foreman-maintain still enables ansible-2.9-for-rhel-8-x86_64-rpms repository for running an update to 6.11.z when no packages are installed from ansible-2.9-for-rhel-8-x86_64-rpms repository

# rpm -qa | grep -i satellite
satellite-maintain-0.0.1-1.el8sat.noarch
satellite-6.11.1.1-1.el8sat.noarch
satellite-installer-6.11.0.7-1.el8sat.noarch
ansible-collection-redhat-satellite_operations-1.2.3-1.el8sat.noarch
satellite-common-6.11.1.1-1.el8sat.noarch
ansible-collection-redhat-satellite-3.3.0-1.el8sat.noarch
satellite-cli-6.11.1.1-1.el8sat.noarch

# rpm -qa | grep -i ansible
ansible-runner-1.4.7-1.el8ar.noarch
ansiblerole-foreman_scap_client-0.2.0-2.el8sat.noarch
rubygem-smart_proxy_ansible-3.3.1-2.el8sat.noarch
rubygem-pulp_ansible_client-0.10.1-1.el8sat.noarch
ansible-lint-5.0.8-3.el8pc.noarch
rubygem-hammer_cli_foreman_ansible-0.3.4-1.el8sat.noarch
python38-pulp-ansible-0.10.1-1.el8pc.noarch
ansible-collection-redhat-satellite_operations-1.2.3-1.el8sat.noarch
ansible-core-2.12.2-4.el8_6.x86_64
ansible-test-2.12.2-4.el8_6.x86_64
ansible-collection-redhat-satellite-3.3.0-1.el8sat.noarch
python3-ansible-runner-1.4.7-1.el8ar.noarch
rubygem-foreman_ansible-7.0.4.1-1.el8sat.noarch
python38-ansible-builder-1.0.1-2.el8pc.noarch
ansiblerole-insights-client-1.7.1-2.el8sat.noarch
]# yum list installed | grep -i ansible
ansible-collection-redhat-satellite.noarch            3.3.0-1.el8sat                              @satellite-6.11-for-rhel-8-x86_64-rpms            
ansible-collection-redhat-satellite_operations.noarch 1.2.3-1.el8sat                              @satellite-6.11-for-rhel-8-x86_64-rpms            
ansible-core.x86_64                                   2.12.2-4.el8_6                              @rhel-8-for-x86_64-appstream-rpms                 
ansible-lint.noarch                                   5.0.8-3.el8pc                               @satellite-6.11-for-rhel-8-x86_64-rpms            
ansible-runner.noarch                                 1.4.7-1.el8ar                               @satellite-6.11-for-rhel-8-x86_64-rpms            
ansible-test.x86_64                                   2.12.2-4.el8_6                              @rhel-8-for-x86_64-appstream-rpms                 
ansiblerole-foreman_scap_client.noarch                0.2.0-2.el8sat                              @satellite-6.11-for-rhel-8-x86_64-rpms            
ansiblerole-insights-client.noarch                    1.7.1-2.el8sat                              @satellite-6.11-for-rhel-8-x86_64-rpms            
python3-ansible-runner.noarch                         1.4.7-1.el8ar                               @satellite-6.11-for-rhel-8-x86_64-rpms            
python38-ansible-builder.noarch                       1.0.1-2.el8pc                               @satellite-6.11-for-rhel-8-x86_64-rpms            
python38-pulp-ansible.noarch                          1:0.10.1-1.el8pc                            @satellite-6.11-for-rhel-8-x86_64-rpms            
rubygem-foreman_ansible.noarch                        7.0.4.1-1.el8sat                            @satellite-6.11-for-rhel-8-x86_64-rpms            
rubygem-hammer_cli_foreman_ansible.noarch             0.3.4-1.el8sat                              @satellite-6.11-for-rhel-8-x86_64-rpms            
rubygem-pulp_ansible_client.noarch                    0.10.1-1.el8sat                             @satellite-6.11-for-rhel-8-x86_64-rpms            
rubygem-smart_proxy_ansible.noarch                    3.3.1-2.el8sat                              @satellite-6.11-for-rhel-8-x86_64-rpms            

# yum list installed | grep -i 'ansible-2.9-for-rhel-8-x86_64-rpms' <=== No Output

Version-Release number of selected component (if applicable):
Red Hat Satellite 6.11 RHEL 8.6

How reproducible:
100%

Steps to Reproduce:
1. Deploy Satellite 6.11 with RHEL 8 as operating system.

2. Run commands on the Satellite server 
# foreman-maintain upgrade check --target-version 6.11.z
# foreman-maintain upgrade run --target-version 6.11.z
# dnf repolist

Actual results:
# dnf repolist
Updating Subscription Management repositories.
repo id                                                       repo name
ansible-2.9-for-rhel-8-x86_64-rpms                            Red Hat Ansible Engine 2.9 for RHEL 8 x86_64 (RPMs)
rhel-8-for-x86_64-appstream-rpms                              Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)
rhel-8-for-x86_64-baseos-rpms                                 Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)
satellite-6.11-for-rhel-8-x86_64-rpms                         Red Hat Satellite 6.11 for RHEL 8 x86_64 (RPMs)
satellite-maintenance-6.11-for-rhel-8-x86_64-rpms             Red Hat Satellite Maintenance 6.11 for RHEL 8 x86_64 (RPMs)


Expected results:
ansible-2.9-for-rhel-8-x86_64-rpms repository should not be enabled while running an update to 6.11.z

Additional info:

Comment 3 Lukas Pramuk 2022-09-02 13:10:17 UTC
*** Bug 2123735 has been marked as a duplicate of this bug. ***

Comment 4 Gaurav Talreja 2022-09-06 20:53:21 UTC
Verified.

Tested on Satellite 6.12.0 Snap 9.0
Version: rubygem-foreman_maintain-1.1.4-1.el8sat.noarch

Steps:
1. # foreman-maintain upgrade run --target-version 6.12 --whitelist="repositories-validate"
OR
1. # satellite-maintain advanced procedure run repositories-setup --version 6.12

Observation:
foreman-maintain doesn't enable ansible-2.9-for-rhel-8-x86_64-rpms repo in repositories-setup check for the upgrade from 6.11.z to 6.12.0 which is specific to el8 only, and 2nd command to test this check fails due to BZ 2124584, which is tracked separately.

Comment 8 errata-xmlrpc 2022-11-16 13:35:34 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 (Important: Satellite 6.12 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-2022:8506