| Summary: | Concurrent attempts to generate an ueber cert for an owner results in bad data | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Community] Candlepin | Reporter: | Michael Stead <mstead> | ||||
| Component: | candlepin | Assignee: | Michael Stead <mstead> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Katello QA List <katello-qa-list> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | high | ||||||
| Version: | 2.0 | CC: | csnyder, jjansky, katello-qa-list, pmorey, redakkan, skallesh, vrjain | ||||
| Target Milestone: | --- | Keywords: | Triaged | ||||
| Target Release: | 2.0 | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | candlepin-2.0.20-1 | Doc Type: | If docs needed, set a value | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | 1391922 | Environment: | |||||
| Last Closed: | 2016-11-16 09:12:05 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: | |||||
| Bug Depends On: | 1391922 | ||||||
| Bug Blocks: | |||||||
| Attachments: |
|
||||||
|
Description
Michael Stead
2016-11-04 11:55:15 UTC
+++ NOTE +++ The validation query will be different for 2.0 due to the data model / DB Schema changes in 2.0. I will update this BZ with the new query once the bug is fixed in 2.0 +++ Updated Validation Query +++
SELECT
-- NO SUBS FOR 2.0
-- Certificates
(SELECT Count(*)
FROM cp_ent_certificate ec
INNER JOIN cp_entitlement e
ON e.id = ec.entitlement_id
INNER JOIN cp_pool p
ON e.pool_id = p.id
INNER JOIN cp2_products prod
ON prod.uuid = p.product_uuid
WHERE prod.NAME LIKE '%_ueber_product') AS UEBER_ENT_CERTS,
-- Entitlements
(SELECT Count(*)
FROM cp_entitlement e
INNER JOIN cp_pool p
ON e.pool_id = p.id
INNER JOIN cp2_products prod
ON prod.uuid = p.product_uuid
WHERE prod.NAME LIKE '%_ueber_product') AS UEBER_ENTS,
-- Pools
(SELECT Count(*)
FROM cp_pool p
INNER JOIN cp2_products prod
ON prod.uuid = p.product_uuid
WHERE prod.NAME LIKE '%_ueber_product') AS UEBER_POOLS,
-- Content
(select count(*) from cp2_content c
inner join cp2_product_content pc on pc.content_uuid=c.uuid
inner join cp2_products p on p.uuid=pc.product_uuid
where p.name LIKE '%ueber_product'
) AS CP2_UEBER_CONTENT,
-- Owner Content
(select count(*) from cp2_owner_content oc
inner join cp2_content c on c.uuid=oc.content_uuid
inner join cp2_product_content pc on pc.content_uuid=c.uuid
inner join cp2_products p on p.uuid=pc.product_uuid
where p.name LIKE '%ueber_product'
) as CP2_OWNER_CONTENT,
-- Products
(select count(*) from cp2_products p where p.name LIKE '%ueber_product') AS CP2_PRODUCTS,
-- Owner Products
(select count(*) from cp2_owner_products op
INNER JOIN cp2_products prod on op.product_uuid = prod.uuid
WHERE prod.name LIKE '%ueber_product'
) AS CP2_OWNER_PRODUCTS,
-- Consumers
(SELECT Count(*)
FROM cp_consumer
WHERE NAME = 'ueber_cert_consumer'
) AS UEBER_CONSUMER;
|