Bug 723044 - auto-subscribe over subscribing
auto-subscribe over subscribing
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager (Show other bugs)
6.2
Unspecified Unspecified
unspecified Severity high
: rc
: ---
Assigned To: Bryan Kearney
J.C. Molet
:
Depends On:
Blocks: rhsm-rhel62
  Show dependency treegraph
 
Reported: 2011-07-18 16:22 EDT by J.C. Molet
Modified: 2013-01-10 05:54 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-12-06 12:22:33 EST
Type: ---
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 J.C. Molet 2011-07-18 16:22:14 EDT
Description of problem:
In subscription manager, autosubscribe subscribes to more than it should and grabs subscriptions for packages that already have valid entitlements.

Version-Release number of selected component (if applicable):
subscription-manager-firstboot-0.96.4-1.git.34.850053a.el6.x86_64
python-rhsm-0.96.7-1.git.3.f3ce5d1.el6.noarch
subscription-manager-gnome-0.96.4-1.git.34.850053a.el6.x86_64
subscription-manager-0.96.4-1.git.34.850053a.el6.x86_64

How reproducible:
always?

Steps to Reproduce:
1. register subscription manager (use a user with lots of data for extra effect, ie: tesuser1 under the admin org)
2. subscription-manager subscribe --auto
3. subscription-manager subscribe --auto  (again)
  
Actual results:
the second autosubscribe subscribes to all sorts of things I don't need and already have:

[root@jmolet-vm0 rhsm]# subscription-manager subscribe --auto
Installed Products:
   Awesome OS for ia64 Bits - Subscribed
   Awesome OS for x86 Bits - Subscribed
   Awesome OS for ppc64 Bits - Subscribed
   Awesome OS for i386 Bits - Subscribed
   Awesome OS Scalable Filesystem Bits - Subscribed
   Awesome OS Modifier Bits - Subscribed
   Awesome OS Workstation Bits - Subscribed
   Large File Support Bits - Subscribed
   Awesome OS Server Bits - Subscribed
   Management Bits - Subscribed
   Shared Storage Bits - Subscribed
   Clustering Bits - Subscribed
   Load Balancing Bits - Subscribed
   Awesome OS for x86/x64_64 Bits - Subscribed
   Awesome OS for z80/ALL Bits - Subscribed
   Awesome OS for z80/x86_64 Bits - Subscribed
   Awesome OS for x86_64/i686/ia64/ppc/ppc64/s390x/s390 Bits - Subscribed
   Awesome OS for i686/x86_64 Bits - Subscribed
   Awesome OS for x86_64 Bits - Subscribed
   Awesome OS for S390X Bits - Subscribed
   Awesome OS for Intel x86_64/i686/ia64 Bits - Subscribed
   Awesome OS for x86_64/ALL Bits for ZERO sockets - Subscribed
   Awesome OS for x86_64/ALL Bits - Subscribed
   Awesome OS for x86_64/s390x Bits - Subscribed
   This product makes mkt RHEL-server 50% more awesome - Not Subscribed
   Awesome OS Developer Bits - Not Subscribed
   Awesome OS Developer Basic - Not Subscribed
   Awesome OS for i686 Bits - Not Subscribed
   Multiplier Product Bits - Not Subscribed
   Awesome OS for S390 Bits - Not Subscribed
   Awesome OS Premium Architecture Bits - Not Subscribed
   Awesome OS for z80 Bits - Not Subscribed
   This product makes RHEL-server 50% more RHEL! - Not Subscribed
   Flexible Hypervisor(Premium Architectures-15-pack) - Not Subscribed
   Red Hat Open Dos - Not Subscribed
   Flexible Hypervisor(Physical Servers-Unlimited) - Not Subscribed
   Red Hat Linux 4.0 - Not Subscribed


[root@jmolet-vm0 rhsm]# subscription-manager subscribe --auto
Installed Products:
   Awesome OS for i386 Bits - Subscribed
   Awesome OS for x86 Bits - Subscribed
   Awesome OS for ppc64 Bits - Subscribed
   Awesome OS for ia64 Bits - Subscribed
   Awesome OS Scalable Filesystem Bits - Subscribed
   Awesome OS for z80/x86_64 Bits - Subscribed
   Awesome OS Scalable Filesystem Bits - Subscribed
   Awesome OS Modifier Bits - Subscribed
   Awesome OS for x86_64/i686/ia64/ppc/ppc64/s390x/s390 Bits - Subscribed
   Clustering Bits - Subscribed
   Awesome OS Server Bits - Subscribed
   Shared Storage Bits - Subscribed
   Management Bits - Subscribed
   Large File Support Bits - Subscribed
   Load Balancing Bits - Subscribed
   Awesome OS for x86_64 Bits - Subscribed
   Awesome OS for Intel x86_64/i686/ia64 Bits - Subscribed
   Awesome OS for i686/x86_64 Bits - Subscribed
   Awesome OS for S390X Bits - Subscribed
   Awesome OS Workstation Bits - Subscribed
   Clustering Bits - Subscribed
   Awesome OS Server Bits - Subscribed
   Shared Storage Bits - Subscribed
   Management Bits - Subscribed
   Large File Support Bits - Subscribed
   Load Balancing Bits - Subscribed
   Awesome OS Workstation Bits - Subscribed
   Awesome OS for x86/x64_64 Bits - Subscribed
   Awesome OS for z80/ALL Bits - Subscribed
   Awesome OS for x86_64/s390x Bits - Subscribed
   Awesome OS for z80/x86_64 Bits - Subscribed
   Awesome OS for z80/ALL Bits - Subscribed
   Awesome OS for x86_64/i686/ia64/ppc/ppc64/s390x/s390 Bits - Subscribed
   Awesome OS for x86/x64_64 Bits - Subscribed
   Awesome OS for i686/x86_64 Bits - Subscribed
   Awesome OS for ia64 Bits - Subscribed
   Awesome OS for x86 Bits - Subscribed
   Awesome OS for ppc64 Bits - Subscribed
   Awesome OS for i386 Bits - Subscribed
   Awesome OS for x86_64 Bits - Subscribed
   Awesome OS for S390X Bits - Subscribed
   Awesome OS for Intel x86_64/i686/ia64 Bits - Subscribed
   Awesome OS for x86_64/ALL Bits - Subscribed
   Awesome OS for x86_64/ALL Bits for ZERO sockets - Subscribed
   Awesome OS for x86_64/s390x Bits - Subscribed
   Awesome OS Modifier Bits - Subscribed
   Awesome OS for x86_64/ALL Bits for ZERO sockets - Subscribed
   Awesome OS for x86_64/ALL Bits - Subscribed
   This product makes mkt RHEL-server 50% more awesome - Not Subscribed
   Awesome OS Developer Bits - Not Subscribed
   Awesome OS Developer Basic - Not Subscribed
   Awesome OS for i686 Bits - Not Subscribed
   Multiplier Product Bits - Not Subscribed
   Awesome OS for S390 Bits - Not Subscribed
   Awesome OS Premium Architecture Bits - Not Subscribed
   Awesome OS for z80 Bits - Not Subscribed
   This product makes RHEL-server 50% more RHEL! - Not Subscribed
   Flexible Hypervisor(Premium Architectures-15-pack) - Not Subscribed
   Red Hat Open Dos - Not Subscribed
   Flexible Hypervisor(Physical Servers-Unlimited) - Not Subscribed
   Red Hat Linux 4.0 - Not Subscribed


Expected results:
When the second subscription-manager --auto is run, it shouldn't try to look for/subscribe to subscriptions that it already has (and whose products are already in compliance).

Additional info:
Comment 1 John Sefler 2011-07-20 13:24:21 EDT
THIS APPEARS TO BE A PROBLEM IN THE RHEL57 PACKAGES TOO..
[root@jsefler-onprem-5server product]# rpm -q subscription-manager
subscription-manager-0.95.5.21-1.git.0.c991e1a.el5

