Bug 822069 - Could not unsubscribe: "No JSON object could be decoded"
Summary: Could not unsubscribe: "No JSON object could be decoded"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Subscription Asset Manager
Classification: Retired
Component: katello
Version: 1.0.0
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: beta
: 1.X
Assignee: Jordan OMara
QA Contact: SAM QE List
URL:
Whiteboard:
Depends On:
Blocks: sam11-tracker
TreeView+ depends on / blocked
 
Reported: 2012-05-16 09:05 UTC by Hui Wang
Modified: 2014-11-09 22:56 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-06-20 15:20:48 UTC
Embargoed:


Attachments (Terms of Use)
pass json back from delete call (462 bytes, patch)
2012-05-17 19:33 UTC, Chris Duryee
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:1021 0 normal SHIPPED_LIVE Subscription Asset Manager 1.1 bug fix and enhancement update 2012-06-20 15:49:42 UTC

Description Hui Wang 2012-05-16 09:05:39 UTC
Description of problem:
Can't unsubscribe all the subscriptions when run "subscription-manager unsubscribe --all" CLI.

Version-Release number of selected component (if applicable):
katello-configure-0.3.3-2.el6_2.noarch
katello-headpin-all-0.2.6-4.el6_2.noarch
katello-common-0.3.1-1.el6_2.noarch
katello-cli-common-0.3.2-3.el6_2.noarch
katello-headpin-0.2.6-4.el6_2.noarch
katello-glue-candlepin-0.3.1-1.el6_2.noarch
katello-cli-headpin-0.2.0-1.el6_2.noarch
katello-selinux-0.2.4-1.el6_2.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-certs-tools-1.1.5-1.el6_2.noarch
candlepin-0.6.2-1.el6_2.noarch
katello-glue-candlepin-0.3.1-1.el6_2.noarch
candlepin-tomcat6-0.6.2-1.el6_2.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
thumbslug-0.0.24-1.el6_2.noarch

How reproducible:
100%

Steps to Reproduce:
1.Register to sam (SAM-2012-05-15.1)
# subscription-manager register 
Username: admin
Password: 
The system has been registered with id: 5b67802c-3970-4710-80fe-c347a4f0eb57 
2.Subscribe 
# subscription-manager subscribe --auto
Installed Product Current Status:
Product Name:         	Red Hat Enterprise Linux Server
Status:               	Subscribed               
3.Unsubscribe 
#subscription-manager unsubscribe --all
No JSON object could be decoded
4.List consumed subscriptions
#subscription-manager list --consumed
+-------------------------------------------+
    Consumed Product Subscriptions
+-------------------------------------------+


ProductName:        	Red Hat Enterprise Linux Server
ContractNumber:     	2596950                  
AccountNumber:      	477931                   
SerialNumber:       	7126170976071892814      
Active:             	True                     
QuantityUsed:       	1                        
Begins:             	10/08/2011               
Expires:            	01/01/2022 
.......
  
Actual results:
Can't unsubscribe the consumed subscriptions.

Expected results:
After running "subscription-manager unsubscribe --all", then run "subscription-manager list --consumed", it will give the "No consumed subscription pools to list" prompt.

Additional info:

Comment 1 Chris Duryee 2012-05-16 22:15:21 UTC
Hui,

I was able to replicate the issue, but I am still determining what the best fix is.

Comment 2 Chris Duryee 2012-05-17 19:33:09 UTC
Created attachment 585301 [details]
pass json back from delete call

Comment 3 Chris Duryee 2012-05-17 19:35:33 UTC
To replicate this bug, you can just run "unsubscribe --all" without having to consume entitlements first.

Comment 4 Jordan OMara 2012-05-18 15:28:56 UTC
merged https://github.com/Katello/katello/pull/127

Comment 6 Hui Wang 2012-05-23 09:32:25 UTC
unsubscribe --all still unsubscribe all the entitlements, and report:
"Expected /usr/share/katello/lib/resources/candlepin.rb to define Resources::Candlepin".



Version:
subscription-manager-0.99.19
katello-common-0.3.2-1.el6_2.noarch
katello-headpin-all-0.2.9-1.el6_2.noarch
katello-glue-candlepin-0.3.2-1.el6_2.noarch
katello-cli-headpin-0.2.2-1.el6_2.noarch
katello-headpin-0.2.9-1.el6_2.noarch
katello-configure-0.3.6-1.el6_2.noarch
katello-cli-common-0.3.4-1.el6_2.noarch
katello-selinux-0.2.4-1.el6_2.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-certs-tools-1.1.5-1.el6_2.noarch
katello-glue-candlepin-0.3.2-1.el6_2.noarch
candlepin-0.6.3-1.el6_2.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
candlepin-tomcat6-0.6.3-1.el6_2.noarch
thumbslug-0.0.24-1.el6_2.noarch

Comment 8 Hui Wang 2012-05-28 07:24:59 UTC
Verified. The result is PASS.

Packages Tested:
subscription-manager-0.99.19-1.el6.x86_64
katello-headpin-0.2.10-1.el6_2.noarch
katello-configure-0.3.7-1.el6_2.noarch
katello-headpin-all-0.2.10-1.el6_2.noarch
katello-common-0.3.2-1.el6_2.noarch
katello-cli-common-0.3.4-1.el6_2.noarch
katello-selinux-0.2.4-1.el6_2.noarch
katello-glue-candlepin-0.3.2-1.el6_2.noarch
katello-cli-headpin-0.2.2-1.el6_2.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-certs-tools-1.1.5-1.el6_2.noarch
candlepin-tomcat6-0.6.5-1.el6_2.noarch
candlepin-0.6.5-1.el6_2.noarch
thumbslug-0.0.24-1.el6_2.noarch

1.#subscription-manager subscribe --auto --servicelevel=None
2.# subscription-manager list --consumed
+-------------------------------------------+
    Consumed Product Subscriptions
+-------------------------------------------+

Product Name:         	Red Hat Enterprise Linux Server
Contract Number:      	2596950                  
Account Number:       	477931                   
Serial Number:        	1374830180863246400      
Active:               	True                     
Quantity Used:        	1                        
Service Level:        	None                     
Service Type :        	None                     
Begins:               	10/08/2011               
Expires:              	01/01/2022               

3.#subscription-manager unsubscribe --all 

4.# subscription-manager list --consumed
No consumed subscription pools to list

Comment 9 sachua 2012-06-14 06:24:36 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
User cannot unsubscribe consumed subscriptions when running the command: "subscription-manager unsubscribe --all". This update passes json back from delete call and user is now able to unsubscribe consumed subscriptions.

Comment 10 Dan Macpherson 2012-06-15 06:17:43 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-User cannot unsubscribe consumed subscriptions when running the command: "subscription-manager unsubscribe --all". This update passes json back from delete call and user is now able to unsubscribe consumed subscriptions.+Due to a lack of JSON object upon return, user cannot unsubscribe all consumed subscriptions via CLI. This update returns JSON from delete call and user is now able to unsubscribe all consumed subscriptions via CLI.

Comment 12 errata-xmlrpc 2012-06-20 15:20:48 UTC
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-2012-1021.html


Note You need to log in before you can comment on or make changes to this bug.