Bug 1292283 - Quantity within Subscription is incorrect
Quantity within Subscription is incorrect
Status: CLOSED CURRENTRELEASE
Product: Candlepin
Classification: Community
Component: candlepin (Show other bugs)
1.2
Unspecified Unspecified
high Severity high
: ---
: ---
Assigned To: candlepin-bugs
Katello QA List
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-16 17:05 EST by Shayne Riley
Modified: 2016-07-22 10:39 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-22 10:39:41 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)
Differences in the same get subscription call to DEV environment with Pre-CP2.0 and CP2.0 (5.39 KB, patch)
2015-12-16 17:05 EST, Shayne Riley
no flags Details | Diff

  None (edit)
Description Shayne Riley 2015-12-16 17:05:47 EST
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 06:07:37 EST
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 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 4 Barnaby Court 2016-07-22 10:39:41 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.