Bug 852328 - "subscription-manager version" cmd should display two RHN types, when registered the system with both classic and cert-based RHN
"subscription-manager version" cmd should display two RHN types, when registe...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager (Show other bugs)
6.3
Unspecified Unspecified
medium Severity medium
: beta
: 6.4
Assigned To: Bryan Kearney
Entitlement Bugs
:
Depends On:
Blocks: 771481
  Show dependency treegraph
 
Reported: 2012-08-28 04:24 EDT by xingge
Modified: 2016-09-19 22:27 EDT (History)
6 users (show)

See Also:
Fixed In Version: subscription-manager-1.1.4-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-21 03:55:50 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)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0350 normal SHIPPED_LIVE subscription-manager bug fix and enhancement update 2013-02-20 15:53:35 EST

  None (edit)
Description xingge 2012-08-28 04:24:05 EDT
Description of problem:
Register the system with both classic and cert-based RHN, then run "subscription-manager version"
the output's option "server type" should show two RHN types.

Version-Release number of selected component (if applicable):
subscription-manager-firstboot-1.0.14-1.el5
subscription-manager-gui-1.0.14-1.el5
subscription-manager-1.0.14-1.el5
python-rhsm-1.0.5-1.el5

How reproducible:
always

Steps to Reproduce:
1.Register the system with both classic and cert-based RHN
2.Run command below:
 #subscription-manager version
  
Actual results:
The output of above step 2. is :
registered to: Unknown
server type: RHN Classic
subscription-manager: 1.0.14-1.el5
python-rhsm: 1.0.5-1.el5

Expected results:
registered to: Unknown
server type: RHN Classic and subsciption management service
subscription-manager: 1.0.14-1.el5
python-rhsm: 1.0.5-1.el5

Additional info:
When register the system with cert-based RHN only, run "subscription-manager version"
will get the output below:
registered to: Unknown
server type: subsciption management service
subscription-manager: 1.0.14-1.el5
python-rhsm: 1.0.5-1.el5
Comment 1 RHEL Product and Program Management 2012-08-28 04:37:01 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 3 John Sefler 2012-08-29 14:29:17 EDT
What server type should we expect from subscription-manager version when the system is only registered classically (valid systemid from RHN; no consumer/cert.pem from Candlepin)?

Current Actual results:

[root@jsefler-59client ~]# subscription-manager version
registered to: Unknown
server type: Unknown
subscription-manager: 1.0.14-1.git.27.c389edc.el5
python-rhsm: 1.0.6-1.git.0.5b533a6.el5


