Bug 976866

Summary: creation of multiple instances of ProductDir/EntitlementDir results in loading certificates multiple times
Product: Red Hat Enterprise Linux 5 Reporter: Adrian Likins <alikins>
Component: subscription-managerAssignee: Carter Kozak <ckozak>
Status: CLOSED CURRENTRELEASE QA Contact: IDM QE LIST <seceng-idm-qe-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.10CC: bkearney, ckozak, jesusr, jsefler
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-01 13:47:37 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: 840995    

Description Adrian Likins 2013-06-21 17:22:06 UTC
Description of problem:

An instance of a ProductDir() or EntitlementDir() can load a set of certificates. Each instance can cache the results of loading the files, but multiple instances do not share that cache.

Either the CertificateDir objects should only be created once, or the objects need to know how to share the cached state across instantiations. 

Since there is some work involved in loading and parsing the certs, they should only be loaded from disk, parsed, and verified once.

Or whatever needs to happen to insure that any given certificate only needs to be loaded 1 time.


strace'ing 'subscription-manager' can show the certificates being opened multiple times.

Comment 1 Carter Kozak 2013-06-26 18:58:50 UTC
commit a1efdaa1b1063d457288438160442535f84ab187
Author: ckozak <ckozak>
Date:   Fri Jun 21 14:57:49 2013 -0400

    976866: single instance of ProdDir and EntDir

Comment 2 Carter Kozak 2013-07-15 16:08:36 UTC
This is an optimization bug/fix, if it is implemented properly, QA tests should not detect any difference.

Comment 3 John Sefler 2013-07-17 19:07:38 UTC
I do not have any explicit test coverage to confirm that comment 0 was a problem nor assert that comment 0 is now fixed. 
I also do not have any metrics to confirm that performance has improved with this bug fix.

As suggested in comment 2, I can say that our automated tests have not revealed a regression in behavior with respect to compliance status that has not already been addressed in other bugzillas.  Therefore, I am flipping this bug to VERIFIED without any adverse regression.

[root@jsefler-5 ~]# rpm -q subscription-manager
subscription-manager-1.8.13-1.el5