Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1686920

Summary: when /var/log/rhsm/ is missing, subscription-manager outputs rhsm logs on terminal.
Product: Red Hat Enterprise Linux 7 Reporter: jcastran
Component: subscription-managerAssignee: candlepin-bugs
Status: CLOSED WONTFIX QA Contact: Red Hat subscription-manager QE Team <rhsm-qe>
Severity: high Docs Contact:
Priority: unspecified    
Version: 7.7CC: csnyder, jcastran, jsefler, jwboyer, pdwyer
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-03-18 18:29:03 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:

Description jcastran 2019-03-08 16:36:08 UTC
Description of problem:
when /var/log/rhsm/ is missing, subscription-manager outputs rhsm logs on terminal.

Everytime yum is called, it calls the subscription-manager plugin and the output can be extremely excessive. This can even stop ansible which will fail when too much yum output is seen.

Version-Release number of selected component (if applicable):
subscription-manager-1.21.10-3.el7_6.x86_64

How reproducible:
Everytime

Steps to Reproduce:
1. mv /var/log/rhsm/ .
2. yum repolist

Actual results:
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-
              : manager
2019-01-23 07:26:48,781 [INFO] yum:23157:MainThread @connection.py:871 - Connection built: http_proxy=intsquid.imf.org:8080 host=subscription.rhn.redhat.com port=443 handler=/subscription auth=identity_cert ca_dir=/etc/rhsm/ca/ insecure=True
2019-01-23 07:26:48,802 [INFO] yum:23157:MainThread @connection.py:871 - Connection built: http_proxy=intsquid.imf.org:8080 host=subscription.rhn.redhat.com port=443 handler=/subscription auth=identity_cert ca_dir=/etc/rhsm/ca/ insecure=True
2019-01-23 07:26:49,092 [INFO] yum:23157:MainThread @connection.py:588 - Response: status=200, request="GET /subscription/"
''
repo id                           repo name                               status
rhel-7-server-rpms/7Server/x86_64 Red Hat Enterprise Linux 7 Server (RPMs 23382
repolist: 23382


Expected results:
repo id                           repo name                               status
rhel-7-server-rpms/7Server/x86_64 Red Hat Enterprise Linux 7 Server (RPMs 23382
repolist: 23382

AND /var/log/rhsm/ gets created so subscription-manager can log properly.

Additional info:
rpm -Va does show the directory as missing. reinstalling the subscription-manager package will resolve this issue. Depending on the entitlements this output can be extremely verbose and all caused by a missing directory that it should either create if needed, or log straight to /var/log/ instead of /var/log/rhsm/.