Bug 773521
Summary: | Help text should include "entitlement ID" instead of "pool id" when un-subscribing a product | ||
---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Sachin Ghai <sghai> |
Component: | API | Assignee: | Martin Bacovsky <mbacovsk> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Katello QA List <katello-qa-list> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 6.0.0 | CC: | gkhachik |
Target Milestone: | Unspecified | Keywords: | Reopened, Triaged |
Target Release: | Unused | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2012-08-22 18:18:45 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: | 747354 |
Description
Sachin Ghai
2012-01-12 06:32:53 UTC
Sachin, You need to specify not the poolid but the EntitlementId that you need to unsubscribe your system from. How to get that? simply make api call: system subscriptions --name <your_rhel_client_registered_to_katello> --org <org> and then provide the id from there in the `system unsubscribe --pool <id_here>` doing that really works for me. Thanks much Garik. This way I was able to unsubscribe the product. Since we are passing the entitlement id to unsubscribe the product then I think following help text needs to be updated. -- katello> system unsubscribe --org ACME_Corporation --name dhcp193-155.pnq.redhat.com --help Usage: katello [options] Options: -h, --help show this help message and exit -g grep friendly output -v verbose, more structured output -d DELIMITER grep friendly output column delimiter --org=ORG organization name (required) --name=NAME system name (required) --pool=POOL pool id to unsubscribe from (required) --- katello> system subscriptions --name dhcp193-155.pnq.redhat.com --org ACME_Corporation -------------------------------------------------------------------------------- Available Subscriptions for System [ dhcp193-155.pnq.redhat.com ] -------------------------------------------------------------------------------- EntitlementId: 8ac1493b34cce2010134d117b9c7009b PoolName: aeolus Expires: 01/04/2042 Consumed: 1 Quantity: 1 Sla: ContractNumber: ProvidedProducts: [] katello> system unsubscribe --org ACME_Corporation --name dhcp193-155.pnq.redhat.com --pool 8ac1493b34cce2010134d117b9c7009b Successfully unsubscribed System [ dhcp193-155.pnq.redhat.com ] katello> @bkearney also please confirm that there is no way recently through RHSM to retrieve the entitlement id(s) for the system subscriptions. Since katello-0.1.195-1 and katello-cli-0.1.41-1 the CLI is fixed as follows CLI: system unsubscribe --org <org> --name <name> --entitlement <ent_id> system unsubscribe --org <org> --name <name> --serial <serial_id> system unsubscribe --org <org> --name <name> --all Serial and entitlement ids are listed via: system subscrptions --org <org> --name <name> Available pools via system subscrptions --org <org> --name <name> --available Verified with following katello build: katello-cli-0.1.42-1.el6.noarch katello-0.1.195-1.el6.noarch Help text is updated and includes entitlement instead of pool id. Also include the serial id of certificate to unsubscribe the product. katello> system unsubscribe --help Usage: katello [options] Options: -h, --help show this help message and exit -g grep friendly output -v verbose, more structured output -d DELIMITER grep friendly output column delimiter --org=ORG organization name (required) --name=NAME system name (required) --entitlement=ENTITLEMENT entitlement id to unsubscribe from (either entitlement or serial or all is required) --serial=SERIAL serial id of a certificate to unsubscribe from (either entitlement or serial or all is required) --all unsubscribe from all currently subscribed certificates (either entitlement or serial or all is required) katello> Unsubscribing the system with entitlement id :success ====================================================== katello> system subscriptions --name dhcp193-78.pnq.redhat.com --org ACME_Corporation ---------------------------------------------------------------------------------------------- Current Subscriptions for System [ dhcp193-78.pnq.redhat.com ] ---------------------------------------------------------------------------------------------- EntitlementId: 8ac1490f35138547013514c8ce10003f Serial Id: 7988125811537418628 PoolName: pulp Expires: 01/17/2042 Consumed: 1 Quantity: 1 Sla: ContractNumber: Provided products: katello> system unsubscribe --org ACME_Corporation --name dhcp193-78.pnq.redhat.com --entitlement 8ac1490f35138547013514c8ce10003f Successfully unsubscribed System [ dhcp193-78.pnq.redhat.com ] Unsubscribing the system with serial cert id is also a success: ====================================================== katello> system subscriptions --org ACME_Corporation --name dhcp193-78.pnq.redhat.com ---------------------------------------------------------------------------------------------- Current Subscriptions for System [ dhcp193-78.pnq.redhat.com ] ---------------------------------------------------------------------------------------------- EntitlementId: 8ac1490f35138547013514be662b003b Serial Id: 3219094884821188044 PoolName: pulp Expires: 01/17/2042 Consumed: 1 Quantity: 1 Sla: ContractNumber: Provided products: katello> system unsubscribe --org ACME_Corporation --name dhcp193-78.pnq.redhat.com --serial 3219094884821188044 Successfully unsubscribed System [ dhcp193-78.pnq.redhat.com ] |