RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 988085 - After running subscription-manager config --remove server.hostname, different default values available from GUI and CLI
Summary: After running subscription-manager config --remove server.hostname, different...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager
Version: 6.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Carter Kozak
QA Contact: IDM QE LIST
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel65
TreeView+ depends on / blocked
 
Reported: 2013-07-24 17:21 UTC by Chris Negus
Modified: 2013-11-21 21:26 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: Consequence: "hostname =" line is completely removed from the rhsm.conf Fix: fix default hostname, remove excess config list output Result: hostname line will now revert to the default value
Clone Of:
Environment:
Last Closed: 2013-11-21 21:26:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:1659 0 normal SHIPPED_LIVE subscription-manager and python-rhsm bug fix and enhancement update 2013-11-20 21:53:10 UTC

Description Chris Negus 2013-07-24 17:21:30 UTC
Description of problem: After unregistering a system (subscription-manager unregister), I wanted to return to the default registration host (subscription.rhn.redhat.com), but the old registration host was left behind in /etc/rhsm/rhsm.conf. 

After deleting the value (subscription-manager config --remove server.hostname) the "hostname =" line is completely removed from the rhsm.conf file and the default hostname becomes "localhost" (subscription-manager config --list | grep hostname). There seems no way to automatically return to subscription.rhn.redhat.com.

Behavior from the GUI is different. From the Subscription Manager window, select Register. The "I will register with" box shows localhost:443/subscription. However, I could select Default to return to subscription.rhn.redhat.com (which is the behavior that I would like to be able to get to from the command line).


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

How reproducible:
Always

Steps to Reproduce:
1. Use subscription-manager to register to a system other than subscription.rhn.redhat.com.
2. Run "subscription-manager unregister"
3. Tried to return to default host by deleting value: "subscription-manager config --remove server.hostname"
4. Saw that "hostname =" line was deleted from /etc/rhsm/rhsm.conf file.
5. Ran "subscription-manager config --list | grep hostname" and saw that "hostname" was now set to "[localhost]"
6. Opened the Subscription manager window and selected Register. The "I will register with" box shows localhost:443/subscription. 
7. Selected the Default button and the value returned to the original: subscription.rhn.redhat.com 


Actual results:
There is no way I can find to get back to the "subscription.rhn.redhat.com" default value from the command line.

Expected results:
I'd like to be able to use subscription-manager to return to the subscription.rhn.redhat.com default value. It would be nice if the original hostname value in /etc/rhsm/rhsm.conf file could return to the original:
hostname = subscription.rhn.redhat.com

Additional info:

Comment 2 Carter Kozak 2013-07-31 19:32:09 UTC
commit 4761f79238e0181333296d43beef3cd79e765fb8
Author: ckozak <ckozak>
Date:   Thu Jul 25 10:46:59 2013 -0400

    988476, 988085: fix default hostname, remove excess config list output

commit ccb343c6330e16694b0ab9450c216ba3fa42f0cb
Author: ckozak <ckozak>
Date:   Wed Jul 31 12:08:11 2013 -0400

    fix config failure

Comment 3 Sharath Dwaral 2013-08-27 15:40:28 UTC
Version:

# rpm -qa | egrep "subscription-manager|python-rhsm"
subscription-manager-firstboot-1.9.5-1.el6.x86_64
subscription-manager-migration-data-1.12.3.2-1.el6.noarch
python-rhsm-1.9.4-1.el6.x86_64
subscription-manager-gui-1.9.5-1.el6.x86_64
subscription-manager-1.9.5-1.el6.x86_64
subscription-manager-migration-1.9.5-1.el6.x86_64

Verification:

# subscription-manager register --serverurl=fsharath-candlepin.usersys.redhat.com:8443/candlepin 
Username: testuser1
Password: 
Organization: admin
The system has been registered with ID: 6a868984-2a2f-402a-97bc-05f684000d03 

# cat /etc/rhsm/rhsm.conf | egrep "hostname|prefix|port"
  # Server hostname:
  hostname = fsharath-candlepin.usersys.redhat.com   <<<<< specified hostname
  # Server prefix:
  prefix = /candlepin
  # Server port:
  port = 8443
  proxy_hostname =
  # port for http proxy server
  proxy_port =

# subscription-manager unregister 
System has been unregistered.

# subscription-manager config --list | grep -A10 server
[server]
   hostname = fsharath-candlepin.usersys.redhat.com   <<<<< specified hostname
   insecure = [0]
   port = 8443
   prefix = /candlepin
   proxy_hostname = []
   proxy_password = []
   proxy_port = []
   proxy_user = []
   ssl_verify_depth = [3]

# subscription-manager config --remove server.hostname
You have removed the value for section server and name hostname.
The default value for hostname will now be used.

# cat /etc/rhsm/rhsm.conf | egrep "hostname|prefix|port"
>> # Server hostname:     <<<<<<    hostname removed
   # Server prefix:
   prefix = /candlepin
   # Server port:
   port = 8443
   proxy_hostname =
   # port for http proxy server
   proxy_port =

# subscription-manager config --list | grep -A10 server
[server]
>> hostname = [subscription.rhn.redhat.com]   <<<<<<< default hostname
   insecure = [0]
   port = 8443
   prefix = /candlepin
   proxy_hostname = []
   proxy_password = []
   proxy_port = []
   proxy_user = []
   ssl_verify_depth = [3]



Additional Information:

GUI -> Register -> I will register with: 
This is set to default (subscription.rhn.redhat.com) without having to click on Default button.

NOTE: The "Port" and "Prefix" are not defaulted on removing server.hostname they are same as passed in --serverurl during register.

VERIFIED

Comment 5 errata-xmlrpc 2013-11-21 21:26:51 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-2013-1659.html


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