Project

General

Profile

Feature #24166

[sat-e-492] Allow adding releasever to custom repos

Added by Thomas McKay almost 4 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
High
Assignee:
Category:
Repositories
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1526564

Description of problem:

Red Hat products that are imported via manifest have an associated architecture and OS release version. This helps ensure that we don't, for example, get a repo for RHEL7 enabled on a RHEL8 host that's consuming content. We have no equivalent for custom products, and that's the aim of the RFE - to be able to specify those values. The working theory is that we can use candlepin to do that, just like it already does for RH products.

Relevant Candlepin API (create Product): https://www.candlepinproject.org/swagger/?url=candlepin/swagger-2.9.17.json#!/owners/createProduct

Previous description:
If a CV exists, with both RHEL6 and RHEL7 base repos in it, a system connected to the CV will only 'see' the repos that match the version of RHEL installed on the system.

For custom products, this does not work.

This is especially cumbersome in container environments.

My customer, for example, has Atomic Host nodes connected to the Default Library View (to get access to new RPMs as soon as we release new container images).

In that Default Org View are also EPEL6 and EPEL7. RHEL6 containers nicely only 'see' and enable the RHEL6 base repos, but they have both EPEL6 and EPEL7 enabled. Same goes for RHEL7 containers, but the other way around.

This is cumbersome.

As I discussed with Rich Jerrido, it would be useful if we could inject some specific tags into the custom product and product certificate that makes sure that on RHEL6 containers (or VMs) only EPEL6 is enabled, and on RHEL7 containers (or VMs) only EPEL7 is enabled, even though both are available from the same CV.

Hope this makes sense :)

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Add both RHEL6 and RHEL7 base repos, EPEL6 and EPEL7. Sync all.
2. Connect new system to Default Org View
3. Spin up RHEL6 or RHEL7 container

Actual results:
Container sees only appropriate RHEL6 or RHEL7 content, but both EPEL6 and EPEL7.

Expected results:
Container sees only appropriate RHEL6 or RHEL7 content, and only appropriate EPEL6 or EPEL7.

Additional info:


Related issues

Has duplicate Katello - Feature #30956: Configure default repository set for subscriptionsDuplicate

Associated revisions

Revision 67b60bb3 (diff)
Added by Jeremy Lenz over 1 year ago

Fixes #24166 - Add requiredTags to custom repos (#8983)

Add "OS Versions" to repositories in custom products
- Uses candlepin requiredTags field
- Compares to provided tags on a host
- Disables repos with nonmatching tags

History

#1 Updated by Thomas McKay almost 4 years ago

  • Assignee changed from Eric Helms to Thomas McKay
  • Category changed from Subscriptions to Repositories
  • Subject changed from allow adding required-tags to custom products to allow adding required-tags to custom products

The solution for this is to allow the "required tags" for a repository to be set in candlepin. This functionality already exists in candlepin so need only expose it in katello.

Implementation choices:
1. simple text field (with hint of "rhel-6,rhel-7")
2. editable text field with drop down checkbox choices
3. editable text field with drop down checkbox choices where choices are populated from known existing tags

% rct cat-cert /etc/pki/entitlements/FOO.pem
Content:
    Type: yum
    Name: Red Hat Developer Toolset RHB RPMs for Red Hat Enterprise Linux 6 Workstation
    Label: rhel-workstation-dts-6-rhb-rpms
    Vendor: Red Hat
    URL: /content/rhb/rhel/workstation/6/6Workstation/$basearch/devtoolset/os
    GPG: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta
    Enabled: False
    Expires: 86400
    Required Tags: rhel-6-workstation
    Arches: x86_64, x86

To see the tags 'installed' on the client:

% rct cat-cert /etc/pki/product/FOO.pem
Product:
    ID: 69
    Name: Red Hat Enterprise Linux Server
    Version: 7.5
    Arch: x86_64
    Tags: rhel-7,rhel-7-server
    Brand Type: 
    Brand Name:

#2 Updated by Jonathon Turel almost 4 years ago

  • Triaged changed from No to Yes
  • Target version set to Katello 3.9.0

#3 Updated by Thomas McKay almost 4 years ago

  • Status changed from New to Assigned
  • Team Backlog Tom added

#4 Updated by Brad Buckingham almost 4 years ago

  • Assignee deleted (Thomas McKay)

#5 Updated by Jonathon Turel over 3 years ago

  • Target version changed from Katello 3.9.0 to Katello Backlog
  • Status changed from Assigned to New
  • Team Backlog Brad added
  • Team Backlog deleted (Tom)

#6 Updated by Jeremy Lenz about 2 years ago

  • Target version changed from Katello Backlog to Katello 4.0.0
  • Description updated (diff)
  • Subject changed from allow adding required-tags to custom products to [sat-e-492] Allow adding arch and releasever to custom repos

#7 Updated by Chris Roberts almost 2 years ago

  • Target version changed from Katello 4.0.0 to Katello 3.17.0

#8 Updated by Jonathon Turel almost 2 years ago

  • Target version changed from Katello 3.17.0 to Katello 3.18.0

#9 Updated by Jeremy Lenz over 1 year ago

  • Assignee set to Jeremy Lenz
  • Subject changed from [sat-e-492] Allow adding arch and releasever to custom repos to [sat-e-492] Allow adding releasever to custom repos

#10 Updated by Jonathon Turel over 1 year ago

  • Has duplicate Feature #30956: Configure default repository set for subscriptions added

#11 Updated by The Foreman Bot over 1 year ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/8983 added

#12 Updated by The Foreman Bot over 1 year ago

  • Fixed in Releases Katello 4.0.0 added

#13 Updated by Jeremy Lenz over 1 year ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF