RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1040546 - rhsm-debug tool should follow the configured paths to: consumercertdir entitlementcertdir productcertdir
Summary: rhsm-debug tool should follow the configured paths to: consumercertdir entitl...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: William Poteat
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel70
TreeView+ depends on / blocked
 
Reported: 2013-12-11 15:37 UTC by John Sefler
Modified: 2014-06-18 00:29 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 12:17:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description John Sefler 2013-12-11 15:37:51 UTC
Description of problem:
The current version of rhsm-debug appears to dump hard coded paths to /etc/pki/entitlement /etc/pki/consumer and /etc/pki/product.  Since these paths are actually configurable, the rhsm-debug tool should be dumping the actual locations.

Version-Release number of selected component (if applicable):
[root@jsefler-7 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.8.34-1
subscription-manager: 1.10.8-1.el7
python-rhsm: 1.10.8-1.el7


How reproducible:


Steps to Reproduce:
[root@jsefler-7 ~]# subscription-manager config --rhsm.productcertdir=/tmp/productCertDir --rhsm.consumercertdir=/tmp/consumerCertDir --rhsm.entitlementcertdir=/tmp/entitlementCertDir

[root@jsefler-7 ~]# subscription-manager config --list | grep -i certdir
   consumercertdir = /tmp/consumerCertDir
   entitlementcertdir = /tmp/entitlementCertDir
   productcertdir = /tmp/productCertDir

[root@jsefler-7 ~]# subscription-manager register
Username: testuser1
Password: 
Organization: admin
The system has been registered with ID: fab4ad07-90f6-4db3-87cc-ec4d5f087123 

[root@jsefler-7 ~]# subscription-manager list --all --avail | grep Pool | head -1
Pool ID:           8a90874042dd2e9b0142dd2f632a0413
[root@jsefler-7 ~]# subscription-manager attach --pool 8a90874042dd2e9b0142dd2f632a0413
Successfully attached a subscription for: Awesome OS Modifier

[root@jsefler-7 ~]# rhsm-debug system --destination dump

[root@jsefler-7 ~]# unzip -l dump/system-debug-20131211-159070.zip 
Archive:  dump/system-debug-20131211-159070.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
     8075  12-11-2013 10:28   consumer.json
      225  12-11-2013 10:28   compliance.json
        2  12-11-2013 10:28   entitlements.json
   117251  12-11-2013 10:28   pools.json
   435732  12-11-2013 10:28   subscriptions.json
     1698  12-11-2013 10:24   etc/rhsm/rhsm.conf
        0  12-10-2013 17:10   var/log/rhsm/
  1048437  12-10-2013 17:10   var/log/rhsm/rhsm.log.1
      747  12-04-2013 01:09   var/log/rhsm/rhsmcertd.log-20131204
     6506  12-11-2013 08:24   var/log/rhsm/rhsmcertd.log
   891391  12-11-2013 10:28   var/log/rhsm/rhsm.log
  1048516  12-10-2013 16:23   var/log/rhsm/rhsm.log.2
     1256  11-14-2013 13:30   var/log/rhsm/rhsmcertd.log-20131117
  1030283  11-16-2013 03:21   var/log/rhsm/rhsm.log-20131117
   221579  11-22-2013 12:09   var/log/rhsm/rhsmcertd.log-20131125
   983032  11-24-2013 12:55   var/log/rhsm/rhsm.log-20131125
   994804  12-08-2013 03:09   var/log/rhsm/rhsm.log-20131209
  1048047  12-10-2013 13:39   var/log/rhsm/rhsm.log.4
     2403  11-30-2013 12:54   var/log/rhsm/rhsm.log-20131201
  1048423  12-10-2013 13:29   var/log/rhsm/rhsm.log.5
     2143  12-06-2013 11:15   var/log/rhsm/rhsmcertd.log-20131208
  1048384  12-10-2013 13:46   var/log/rhsm/rhsm.log.3
        0  12-11-2013 10:20   etc/pki/product/
     2183  12-06-2013 11:24   etc/pki/product/230.pem
        0  12-11-2013 10:23   etc/pki/entitlement/
---------                     -------
  9941117                     25 files
[root@jsefler-7 ~]# 


Actual results:
shown above should NOT have included etc/pki/* files since they are not currently configured for use

Expected results:
the zip file should have included these files...
[root@jsefler-7 ~]# ls /tmp/*CertDir
/tmp/consumerCertDir:
cert.pem  key.pem

/tmp/entitlementCertDir:
1312111565779061004-key.pem  1312111565779061004.pem

/tmp/productCertDir:
[root@jsefler-7 ~]#

Comment 1 William Poteat 2014-01-07 17:49:03 UTC
master commit 77752678383866dea8b4d2701cae695e7b14aac1

Comment 4 Sharath Dwaral 2014-01-24 15:15:33 UTC
Version:

# subscription-manager version
server type: This system is currently not registered.
subscription management server: 0.9.2-1
subscription-manager: 1.10.11-1.git.2.e96f6cd.el7
python-rhsm: 1.10.11-1.git.0.17362f9.el7

Verfication

# subscription-manager config --rhsm.productcertdir=/tmp/productCertDir --rhsm.consumercertdir=/tmp/consumerCertDir --rhsm.entitlementcertdir=/tmp/entitlementCertDir

# subscription-manager config --list | grep -i certdir
   consumercertdir = /tmp/consumerCertDir
   entitlementcertdir = /tmp/entitlementCertDir
   productcertdir = /tmp/productCertDir

# subscription-manager unregister
This system is currently not registered.

# subscription-manager register
Username: testuser1
Password: 
Organization: admin
The system has been registered with ID: 8906ad08-ee21-47fb-94eb-d87e341af1f3 


# subscription-manager list --all --avail | grep Pool | head -1
Pool ID:           8a8d01e043bfdf710143bfdff03f0886

# subscription-manager attach --pool 8a8d01e043bfdf710143bfdff03f0886
Successfully attached a subscription for: Awesome OS for All Arch (just x86_64 content)


# rhsm-debug system --destination /tmp/dump
Wrote: /tmp/dump/rhsm-debug-system-20140123-134232.tar.gz

# tar -xvf /tmp/dump/rhsm-debug-system-20140123-134232.tar.gz | grep "etc/pki*"


There are no entries with file path /etc/pki

VERIFIED



Additional Info:

# tar -xvf /tmp/dump/rhsm-debug-system-20140123-134232.tar.gz 
rhsm-debug-system-20140123-134232/
rhsm-debug-system-20140123-134232/subscriptions.json
rhsm-debug-system-20140123-134232/consumer.json
rhsm-debug-system-20140123-134232/compliance.json
rhsm-debug-system-20140123-134232/entitlements.json
rhsm-debug-system-20140123-134232/pools.json
rhsm-debug-system-20140123-134232/version.json
rhsm-debug-system-20140123-134232/etc/
rhsm-debug-system-20140123-134232/etc/rhsm/
rhsm-debug-system-20140123-134232/etc/rhsm/ca/
rhsm-debug-system-20140123-134232/etc/rhsm/ca/sharath-candlepin.pem
rhsm-debug-system-20140123-134232/etc/rhsm/ca/fsharath-candlepin.pem
rhsm-debug-system-20140123-134232/etc/rhsm/ca/candlepin-stage.pem
rhsm-debug-system-20140123-134232/etc/rhsm/ca/redhat-uep.pem
rhsm-debug-system-20140123-134232/etc/rhsm/rhsm.conf.rpmsave
rhsm-debug-system-20140123-134232/etc/rhsm/facts/
rhsm-debug-system-20140123-134232/etc/rhsm/facts/custom.facts
rhsm-debug-system-20140123-134232/etc/rhsm/pluginconf.d/
rhsm-debug-system-20140123-134232/etc/rhsm/rhsm.conf
rhsm-debug-system-20140123-134232/var/
rhsm-debug-system-20140123-134232/var/log/
rhsm-debug-system-20140123-134232/var/log/rhsm/
rhsm-debug-system-20140123-134232/var/log/rhsm/rhsmcertd.log-20140115
rhsm-debug-system-20140123-134232/var/log/rhsm/rhsm.log-20140116
rhsm-debug-system-20140123-134232/var/log/rhsm/rhsmcertd.log-20140117
rhsm-debug-system-20140123-134232/var/log/rhsm/rhsm.log-20140117
rhsm-debug-system-20140123-134232/var/log/rhsm/rhsmcertd.log
rhsm-debug-system-20140123-134232/var/log/rhsm/rhsm.log.4
rhsm-debug-system-20140123-134232/var/log/rhsm/rhsm.log.2
rhsm-debug-system-20140123-134232/var/log/rhsm/rhsm.log-20140123
rhsm-debug-system-20140123-134232/var/log/rhsm/rhsmcertd.log-20140113
rhsm-debug-system-20140123-134232/var/log/rhsm/rhsmcertd.log-20140119
rhsm-debug-system-20140123-134232/var/log/rhsm/rhsm.log-20140119
rhsm-debug-system-20140123-134232/var/log/rhsm/rhsm.log.5
rhsm-debug-system-20140123-134232/var/log/rhsm/rhsm.log.3
rhsm-debug-system-20140123-134232/var/log/rhsm/rhsm.log.1
rhsm-debug-system-20140123-134232/var/log/rhsm/rhsm.log
rhsm-debug-system-20140123-134232/var/lib/
rhsm-debug-system-20140123-134232/var/lib/rhsm/
rhsm-debug-system-20140123-134232/var/lib/rhsm/productid.js
rhsm-debug-system-20140123-134232/var/lib/rhsm/branded_name
rhsm-debug-system-20140123-134232/var/lib/rhsm/cache/
rhsm-debug-system-20140123-134232/var/lib/rhsm/cache/installed_products.json
rhsm-debug-system-20140123-134232/var/lib/rhsm/cache/entitlement_status.json
rhsm-debug-system-20140123-134232/var/lib/rhsm/cache/product_status.json
rhsm-debug-system-20140123-134232/var/lib/rhsm/cache/content_overrides.json
rhsm-debug-system-20140123-134232/var/lib/rhsm/facts/
rhsm-debug-system-20140123-134232/var/lib/rhsm/facts/facts.json
rhsm-debug-system-20140123-134232/var/lib/rhsm/packages/
rhsm-debug-system-20140123-134232/tmp/
rhsm-debug-system-20140123-134232/tmp/productCertDir/
rhsm-debug-system-20140123-134232/tmp/entitlementCertDir/
rhsm-debug-system-20140123-134232/tmp/entitlementCertDir/1321313656599614601-key.pem
rhsm-debug-system-20140123-134232/tmp/entitlementCertDir/1321313656599614601.pem
rhsm-debug-system-20140123-134232/tmp/consumerCertDir/
rhsm-debug-system-20140123-134232/tmp/consumerCertDir/key.pem
rhsm-debug-system-20140123-134232/tmp/consumerCertDir/cert.pem

Comment 5 Ludek Smid 2014-06-13 12:17:48 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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