Bug 756694

Summary: unsubscribe --all, unsubscribes the subscriptions even there are no subscriptions
Product: Red Hat Enterprise Linux 5 Reporter: Shwetha Kallesh <skallesh>
Component: subscription-managerAssignee: Devan Goodwin <dgoodwin>
Status: CLOSED CURRENTRELEASE QA Contact: John Sefler <jsefler>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.8CC: dgoodwin, spandey
Target Milestone: rcKeywords: QA-Closed
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-01-09 17:45:05 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: 771748    

Description Shwetha Kallesh 2011-11-24 10:07:03 UTC
Description of problem:


Version-Release number of selected component (if applicable):
[root@tiger entitlement]# rpm -qa | grep subscription-manager
subscription-manager-gnome-0.98.3-1.git.16.14460bc.el5_7
subscription-manager-firstboot-0.98.3-1.git.16.14460bc.el5_7
subscription-manager-migration-0.98.3-1.git.16.14460bc.el5_7
subscription-manager-0.98.3-1.git.16.14460bc.el5_7


How reproducible:


Steps to Reproduce:
1.[root@tiger entitlement]# subscription-manager unsubscribe --all
This machine has been unsubscribed from all subscriptions

[root@tiger entitlement]# subscription-manager unsubscribe --all
This machine has been unsubscribed from all subscriptions

2.
3.
  
Actual results:
Second time you hit the cmd subscription-manager unsubscribe --all it says "This machine has been unsubscribed from all subscriptions"

Expected results:
It should throw a message saying "there are no subscriptions to unsubscribe " or something similar to that

Additional info:

Comment 1 Devan Goodwin 2012-06-05 13:17:43 UTC
Looks like the message has already been changed to:

$ subscription-manager unsubscribe --all
This machine has been unsubscribed from 0 subscriptions

Which clarifies the situation if there are no entitlements to remove. Going to assume this is ok and move to MODIFIED.

Comment 2 spandey 2012-06-18 12:29:16 UTC
Verified using following rpm 

subscription-manager-firstboot-1.0.3-1.git.75.a0245f2.el5
subscription-manager-1.0.3-1.git.75.a0245f2.el5
subscription-manager-gui-1.0.3-1.git.75.a0245f2.el5
subscription-manager-migration-data-1.11.1.1-1.git.2.c7fbafe.el5
subscription-manager-migration-1.0.3-1.git.75.a0245f2.el5

[root@dhcp193-122 product]# subscription-manager unsubscribe --all
This machine has been unsubscribed from 2 subscriptions
[root@dhcp193-122 product]# subscription-manager unsubscribe --all
This machine has been unsubscribed from 0 subscriptions

As per comment 1 i am resolving defect as verified.

Comment 3 Bryan Kearney 2013-01-09 17:45:05 UTC
Batch change of verified bugs which must have missed making the errata.