Bug 1294044 - GUI : Dev facts are not considered while Auto-attaching subscriptions
GUI : Dev facts are not considered while Auto-attaching subscriptions
Status: CLOSED CURRENTRELEASE
Product: Candlepin
Classification: Community
Component: candlepin (Show other bugs)
2.0
Unspecified Unspecified
high Severity high
: ---
: ---
Assigned To: candlepin-bugs
Katello QA List
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-24 04:01 EST by Shwetha Kallesh
Modified: 2016-07-22 10:40 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-22 10:40:01 EDT
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)
GUI auto-attach doesnot attach CDK subscriptions (95.82 KB, image/png)
2015-12-24 04:01 EST, Shwetha Kallesh
no flags Details

  None (edit)
Description Shwetha Kallesh 2015-12-24 04:01:24 EST
Created attachment 1109159 [details]
GUI auto-attach doesnot attach CDK subscriptions

Description of problem:
Upon clicking the Auto-attach button of GUI on a system that has following facts

dev_platform: vagrant
dev_sku: RH2262474

doesnot attach a CDK subscription , but a normal subscription valid for an year is attached , whereas subscription-manager auto-attach (CLI) command does attach the CDK subscriptions . Same is the case with subscription-manager register --auto-attach.

Version-Release number of selected component (if applicable):

[root@hp-dl380pgen8-02-vm-16 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.9.51.13-1
subscription management rules: 5.15.1
subscription-manager: 1.16.6-1.el6
python-rhsm: 1.16.4-1.el6

How reproducible:


Steps to Reproduce:
Case 1:
-------------------------------------------------------------------------------
Register the system , donot attach subscriptions -------> Launch GUI -----> click on Auto-attach button 

--------------------------------------------------------------------------------
Case 2:

Launch GUI ------> Click on register button ------> enter the details and donot select "Manually attach subscriptions"


Actual results:

Case 1:
Normal subscription is attached

P.S attachment , observe the facts and the End date 
--------------------------------------------------------------------------------
Case 2: 
Normal subscription is attached
P.S attachment , observe the facts and the End date 

Expected results:

Case 1:
CDK subscriptions that is valid for 90 days from the day of registration should attached
--------------------------------------------------------------------------------
Case 2: 

CDK subscriptions that is valid for 90 days from the day of registration should attached

Additional info:

Thro CLI:

Case 1:

[root@hp-dl380pgen8-02-vm-16 ~]# subscription-manager remove --all
1 subscription removed at the server.
1 local certificate has been deleted.
[root@hp-dl380pgen8-02-vm-16 ~]# subscription-manager attach --auto


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

[root@hp-dl380pgen8-02-vm-16 ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name:   Red Hat Enterprise Linux Developer Suite
Provides:            Red Hat Enterprise Linux Server
SKU:                 RH2262474
Contract:            
Account:             
Serial:              8356907465838278426
Pool ID:             8a99f98151c565590151d323e5b00bad
Provides Management: No
Active:              True
Quantity Used:       1
Service Level:       Self-Support
Service Type:        
Status Details:      Subscription is current
Subscription Type:   Standard
Starts:              12/24/2015
Ends:                03/23/2016
System Type:         Physical

--------------------------------------------------------------------------------
Case 2:

[root@hp-dl380pgen8-02-vm-16 ~]# subscription-manager register --auto-attach
Registering to: subscription.rhn.stage.redhat.com:443/subscription
Username: stage_cdk_test
Password: 
The system has been registered with ID: 3149ebef-a2e1-453a-ac99-947c166f7cc9 

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

[root@hp-dl380pgen8-02-vm-16 ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name:   Red Hat Enterprise Linux Developer Suite
Provides:            Red Hat Enterprise Linux Server
SKU:                 RH2262474
Contract:            
Account:             
Serial:              5456647460555893022
Pool ID:             8a99f98151c565590151d33535e30bb4
Provides Management: No
Active:              True
Quantity Used:       1
Service Level:       Self-Support
Service Type:        
Status Details:      Subscription is current
Subscription Type:   Standard
Starts:              12/24/2015
Ends:                03/23/2016
System Type:         Physical

[root@hp-dl380pgen8-02-vm-16 ~]# subscription-manager facts --list | grep dev
dev_platform: vagrant
dev_sku: RH2262474
Comment 2 Adrian Likins 2016-01-05 12:25:18 EST
There is a behavior difference between gui auto attach and cli, so that could be part of the problem,

Mainly, that cli does a 'bind' while gui binds to each of the pools it can fix with the service level. 

But not sure why the gui style bind would fail for this case though.
Comment 3 William Poteat 2016-01-22 09:22:06 EST
PR at https://github.com/candlepin/candlepin/pull/1054
Comment 4 Chris Snyder 2016-02-01 14:39:25 EST
The behavior exhibited by subscription-manager in this bug appears to be the result of a bug in candlepin. The behavior in subscription-manager is resolved by the PR above for fixes in candlepin.

Moving to the candlepin component.
Comment 5 Chris Snyder 2016-02-02 14:19:10 EST
commit 6b3adb02be32be6ab0c2d7355f3aaddaffe18205
Author: William Poteat <wpoteat@redhat.com>
Date:   Wed Jan 6 12:06:07 2016 -0500

    1294044: Allow Subscription Manager Gui register process to work with Dev client
    1294049: Allow Firstboot register process to work with Dev client
    
    Stop the return of all available service levels and just return "". This way only
    one dry run is attempted. The dev pool is created at dry run and available to use
    on the bind step.
    
    Update to match master rebase


In upstream master as of the above commit
Comment 6 Mike McCune 2016-03-28 18:23:05 EDT
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune@redhat.com with any questions
Comment 7 Barnaby Court 2016-07-22 10:40:01 EDT
Moving to closed per the updated candlepin process for bugs that have been merged or have been taken care of.

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