Bug 843191 - subscription-manager version value for server type fails to read "Unknown"
subscription-manager version value for server type fails to read "Unknown"
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: subscription-manager (Show other bugs)
5.9
Unspecified Unspecified
unspecified Severity low
: rc
: ---
Assigned To: Adrian Likins
Entitlement Bugs
:
Depends On:
Blocks: 771748
  Show dependency treegraph
 
Reported: 2012-07-25 16:25 EDT by John Sefler
Modified: 2013-01-07 22:57 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-01-07 22:57:55 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description John Sefler 2012-07-25 16:25:10 EDT
Description of problem:
When we are not registered (to rhsm or classic) and the server.hostname is inaccessible, the remote entitlement server type reported should be "Unknown".

Version-Release number of selected component (if applicable):
[root@jsefler-rhel59 ~]# rpm -q subscription-manager
subscription-manager-1.0.9-1.git.37.53fde9a.el5


How reproducible:


Steps to Reproduce:
[root@jsefler-rhel59 ~]# subscription-manager unregister
System has been un-registered.
[root@jsefler-rhel59 ~]# subscription-manager config --server.hostname=FOO
[root@jsefler-rhel59 ~]# subscription-manager version
remote entitlement server: Unknown
remote entitlement server type: subscription management service
subscription-manager: 1.0.9-1.git.37.53fde9a.el5
python-rhsm: 1.0.3-1.git.2.47dc8f4.el5
[root@jsefler-rhel59 ~]# 

  
Actual results:
remote entitlement server type: subscription management service

Expected results:
remote entitlement server type: Unknown

Additional info:
Comment 1 RHEL Product and Program Management 2012-07-25 16:38:21 EDT
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.
Comment 2 Adrian Likins 2012-08-02 11:22:14 EDT
Should be fixed in:

commit 986fa2f5c8df69142ac3fd4ad0e05e5e536006ef
Author: Adrian Likins <alikins@redhat.com>
Date:   Thu Aug 2 11:11:40 2012 -0400

    843191: 'version' command showed wrong info with no network
    
    If the attempt to get the status and version info from the
    candlepin server failed (for example, wrong host name or
    missing certs) the server type defaulted to
    'subscription management service' which is not particular
    correct.
    
    Errors were also being ignored, so at least show the
    error and log it now. server-type should be "Unknown"
    in these cases now.

(patch out for review at https://github.com/candlepin/subscription-manager/pull/178)
Comment 4 Shwetha Kallesh 2012-08-14 07:14:28 EDT
Moving bug back to new..Verification failed

RPM version:
[root@dhcp201-115 ~]# rpm -qa | grep subscription-manager
subscription-manager-migration-1.0.13-1.git.20.5346dac.el5
subscription-manager-1.0.13-1.git.20.5346dac.el5
subscription-manager-gui-1.0.13-1.git.20.5346dac.el5
subscription-manager-migration-data-1.11.2.3-1.git.0.861f9ba.el5
subscription-manager-firstboot-1.0.13-1.git.20.5346dac.el5


[root@dhcp201-115 ~]# subscription-manager config --server.hostname=FOO
[root@dhcp201-115 ~]# subscription-manager version
Error while checking server version: (-2, 'Name or service not known')
remote entitlement server: Unknown
remote entitlement server type: subscription management service
subscription-manager: 1.0.13-1.git.20.5346dac.el5
python-rhsm: 1.0.5-1.git.1.1ce0910.el5
Comment 5 Adrian Likins 2012-08-17 15:02:06 EDT
commit 4eaa9efbf9317a5391e80d323ec16ab90ef0dbc8
Author: Adrian Likins <alikins@redhat.com>
Date:   Thu Aug 16 10:00:33 2012 -0400

    843191: handle network errors better for 'version' command
    
    Refactor utils.get_*_versions and add more exception
    handling. Add test cases, and add mocking for
    rhn classic check to test cases.

should be 1.0.14-1
Comment 6 Shwetha Kallesh 2012-09-18 03:05:10 EDT
Verified!!

[root@dhcp201-110 pki]# rpm -qa | grep subscription-manager
subscription-manager-1.0.17-1.el5
subscription-manager-gui-1.0.17-1.el5
subscription-manager-firstboot-1.0.17-1.el5


[root@dhcp201-110 pki]# subscription-manager unregister
System has been un-registered.
[root@dhcp201-110 pki]# subscription-manager config --server.hostname=FOO
[root@dhcp201-110 pki]# subscription-manager version
registered to: Unknown
server type: Unknown
subscription-manager: 1.0.17-1.el5
python-rhsm: 1.0.6-1.el5
Comment 8 errata-xmlrpc 2013-01-07 22:57:55 EST
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-0033.html

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