Bug 1292283 - Quantity within Subscription is incorrect
Summary: Quantity within Subscription is incorrect
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Candlepin
Classification: Community
Component: candlepin
Version: 1.2
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: ---
Assignee: candlepin-bugs
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-16 22:05 UTC by Shayne Riley
Modified: 2016-07-22 14:39 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-07-22 14:39:41 UTC
Embargoed:


Attachments (Terms of Use)
Differences in the same get subscription call to DEV environment with Pre-CP2.0 and CP2.0 (5.39 KB, patch)
2015-12-16 22:05 UTC, Shayne Riley
no flags Details | Diff

Description Shayne Riley 2015-12-16 22:05:47 UTC
Created attachment 1106540 [details]
Differences in the same get subscription call to DEV environment with Pre-CP2.0 and CP2.0

Description of problem:

Since Candlepin 2.0, Subscription's quantity amount is incorrect. For example, if I have a subscription with a Multiplier of 10, and a Quantity of 1, then what I get back from a GET subscription call is a Multiplier of 10 and a Quantity of 10, which is incorrect.


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

Candlepin 2.0


How reproducible:

Always.


Steps to Reproduce:

1. Find a subscription which has a multiplier greater than 1. Not all subscriptions do. However, any subscription for MCT2867 (among others) should have a multiplier greater than 1.

In CP2.0 DEV, we'll use subscriptionId=3781065 (from owner 7791251, pool 8a8798305159a12f01517cb1d9437276):

curl -vku $CP_USER:$CP_PASS -X GET http://candlepin06.web.dev.int.devlab.redhat.com:8080/candlepin/subscriptions/3781065

2. Look at the quantity amount


Actual results:

"quantity": 10


Expected results:

"quantity": 1,


Additional Notes:

The attachment shows this difference. It is a diff of the same call made in the same environment; One was made using a Pre-CP2.0 version, the other using a CP2.0 version.

This bug is similar to BZ1292282. Each bug represents a problematic difference in what the GET subscription call returns between pre-CP2.0 and CP2.0.

Comment 1 Filip Nguyen 2016-01-25 11:07:37 UTC
The problem seems to be that in CP 2.0 we no longer store the subscription data. Instead we create recreate the subscription information from pools and products. The Pool quantity needs to be divided by multiplier of the corresponding product.

Comment 3 Mike McCune 2016-03-28 22:23:05 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 4 Barnaby Court 2016-07-22 14:39:41 UTC
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.