Bug 2141454

Summary: "rhc connect --username --password" on RHEL 8.7 system does not result in a system with working yum repositories
Product: Red Hat Enterprise Linux 8 Reporter: Brian Smith <briasmit>
Component: rhcAssignee: Link Dupont <link>
Status: CLOSED ERRATA QA Contact: Pavol Kotvan <pakotvan>
Severity: medium Docs Contact:
Priority: high    
Version: 8.7CC: cmarinea, fjansen, jhnidek, link, pakotvan
Target Milestone: rcKeywords: Triaged, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: SCRUB_20221201
Fixed In Version: rhc-0.2.1-11.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2165099 (view as bug list) Environment:
Last Closed: 2023-05-16 08:35:37 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:
Bug Depends On:    
Bug Blocks: 2165099    

Description Brian Smith 2022-11-09 22:30:59 UTC
Description of problem:
On newly built RHEL 8.7 system, running "rhc connect" does not result in a system with working RHEL yum repositories

Version-Release number of selected component (if applicable):  RHEL 8.7, rhc-0.2.1-9.el8.x86_64

How reproducible:
Only attempted one time

Steps to Reproduce:
1. Build RHEL 8.7 system from rhel-8.7-x86_64-dvd.iso 

2. Run "rhc connect", which successfully completes:
● Connected to Red Hat Subscription Management
● Connected to Red Hat Insights
● Activated the Red Hat connector daemon


Actual results:
There are no RHEL repositories configured:

# dnf repolist
Updating Subscription Management repositories.
No repositories available

# cat /etc/yum.repos.d/redhat.repo 
#
# Certificate-Based Repositories
# Managed by (rhsm) subscription-manager
#
# *** This file is auto-generated.  Changes made here will be over-written. ***
# *** Use "subscription-manager repo-override --help" if you wish to make changes. ***
#
# If this file is empty and this system is subscribed consider
# a "yum repolist" to refresh available repos
#

Expected results:
- Expected that after running "rhc connect" the BaseOS / AppStream repositories are available

Additional info:
- After running "subscription-manager refresh" the BaseOS / AppStream repositories are available/working.

Comment 1 Link Dupont 2022-12-01 16:43:58 UTC
I could not reproduce this. Does the account you registered with have Simple Content Access enabled? 'rhc connect' does not activate any entitlements; it only registers the system with RHSM.

Comment 2 Brian Smith 2022-12-01 17:33:39 UTC
Yes, my account has simple content access enabled.  

I built another two new RHEL 8.7 systems from the rhel-8.7-x86_64-dvd.iso:

- On one system, I ran "rhc connect" and reproduced the issue again as described in this BZ.  If I then run "subscription-manager refresh", the AppStream and BaseOS repositories are avalable.

- On the other system, I ran "subscription-manager register" and was left with both the AppStream and BaseOS repositories setup/available 

Why does "subscription-manager register" configure the repositories, but "rhc connect" doesn't?

Comment 4 Christian Marineau 2022-12-02 14:54:05 UTC
I was able to reproduce the issue on RHEL 8.7

Comment 6 Link Dupont 2022-12-02 15:48:54 UTC
I figured it out. I was able to reproduce it when I run 'rhc connect' using a username and password. I had previously run my reproduction steps using an org-id and activation key, which of course activates the repositories automatically.

Comment 24 errata-xmlrpc 2023-05-16 08:35:37 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 (rhc bug fix and enhancement update), 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/RHBA-2023:2819