Bug 767265

Summary: 'subscription-manager register' does not re-send installed packages
Product: Red Hat Enterprise Linux 5 Reporter: Tom McKay <tomckay>
Component: subscription-managerAssignee: John Sefler <jsefler>
Status: CLOSED ERRATA QA Contact: Entitlement Bugs <entitlement-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 5.8CC: awood, cduryee, cwelton, jsefler, sghai, syeghiay, wpoteat
Target Milestone: rc   
Target Release: 5.8   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
No description necessary
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-21 06:43:59 UTC Type: ---
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: 715031, 782064    
Attachments:
Description Flags
packages are rendered for re/registered system none

Description Tom McKay 2011-12-13 17:01:58 UTC
Description of problem:

After the first time 'subscription-manager register' is run, the installed packages are not re-sent. To trigger the sending of packages, a call to 'subscription-manager clean' must be run.

I would suggest that 'subscription-manager register --force' should force the sending of all info.

This causes problems in katello/headpin Systems->Packages view. If the system is re-registered, no installed packages are listed.

Version-Release number of selected component (if applicable):
0.96.17-1.el6.x86_64


How reproducible:
Always


Steps to Reproduce:
1. subscription-manager register
2. subscription-manager register --force
3.
  
Actual results:


Expected results:


Additional info:

Comment 2 Tom McKay 2011-12-13 17:14:09 UTC
Edit: Since headpin does not show packages, this only impacts katello.

Comment 3 Alex Wood 2012-01-04 21:47:37 UTC
Steps to Reproduce:
1. Set up a Katello server: https://fedorahosted.org/katello/wiki/Install
2. Set up a Katello client: https://fedorahosted.org/katello/wiki/GuideSystemRegistrationClient
3. On the client run a subscription-manager register
4. In Katello, go to the Systems tab, click on the system name, and go to the Packages tab.  The list of packages should be populated.
5. Delete the system by ctrl-clicking it and selecting "Remove System(s)"
6. On the client run a subscription-manager register --force
7. In Katello, go back to the Systems tab, click the system name, and go to the Packages tab.  The list of packages is empty.

Expected results:
The list of packages is populated whenever a system is registered.

Comment 4 Alex Wood 2012-01-05 16:42:30 UTC
Committed af8229978f21eeaca72f7676fa1edb11bbfa25ab

In subscription-manager-0.99.3+

Comment 6 Alex Wood 2012-01-05 18:17:29 UTC
Committed 85711a3741a34f899c4623f6a2b60de4d613543e on RHEL5.8 branch.

Comment 7 John Sefler 2012-01-09 16:59:06 UTC
Created attachment 551611 [details]
packages are rendered for re/registered system

Verifying Version....
 subscription-manager-0.98.10-1.git.7.33a1a37.el5
 katello-0.1.165-2.el6.noarch included in a system engine compose



[root@jsefler-onprem-5server ~]# subscription-manager config --list
[server]
   ca_cert_dir = [/etc/rhsm/ca/]
   hostname = se-rhelbox.usersys.redhat.com
   insecure = 1
   port = 443
   prefix = /katello/api
   proxy_hostname = []
   proxy_password = []
   proxy_port = []
   proxy_user = []
   repo_ca_cert = [/etc/rhsm/ca/redhat-uep.pem]
   ssl_verify_depth = [3]
<...snip...>



Verifying cases...

Case 1: New register
[root@jsefler-onprem-5server ~]# subscription-manager register --username admin --password admin --org ACME_Corporation --env dev
The system has been registered with id: e595ef94-c5cb-477a-95a0-eb8f8c3a8db6 

Case 2: Remove system in Cloud Forms System Engine gui and register from client with force:
[root@jsefler-onprem-5server ~]# subscription-manager register --username admin --password admin --org ACME_Corporation --env dev --force
The system has been registered with id: 90509c38-ccc5-4234-acfd-97605fb64101 

Case 3: Register from client with --force:
[root@jsefler-onprem-5server ~]# subscription-manager register --username admin --password admin --org ACME_Corporation --env dev --force
The system with UUID 90509c38-ccc5-4234-acfd-97605fb64101 has been unregistered
The system has been registered with id: 8625e5f9-7197-47fb-b015-b5d870c9b010 

For all three cases, the list of the registered system's packages appear loaded for the newly (re)registered system.  See screenshot.

Moving to VERIFIED.

Comment 8 Brad Buckingham 2012-01-16 17:07:30 UTC
*** Bug 772191 has been marked as a duplicate of this bug. ***

Comment 9 William Poteat 2012-01-23 16:31:08 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
No description necessary

Comment 10 errata-xmlrpc 2012-02-21 06:43:59 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-2012-0154.html