Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #38158 - restrict repositories to RHEL 10 #11286

Merged
merged 1 commit into from
Jan 23, 2025

Conversation

ianballou
Copy link
Member

What are the changes introduced in this pull request?

Adds RHEL 10 to the OS restriction list for repos.

Considerations taken when implementing this change?

Inspiration: #9786
We need to come up with a way to catch this since it'll be likely forgotten each RHEL release.

What are the testing steps for this pull request?

  1. Create 3 repositories:
    • 1 with restrict to RHEL 10
    • 1 with restrict to RHEL 9
    • 1 with no restriction
  2. Register a RHEL 10 beta machine
  3. See that repo 1 and 3 are available to the host but not repo 2, the RHEL 9 one.

@@ -39,7 +39,8 @@ class RootRepository < Katello::Model
RHEL7 = 'rhel-7'.freeze
RHEL8 = 'rhel-8'.freeze
RHEL9 = 'rhel-9'.freeze
ALLOWED_OS_VERSIONS = [RHEL6, RHEL7, RHEL8, RHEL9].freeze
RHEL10 = 'rhel-10'.freeze
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the tag that will be provided by the RHEL10 installed product? (I mean, it probably is, but it would be nice to confirm. It's certainly possible it can't be confirmed until after RHEL10 GA)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where does this tag come from for RH repos? Is it the manifest?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The product cert:

# rct cat-cert /etc/pki/product-default/479.pem 

+-------------------------------------------+
	Product Certificate
+-------------------------------------------+

Certificate:
	Path: /etc/pki/product-default/479.pem
	Version: 1.0
	Serial: 12750047592154747873
	Start Date: 2024-01-16 15:30:21+00:00
	End Date: 2044-01-16 15:30:21+00:00

Subject:
	CN: Red Hat Product ID [3ad649c5-c93c-4662-ab13-b71883f5ef72]

Issuer:
	C: US
	CN: Red Hat Entitlement Product Authority
	O: Red Hat, Inc.
	OU: Red Hat Network
	ST: North Carolina
	emailAddress: [email protected]

Product:
	ID: 479
	Name: Red Hat Enterprise Linux for x86_64
	Version: 9.5
	Arch: x86_64
	Tags: rhel-9,rhel-9-x86_64
	Brand Type: 
	Brand Name: 

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rhel-10 is the label!

Copy link
Member

@sjha4 sjha4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Able to see rhel 10 as valid restrict to OS option. 🍏


Rhel9 doesn't get the repositories when restricting to rhel10,: 🍏

rhel9_restrictedtorhel10


Rhel10 gets the repository 🍏

rhel10_restrictedto10


Rhel10 does not get repository when repo restricted to rhel9 🍏

Repositories_rhel10_rhel9_restricted


Rhel9 gets repository when repo restricted to rhel9 🍏

Restrict_to_rhel9_on_el9

@ianballou ianballou merged commit 5f06aa5 into Katello:master Jan 23, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants