Bug 722975
| Summary: | subscription-manager cli should not allow one to subscribe with --quantity>1 when "multi-entitlement" attribute is not "yes" | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | John Sefler <jsefler> |
| Component: | subscription-manager | Assignee: | Devan Goodwin <dgoodwin> |
| Status: | CLOSED ERRATA | QA Contact: | John Sefler <jsefler> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.2 | CC: | dgoodwin, skallesh, spandey |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-12-06 17:22:30 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 682238 | ||
|
Description
John Sefler
2011-07-18 16:48:07 UTC
Good catch, this was completely not checked server side. I suspect this is because quantities were originally only used for candlepin consumers transferring things downstream, where multi-entitlement is not required. Added check during pre_global rule and it will error out if you try. This check should not affect candlepin consumers as they do not run this set of rules. Fix is in multientitlefix branch in candlepin git. I have not yet merged it because I need to do more testing and fix an issue where pre-global is called twice during all entitlement operations. Leaving for PTO shortly so will wrap up on return, but the fix is out there if needed urgently. Fixed in candlepin.git master: f6f175d864a42be02638ba62d45efc91b1cfc9cf Moving the bug to verified as it works fine now. Rpm's used : subscription-manager-0.96.5-1.git.5.4303921.el6.x86_64 subscription-manager-firstboot-0.96.5-1.git.5.4303921.el6.x86_64 subscription-manager-gnome-0.96.5-1.git.5.4303921.el6.x86_64 Steps to reproduce the expected result: curl -k -u admin:admin --request GET https://10.65.193.123:8443/candlepin/pools/ff80808131a8cbb10131a8ccd57306e6 | python -mjson.tool % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 102 1639 102 1639 0 0 14413 0 --:--:-- --:--:-- --:--:-- 28258 { "accountNumber": "12331131231", "activeSubscription": true, "attributes": [], "consumed": 1, "contractNumber": "1", "created": "2011-08-08T09:50:21.555+0000", "endDate": "2012-08-07T00:00:00.000+0000", "href": "/pools/ff80808131a8cbb10131a8ccd57306e6", "id": "ff80808131a8cbb10131a8ccd57306e6", "owner": { "displayName": "Admin Owner", "href": "/owners/admin", "id": "ff80808131a8cbb10131a8cbf0950006", "key": "admin" }, "productAttributes": [ { "created": "2011-08-08T09:50:21.555+0000", "id": "ff80808131a8cbb10131a8ccd57306e7", "name": "type", "productId": "awesomeos-modifier", "updated": "2011-08-08T09:50:21.555+0000", "value": "MKT" }, { "created": "2011-08-08T09:50:21.555+0000", "id": "ff80808131a8cbb10131a8ccd57306e8", "name": "arch", "productId": "awesomeos-modifier", "updated": "2011-08-08T09:50:21.555+0000", "value": "ALL" }, { "created": "2011-08-08T09:50:21.556+0000", "id": "ff80808131a8cbb10131a8ccd57406e9", "name": "version", "productId": "awesomeos-modifier", "updated": "2011-08-08T09:50:21.556+0000", "value": "1.0" }, { "created": "2011-08-08T09:50:21.556+0000", "id": "ff80808131a8cbb10131a8ccd57406ea", "name": "variant", "productId": "awesomeos-modifier", "updated": "2011-08-08T09:50:21.556+0000", "value": "ALL" } ], "productId": "awesomeos-modifier", "productName": "Awesome OS Modifier", "providedProducts": [ { "created": "2011-08-08T09:50:21.556+0000", "id": "ff80808131a8cbb10131a8ccd57406eb", "productId": "37080", "productName": "Awesome OS Modifier Bits", "updated": "2011-08-08T09:50:21.556+0000" } ], "quantity": 10, "restrictedToUsername": null, "sourceEntitlement": null, "startDate": "2011-08-08T00:00:00.000+0000", "subscriptionId": "ff80808131a8cbb10131a8cc2a8d0072", "updated": "2011-08-08T09:50:21.555+0000" } subscription-manager subscribe --pool=ff80808131a8cbb10131a8ccd57306e6 --quantity=3 Multi-entitlement not supported for pool with id 'ff80808131a8cbb10131a8ccd57306e6'. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2011-1695.html |