Bug 1086316 - [RFE] repo-override support on rhel5 subscription-manager clients
Summary: [RFE] repo-override support on rhel5 subscription-manager clients
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: subscription-manager
Version: 5.11
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: John Sefler
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel511
TreeView+ depends on / blocked
 
Reported: 2014-04-10 15:20 UTC by John Sefler
Modified: 2014-09-16 00:22 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Feature: subscription-manager repos are written with server-side overrides taken into account Reason: This feature gives more control in managed environments Result: rhel5 subscription-manager supports repo overrides
Clone Of:
Environment:
Last Closed: 2014-09-16 00:22:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
screenshot of subscription-manager-gui interface to repo-overrides (55.79 KB, image/png)
2014-05-20 18:59 UTC, John Sefler
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1225 0 normal SHIPPED_LIVE subscription-manager bug fix and enhancement update 2014-09-16 04:15:23 UTC

Description John Sefler 2014-04-10 15:20:39 UTC
Description of problem:
During the development cycle for subscription-manager-1.10 targetted for release on rhel7, content overrides was implemented to support RFE Bug 803746.  Ideally, this same functionality should be backported a RHEL5 subscription-manager client.  Minimally, a RHEL5 client should honor content-overrides that are set on the consumer from an upstream entitlement server such as SAM or Satellite 6.

Comment 1 Carter Kozak 2014-04-29 13:49:11 UTC
Fixed in subscription-manager-1.11.3-2.el5

Comment 3 John Sefler 2014-05-20 18:59:43 UTC
Created attachment 897695 [details]
screenshot of subscription-manager-gui interface to repo-overrides

Verifying Version...
[root@jsefler-5 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.9.10-1
subscription-manager: 1.11.3-3.el5
python-rhsm: 1.11.3-3.el5

The ability to override repo parameters (all except baseurl) is now available through the CLI.

Here is the usage syntax via the CLI:

[root@jsefler-5 ~]# subscription-manager repo-override --help
Usage: subscription-manager repo-override [OPTIONS]

Manage custom content repository settings

options:
  -h, --help            show this help message and exit
  --proxy=PROXY_URL     proxy URL in the form of proxy_hostname:proxy_port
  --proxyuser=PROXY_USER
                        user for HTTP proxy with basic authentication
  --proxypassword=PROXY_PASSWORD
                        password for HTTP proxy with basic authentication
  --repo=REPOID         repository to modify (can be specified more than once)
  --remove=NAME         name of the override to remove (can be specified more
                        than once); used with --repo option.
  --add=NAME:VALUE      name and value of the option to override separated by
                        a colon (can be specified more than once); used with
                        --repo option.
  --remove-all          remove all overrides; can be specific to a repository
                        by providing --repo
  --list                list all overrides; can be specific to a repository by
                        providing --repo

Here is an example creation of a repo override:

[root@jsefler-5 ~]# subscription-manager register --serverurl=subscription.rhn.redhat.com:443/subscription --autosubscribe
Username: qa
Password: 
The system has been registered with ID: 3a04ef4c-4ca3-4e1c-b021-d2a52a3b6b45 
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status:       Subscribed

[root@jsefler-5 ~]# subscription-manager repo-override --list
This system does not have any content overrides applied to it.

[root@jsefler-5 ~]# tail -12 /etc/yum.repos.d/redhat.repo 
[rhel-5-server-rhev-agent-beta-rpms]
name = Red Hat Enterprise Virtualization Agents for RHEL 5 Server Beta (RPMs)
baseurl = https://cdn.redhat.com/content/beta/rhel/server/5/$releasever/$basearch/rhev-agent/3/os
enabled = 0
gpgcheck = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta
sslverify = 1
sslcacert = /etc/rhsm/ca/redhat-uep.pem
sslclientkey = /etc/pki/entitlement/8117353697731660204-key.pem
sslclientcert = /etc/pki/entitlement/8117353697731660204.pem
metadata_expire = 86400
ui_repoid_vars = releasever basearch

[root@jsefler-5 ~]# subscription-manager repo-override --repo=rhel-5-server-rhev-agent-beta-rpms --add=metadata_expire:9999

[root@jsefler-5 ~]# tail -12 /etc/yum.repos.d/redhat.repo 
[rhel-5-server-rhev-agent-beta-rpms]
name = Red Hat Enterprise Virtualization Agents for RHEL 5 Server Beta (RPMs)
baseurl = https://cdn.redhat.com/content/beta/rhel/server/5/$releasever/$basearch/rhev-agent/3/os
enabled = 0
gpgcheck = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta
sslverify = 1
sslcacert = /etc/rhsm/ca/redhat-uep.pem
sslclientkey = /etc/pki/entitlement/8117353697731660204-key.pem
sslclientcert = /etc/pki/entitlement/8117353697731660204.pem
metadata_expire = 9999    <============== VERIFIED: the override was applied
ui_repoid_vars = releasever basearch

[root@jsefler-5 ~]# subscription-manager repo-override --list
Repository: rhel-5-server-rhev-agent-beta-rpms
  metadata_expire: 9999

[root@jsefler-5 ~]# subscription-manager repo-override --repo=rhel-5-server-rhev-agent-beta-rpms --remove=metadata_expire

[root@jsefler-5 ~]# subscription-manager repo-override --list
This system does not have any content overrides applied to it.

[root@jsefler-5 ~]# tail -12 /etc/yum.repos.d/redhat.repo 
[rhel-5-server-rhev-agent-beta-rpms]
name = Red Hat Enterprise Virtualization Agents for RHEL 5 Server Beta (RPMs)
baseurl = https://cdn.redhat.com/content/beta/rhel/server/5/$releasever/$basearch/rhev-agent/3/os
enabled = 0
gpgcheck = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta
sslverify = 1
sslcacert = /etc/rhsm/ca/redhat-uep.pem
sslclientkey = /etc/pki/entitlement/8117353697731660204-key.pem
sslclientcert = /etc/pki/entitlement/8117353697731660204.pem
metadata_expire = 86400   <============== VERIFIED: the original value was restored
ui_repoid_vars = releasever basearch
[root@jsefler-5 ~]# 


VERIFIED: Above is a simple example of adding, listing, and removing a repo-override of the metadata_expire parameter to repo rhel-5-server-rhev-agent-beta-rpms.





The ability to override repo parameters (enabled and gpgcheck ONLY) is now available through the GUI:
See attached screenshot.

Comment 5 errata-xmlrpc 2014-09-16 00:22:17 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, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-1225.html


Note You need to log in before you can comment on or make changes to this bug.