Bug 1250993

Summary: The auto attach will pick a improper subscription when there is a better choice.
Product: [Community] Candlepin Reporter: xingge <gxing>
Component: candlepinAssignee: Filip Nguyen <fnguyen>
Status: CLOSED NOTABUG QA Contact: John Sefler <jsefler>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 0.9CC: alikins, awood, fnguyen, gxing, ldai, qianzhan, sshedmak
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-11 07:08:42 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: 1121117    
Attachments:
Description Flags
'Attach' fails with a runtime error with subscription-manager-gui-1.15.9-6.el7 none

Description xingge 2015-08-06 11:44:05 UTC
Description of problem:
The auto attach will pick a improper subscription when there is a better choice.

Version-Release number of selected component (if applicable):
subscription-manager-1.15.9-2.el7.x86_64
subscription-manager-gui-1.15.9-2.el7.x86_64
subscription-manager-initial-setup-addon-1.15.9-2.el7.x86_64
python-rhsm-1.15.4-2.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1.auto attach a subscription
[root@dhcp-129-157 ~]# LANG=en subscription-manager attach --auto


Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status:       Subscribed



2.See the system status
[root@dhcp-129-157 ~]#subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Insufficient

Red Hat Enterprise Linux for Virtual Datacenters, Premium (DERIVED SKU):
- Guest has not been reported on any host and is using a temporary unmapped guest subscription.

3.Remove the subscription
[root@dhcp-129-157 ~]#subscription-manager remove --all
1 subscription removed at the server.
1 local certificate has been deleted.

4.Attach a proper subscription that make the system status current.
[root@dhcp-129-157 ~]# subscription-manager attach --pool=8a99f9814eb7128e014ebf827a467776
Successfully attached a subscription for: Red Hat Enterprise Linux Server, Premium (Physical or Virtual Nodes)

[root@dhcp-129-157 ~]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Current

Actual results:


Expected results:
The auto attach model should pick the subscription that make the system stauts current if there do have this kind of subscription.

Additional info:

Comment 3 sandeep shedmake 2015-08-26 11:00:17 UTC
Created attachment 1067226 [details]
'Attach' fails with a runtime error with subscription-manager-gui-1.15.9-6.el7

Could reproduce this bugzilla with following:

subscription-manager-1.15.9-6.el7.x86_64
subscription-manager-gui-1.15.9-6.el7.x86_64
subscription-manager-initial-setup-addon-1.15.9-6.el7.x86_64
python-rhsm-1.15.4-2.el7.x86_64

Comment 5 Alex Wood 2015-09-24 21:08:08 UTC
All auto-attach calculations are performed on the server side.  Moving to Candlepin product.