Description of problem: Currently, the "--serverurl" option is used in the following use cases: 1. rhn-migrate-classic-to-rhsm --serverurl 2. subscription-manager register --serverurl 3. subscription-manager orgs --serverurl 4. subscription-manager environments --serverurl 5. subscription-manager service-level --serverurl In each case above, the value for serverurl is currently persisted to the rhsm.conf file. In my opinion, this is the wrong behavior for cases 3,4,5 which are query based operations. I believe these use cases should NOT persist the serverurl values to rhsm.conf. 3. subscription-manager orgs --serverurl 4. subscription-manager environments --serverurl 5. subscription-manager service-level --serverurl Version-Release number of selected component (if applicable): [root@jsefler-6 ~]# rpm -q subscription-manager subscription-manager-1.1.18-1.el6.x86_64
commit 017043f43225d5abc381a9164352e5b35e95102b Author: Alex Wood <awood> Date: Wed Jan 2 15:03:15 2013 -0500 889573: Only persist serverurl and baseurl when registering.
Fixed in the 1.8.2 version of subscription-manager or python-rhsm
# rpm -qa | egrep "subscription-manager|python-rhsm" python-rhsm-1.8.3-1.el7.x86_64 subscription-manager-gui-1.8.3-1.el7.x86_64 subscription-manager-migration-1.8.3-1.el7.x86_64 subscription-manager-debuginfo-1.8.3-1.el7.x86_64 subscription-manager-1.8.3-1.el7.x86_64 subscription-manager-firstboot-1.8.3-1.el7.x86_64 python-rhsm-debuginfo-1.8.3-1.el7.x86_64 Tested of each case individually 1. rhn-migrate-classic-to-rhsm --serverurl cat /etc/rhsm/rhsm.conf | grep hostname # Server hostname: hostname = subscription.rhn.redhat.com proxy_hostname = # subscription-manager identity This system is not yet registered. Try 'subscription-manager register --help' for more information. # rhnreg_ks --serverUrl=https://xmlrpc.rhn.code.stage.redhat.com/XMLRPC --username=qa --password=redhatqa --force --norhnsd --nohardware --nopackages --novirtinfo This system is not subscribed to any channels. RHN channel support will be disabled. # rhn-migrate-classic-to-rhsm --serverurl=fsharath-candlepin.usersys.redhat.com:8443/candlepin Red Hat account: qa Password: System Engine Username: testuser1 Password: Org: snowwhite Retrieving existing RHN Classic subscription information... Problem encountered getting the list of subscribed channels. Exiting. # cat /etc/rhsm/rhsm.conf | grep hostname # Server hostname: hostname = subscription.rhn.redhat.com proxy_hostname = 2. subscription-manager register --serverurl # cat /etc/rhsm/rhsm.conf | grep hostname # Server hostname: hostname = subscription.rhn.redhat.com proxy_hostname = # subscription-manager identity This system is not yet registered. Try 'subscription-manager register --help' for more information. # subscription-manager register --serverurl fsharath-candlepin.usersys.redhat.com:8443/candlepin Username: testuser1 Password: Organization: snowwhite The system has been registered with id: e2ad42fb-4f2b-45fd-8f2f-b6d0df46387a # cat /etc/rhsm/rhsm.conf | grep hostname # Server hostname: hostname=fsharath-candlepin.usersys.redhat.com proxy_hostname = 3. subscription-manager orgs --serverurl # subscription-manager identity This system is not yet registered. Try 'subscription-manager register --help' for more information. # cat /etc/rhsm/rhsm.conf | grep hostname # Server hostname: hostname=fsharath-candlepin.usersys.redhat.com proxy_hostname = # subscription-manager orgs --serverurl fsharath-candlepin.usersys.redhat.com:8443/candlepin Username: testuser1 Password: +-------------------------------------------+ testuser1 Organizations +-------------------------------------------+ Name: Admin Owner Key: admin Name: Snow White Key: snowwhite 4. subscription-manager environments --serverurl Using the --insecure option to test this as it was tested against a server who's certs I didn't have # cat /etc/rhsm/rhsm.conf | grep hostname # Server hostname: hostname=subscription.rhn.redhat.com proxy_hostname = # subscription-manager environments --serverurl https://jsefler-r63-headpin.usersys.redhat.com --insecure Username: admin Password: Organization: testOrgName +-------------------------------------------+ Environments +-------------------------------------------+ Name: testEnvName Description: testing 1 2 3 # cat /etc/rhsm/rhsm.conf | grep hostname # Server hostname: hostname=subscription.rhn.redhat.com proxy_hostname = 5. subscription-manager service-level --serverurl # subscription-manager identity This system is not yet registered. Try 'subscription-manager register --help' for more information. # cat /etc/rhsm/rhsm.conf | grep hostname # Server hostname: hostname=subscription.rhn.redhat.com proxy_hostname = # subscription-manager register --serverurl fsharath-candlepin.usersys.redhat.com:8443/candlepin Username: testuser1 Password: Organization: snowwhite The system has been registered with id: 8054aad5-8370-4ab5-a23a-a053332ea1b5 # cat /etc/rhsm/rhsm.conf | grep hostname # Server hostname: hostname=fsharath-candlepin.usersys.redhat.com proxy_hostname = change hostname in rhsm.conf file # cat /etc/rhsm/rhsm.conf | grep hostname # Server hostname: hostname = subscription.rhn.redhat.com proxy_hostname = # subscription-manager service-level --serverurl fsharath-candlepin.usersys.redhat.com:8443/candlepin Service level preference not set # subscription-manager service-level --serverurl fsharath-candlepin.usersys.redhat.com:8443/candlepin --list +-------------------------------------------+ Available Service Levels +-------------------------------------------+ None Premium Standard # cat /etc/rhsm/rhsm.conf | grep hostname # Server hostname: hostname = subscription.rhn.redhat.com proxy_hostname = VERIFIED
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux release for currently deployed products. This request is not yet committed for inclusion in a release.
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-2013-1332.html