| Summary: | candlepin restAPI is failing to delete a subscription | ||
|---|---|---|---|
| Product: | [Community] Candlepin | Reporter: | John Sefler <jsefler> |
| Component: | candlepin | Assignee: | Devan Goodwin <dgoodwin> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | John Sefler <jsefler> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 0.5 | CC: | dgoodwin, spandey |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2012-05-30 20:44:03 UTC | Type: | --- |
| 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: | |||
| Bug Blocks: | 568421 | ||
|
Description
John Sefler
2011-02-16 18:52:41 UTC
Can't reproduce this yet, any chance you have the full tomcat trace? Ignore that request, I found the problem, you need to create a subscription token associated with the subscription, then try to delete the sub. Fix incoming shortly. Fixed in candlepin master: 8dce48accf27a548563519a2ad987b62d79d41b1 Will appear in: candlepin-0.2.10 [root@jsefler-f14-candlepin candlepin]# git log | grep 8dce48accf27a548563519a2ad987b62d79d41b1 commit 8dce48accf27a548563519a2ad987b62d79d41b1 [root@jsefler-f14-candlepin candlepin]# git show-ref master 88a5ec56ab4b222377acf8a8cccdb3792e7292fb refs/heads/master 563c6c3b91c11d517e8f0de7d44f64133cbbb4df refs/remotes/origin/master [root@jsefler-onprem03 ~]# subscription-manager register --username=testuser1 --password=password 2318d74a-6b51-427d-9c96-59de9ff6635f jsefler-onprem03.usersys.redhat.com [root@jsefler-onprem03 ~]# subscription-manager list --available --all | grep -A4 390 ProductName: Awesome OS for S390X ProductId: awesomeos-s390x PoolId: 8a90f8b42ea1aeed012ea1af6c4e0168 Quantity: 10 Expires: 2012-03-08 -- ProductName: Awesome OS for S390X ProductId: awesomeos-s390x PoolId: 8a90f8b42ea1aeed012ea1af6c6c016b Quantity: 5 Expires: 2012-03-08 [root@jsefler-onprem03 ~]# curl -u admin:admin -k https://jsefler-f14-candlepin.usersys.redhat.com:8443/candlepin/pools/8a90f8b42ea1aeed012ea1af6c6c016b | python -mjson.tool % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 104 838 0 838 0 0 3823 0 --:--:-- --:--:-- --:--:-- 6925 { "accountNumber": "12331131231", "activeSubscription": true, "attributes": [], "consumed": 0, "contractNumber": "30", "created": "2011-03-10T21:32:31.724+0000", "endDate": "2012-03-09T00:00:00.000+0000", "href": "/pools/8a90f8b42ea1aeed012ea1af6c6c016b", "id": "8a90f8b42ea1aeed012ea1af6c6c016b", "owner": { "href": "/owners/admin", "id": "8a90f8b42ea1aeed012ea1af012a0005" }, "productId": "awesomeos-s390x", "productName": "Awesome OS for S390X", "providedProducts": [ { "created": "2011-03-10T21:32:31.724+0000", "id": "8a90f8b42ea1aeed012ea1af6c6c016c", "productId": "100000000000000", "productName": "Awesome OS for S390X Bits", "updated": "2011-03-10T21:32:31.724+0000" } ], "quantity": 5, "restrictedToUsername": null, "sourceEntitlement": null, "startDate": "2011-03-10T00:00:00.000+0000", "subscriptionId": "8a90f8b42ea1aeed012ea1af59d700e5", "updated": "2011-03-10T21:32:31.724+0000" } [root@jsefler-onprem03 ~]# curl -u admin:admin -k --request DELETE https://jsefler-f14-candlepin.usersys.redhat.com:8443/candlepin/subscriptions/8a90f8b42ea1aeed012ea1af59d700e5 [root@jsefler-onprem03 ~]# curl -u admin:admin -k --request PUT https://jsefler-f14-candlepin.usersys.redhat.com:8443/candlepin/owners/admin/subscriptions/ | python -mjson.tool % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 140 280 0 280 0 0 2166 0 --:--:-- --:--:-- --:--:-- 8235 { "created": "2011-03-10T22:04:12.128+0000", "finishTime": null, "id": "refresh_pools_b29182fc-1c39-4432-9714-d82498f5409a", "result": null, "startTime": null, "state": "CREATED", "statusPath": "/jobs/refresh_pools_b29182fc-1c39-4432-9714-d82498f5409a", "updated": "2011-03-10T22:04:12.128+0000" } [root@jsefler-onprem03 ~]# subscription-manager list --available --all | grep 8a90f8b42ea1aeed012ea1af6c6c016b [root@jsefler-onprem03 ~]# subscription-manager list --available --all | grep -A4 390ProductName: Awesome OS for S390X ProductId: awesomeos-s390x PoolId: 8a90f8b42ea1aeed012ea1af6c4e0168 Quantity: 10 Expires: 2012-03-08 Success! The api subscription delete subscription succeeded and after a refresh pools, the corresponding pool was gone. moving to VERIFIED Group move of VERIFIED Candlepin component bugs to RELEASE_PENDING |