Bug 906550

Summary: Any local-only certificates have been deleted.
Product: Red Hat Enterprise Linux 7 Reporter: John Sefler <jsefler>
Component: subscription-managerAssignee: candlepin-bugs
Status: CLOSED WORKSFORME QA Contact: IDM QE LIST <seceng-idm-qe-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.0CC: bkearney, mreid, seceng-idm-qe-list, skallesh, wpoteat
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: 2013-10-15 17:51:13 UTC Type: Bug
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: 863175    

Description John Sefler 2013-01-31 21:26:01 UTC
Description of problem:
This new message is popping up often in various scenarios where it does not really apply.

Why was it added?
Is it grammatically correct?
Seems like non-value added confusion.


Version-Release number of selected component (if applicable):
[root@jsefler-7 ~]# rpm -q subscription-manager
subscription-manager-1.8.1-1.git.2.23579a5.el7.x86_64


How reproducible:


Steps to Reproduce:
[root@jsefler-7 ~]# subscription-manager register --username testuser1 --org admin
Password: 
The system has been registered with id: 99dc2d9c-1a3c-4466-a273-9c675c2738a4 
[root@jsefler-7 ~]# subscription-manager list --avail | grep "Pool ID"
Pool ID:           8a90f81d3c82af96013c82b1ccf104d5
Pool ID:           8a90f81d3c82af96013c82b1bfae02c7
[root@jsefler-7 ~]# subscription-manager subscribe --pool 8a90f81d3c82af96013c82b1bfae02c7
Successfully attached a subscription for: Awesome OS Server Basic (multi-entitlement)
[root@jsefler-7 ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+

Subscription Name: Awesome OS Server Basic (multi-entitlement)
Provides:          Awesome OS Server Bits
SKU:               awesomeos-server-basic-me
Contract:          19
Account:           12331131231
Serial Number:     4783210717843221982
Active:            True
Quantity Used:     1
Service Level:     None
Service Type:      Self-Support
Starts:            01/27/2013
Ends:              01/27/2014

[root@jsefler-7 ~]# ls /etc/pki/entitlement/
4783210717843221982-key.pem  4783210717843221982.pem
[root@jsefler-7 ~]# subscription-manager remove --serial 4783210717843221982
Successfully removed serial numbers:
   4783210717843221982
Any local-only certificates have been deleted.
[root@jsefler-7 ~]# ls /etc/pki/entitlement/
[root@jsefler-7 ~]# 

  
Actual results:
Successfully removed serial numbers:
   4783210717843221982
Any local-only certificates have been deleted.

Expected results:
Successfully removed serial numbers:
   4783210717843221982



WHY WAS "Any local-only certificates have been deleted." PRINTED?  IN MY OPIONION THIS IS NON-VALUE ADDED CONFUSION BECAUSE IN THIS CASE THERE WAS NO "local-only" CERTIFICATES INSTALLED.  I BELIEVE IT IS THE JOB OF rhsmcertd TO REMOVE EXPIRED/REVOKED CERTIFICATES AND THE ASSOCIATED LOGGING IS STUFFED IN rhsm.log.  I DON'T THINK THIS FEEDBACK BELONGS IN THE CLI COMMAND OUTPUT.

Comment 1 Matt Reid 2013-02-01 14:56:56 UTC
This sounds like it should be associated with 'subscription-manager clean', but we already had a string for that. Running clean on sub-man 1.1.11-1.git returns 'All local data removed'.

Comment 2 Bryan Kearney 2013-02-08 21:59:32 UTC
WHY ARE YOU YELLING?????

Comment 3 John Sefler 2013-02-09 01:09:50 UTC
(In reply to comment #2)
> WHY ARE YOU YELLING?????

I'm not consciously yelling.  I'm just trying to distinguish my commentary from the traces of input/output.  I'll stop the excessive capitalization.

Comment 4 John Sefler 2013-03-07 16:36:35 UTC
The feedback message for this bug has changed with committed work
https://bugzilla.redhat.com/show_bug.cgi?id=895447#c8
"Any local-only certificates have been deleted." => changed to =>
    "%d local certificate has been deleted.
    "%d local certificates have been deleted.

Comment 5 John Sefler 2013-03-07 17:37:08 UTC
Here is a case that demonstrates why this new feedback is misleading...
Subscribe to a modifier pool and then subscribe to the pool it modifies...

[root@jsefler-7 ~]# subscription-manager list --avail
+-------------------------------------------+
    Available Subscriptions
+-------------------------------------------+
Subscription Name: Awesome OS Server Bundled
SKU:               awesomeos-server
Pool ID:           8a90f81d3d45ba3f013d45bb4494027f
Quantity:          5
Service Level:     Premium
Service Type:      Level 3
Multi-Entitlement: No
Ends:              03/06/2014
System Type:       Physical

Subscription Name: Awesome OS Modifier
SKU:               awesomeos-modifier
Pool ID:           8a90f81d3d45ba3f013d45bb441e0273
Quantity:          10
Service Level:     
Service Type:      
Multi-Entitlement: No
Ends:              03/06/2014
System Type:       Physical

[root@jsefler-7 ~]# subscription-manager subscribe --pool 8a90f81d3d45ba3f013d45bb441e0273
Successfully attached a subscription for: Awesome OS Modifier
[root@jsefler-7 ~]# subscription-manager subscribe --pool 8a90f81d3d45ba3f013d45bb4494027f
Successfully attached a subscription for: Awesome OS Server Bundled
1 local certificate has been deleted.
[root@jsefler-7 ~]# 

^^ Notice that two subscribes occurred and after the second subscribe, I got feedback that "1 local certificate has been deleted."  This is counter intuitive.  Under the covers, the modifier entitlement required an update to expose additional content sets after subscribing to the modifiee pool.  As a result, the second subscribe actually layed down two entitlements and the original one was deleted.  Hence the feedback is technically correct, but creates confusion for the user.

Comment 6 William Poteat 2013-03-21 12:57:18 UTC
So its confusing to not tell them at all, its confusing to tell them something was removed, and it is confusing to tell them how many.

This all got started to cover the scenario of importing certs into a system that is connected to a candlepin server. If there is a solution that covers all cases, I'm all ears.

Comment 7 William Poteat 2013-03-21 12:58:44 UTC
There are certs that are removed at the server and certs that are removed locally. It is done in 2 separate and independent processes. There is no way to consolidate messages unless we significantly alter the process.

Comment 8 John Sefler 2013-10-15 17:51:13 UTC
The functionality discussed in this bug was introduced as a solution to bug 895447.

Moving to CLOSED/WORKSFORME