[Katello] publish custom yum repos relative to machine os version, architecture etc

I've got a mirror of
the https://fedorapeople.org/groups/katello/releases/yum/nightly/client
repo in Katello and have enabled the three repos, 5Server, 6Server and
7Server.
If I add this subscription (repo) to a RHEL 6 machine, it can't install
katello 2.3 since all three repos are added (the machine tries to install
the packages provided by the RHEL7 repo)

Is there a way I can add this repo to the clients using subscription-manger
(or via foreman) and use the appropriate 'sub' repository depending the the
client os version?

Currently if I add the subscription to the client, the run
subscription-manager repos --list I get:

Repo ID: Default_Organization_Katello_client_RHEL_5Server_x86_64
Repo Name: client RHEL 5Server x86_64
Repo URL:
https://katelloserver/pulp/repos/Default_Organization/Library/custom/Katello/client_RHEL_5Server_x86_64
Enabled: 1

Repo ID: Default_Organization_Katello_client_RHEL_6Server_x86_64
Repo Name: client RHEL 6Server x86_64
Repo URL:
https://katelloserver/pulp/repos/Default_Organization/Library/custom/Katello/client_RHEL_6Server_x86_64
Enabled: 1

Repo ID: Default_Organization_Katello_client_RHEL_7Server_x86_64
Repo Name: client RHEL 7Server x86_64
Repo URL:
https://katelloserver/pulp/repos/Default_Organization/Library/custom/Katello/client_RHEL_7Server_x86_64
Enabled: 1

So this enables all three sync'ed repos in the product. What I really want
is this: (for a RHEL 6 server)

Repo ID: Default_Organization_Katello_client_RHEL_6Server_x86_64
Repo Name: client RHEL 6Server x86_64
Repo URL:
https://katelloserver/pulp/repos/Default_Organization/Library/custom/Katello/client_RHEL_6Server_x86_64
Enabled: 1

For custom products (those not created by import of a Red Hat subscription manifest), the operating system and arch are not written as variables to the redhat.repo file (where the sub-mgr repos lists from). In your case, there are several options:

  1. Explicitly disable repos in the Product Content of an activation key and use that during subscription-manager register. This would mean you'd have three act keys, one for each OS.
  2. Explicitly disable repos either in the Product Content of the content host in the server, or disable the repos client side. Both of these require sub-man register first.

I thought there was an RFE to provide custom products with the same yum variable substitution as Red Hat products, but I'm not finding it. Please open an RFE in redmine, if desired.

··· ----- Original Message ----- > I've got a mirror of > the https://fedorapeople.org/groups/katello/releases/yum/nightly/client > repo in Katello and have enabled the three repos, 5Server, 6Server and > 7Server. > If I add this subscription (repo) to a RHEL 6 machine, it can't install > katello 2.3 since all three repos are added (the machine tries to install > the packages provided by the RHEL7 repo) > > Is there a way I can add this repo to the clients using subscription-manger > (or via foreman) and use the appropriate 'sub' repository depending the the > client os version? > > Currently if I add the subscription to the client, the run > subscription-manager repos --list I get: > > Repo ID: Default_Organization_Katello_client_RHEL_5Server_x86_64 > Repo Name: client RHEL 5Server x86_64 > Repo URL: > https://katelloserver/pulp/repos/Default_Organization/Library/custom/Katello/client_RHEL_5Server_x86_64 > Enabled: 1 > > Repo ID: Default_Organization_Katello_client_RHEL_6Server_x86_64 > Repo Name: client RHEL 6Server x86_64 > Repo URL: > https://katelloserver/pulp/repos/Default_Organization/Library/custom/Katello/client_RHEL_6Server_x86_64 > Enabled: 1 > > Repo ID: Default_Organization_Katello_client_RHEL_7Server_x86_64 > Repo Name: client RHEL 7Server x86_64 > Repo URL: > https://katelloserver/pulp/repos/Default_Organization/Library/custom/Katello/client_RHEL_7Server_x86_64 > Enabled: 1 > > > So this enables all three sync'ed repos in the product. What I really want > is this: (for a RHEL 6 server) > > Repo ID: Default_Organization_Katello_client_RHEL_6Server_x86_64 > Repo Name: client RHEL 6Server x86_64 > Repo URL: > https://katelloserver/pulp/repos/Default_Organization/Library/custom/Katello/client_RHEL_6Server_x86_64 > Enabled: 1 > > > > -- > You received this message because you are subscribed to the Google Groups > "Foreman users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to foreman-users+unsubscribe@googlegroups.com. > To post to this group, send email to foreman-users@googlegroups.com. > Visit this group at http://groups.google.com/group/foreman-users. > For more options, visit https://groups.google.com/d/optout. >

Just ran into this issue myself using Satellite 6.1.1. Will submit a RFE
if there isn't one.

··· On Friday, May 29, 2015 at 10:27:58 AM UTC-4, Tom McKay wrote: > > > > ----- Original Message ----- > > I've got a mirror of > > the https://fedorapeople.org/groups/katello/releases/yum/nightly/client > > repo in Katello and have enabled the three repos, 5Server, 6Server and > > 7Server. > > If I add this subscription (repo) to a RHEL 6 machine, it can't install > > katello 2.3 since all three repos are added (the machine tries to > install > > the packages provided by the RHEL7 repo) > > > > Is there a way I can add this repo to the clients using > subscription-manger > > (or via foreman) and use the appropriate 'sub' repository depending the > the > > client os version? > > > > Currently if I add the subscription to the client, the run > > subscription-manager repos --list I get: > > > > Repo ID: Default_Organization_Katello_client_RHEL_5Server_x86_64 > > Repo Name: client RHEL 5Server x86_64 > > Repo URL: > > > https://katelloserver/pulp/repos/Default_Organization/Library/custom/Katello/client_RHEL_5Server_x86_64 > > Enabled: 1 > > > > Repo ID: Default_Organization_Katello_client_RHEL_6Server_x86_64 > > Repo Name: client RHEL 6Server x86_64 > > Repo URL: > > > https://katelloserver/pulp/repos/Default_Organization/Library/custom/Katello/client_RHEL_6Server_x86_64 > > Enabled: 1 > > > > Repo ID: Default_Organization_Katello_client_RHEL_7Server_x86_64 > > Repo Name: client RHEL 7Server x86_64 > > Repo URL: > > > https://katelloserver/pulp/repos/Default_Organization/Library/custom/Katello/client_RHEL_7Server_x86_64 > > Enabled: 1 > > > > > > So this enables all three sync'ed repos in the product. What I really > want > > is this: (for a RHEL 6 server) > > > > Repo ID: Default_Organization_Katello_client_RHEL_6Server_x86_64 > > Repo Name: client RHEL 6Server x86_64 > > Repo URL: > > > https://katelloserver/pulp/repos/Default_Organization/Library/custom/Katello/client_RHEL_6Server_x86_64 > > Enabled: 1 > > > > > > > > -- > > You received this message because you are subscribed to the Google > Groups > > "Foreman users" group. > > To unsubscribe from this group and stop receiving emails from it, send > an > > email to foreman-user...@googlegroups.com . > > To post to this group, send email to forema...@googlegroups.com > . > > Visit this group at http://groups.google.com/group/foreman-users. > > For more options, visit https://groups.google.com/d/optout. > > > > For custom products (those not created by import of a Red Hat subscription > manifest), the operating system and arch are not written as variables to > the redhat.repo file (where the sub-mgr repos lists from). In your case, > there are several options: > > 1. Explicitly disable repos in the Product Content of an activation key > and use that during subscription-manager register. This would mean you'd > have three act keys, one for each OS. > 2. Explicitly disable repos either in the Product Content of the content > host in the server, or disable the repos client side. Both of these require > sub-man register first. > > I thought there was an RFE to provide custom products with the same yum > variable substitution as Red Hat products, but I'm not finding it. Please > open an RFE in redmine, if desired. > > --