[root@jsefler-onprem-5server product]# subscription-manager subscribe --auto
Installed Products:
   Awesome OS for x86/x64_64 Bits - Subscribed
   Awesome OS for ppc64 Bits - Subscribed
   Awesome OS for i386 Bits - Subscribed
   Awesome OS for ia64 Bits - Subscribed
   Awesome OS for x86 Bits - Subscribed
   Awesome OS for z80/x86_64 Bits - Subscribed
   Awesome OS Workstation Bits - Subscribed
   Awesome OS for x86_64/ALL Bits for ZERO sockets - Subscribed
   Awesome OS for x86_64/ALL Bits - Subscribed
   Awesome OS for Intel x86_64/i686/ia64 Bits - Subscribed
   Awesome OS for i686/x86_64 Bits - Subscribed
   Clustering Bits - Subscribed
   Awesome OS Server Bits - Subscribed
   Shared Storage Bits - Subscribed
   Management Bits - Subscribed
   Large File Support Bits - Subscribed
   Load Balancing Bits - Subscribed
   Awesome OS Scalable Filesystem Bits - Subscribed
   Awesome OS for x86_64 Bits - Subscribed
   Awesome OS Modifier Bits - Subscribed
   Awesome OS for z80/ALL Bits - Subscribed
   Awesome OS for x86_64/s390x Bits - Subscribed
   Awesome OS for S390X Bits - Subscribed
   Awesome OS for x86_64/i686/ia64/ppc/ppc64/s390x/s390 Bits - Subscribed
   Awesome OS for S390 Bits - Not Subscribed
   Awesome OS Developer Basic - Not Subscribed
   Awesome OS for i686 Bits - Not Subscribed
   Awesome OS Premium Architecture Bits - Not Subscribed
   Awesome OS for z80 Bits - Not Subscribed
   Multiplier Product Bits - Not Subscribed
   Awesome OS Developer Bits - Not Subscribed
[root@jsefler-onprem-5server product]# ls /etc/pki/entitlement/ | wc -l
30
[root@jsefler-onprem-5server product]# subscription-manager subscribe --auto
Installed Products:
   Awesome OS Workstation Bits - Subscribed
   Awesome OS for S390X Bits - Subscribed
   Awesome OS for i686/x86_64 Bits - Subscribed
   Awesome OS for z80/ALL Bits - Subscribed
   Awesome OS for x86/x64_64 Bits - Subscribed
   Awesome OS for ppc64 Bits - Subscribed
   Awesome OS for i386 Bits - Subscribed
   Awesome OS for ia64 Bits - Subscribed
   Awesome OS for x86 Bits - Subscribed
   Awesome OS for z80/x86_64 Bits - Subscribed
   Awesome OS for x86_64 Bits - Subscribed
   Awesome OS Workstation Bits - Subscribed
   Awesome OS Modifier Bits - Subscribed
   Awesome OS for x86_64/ALL Bits for ZERO sockets - Subscribed
   Awesome OS for x86_64/ALL Bits - Subscribed
   Clustering Bits - Subscribed
   Awesome OS Server Bits - Subscribed
   Shared Storage Bits - Subscribed
   Management Bits - Subscribed
   Large File Support Bits - Subscribed
   Load Balancing Bits - Subscribed
   Awesome OS Scalable Filesystem Bits - Subscribed
   Awesome OS for Intel x86_64/i686/ia64 Bits - Subscribed
   Awesome OS for i686/x86_64 Bits - Subscribed
   Clustering Bits - Subscribed
   Awesome OS Server Bits - Subscribed
   Shared Storage Bits - Subscribed
   Management Bits - Subscribed
   Large File Support Bits - Subscribed
   Load Balancing Bits - Subscribed
   Awesome OS Modifier Bits - Subscribed
   Awesome OS for x86_64/ALL Bits for ZERO sockets - Subscribed
   Awesome OS for x86_64/ALL Bits - Subscribed
   Awesome OS for x86_64 Bits - Subscribed
   Awesome OS for x86_64/i686/ia64/ppc/ppc64/s390x/s390 Bits - Subscribed
   Awesome OS for z80/ALL Bits - Subscribed
   Awesome OS for Intel x86_64/i686/ia64 Bits - Subscribed
   Awesome OS for ppc64 Bits - Subscribed
   Awesome OS for i386 Bits - Subscribed
   Awesome OS for ia64 Bits - Subscribed
   Awesome OS for x86 Bits - Subscribed
   Awesome OS for x86_64/s390x Bits - Subscribed
   Awesome OS for z80/x86_64 Bits - Subscribed
   Awesome OS for x86_64/s390x Bits - Subscribed
   Awesome OS for S390X Bits - Subscribed
   Awesome OS for x86_64/i686/ia64/ppc/ppc64/s390x/s390 Bits - Subscribed
   Awesome OS for x86/x64_64 Bits - Subscribed
   Awesome OS Scalable Filesystem Bits - Subscribed
   Awesome OS for S390 Bits - Not Subscribed
   Awesome OS Developer Basic - Not Subscribed
   Awesome OS for i686 Bits - Not Subscribed
   Awesome OS Premium Architecture Bits - Not Subscribed
   Awesome OS for z80 Bits - Not Subscribed
   Multiplier Product Bits - Not Subscribed
   Awesome OS Developer Bits - Not Subscribed
