Bug 874623

Summary: subscription-manager version report for server when not registered classically nor certificatlely
Product: Red Hat Enterprise Linux 6 Reporter: John Sefler <jsefler>
Component: subscription-managerAssignee: Alex Wood <awood>
Status: CLOSED ERRATA QA Contact: IDM QE LIST <seceng-idm-qe-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.4CC: alikins, awood, spandey
Target Milestone: rcKeywords: QA-Closed
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-21 08:59:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 771481    

Description John Sefler 2012-11-08 14:43:07 UTC
Description of problem:
When the rhsm.conf is configured for a valid candlepin server, but the system is not registered to it (nor registered classically to RHN), the subscription-manager version report is giving half the server info.

[root@jsefler-6 ~]# subscription-manager version
server type: Unknown                      <====== if the server type is unknown,
subscription management server: 0.7.18-1  <====== how can we know its version?
subscription-manager: 1.1.5-1.git.14.ae9fffd.el6
python-rhsm: 1.1.4-1.git.0.57fc0de.el6

Version-Release number of selected component (if applicable):
[root@jsefler-6 ~]# rpm -q subscription-manager
subscription-manager-1.1.5-1.git.14.ae9fffd.el6.x86_64


How reproducible:


Steps to Reproduce:
[root@jsefler-6 ~]# subscription-manager config --server.hostname=jsefler-f14-6candlepin.usersys.redhat.com --server.port=8443 --server.prefix=/candlepin

[root@jsefler-6 ~]# subscription-manager unregister
This system is currently not registered.

[root@jsefler-6 ~]# rm /etc/sysconfig/rhn/systemid
rm: cannot remove `/etc/sysconfig/rhn/systemid': No such file or directory

[root@jsefler-6 ~]# subscription-manager version
server type: Unknown
subscription management server: 0.7.18-1
subscription-manager: 1.1.5-1.git.14.ae9fffd.el6
python-rhsm: 1.1.4-1.git.0.57fc0de.el6

  
Actual results:
server type: Unknown
subscription management server: 0.7.18-1

Expected results:
  I can't decide what the correct expectations should be.
  In my opinion it should be either:
server type: Unknown
subscription management server: Unknown
  OR
server type: Red Hat Subscription Management
subscription management server: 0.7.18-1

Comment 1 Adrian Likins 2012-11-19 15:21:44 UTC
commit 004314cea99b4b81ba03afb259cd813c50eb30fd
Author: Alex Wood <awood>
Date:   Fri Nov 16 16:00:01 2012 -0500

    874623: Tell users running the version command if they are not registered.

Comment 4 spandey 2012-11-26 11:10:02 UTC
Verified using following rpm with rhel6.4 
[root@localhost ~]# rpm -qa | grep subscription
subscription-manager-1.8.0-1.git.3.006a990.el6.x86_64
subscription-manager-migration-1.8.0-1.git.3.006a990.el6.x86_64
subscription-manager-firstboot-1.8.0-1.git.3.006a990.el6.x86_64
subscription-manager-gui-1.8.0-1.git.3.006a990.el6.x86_64
subscription-manager-migration-data-1.12.2.6-1.git.0.171d4c3.el6.noarch



[root@localhost ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: Unknown
subscription-manager: 1.8.0-1.git.3.006a990.el6
python-rhsm: 1.8.0-1.git.0.28876af.el6

I think this is meeting the expected behaviour, so marking defect as verified.

Comment 6 errata-xmlrpc 2013-02-21 08:59:54 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-0350.html