Seems like Expected results should include:
server type: RHN Classic
Comment 4 John Sefler 2012-10-01 18:33:26 EDT
(In reply to comment #3)
> What server type should we expect from subscription-manager version when the
> system is only registered classically (valid systemid from RHN; no
> consumer/cert.pem from Candlepin)?
> 
> Current Actual results:
> 
> [root@jsefler-59client ~]# subscription-manager version
> registered to: Unknown
> server type: Unknown
> subscription-manager: 1.0.14-1.git.27.c389edc.el5
> python-rhsm: 1.0.6-1.git.0.5b533a6.el5
> 
> 
> Seems like Expected results should include:
> server type: RHN Classic

Observe that the identity module returns...

[root@rhsm-accept-rhel5 ~]# subscription-manager identity
server type: RHN Classic

... therefore, I would say that the version module should also return "server type: RHN Classic" when the system is only registered classically.
Comment 5 Bryan Kearney 2012-10-12 16:42:16 EDT
The version command will always report server type. It will show 'Red Hat Subscription Management' if there is no systemid field, and will show 'RHN Classic and Red Hat Subscription Management' if there is.

The identity command will omit the server type unless there is a system id field. In that case it will show 'RHN Classic' if not registered with Subscription Management, and the same both string as above if registered to both.
Comment 6 Bryan Kearney 2012-10-15 11:23:37 EDT
fixed in master at a93ba50bacc4a12a5d51a98ef6501116cf7f34c9
Comment 9 John Sefler 2012-11-03 14:39:02 EDT
The server type information reported by the identity and version modules is still conflicting when only registered classically....

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

[root@jsefler-6 ~]# subscription-manager clean
All local data removed

[root@jsefler-6 ~]# touch /etc/sysconfig/rhn/systemid

[root@jsefler-6 ~]# subscription-manager identity
server type: RHN Classic                                      <======== TRUE

[root@jsefler-6 ~]# subscription-manager version
server type: RHN Classic and Red Hat Subscription Management  <======== DECEPTIVE
subscription management server: 0.7.16-1
subscription-manager: 1.1.5-1.git.1.a350693.el6
python-rhsm: 1.1.4-1.git.0.57fc0de.el6


The server types above report different values when registered classically while NOT registered to Red Hat Subscription Management, yet configured to communicate with one.


In my opinion, if the system in not registered to Red Hat Subscription Management, then the "server type:" reported by the version module should not contain "Red Hat Subscription Management" and the version "subscription management server: Unknown" should be reported even when the rhsm.conf values point to a valid server.
Comment 10 Bryan Kearney 2012-11-09 14:18:12 EST
fixed in master at c36015daf72e1d4011b7430c9e35ebbd1d6684bc.
Comment 12 John Sefler 2012-11-16 19:56:05 EST
Verifying Version...
[root@jsefler-6 ~]# rpm -q subscription-manager
subscription-manager-1.1.9-1.el6.x86_64


[root@jsefler-6 ~]# rm -f /etc/sysconfig/rhn/systemid
[root@jsefler-6 ~]# subscription-manager clean
All local data removed
[root@jsefler-6 ~]# 
[root@jsefler-6 ~]# subscription-manager identity
This system is not yet registered. Try 'subscription-manager register --help' for more information.                                         <======= VERIFIED
[root@jsefler-6 ~]# subscription-manager version
server type: Unknown                                          <======= VERIFIED
subscription management server: 0.7.19-1
subscription-manager: 1.1.9-1.el6
python-rhsm: 1.1.5-1.el6
[root@jsefler-6 ~]# 
[root@jsefler-6 ~]# 
[root@jsefler-6 ~]# subscription-manager register --username testuser1 --org admin
Password: 
The system has been registered with id: 49beb861-8c32-443b-861d-ff4fed611d9e 
[root@jsefler-6 ~]# 
[root@jsefler-6 ~]# 
[root@jsefler-6 ~]# subscription-manager identity
Current identity is: 49beb861-8c32-443b-861d-ff4fed611d9e
name: jsefler-6.usersys.redhat.com
org name: Admin Owner
org id: admin
[root@jsefler-6 ~]# subscription-manager version
server type: Red Hat Subscription Management                  <======= VERIFIED
subscription management server: 0.7.19-1
subscription-manager: 1.1.9-1.el6
python-rhsm: 1.1.5-1.el6
[root@jsefler-6 ~]# 
[root@jsefler-6 ~]# 
[root@jsefler-6 ~]# touch /etc/sysconfig/rhn/systemid
[root@jsefler-6 ~]# 
[root@jsefler-6 ~]# 
[root@jsefler-6 ~]# subscription-manager identity
server type: RHN Classic and Red Hat Subscription Management  <======= VERIFIED
Current identity is: 49beb861-8c32-443b-861d-ff4fed611d9e
name: jsefler-6.usersys.redhat.com
org name: Admin Owner
org id: admin
[root@jsefler-6 ~]# subscription-manager version
server type: RHN Classic and Red Hat Subscription Management  <======= VERIFIED
subscription management server: 0.7.19-1
subscription-manager: 1.1.9-1.el6
python-rhsm: 1.1.5-1.el6
[root@jsefler-6 ~]# 
[root@jsefler-6 ~]# 
[root@jsefler-6 ~]# subscription-manager unregister
System has been un-registered.
[root@jsefler-6 ~]# 
[root@jsefler-6 ~]# 
[root@jsefler-6 ~]# subscription-manager identity
server type: RHN Classic                                      <======= VERIFIED
[root@jsefler-6 ~]# subscription-manager version
server type: RHN Classic                                      <======= VERIFIED
subscription management server: 0.7.19-1
subscription-manager: 1.1.9-1.el6
python-rhsm: 1.1.5-1.el6


VERIFIED: server type for all four cases of registered to neither, cert-based, both, and classic are verified above.
Comment 14 errata-xmlrpc 2013-02-21 03:55:50 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-0350.html

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