This e-mail message is intended only for the designated recipient(s) named above. The information contained in this e-mail and any attachments may be confidential or legally privileged. If you are not the intended recipient, you may not review, retain, copy, redistribute or use this e-mail or any attachment for any purpose, or disclose all or any part of its contents. If you have received this e-mail in error, please immediately notify the sender by reply e-mail and permanently delete this e-mail and any attachments from your computer system.


I have a bugzilla for this feature. Opened in April.

https://bugzilla.redhat.com/show_bug.cgi?id=1217261

··· On Friday, May 29, 2015 at 7:27:58 AM UTC-7, Tom McKay wrote: > > > > ----- Original Message ----- > > I've got a mirror of > > the https://fedorapeople.org/groups/katello/releases/yum/nightly/client > > repo in Katello and have enabled the three repos, 5Server, 6Server and > > 7Server. > > If I add this subscription (repo) to a RHEL 6 machine, it can't install > > katello 2.3 since all three repos are added (the machine tries to > install > > the packages provided by the RHEL7 repo) > > > > Is there a way I can add this repo to the clients using > subscription-manger > > (or via foreman) and use the appropriate 'sub' repository depending the > the > > client os version? > > > > Currently if I add the subscription to the client, the run > > subscription-manager repos --list I get: > > > > Repo ID: Default_Organization_Katello_client_RHEL_5Server_x86_64 > > Repo Name: client RHEL 5Server x86_64 > > Repo URL: > > > https://katelloserver/pulp/repos/Default_Organization/Library/custom/Katello/client_RHEL_5Server_x86_64 > > Enabled: 1 > > > > Repo ID: Default_Organization_Katello_client_RHEL_6Server_x86_64 > > Repo Name: client RHEL 6Server x86_64 > > Repo URL: > > > https://katelloserver/pulp/repos/Default_Organization/Library/custom/Katello/client_RHEL_6Server_x86_64 > > Enabled: 1 > > > > Repo ID: Default_Organization_Katello_client_RHEL_7Server_x86_64 > > Repo Name: client RHEL 7Server x86_64 > > Repo URL: > > > https://katelloserver/pulp/repos/Default_Organization/Library/custom/Katello/client_RHEL_7Server_x86_64 > > Enabled: 1 > > > > > > So this enables all three sync'ed repos in the product. What I really > want > > is this: (for a RHEL 6 server) > > > > Repo ID: Default_Organization_Katello_client_RHEL_6Server_x86_64 > > Repo Name: client RHEL 6Server x86_64 > > Repo URL: > > > https://katelloserver/pulp/repos/Default_Organization/Library/custom/Katello/client_RHEL_6Server_x86_64 > > Enabled: 1 > > > > > > > > -- > > You received this message because you are subscribed to the Google > Groups > > "Foreman users" group. > > To unsubscribe from this group and stop receiving emails from it, send > an > > email to foreman-user...@googlegroups.com . > > To post to this group, send email to forema...@googlegroups.com > . > > Visit this group at http://groups.google.com/group/foreman-users. > > For more options, visit https://groups.google.com/d/optout. > > > > For custom products (those not created by import of a Red Hat subscription > manifest), the operating system and arch are not written as variables to > the redhat.repo file (where the sub-mgr repos lists from). In your case, > there are several options: > > 1. Explicitly disable repos in the Product Content of an activation key > and use that during subscription-manager register. This would mean you'd > have three act keys, one for each OS. > 2. Explicitly disable repos either in the Product Content of the content > host in the server, or disable the repos client side. Both of these require > sub-man register first. > > I thought there was an RFE to provide custom products with the same yum > variable substitution as Red Hat products, but I'm not finding it. Please > open an RFE in redmine, if desired. > >