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 1055664 - rhsm-debug tool should follow the configured paths to: ca_cert_dir pluginconfdir plugindir
Summary: rhsm-debug tool should follow the configured paths to: ca_cert_dir pluginconf...
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: Adrian Likins
QA Contact: John Sefler
URL:
Whiteboard:
Depends On: 1070737
Blocks: rhsm-rhel70
TreeView+ depends on / blocked
 
Reported: 2014-01-20 17:51 UTC by John Sefler
Modified: 2014-06-18 00:31 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 11:32:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description John Sefler 2014-01-20 17:51:48 UTC
Description of problem:
Very similar to bug 1040546


Version-Release number of selected component (if applicable):
[root@jsefler-7 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.9.2-1
subscription-manager: 1.10.10-1.git.22.bf03c6b.el7
python-rhsm: 1.10.10-1.git.1.90486fd.el7


How reproducible:


Steps to Reproduce:
[root@jsefler-7 ~]# subscription-manager config --list | egrep "ca_cert_dir|pluginconfdir|plugindir"
   ca_cert_dir = [/etc/rhsm/ca/]
   pluginconfdir = [/etc/rhsm/pluginconf.d]
   plugindir = [/usr/share/rhsm-plugins]

[root@jsefler-7 ~]# mkdir /tmp/ca_cert_dir /tmp/pluginconfdir /tmp/plugindir

[root@jsefler-7 ~]# cp /etc/rhsm/ca/* /tmp/ca_cert_dir

[root@jsefler-7 ~]# cp /etc/rhsm/pluginconf.d/* /tmp/pluginconfdir

[root@jsefler-7 ~]# cp /usr/share/rhsm-plugins/* /tmp/plugindir

[root@jsefler-7 ~]# ls -c1 /tmp/ca_cert_dir
redhat-uep.pem
jsefler-f14-7candlepin.pem
jsefler-f14-candlepin.pem
candlepin-stage.pem

[root@jsefler-7 ~]# ls -c1 /tmp/pluginconfdir
product_id_install_test.ProductIdInstallTestPlugin.conf
register_consumer_test1.RegisterConsumerTestPlugin.conf
register_consumer_test2.RegisterConsumerTestPlugin.conf
subscribe_test.SubscribeTestPlugin.conf
facts_collection_test.FactsCollectionTestPlugin.conf
all_slots_test.AllSlotsTestPlugin.conf
auto_attach_test.AutoAttachTestPlugin.conf
dbus_event.DbusEventPlugin.conf

[root@jsefler-7 ~]# ls -c1 /tmp/plugindir
subscribe_test.pyc
register_consumer_test2.pyc
register_consumer_test1.pyc
product_id_install_test.pyc
facts_collection_test.pyc
dbus_event.pyc
auto_attach_test.pyc
all_slots_test.pyc
subscribe_test.py
register_consumer_test2.py
register_consumer_test1.py
product_id_install_test.py
facts_collection_test.py
dbus_event.py
auto_attach_test.py
all_slots_test.py

[root@jsefler-7 ~]# subscription-manager config --rhsm.ca_cert_dir=/tmp/ca_cert_dir --rhsm.pluginconfdir=/tmp/pluginconfdir --rhsm.plugindir=/tmp/plugindir

[root@jsefler-7 ~]# subscription-manager config --list | egrep "ca_cert_dir|pluginconfdir|plugindir"
   ca_cert_dir = /tmp/ca_cert_dir
   pluginconfdir = /tmp/pluginconfdir
   plugindir = /tmp/plugindir
   repo_ca_cert = /tmp/ca_cert_dirredhat-uep.pem

[root@jsefler-7 ~]# subscription-manager register --username testuser1 --password password --org admin
The system has been registered with ID: 4de2eee1-7581-4d1c-abf2-3b852faa3893 

[root@jsefler-7 ~]# rhsm-debug system
Wrote: /tmp/rhsm-debug-system-20140120-050890.tar.gz

[root@jsefler-7 ~]# tar -xvf /tmp/rhsm-debug-system-20140120-050890.tar.gz
rhsm-debug-system-20140120-050890/
rhsm-debug-system-20140120-050890/subscriptions.json
rhsm-debug-system-20140120-050890/consumer.json
rhsm-debug-system-20140120-050890/compliance.json
rhsm-debug-system-20140120-050890/entitlements.json
rhsm-debug-system-20140120-050890/pools.json
rhsm-debug-system-20140120-050890/version.json
rhsm-debug-system-20140120-050890/etc/
rhsm-debug-system-20140120-050890/etc/rhsm/
rhsm-debug-system-20140120-050890/etc/rhsm/ca/
rhsm-debug-system-20140120-050890/etc/rhsm/ca/jsefler-f14-candlepin.pem
rhsm-debug-system-20140120-050890/etc/rhsm/ca/jsefler-f14-7candlepin.pem
rhsm-debug-system-20140120-050890/etc/rhsm/ca/candlepin-stage.pem
rhsm-debug-system-20140120-050890/etc/rhsm/ca/redhat-uep.pem
rhsm-debug-system-20140120-050890/etc/rhsm/rhsm.conf.rpmsave
rhsm-debug-system-20140120-050890/etc/rhsm/pluginconf.d/
rhsm-debug-system-20140120-050890/etc/rhsm/pluginconf.d/all_slots_test.AllSlotsTestPlugin.conf
rhsm-debug-system-20140120-050890/etc/rhsm/pluginconf.d/auto_attach_test.AutoAttachTestPlugin.conf
rhsm-debug-system-20140120-050890/etc/rhsm/pluginconf.d/dbus_event.DbusEventPlugin.conf
rhsm-debug-system-20140120-050890/etc/rhsm/pluginconf.d/facts_collection_test.FactsCollectionTestPlugin.conf
rhsm-debug-system-20140120-050890/etc/rhsm/pluginconf.d/product_id_install_test.ProductIdInstallTestPlugin.conf
rhsm-debug-system-20140120-050890/etc/rhsm/pluginconf.d/register_consumer_test1.RegisterConsumerTestPlugin.conf
rhsm-debug-system-20140120-050890/etc/rhsm/pluginconf.d/register_consumer_test2.RegisterConsumerTestPlugin.conf
rhsm-debug-system-20140120-050890/etc/rhsm/pluginconf.d/subscribe_test.SubscribeTestPlugin.conf
rhsm-debug-system-20140120-050890/etc/rhsm/facts/
rhsm-debug-system-20140120-050890/etc/rhsm/facts/override.facts
rhsm-debug-system-20140120-050890/etc/rhsm/rhsm.conf
rhsm-debug-system-20140120-050890/etc/pki/
rhsm-debug-system-20140120-050890/etc/pki/product/
rhsm-debug-system-20140120-050890/etc/pki/product/88888_.pem
rhsm-debug-system-20140120-050890/etc/pki/product/100000000000000_.pem
rhsm-debug-system-20140120-050890/etc/pki/product/100000000000001_.pem
rhsm-debug-system-20140120-050890/etc/pki/product/1000000000000023_.pem
rhsm-debug-system-20140120-050890/etc/pki/product/100000000000002_.pem
rhsm-debug-system-20140120-050890/etc/pki/product/100000000000003_.pem
rhsm-debug-system-20140120-050890/etc/pki/product/100000000000005_.pem
rhsm-debug-system-20140120-050890/etc/pki/product/100000000000006_.pem
rhsm-debug-system-20140120-050890/etc/pki/product/100000000000011_.pem
rhsm-debug-system-20140120-050890/etc/pki/product/100000000000020_.pem
rhsm-debug-system-20140120-050890/etc/pki/product/100000000000060_.pem
rhsm-debug-system-20140120-050890/etc/pki/product/100000000000069_.pem
rhsm-debug-system-20140120-050890/etc/pki/product/1144_.pem
rhsm-debug-system-20140120-050890/etc/pki/product/1_.pem
rhsm-debug-system-20140120-050890/etc/pki/product/213412341234_.pem
rhsm-debug-system-20140120-050890/etc/pki/product/213412341235_.pem
rhsm-debug-system-20140120-050890/etc/pki/product/213412341236_.pem
rhsm-debug-system-20140120-050890/etc/pki/product/213412341237_.pem
rhsm-debug-system-20140120-050890/etc/pki/product/27060_.pem
rhsm-debug-system-20140120-050890/etc/pki/product/32060_.pem
rhsm-debug-system-20140120-050890/etc/pki/product/37060_.pem
rhsm-debug-system-20140120-050890/etc/pki/product/37062_.pem
rhsm-debug-system-20140120-050890/etc/pki/product/37065_.pem
rhsm-debug-system-20140120-050890/etc/pki/product/37067_.pem
rhsm-debug-system-20140120-050890/etc/pki/product/37068_.pem
rhsm-debug-system-20140120-050890/etc/pki/product/37069_.pem
rhsm-debug-system-20140120-050890/etc/pki/product/37070_.pem
rhsm-debug-system-20140120-050890/etc/pki/product/37080_.pem
rhsm-debug-system-20140120-050890/etc/pki/product/801_.pem
rhsm-debug-system-20140120-050890/etc/pki/product/806_.pem
rhsm-debug-system-20140120-050890/etc/pki/product/900_.pem
rhsm-debug-system-20140120-050890/etc/pki/product/917571_.pem
rhsm-debug-system-20140120-050890/etc/pki/product/98121_.pem
rhsm-debug-system-20140120-050890/etc/pki/entitlement/
rhsm-debug-system-20140120-050890/etc/pki/consumer/
rhsm-debug-system-20140120-050890/etc/pki/consumer/key.pem
rhsm-debug-system-20140120-050890/etc/pki/consumer/cert.pem
rhsm-debug-system-20140120-050890/var/
rhsm-debug-system-20140120-050890/var/log/
rhsm-debug-system-20140120-050890/var/log/rhsm/
rhsm-debug-system-20140120-050890/var/log/rhsm/rhsmcertd.log-20140106
rhsm-debug-system-20140120-050890/var/log/rhsm/rhsm.log-20140106
rhsm-debug-system-20140120-050890/var/log/rhsm/rhsmcertd.log-20140112
rhsm-debug-system-20140120-050890/var/log/rhsm/rhsm.log.5
rhsm-debug-system-20140120-050890/var/log/rhsm/rhsm.log.3
rhsm-debug-system-20140120-050890/var/log/rhsm/rhsm.log.1
rhsm-debug-system-20140120-050890/var/log/rhsm/rhsm.log-20140119
rhsm-debug-system-20140120-050890/var/log/rhsm/rhsm.log.2
rhsm-debug-system-20140120-050890/var/log/rhsm/rhsmcertd.log
rhsm-debug-system-20140120-050890/var/log/rhsm/rhsm.log.4
rhsm-debug-system-20140120-050890/var/log/rhsm/rhsm.log
rhsm-debug-system-20140120-050890/var/log/rhsm/rhsmcertd.log-20131229
rhsm-debug-system-20140120-050890/var/log/rhsm/rhsm.log-20131229
rhsm-debug-system-20140120-050890/var/log/rhsm/rhsm.log-20140112
rhsm-debug-system-20140120-050890/var/log/rhsm/rhsmcertd.log-20140119
rhsm-debug-system-20140120-050890/var/lib/
rhsm-debug-system-20140120-050890/var/lib/rhsm/
rhsm-debug-system-20140120-050890/var/lib/rhsm/productid.js
rhsm-debug-system-20140120-050890/var/lib/rhsm/branded_name
rhsm-debug-system-20140120-050890/var/lib/rhsm/cache/
rhsm-debug-system-20140120-050890/var/lib/rhsm/cache/content_overrides.json
rhsm-debug-system-20140120-050890/var/lib/rhsm/cache/installed_products.json
rhsm-debug-system-20140120-050890/var/lib/rhsm/cache/entitlement_status.json
rhsm-debug-system-20140120-050890/var/lib/rhsm/facts/
rhsm-debug-system-20140120-050890/var/lib/rhsm/facts/facts.json
rhsm-debug-system-20140120-050890/var/lib/rhsm/packages/

Actual results:
above

Expected results:
The tar listing should have included all of the files listed in:
  /tmp/ca_cert_dir
  /tmp/pluginconfdir
  /tmp/plugindir

Comment 1 Adrian Likins 2014-02-18 15:10:58 UTC
I think for this case I'd rather not collect the plugins themselves, but I'll add the plugin configurations.

We can add collecting the 'plugins --list' outputs as an RFE.

Comment 2 Adrian Likins 2014-02-18 18:46:37 UTC
https://github.com/candlepin/subscription-manager/pull/911

That fixes most of it.

Comment 3 William Poteat 2014-02-26 14:49:20 UTC
master commit 025a5069108f3278becf33dcaa3cdbe31a1427cb

Comment 6 John Sefler 2014-03-04 23:14:43 UTC
Verifying Version...
[root@jsefler-7 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: Unknown
subscription-manager: 1.10.14-4.el7
python-rhsm: 1.10.12-1.el7


[root@jsefler-7 ~]# subscription-manager config --list | egrep "ca_cert_dir|pluginconfdir|plugindir"
   ca_cert_dir = [/etc/rhsm/ca/]
   pluginconfdir = [/etc/rhsm/pluginconf.d]
   plugindir = [/usr/share/rhsm-plugins]

[root@jsefler-7 ~]# mkdir /tmp/ca_cert_dir /tmp/pluginconfdir /tmp/plugindir

[root@jsefler-7 ~]# cp /etc/rhsm/ca/* /tmp/ca_cert_dir

[root@jsefler-7 ~]# cp /etc/rhsm/pluginconf.d/* /tmp/pluginconfdir

[root@jsefler-7 ~]# cp /usr/share/rhsm-plugins/* /tmp/plugindir

[root@jsefler-7 ~]# ls -c1 /tmp/ca_cert_dir
jsefler-f14-candlepin.pem
katellosach.pem
redhat-uep.pem
candlepin-stage.pem
jsefler-f14-7candlepin.pem

[root@jsefler-7 ~]# ls -c1 /tmp/pluginconfdir
subscribe_test.SubscribeTestPlugin.conf
facts_collection_test.FactsCollectionTestPlugin.conf
product_id_install_test.ProductIdInstallTestPlugin.conf
register_consumer_test1.RegisterConsumerTestPlugin.conf
register_consumer_test2.RegisterConsumerTestPlugin.conf
auto_attach_test.AutoAttachTestPlugin.conf
dbus_event.DbusEventPlugin.conf
all_slots_test.AllSlotsTestPlugin.conf

[root@jsefler-7 ~]# ls -c1 /tmp/plugindir
subscribe_test.pyc
register_consumer_test2.pyc
subscribe_test.py
register_consumer_test2.py
register_consumer_test1.py
register_consumer_test1.pyc
product_id_install_test.py
product_id_install_test.pyc
facts_collection_test.py
facts_collection_test.pyc
dbus_event.py
dbus_event.pyc
all_slots_test.pyc
auto_attach_test.py
auto_attach_test.pyc
all_slots_test.py

[root@jsefler-7 ~]# subscription-manager config --rhsm.ca_cert_dir=/tmp/ca_cert_dir --rhsm.pluginconfdir=/tmp/pluginconfdir --rhsm.plugindir=/tmp/plugindir

[root@jsefler-7 ~]# subscription-manager config --list | egrep "ca_cert_dir|pluginconfdir|plugindir"
   ca_cert_dir = /tmp/ca_cert_dir
   pluginconfdir = /tmp/pluginconfdir
   plugindir = /tmp/plugindir
   repo_ca_cert = /tmp/ca_cert_dirredhat-uep.pem

[root@jsefler-7 ~]# subscription-manager register --username=testuser1 --org=admin --serverurl=jsefler-f14-candlepin.usersys.redhat.com:8443/candlepin
Password: 
The system has been registered with ID: f19d73e3-3d29-4fb0-b1df-872a195ea973 

[root@jsefler-7 ~]# rhsm-debug system --sos
Wrote: /tmp/rhsm-debug-system-20140304-676399.tar.gz

[root@jsefler-7 ~]# tar -tf /tmp/rhsm-debug-system-20140304-676399.tar.gz 
rhsm-debug-system-20140304-676399/
rhsm-debug-system-20140304-676399/subscriptions.json
rhsm-debug-system-20140304-676399/consumer.json
rhsm-debug-system-20140304-676399/compliance.json
rhsm-debug-system-20140304-676399/entitlements.json
rhsm-debug-system-20140304-676399/pools.json
rhsm-debug-system-20140304-676399/version.json
rhsm-debug-system-20140304-676399/tmp/
rhsm-debug-system-20140304-676399/tmp/ca_cert_dir/
rhsm-debug-system-20140304-676399/tmp/ca_cert_dir/candlepin-stage.pem
rhsm-debug-system-20140304-676399/tmp/ca_cert_dir/jsefler-f14-7candlepin.pem
rhsm-debug-system-20140304-676399/tmp/ca_cert_dir/jsefler-f14-candlepin.pem
rhsm-debug-system-20140304-676399/tmp/ca_cert_dir/katellosach.pem
rhsm-debug-system-20140304-676399/tmp/ca_cert_dir/redhat-uep.pem
rhsm-debug-system-20140304-676399/tmp/pluginconfdir/
rhsm-debug-system-20140304-676399/tmp/pluginconfdir/all_slots_test.AllSlotsTestPlugin.conf
rhsm-debug-system-20140304-676399/tmp/pluginconfdir/auto_attach_test.AutoAttachTestPlugin.conf
rhsm-debug-system-20140304-676399/tmp/pluginconfdir/dbus_event.DbusEventPlugin.conf
rhsm-debug-system-20140304-676399/tmp/pluginconfdir/facts_collection_test.FactsCollectionTestPlugin.conf
rhsm-debug-system-20140304-676399/tmp/pluginconfdir/product_id_install_test.ProductIdInstallTestPlugin.conf
rhsm-debug-system-20140304-676399/tmp/pluginconfdir/register_consumer_test1.RegisterConsumerTestPlugin.conf
rhsm-debug-system-20140304-676399/tmp/pluginconfdir/register_consumer_test2.RegisterConsumerTestPlugin.conf
rhsm-debug-system-20140304-676399/tmp/pluginconfdir/subscribe_test.SubscribeTestPlugin.conf
[root@jsefler-7 ~]# 


VERIFIED: The tar listing included all of the files listed in:
  /tmp/ca_cert_dir
  /tmp/pluginconfdir

VERIFIED: As stated in comment 1, the plugindir will NOT be collected by rhsm-debug

VERIFIED: Also verified that using the --sos option will exclude files that are not already be collected by the sos report tool -- namely /etc/pki/* /etc/rhsm/* /var/log/rhsm/* /var/lib/rhsm/*

Comment 7 Ludek Smid 2014-06-13 11:32:57 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.