[root@jsefler-onprem-5server product]# ls /etc/pki/entitlement/ | wc -l
62
Comment 2 John Sefler 2011-07-20 13:26:51 EDT
Actually, I believe this bug is on the candlepin server side in both the current master and 0.3 branches...

[root@jsefler-onprem-62candlepin proxy]# git branch
  0.3
* master
[root@jsefler-onprem-62candlepin proxy]# git show-ref | grep master
dd43750685593a1477e6ad590d40c95043a507fc refs/heads/master
dd43750685593a1477e6ad590d40c95043a507fc refs/remotes/origin/master

[root@jsefler-f14-5candlepin proxy]# git branch
  0.2
* 0.3
  master
[root@jsefler-f14-5candlepin proxy]# git show-ref | egrep 0.3$
ae599847a188f4c200af5353854ab96ff66e4c74 refs/heads/0.3
ae599847a188f4c200af5353854ab96ff66e4c74 refs/remotes/origin/0.3
Comment 3 James Bowes 2011-10-03 11:48:17 EDT
fixed in candlepin master, 65a89acd
Comment 6 J.C. Molet 2011-10-05 10:49:24 EDT
verified against 

[root@mgmt5 candlepin]# git show
commit 5340dfd5b25440d227ee22940da712516a4989bb


python-rhsm-0.96.13-1.git.0.a237980.el6.noarch
subscription-manager-firstboot-0.96.13-1.git.0.b1b0502.el6.x86_64
subscription-manager-0.96.13-1.git.0.b1b0502.el6.x86_64
subscription-manager-gnome-0.96.13-1.git.0.b1b0502.el6.x86_64


[root@jmolet-vm0 ~]# subscription-manager subscribe --auto
Installed Product Current Status:

ProductName:          Awesome OS for S390 Bits 
Status:                Not Subscribed           


ProductName:          Stackable with Awesome OS for x86_64 Bits
Status:                Subscribed               


ProductName:          Red Hat Linux 4.0        
Status:                Not Subscribed           


ProductName:          Awesome OS Developer Basic
Status:                Not Subscribed           


ProductName:          Awesome OS for x86_64/i686/ia64/ppc/ppc64/s390x/s390 Bits
Status:                Subscribed               


ProductName:          Awesome OS for z80/x86_64 Bits
Status:                Subscribed               


ProductName:          Awesome OS for z80/ALL Bits
Status:                Subscribed               


ProductName:          Awesome OS for x86_64/ALL Bits
Status:                Subscribed               


ProductName:          Awesome OS for x86_64/ALL Bits for ZERO sockets
Status:                Subscribed               


ProductName:          Red Hat Open Dos         
Status:                Not Subscribed           


ProductName:          Awesome OS Workstation Bits
Status:                Subscribed               


ProductName:          Multiplier Product Bits  
Status:                Not Subscribed           


ProductName:          Awesome OS Developer Bits
Status:                Not Subscribed           


ProductName:          Management Bits          
Status:                Subscribed               


ProductName:          Large File Support Bits  
Status:                Subscribed               


ProductName:          Awesome OS Modifier Bits 
Status:                Subscribed               


ProductName:          Clustering Bits          
Status:                Subscribed               


ProductName:          Shared Storage Bits      
Status:                Subscribed               


ProductName:          Awesome OS Server Bits   
Status:                Subscribed               


ProductName:          Awesome OS Premium Architecture Bits
Status:                Not Subscribed           


ProductName:          Awesome OS for ia64 Bits 
Status:                Subscribed               


ProductName:          Awesome OS for i686/x86_64 Bits
Status:                Subscribed               


ProductName:          Awesome OS for z80 Bits  
Status:                Not Subscribed           


ProductName:          Awesome OS for i686 Bits 
Status:                Not Subscribed           


ProductName:          Awesome OS for x86_64 Bits
Status:                Subscribed               


ProductName:          Awesome OS for ppc64 Bits
Status:                Subscribed               


ProductName:          Awesome OS for S390X Bits
Status:                Not Subscribed           


ProductName:          Awesome OS for i386 Bits 
Status:                Subscribed               


ProductName:          Awesome OS for x86 Bits  
Status:                Subscribed               


ProductName:          Awesome OS for x86_64/s390x Bits
Status:                Subscribed               


ProductName:          Awesome OS for Intel x86_64/i686/ia64 Bits
Status:                Subscribed               


ProductName:          Awesome OS for x86/x64_64 Bits
Status:                Subscribed               


ProductName:          Flexible Hypervisor(Physical Servers-Unlimited)
Status:                Not Subscribed           


ProductName:          Flexible Hypervisor(Premium Architectures-15-pack)
Status:                Not Subscribed           


ProductName:          This product makes RHEL-server 50% more RHEL!
Status:                Not Subscribed           


ProductName:          This product makes mkt RHEL-server 50% more awesome
Status:                Not Subscribed           


ProductName:          Awesome OS Scalable Filesystem Bits
Status:                Subscribed               


ProductName:          Load Balancing Bits      
Status:                Subscribed               

[root@jmolet-vm0 ~]# ls /etc/pki/entitlement/
2377893947489220621-key.pem  3003769823593497447-key.pem 
3427504881581507364-key.pem  7645342567805069766-key.pem 
8543563159838905421-key.pem
2377893947489220621.pem      3003769823593497447.pem     
3427504881581507364.pem      7645342567805069766.pem     
8543563159838905421.pem
2490545921112584114-key.pem  3082987171561264015-key.pem 
3565819033079715230-key.pem  8057380876877774949-key.pem 
8880438772390933480-key.pem
2490545921112584114.pem      3082987171561264015.pem     
3565819033079715230.pem      8057380876877774949.pem     
8880438772390933480.pem
2744059236859184075-key.pem  313039718748127576-key.pem  
6335958323802126028-key.pem  831615461229144201-key.pem  
960141293169035016-key.pem
2744059236859184075.pem      313039718748127576.pem      
6335958323802126028.pem      831615461229144201.pem      
960141293169035016.pem
[root@jmolet-vm0 ~]# vim output1.txt
[root@jmolet-vm0 ~]# subscription-manager subscribe --auto
Installed Product Current Status:

ProductName:          Awesome OS for S390 Bits 
Status:                Not Subscribed           


ProductName:          Stackable with Awesome OS for x86_64 Bits
Status:                Subscribed               


ProductName:          Red Hat Linux 4.0        
Status:                Not Subscribed           


ProductName:          Awesome OS Developer Basic
Status:                Not Subscribed           


ProductName:          Awesome OS for x86_64/i686/ia64/ppc/ppc64/s390x/s390 Bits
Status:                Subscribed               


ProductName:          Awesome OS for z80/x86_64 Bits
Status:                Subscribed               


ProductName:          Awesome OS for z80/ALL Bits
Status:                Subscribed               


ProductName:          Awesome OS for x86_64/ALL Bits
Status:                Subscribed               


ProductName:          Awesome OS for x86_64/ALL Bits for ZERO sockets
Status:                Subscribed               


ProductName:          Red Hat Open Dos         
Status:                Not Subscribed           


ProductName:          Awesome OS Workstation Bits
Status:                Subscribed               


ProductName:          Multiplier Product Bits  
Status:                Not Subscribed           


ProductName:          Awesome OS Developer Bits
Status:                Not Subscribed           


ProductName:          Management Bits          
Status:                Subscribed               


ProductName:          Large File Support Bits  
Status:                Subscribed               


ProductName:          Awesome OS Modifier Bits 
Status:                Subscribed               


ProductName:          Clustering Bits          
Status:                Subscribed               


ProductName:          Shared Storage Bits      
Status:                Subscribed               


ProductName:          Awesome OS Server Bits   
Status:                Subscribed               


ProductName:          Awesome OS Premium Architecture Bits
Status:                Not Subscribed           


ProductName:          Awesome OS for ia64 Bits 
Status:                Subscribed               


ProductName:          Awesome OS for i686/x86_64 Bits
Status:                Subscribed               


ProductName:          Awesome OS for z80 Bits  
Status:                Not Subscribed           


ProductName:          Awesome OS for i686 Bits 
Status:                Not Subscribed           


ProductName:          Awesome OS for x86_64 Bits
Status:                Subscribed               


ProductName:          Awesome OS for ppc64 Bits
Status:                Subscribed               


ProductName:          Awesome OS for S390X Bits
Status:                Not Subscribed           


ProductName:          Awesome OS for i386 Bits 
Status:                Subscribed               


ProductName:          Awesome OS for x86 Bits  
Status:                Subscribed               


ProductName:          Awesome OS for x86_64/s390x Bits
Status:                Subscribed               


ProductName:          Awesome OS for Intel x86_64/i686/ia64 Bits
Status:                Subscribed               


ProductName:          Awesome OS for x86/x64_64 Bits
Status:                Subscribed               


ProductName:          Flexible Hypervisor(Physical Servers-Unlimited)
Status:                Not Subscribed           


ProductName:          Flexible Hypervisor(Premium Architectures-15-pack)
Status:                Not Subscribed           


ProductName:          This product makes RHEL-server 50% more RHEL!
Status:                Not Subscribed           


ProductName:          This product makes mkt RHEL-server 50% more awesome
Status:                Not Subscribed           


ProductName:          Awesome OS Scalable Filesystem Bits
Status:                Subscribed               


ProductName:          Load Balancing Bits      
Status:                Subscribed               

[root@jmolet-vm0 ~]# ls /etc/pki/entitlement/
2377893947489220621-key.pem  3003769823593497447-key.pem 
3427504881581507364-key.pem  7645342567805069766-key.pem 
8543563159838905421-key.pem
2377893947489220621.pem      3003769823593497447.pem     
3427504881581507364.pem      7645342567805069766.pem     
8543563159838905421.pem
2490545921112584114-key.pem  3082987171561264015-key.pem 
3565819033079715230-key.pem  8057380876877774949-key.pem 
8880438772390933480-key.pem
2490545921112584114.pem      3082987171561264015.pem     
3565819033079715230.pem      8057380876877774949.pem     
8880438772390933480.pem
2744059236859184075-key.pem  313039718748127576-key.pem  
6335958323802126028-key.pem  831615461229144201-key.pem  
960141293169035016-key.pem
2744059236859184075.pem      313039718748127576.pem      
6335958323802126028.pem      831615461229144201.pem      
960141293169035016.pem
[root@jmolet-vm0 ~]# vim output2.txt


[root@jmolet-vm0 ~]# diff output1.txt output2.txt 
161a162
> 
[root@jmolet-vm0 ~]# 


Lack of difference in the output diffs show that no new products were
subscribed to on the second invocation of autosubscribe.  Marking this
VERIFIED.
Comment 7 errata-xmlrpc 2011-12-06 12:22:33 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-2011-1695.html

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