Bug 1326006

Summary: Subscriptions missing from Scoped Search collection
Product: Red Hat Satellite Reporter: Mike McCune <mmccune>
Component: Subscription ManagementAssignee: John Mitsch <jomitsch>
Status: CLOSED DUPLICATE QA Contact: Katello QA List <katello-qa-list>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: bbuckingham, sthirugn
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: https://bugzilla.redhat.com/show_bug.cgi?id=1328409
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-04-25 17:35:57 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:

Description Mike McCune 2016-04-11 14:56:55 UTC
Observed a installation where Subscriptions that existed in Candlepin's subscription pool data did not show up when querying the /subscriptions index method.

There were 5 subscriptions in CP's database yet the index call only returned 2 items.

Running foreman-rake katello:reindex resolved the mismatch in data but this is not an acceptable workaround.

data:


### HAMMER ###

hammer subscription list --organization-id 1
----------------------------------------|----------|---------|--------------|----------|----------|------------------------------|----|-----------------------------------------|----------|---------
NAME                                    | CONTRACT | ACCOUNT | SUPPORT      | QUANTITY | CONSUMED | END DATE                     | ID | PRODUCT                                 | QUANTITY | ATTACHED
----------------------------------------|----------|---------|--------------|----------|----------|------------------------------|----|-----------------------------------------|----------|---------
Red Hat Satellite Employee Subscription | 10845203 | 1212729 | Self-Support | 100      | 0        | 2022-01-01T04:59:59.000+0000 | 3  | Red Hat Satellite Employee Subscription | 100      | 0       
Employee SKU                            | 10913844 | 1212729 | Self-Support | 20       | 0        | 2022-01-01T04:59:59.000+0000 | 2  | Employee SKU                            | 20       | 0       
----------------------------------------|----------|---------|--------------|----------|----------|------------------------------|----|-----------------------------------------|----------|---------
[root@cloud-qe-21 /]# 

### CP DATABASE ###

candlepin=# select * from cp_pool;
                id                |          created           |          updated           | accountnumber | activesubscription | contractnumber |          e
nddate           |   productid   |               productname               | quantity | restrictedtousername |         startdate          | subscriptionid | s
ubscriptionsubkey | version |             owner_id             | sourceentitlement_id | ordernumber | derivedproductid | derivedproductname |      type      
----------------------------------+----------------------------+----------------------------+---------------+--------------------+----------------+-----------
-----------------+---------------+-----------------------------------------+----------+----------------------+----------------------------+----------------+--
------------------+---------+----------------------------------+----------------------+-------------+------------------+--------------------+----------------
 8a90e00c53f7e26e0153f7f3edde020e | 2016-04-08 18:17:51.838-04 | 2016-04-08 18:17:51.838-04 | 1212729       | t                  | 10845203       | 2021-12-31
 23:59:59-05     | SER0232US     | Red Hat Satellite Employee Subscription |      100 |                      | 2015-12-15 00:00:00-05     |                |  
                  |       0 | 8a90e00c53f7de330153f7deabdc0001 |                      | 40185580    |                  |                    | NORMAL
 8a90e00c53f7e26e0153f7f3ef54022e | 2016-04-08 18:17:52.212-04 | 2016-04-08 18:17:52.212-04 | 1212729       | t                  | 10913844       | 2021-12-31
 23:59:59-05     | ES0113909     | Employee SKU                            |       20 |                      | 2016-03-24 00:00:00-04     |                |  
                  |       0 | 8a90e00c53f7de330153f7deabdc0001 |                      | 40202637    |                  |                    | NORMAL
 8a90e00c53f7e26e0153f7f3efd402d3 | 2016-04-08 18:17:52.34-04  | 2016-04-08 18:17:52.34-04  | 1212729       | t                  | 10913844       | 2021-12-31
 23:59:59-05     | ES0113909     | Employee SKU                            |       -1 |                      | 2016-03-24 00:00:00-04     |                |  
                  |       0 | 8a90e00c53f7de330153f7deabdc0001 |                      | 40202637    |                  |                    | UNMAPPED_GUEST
 8a90e00c53f7e26e0153f7f49323038a | 2016-04-08 18:18:34.147-04 | 2016-04-08 18:18:34.147-04 |               | t                  |                | 2046-04-01
 18:18:33.782-04 | 1460153913746 | Satellite Tools                         |       -1 |                      | 2016-04-08 18:18:33.782-04 |                |  
                  |       0 | 8a90e00c53f7de330153f7deabdc0001 |                      |             |                  |                    | NORMAL
 8a90e00c53f7e26e0153f7f49c5f0390 | 2016-04-08 18:18:36.511-04 | 2016-04-08 18:18:36.511-04 |               | t                  |                | 2046-04-01
 18:18:36.165-04 | 1460153916131 | Satellite Capsule                       |       -1 |                      | 2016-04-08 18:18:36.165-04 |                |  
                  |       0 | 8a90e00c53f7de330153f7deabdc0001 |                      |             |                  |                    | NORMAL
(5 rows)

Comment 2 John Mitsch 2016-04-25 13:57:46 UTC
Note to QE -

This bug is likely a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=1328409 which is fixed in the latest snap. Can we verify that subscriptions are being created for custom products and mark this as a duplicate if so?

Comment 3 John Mitsch 2016-04-25 17:35:57 UTC

*** This bug has been marked as a duplicate of bug 1328409 ***