Bug 878820 - There's error info on terminal when doing subscribe or unregister using subscription-manager in RHEV-H
There's error info on terminal when doing subscribe or unregister using subsc...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager (Show other bugs)
6.4
Unspecified Unspecified
high Severity medium
: rc
: 6.4
Assigned To: Devan Goodwin
IDM QE LIST
: Regression
Depends On:
Blocks: 771481 888457
  Show dependency treegraph
 
Reported: 2012-11-21 05:03 EST by lzhuang
Modified: 2013-02-21 04:01 EST (History)
16 users (show)

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


Attachments (Terms of Use)

  None (edit)
Description lzhuang 2012-11-21 05:03:57 EST
Description of problem:
When doing subscribe or unregister with subscription-manager, there will be error info on terminal.

Version-Release number of selected component (if applicable):
Red Hat Enterprise Virtualization Hypervisor release 5.9 (20121114.2)
subscription-manager-1.0.24-1.el5
python-rhsm-1.0.10-1.el5

How reproducible:
100%

Steps to Reproduce:
1. register the host to SAM server:
   # subscription-manager register
   Username: admin
   Password: 
   The system has been registered with id: 0e083b63-1770-48f4-a67f-1dac89cbf513

2. subscribe a subscription:
   # subscription-manager  subscribe --pool=8ac28de13b20f59f013b20fb396700a1
   [Errno 2] No such file or directory: '/etc/yum.repos.d/redhat.repo'
   ^^^^^^^^^ There's error info in terminal about the missing file.

   Successfully consumed a subscription for: Red Hat Enterprise Linux Server for HPC Compute Node, Self-support (8 sockets) (Up to 1 guest)

3. do unsubscribe with subscription-manager:
   # subscription-manager  unsubscribe --all
   This machine has been unsubscribed from 1 subscriptions

4. ubregister the host:
   # subscription-manager  unregister
   [Errno 2] No such file or directory: '/etc/yum.repos.d/redhat.repo'
   ^^^^^^^^^ The same error info is printed in terminal.

   System has been un-registered.

5. # subscription-manager  register
   Username: admin
   Password: 
   The system has been registered with id: 3e7c61cb-bb79-491e-ae12-e9d70efed92b 

6. # subscription-manager  unregister
   [Errno 2] No such file or directory: '/etc/yum.repos.d/redhat.repo'
   ^^^^^^^^^ The error info is printed when only doing register/unregister.

   System has been un-registered.
  
Actual results:
As list above.

Expected results:
There should be no error info when doing register, unregister, subscribe or unsubsribe with subscription-manager.

Additional info:
The issue only happens in RHEV-H.
And the issue happens whenever RHEV-H register to SAM server or Candlepin.
Comment 1 RHEL Product and Program Management 2012-11-22 22:18:33 EST
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 Li Bin Liu 2012-11-22 23:49:20 EST
Hi Mike, Bryan,

I'm not sure if this bug belongs to subscription-manager or rhev-hypervisor5, could you please confirm which component it should be set to?

Thanks,
liliu
Comment 3 Mike Burns 2012-11-26 20:26:27 EST
(In reply to comment #2)
> Hi Mike, Bryan,
> 
> I'm not sure if this bug belongs to subscription-manager or
> rhev-hypervisor5, could you please confirm which component it should be set
> to?
> 
> Thanks,
> liliu

In RHEV-H, we don't persist anything under /etc/yum.repos.d since we don't have yum installed.  I would argue that subscription-manager should handle if the file does not exist
Comment 13 Devan Goodwin 2012-12-10 10:42:19 EST
Fixed in subscription-manager master: c6d2af770a1a9c3bb062307d03b7d5d5516762f5

Will appear in subscription-manager-1.8.1

alikins will bring to 6.4 branch.
Comment 16 John Sefler 2012-12-13 14:00:57 EST
(In reply to comment #13)
> Fixed in subscription-manager master:
> c6d2af770a1a9c3bb062307d03b7d5d5516762f5
> 
> Will appear in subscription-manager-1.8.1
> 
> alikins will bring to 6.4 branch.

This fix FailsQA.  It caused bug 878820 which then caused bug 886992.

Moving this bug to ASSIGNED/FailsQA until fixes for 878820 and 886992 are resolved.  Once those bugs are fixed, then please re-test this bug's use case.
Comment 17 Adrian Likins 2012-12-14 15:32:34 EST
886992 is resolved now, so moving this back to MODIFIED.
Comment 19 gaoshang 2012-12-18 21:30:52 EST
This bug has been verified and passed in RHEVH snapshot 2.

[root@hp-dc5850-02 ca]# cat /etc/redhat-release 
Red Hat Enterprise Virtualization Hypervisor release 6.4 (20121212.1)

[root@hp-dc5850-02 ca]# subscription-manager register --user=admin --password=admin
The system has been registered with id: 0e19c66d-8cd2-422f-8584-075d14bf4c34

[root@hp-dc5850-02 ca]# subscription-manager subscribe --pool=8ac28da23b8d3165013b8d350cea00d1
Successfully attached a subscription for: Red Hat Enterprise Linux Server for HPC Compute Node, Self-support (8 sockets) (Up to 1 guest)

[root@hp-dc5850-02 ca]# subscription-manager unsubscribe --all
1 subscription removed from this system.

[root@hp-dc5850-02 ca]# subscription-manager unregister
System has been un-registered.
[root@hp-dc5850-02 ca]#
Comment 21 errata-xmlrpc 2013-02-21 04:01:13 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.