Bug 2227821

Summary: rhc: baseurl in rhsm.conf is empty when rhc_baseurl is not specified
Product: Red Hat Enterprise Linux 9 Reporter: Pino Toscano <ptoscano>
Component: rhel-system-rolesAssignee: Rich Megginson <rmeggins>
Status: CLOSED ERRATA QA Contact: CS System Management SST QE <rhel-cs-system-management-subsystem-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.3CC: arpandey, briasmit, djez, jharuda, pkettman, spetrosi, vdanek
Target Milestone: rcKeywords: Triaged
Target Release: 9.3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: role:rhc
Fixed In Version: rhel-system-roles-1.22.0-0.19.el9 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 2227823 (view as bug list) Environment:
Last Closed: 2023-11-07 08:29:54 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: 2227823    

Description Pino Toscano 2023-07-31 15:24:17 UTC
Description of problem:
Due to a regression in a refactoring, when "rhc_baseurl" is not specified as a role parameter and a system is being registered, then the "baseurl" configuration option in the [rhsm] section of the /etc/rhsm/rhsm.conf file is set to empty. This obviously has the wrong side effect of not being able to receive content, since the repositories in /etc/yum.repos.d/redhat.repo have a wrong URL.

This was reported upstream as https://github.com/linux-system-roles/rhc/issues/126

Version-Release number of selected component (if applicable):
rhel-system-roles since 1.22.0-0.9

How reproducible:
100%

Steps to Reproduce:
1. register an unsubscribed system with the rhc role, without specifying "rhc_baseurl" (and thus registering to Red Hat RHSM)
2. try to update the system, or install packages, etc

Actual results:
The system cannot fetch any content.

Expected results:
The system can fetch updates, packages, etc.

Comment 1 Rich Megginson 2023-07-31 15:29:53 UTC
Is there a workaround?  What is the impact/severity of this?  Is the rhc role mostly unusable? I'm trying to determine how we should address this issue - sounds like a 8.8.z/9.2.z but want to make sure

Comment 2 Pino Toscano 2023-07-31 15:36:10 UTC
(In reply to Rich Megginson from comment #1)
> Is there a workaround?

# subscription-manager config --rhsm.baseurl https://cdn.redhat.com

> What is the impact/severity of this?

Pretty high, if you register to Hosted (and not to a Satellite server, or Stage).

> Is the rhc role mostly unusable?

The role is usable, it's about the modified/registered system.

> I'm trying to determine how we should address this
> issue - sounds like a 8.8.z/9.2.z but want to make sure

Nope, 9.2 is not affected (uses rhc 1.1.x).

Hopefully an easy fix: https://github.com/linux-system-roles/rhc/pull/127

Comment 12 errata-xmlrpc 2023-11-07 08:29:54 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 (rhel-system-roles 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/RHEA-2023:6390