| Summary: | The list of provided products for Temporary Subscriptions is empty | ||
|---|---|---|---|
| Product: | [Community] Candlepin | Reporter: | John Sefler <jsefler> |
| Component: | candlepin | Assignee: | Filip Nguyen <fnguyen> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Katello QA List <katello-qa-list> |
| Severity: | low | Docs Contact: | |
| Priority: | high | ||
| Version: | 2.0 | CC: | fnguyen, redakkan, skallesh, tdarby, vrjain, wpoteat |
| Target Milestone: | --- | Keywords: | Regression, Triaged |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | candlepin-2.0.22-1 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-01-20 12:22:21 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: | |
Additional info: When I downgrade deploy to tag candlepin-2.0.19-1 commit 7cb033aafbd37c7db60fc713fceea43b05977531 the bug goes away. Therefore the offending code change is located between candlepin master commits commit 3f9d4c6b40d17b39ddafedcf0933895a65497a79 commit 7cb033aafbd37c7db60fc713fceea43b05977531 The problem is in method PoolHelper.copyProvidedProducts. The method is used to copy the original pool to UNMAPPED_GUEST_POOL (Temporary pool). The method expects the original pool (the one being copied) to be stored in the database. It is trying to find its provided products in the database. That fails, because the original pool is not yet there. I will add more defensive code into that method. First I will check whether the pool is already persisted (Pool.id != null). When it is not persisted, I will copy the provided products directly from the original instance. |
Description of problem: This appears to be a recent regression... Using subscription-manager to list available subscription pools from an unmapped virtual system against a master onpremise candlepin deployed with TESTDATA shows that the Temporary Subscriptions have an empty list of Provided Products. Version-Release number of selected component (if applicable): Offending Candlpin version... [root@jsefler-candlepin candlepin]# git log | head -1 commit 3f9d4c6b40d17b39ddafedcf0933895a65497a79 [root@jsefler-rhel6 ~]# subscription-manager version server type: Red Hat Subscription Management subscription management server: 2.0.19-1 subscription management rules: 5.20 subscription-manager: 1.18.4-1.el6 python-rhsm: 1.18.4-1.el6 How reproducible: Steps to Reproduce: [root@jsefler-rhel6 ~]# subscription-manager facts | grep is_guest virt.is_guest: True [root@jsefler-rhel6 ~]# subscription-manager register --username=testuser1 --org=admin Registering to: jsefler-candlepin.usersys.redhat.com:8443/candlepin Password: The system has been registered with ID: adf85aec-dcb8-4f20-a571-ed382c0df862 [root@jsefler-rhel6 ~]# subscription-manager list --avail | grep Temporary -B11 Subscription Name: Awesome OS Instance Based (Standard Support) Provides: SKU: awesomeos-instancebased Contract: 1 Pool ID: 8a90860f585526930158552787e90418 Provides Management: No Available: 20 Suggested: 1 Service Level: Standard Service Type: L1-L3 Subscription Type: Instance Based (Temporary) -- Subscription Name: Admin OS Instance Based one socket Provides: SKU: adminos-onesocketib Contract: 0 Pool ID: 8a90860f5855269301585527811a02f0 Provides Management: No Available: 10 Suggested: 1 Service Level: Standard Service Type: L1-L3 Subscription Type: Instance Based (Temporary) -- Subscription Name: Awesome OS Unlimited Quantity Virt Limit Provides: SKU: awesomeos-ul-quantity-virt Contract: 1 Pool ID: 8a90860f58552693015855279b23082b Provides Management: No Available: Unlimited Suggested: 1 Service Level: Service Type: Subscription Type: Multi-Entitleable (Temporary) -- Subscription Name: Admin OS Instance Based one socket Provides: SKU: adminos-onesocketib Contract: 1 Pool ID: 8a90860f585526930158552783ad0317 Provides Management: No Available: 20 Suggested: 1 Service Level: Standard Service Type: L1-L3 Subscription Type: Instance Based (Temporary) -- Subscription Name: Awesome OS Instance Based (Standard Support) Provides: SKU: awesomeos-instancebased Contract: 0 Pool ID: 8a90860f585526930158552785f703c3 Provides Management: No Available: 10 Suggested: 1 Service Level: Standard Service Type: L1-L3 Subscription Type: Instance Based (Temporary) -- Subscription Name: Awesome OS Unlimited Quantity Virt Limit Provides: SKU: awesomeos-ul-quantity-virt Contract: 0 Pool ID: 8a90860f5855269301585527999c07ff Provides Management: No Available: Unlimited Suggested: 1 Service Level: Service Type: Subscription Type: Multi-Entitleable (Temporary) [root@jsefler-rhel6 ~]# Actual results: Notice above that every Temporary subscription has an empty Provides list. Expected results: Let's list one of those SKUs, awesomeos-ul-quantity-virt, to see what Provides list is expected... [root@jsefler-rhel6 ~]# subscription-manager list --avail --matches=awesomeos-ul-quantity-virt +-------------------------------------------+ Available Subscriptions +-------------------------------------------+ Subscription Name: Awesome OS Unlimited Quantity Virt Limit Provides: Awesome OS Server Bits SKU: awesomeos-ul-quantity-virt Contract: 0 Pool ID: 8a90860f5855269301585527999607fc Provides Management: No Available: Unlimited Suggested: 1 Service Level: Service Type: Subscription Type: Multi-Entitleable Ends: 11/10/2017 System Type: Physical Subscription Name: Awesome OS Unlimited Quantity Virt Limit Provides: Awesome OS Server Bits SKU: awesomeos-ul-quantity-virt Contract: 1 Pool ID: 8a90860f58552693015855279add0820 Provides Management: No Available: Unlimited Suggested: 1 Service Level: Service Type: Subscription Type: Multi-Entitleable Ends: 11/10/2017 System Type: Physical Subscription Name: Awesome OS Unlimited Quantity Virt Limit Provides: SKU: awesomeos-ul-quantity-virt Contract: 1 Pool ID: 8a90860f58552693015855279b23082b Provides Management: No Available: Unlimited Suggested: 1 Service Level: Service Type: Subscription Type: Multi-Entitleable (Temporary) Ends: 11/10/2017 System Type: Virtual Subscription Name: Awesome OS Unlimited Quantity Virt Limit Provides: SKU: awesomeos-ul-quantity-virt Contract: 0 Pool ID: 8a90860f5855269301585527999c07ff Provides Management: No Available: Unlimited Suggested: 1 Service Level: Service Type: Subscription Type: Multi-Entitleable (Temporary) Ends: 11/10/2017 System Type: Virtual BANG! Notice above that the Physical subscriptions provide product "Awesome OS Server Bits" as expected, but the Virtual Temporary pools provide an empty set of products. Expected "Awesome OS Server Bits" on all pools for awesomeos-ul-quantity-virt. Additional info: