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 847789 - [RFE] Make subscription-manager log its actions into the sysloger
Summary: [RFE] Make subscription-manager log its actions into the sysloger
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: beta
: 7.0
Assignee: candlepin-bugs
QA Contact: Shwetha Kallesh
Petr Bokoc
URL:
Whiteboard:
Depends On:
Blocks: 1113520 rhsm-rhel72 1205796 1249537
TreeView+ depends on / blocked
 
Reported: 2012-08-13 14:55 UTC by Clifford Perry
Modified: 2019-08-15 03:35 UTC (History)
14 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Subscription Manager now supports syslog The _subscription-manager_ tool can now use the syslog as the log handler and formatter in addition to separate log used previously. The handler and formatter is configured in the `/etc/rhsm/logging.conf` configuration file.
Clone Of: 795136
Environment:
Last Closed: 2015-11-19 11:47:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 1444353 0 None None None Never
Red Hat Product Errata RHBA-2015:2122 0 normal SHIPPED_LIVE subscription-manager bug fix and enhancement update 2015-11-19 10:31:14 UTC

Comment 1 Bryan Kearney 2014-02-03 20:32:01 UTC
moving this to rhel 7.1

Comment 4 Adrian Likins 2015-05-08 17:50:38 UTC
subscription-manager 1.14.5 or higher support this. Logging is configured via
/etc/rhsm/logging.conf (via python fileConfig based logging). So turning on syslog can be configured by changing the log handler configuration.

It is not enabled by default, but it will support it by default.

Comment 7 Adrian Likins 2015-07-17 15:50:55 UTC
Sample diff of a /etc/rhsm/logging.conf setup to log to syslog
at INFO level.

--- 1/etc-conf/logging.conf
+++ 2/etc/rhsm/logging.conf
@@ -2,10 +2,10 @@
 keys=root,rhsm-app,rhsm,subscription_manager,py.warnings

 [handlers]
-keys=rhsm_log,subman_debug
+keys=rhsm_log,subman_debug,syslog

 [formatters]
-keys=rhsm_log,subman_debug
+keys=rhsm_log,subman_debug,syslog



@@ -15,17 +15,17 @@ handlers=subman_debug

 [logger_rhsm-app]
 level=DEBUG
-handlers=rhsm_log
+handlers=syslog
 qualname=rhsm-app

 [logger_rhsm]
 level=DEBUG
-handlers=rhsm_log
+handlers=syslog
 qualname=rhsm

 [logger_subscription_manager]
 level=DEBUG
-handlers=rhsm_log
+handlers=syslog
 qualname=subscription_manager

 [logger_py.warnings]

Comment 8 Shwetha Kallesh 2015-07-20 10:19:23 UTC
After turning on the syslog by changing the log handler configuration in /etc/rhsm/logging.conf by following steps in https://bugzilla.redhat.com/show_bug.cgi?id=847789#c7


[root@ibm-x3650m4-01-vm-11 ~]# subscription-manager  version
server type: Red Hat Subscription Management
subscription management server: 0.9.26.11-1
subscription management rules: 5.12
subscription-manager: 1.15.6-1.el7
python-rhsm: 1.15.3-1.el7

[root@ibm-x3650m4-01-vm-11 ~]# vi /etc/rhsm/logging.conf


[root@ibm-x3650m4-01-vm-11 ~]# subscription-manager  unregister
System has been unregistered.
[root@ibm-x3650m4-01-vm-11 ~]# subscription-manager  register
Username: qa
Password: 
The system has been registered with ID: dee531d6-cab4-420d-add9-c0b78ece206f 


[root@ibm-x3650m4-01-vm-11 ~]# tail -f /var/log/messages 

Jul 20 05:08:27 ibm-x3650m4-01-vm-11 journal: [INFO] @managercli.py:352 - Client Versions: {'python-rhsm': '1.15.3-1.el7', 'subscription-manager': '1.15.6-1.el7'}
Jul 20 05:08:27 ibm-x3650m4-01-vm-11 journal: [INFO] @connection.py:741 - Connection built: host=subscription.rhn.stage.redhat.com port=443 handler=/subscription auth=identity_cert ca_dir=/etc/rhsm/ca/ verify=False
Jul 20 05:08:27 ibm-x3650m4-01-vm-11 journal: [INFO] @connection.py:741 - Connection built: host=subscription.rhn.stage.redhat.com port=443 handler=/subscription auth=none
Jul 20 05:08:28 ibm-x3650m4-01-vm-11 journal: [INFO] @managercli.py:363 - Server Versions: {'rules-version': '5.12', 'candlepin': '0.9.26.11-1', 'server-type': 'Red Hat Subscription Management'}
Jul 20 05:08:28 ibm-x3650m4-01-vm-11 journal: [INFO] @managercli.py:328 - Consumer Identity name=ibm-x3650m4-01-vm-11.lab.eng.bos.redhat.com uuid=532f5ef0-d8ae-4108-9b74-84d9a296e9f7
Jul 20 05:08:33 ibm-x3650m4-01-vm-11 NetworkManager[607]: <warn>  (eth0): Lowering IPv6 MTU (9216) to match device MTU (1500)
Jul 20 05:08:33 ibm-x3650m4-01-vm-11 NetworkManager[607]: <warn>  (eth0): Lowering IPv6 MTU (9216) to match device MTU (1500)
Jul 20 05:08:38 ibm-x3650m4-01-vm-11 journal: [INFO] @managerlib.py:790 - Successfully un-registered.
Jul 20 05:08:38 ibm-x3650m4-01-vm-11 subscription-manager: Unregistered machine with identity: 532f5ef0-d8ae-4108-9b74-84d9a296e9f7
Jul 20 05:08:38 ibm-x3650m4-01-vm-11 journal: [INFO] @managerlib.py:861 - Cleaned local data
Jul 20 05:08:38 ibm-x3650m4-01-vm-11 journal: [INFO] @entcertlib.py:131 - certs updated:#012Total updates: 0#012Found (local) serial# []#012Expected (UEP) serial# []#012Added (new)#012  <NONE>#012Deleted (rogue):#012  <NONE>
Jul 20 05:08:38 ibm-x3650m4-01-vm-11 journal: [INFO] @repolib.py:278 - repos updated: Repo updates#012#012Total repo updates: 0#012Updated#012    <NONE>#012Added (new)#012    <NONE>#012Deleted#012    <NONE>
Jul 20 05:08:38 ibm-x3650m4-01-vm-11 dbus-daemon: dbus[598]: [system] Activating service name='com.redhat.SubscriptionManager' (using servicehelper)
Jul 20 05:08:38 ibm-x3650m4-01-vm-11 dbus[598]: [system] Activating service name='com.redhat.SubscriptionManager' (using servicehelper)
Jul 20 05:08:38 ibm-x3650m4-01-vm-11 journal: [ERROR] @rhsmd:62 - Unhandled rhsmd exception caught by the logging excepthook: Traceback (most recent call last):#012  File "/usr/libexec/rhsmd", line 68, in <module>#012    from subscription_manager.ga import GObject as ga_GObject#012ImportError: No module named ga

Jul 20 05:08:47 ibm-x3650m4-01-vm-11 NetworkManager[607]: <error> [1437383327.112920] [devices/nm-device.c:2590] activation_source_schedule(): (eth0): activation stage already scheduled
Jul 20 05:08:47 ibm-x3650m4-01-vm-11 NetworkManager[607]: <warn>  (eth0): Lowering IPv6 MTU (9216) to match device MTU (1500)
Jul 20 05:08:58 ibm-x3650m4-01-vm-11 NetworkManager[607]: <warn>  (eth0): Lowering IPv6 MTU (9216) to match device MTU (1500)
Jul 20 05:08:58 ibm-x3650m4-01-vm-11 NetworkManager[607]: <warn>  (eth0): Lowering IPv6 MTU (9216) to match device MTU (1500)
Jul 20 05:09:03 ibm-x3650m4-01-vm-11 dbus[598]: [system] Failed to activate service 'com.redhat.SubscriptionManager': timed out
Jul 20 05:09:03 ibm-x3650m4-01-vm-11 dbus-daemon: dbus[598]: [system] Failed to activate service 'com.redhat.SubscriptionManager': timed out
Jul 20 05:09:03 ibm-x3650m4-01-vm-11 journal: [ERROR] @dbus_interface.py:47 - org.freedesktop.DBus.Error.TimedOut: Activation of com.redhat.SubscriptionManager timed out#012Traceback (most recent call last):#012  File "/usr/share/rhsm/subscription_manager/dbus_interface.py", line 36, in __init__#012    follow_name_owner_changes=self.has_main_loop)#012  File "/usr/share/rhsm/subscription_manager/dbus_interface.py", line 69, in _get_validity_object#012    return self.bus.get_object(*args, **kwargs)#012  File "/usr/lib64/python2.7/site-packages/dbus/bus.py", line 241, in get_object#012    follow_name_owner_changes=follow_name_owner_changes)#012  File "/usr/lib64/python2.7/site-packages/dbus/proxies.py", line 248, in __init__#012    self._named_service = conn.activate_name_owner(bus_name)#012  File "/usr/lib64/python2.7/site-packages/dbus/bus.py", line 180, in activate_name_owner#012    self.start_service_by_name(bus_name)#012  File "/usr/lib64/python2.7/site-packages/dbus/bus.py", line 278, in start_service_by_name#012    'su', (bus_name, flags)))#012  File "/usr/lib64/python2.7/site-packages/dbus/connection.py", line 651, in call_blocking#012    message, timeout)#012DBusException: org.freedesktop.DBus.Error.TimedOut: Activation of com.redhat.SubscriptionManager timed out

Jul 20 05:09:22 ibm-x3650m4-01-vm-11 journal: [INFO] @managercli.py:352 - Client Versions: {'python-rhsm': '1.15.3-1.el7', 'subscription-manager': '1.15.6-1.el7'}
Jul 20 05:09:22 ibm-x3650m4-01-vm-11 journal: [INFO] @connection.py:741 - Connection built: host=subscription.rhn.stage.redhat.com port=443 handler=/subscription auth=identity_cert ca_dir=/etc/rhsm/ca/ verify=False
Jul 20 05:09:22 ibm-x3650m4-01-vm-11 journal: [INFO] @connection.py:741 - Connection built: host=subscription.rhn.stage.redhat.com port=443 handler=/subscription auth=none
Jul 20 05:09:23 ibm-x3650m4-01-vm-11 journal: [INFO] @managercli.py:363 - Server Versions: {'rules-version': '5.12', 'candlepin': '0.9.26.11-1', 'server-type': 'This system is currently not registered.'}
Jul 20 05:09:23 ibm-x3650m4-01-vm-11 journal: [INFO] @managercli.py:352 - Client Versions: {'python-rhsm': '1.15.3-1.el7', 'subscription-manager': '1.15.6-1.el7'}
Jul 20 05:09:23 ibm-x3650m4-01-vm-11 journal: [INFO] @managercli.py:328 - Consumer Identity name=None uuid=None
Jul 20 05:09:23 ibm-x3650m4-01-vm-11 journal: [INFO] @managercli.py:328 - Consumer Identity name=None uuid=None
Jul 20 05:09:33 ibm-x3650m4-01-vm-11 journal: [INFO] @connection.py:741 - Connection built: host=subscription.rhn.stage.redhat.com port=443 handler=/subscription auth=basic username=qa
Jul 20 05:09:33 ibm-x3650m4-01-vm-11 journal: [INFO] @hwprobe.py:854 - collected virt facts: virt.is_guest=True, virt.host_type=kvm, virt.uuid=fe2bb4ae-279a-4e25-b4e1-18cdfd77b13b
Jul 20 05:09:37 ibm-x3650m4-01-vm-11 journal: [INFO] @managerlib.py:75 - Consumer created: {'consumer_name': 'ibm-x3650m4-01-vm-11.lab.eng.bos.redhat.com', 'uuid': 'dee531d6-cab4-420d-add9-c0b78ece206f'}
Jul 20 05:09:37 ibm-x3650m4-01-vm-11 subscription-manager: Registered system with identity: dee531d6-cab4-420d-add9-c0b78ece206f
Jul 20 05:09:38 ibm-x3650m4-01-vm-11 journal: [INFO] @managercli.py:363 - Server Versions: {'rules-version': '5.12', 'candlepin': '0.9.26.11-1', 'server-type': 'Red Hat Subscription Management'}
Jul 20 05:09:38 ibm-x3650m4-01-vm-11 journal: [INFO] @cache.py:382 - Server does not support packages, skipping profile upload.
Jul 20 05:09:40 ibm-x3650m4-01-vm-11 journal: [INFO] @cert_sorter.py:205 - Product status: valid_products= partial_products= expired_products= unentitled_producs=69 and 230 future_products= valid_until=None

Comment 9 errata-xmlrpc 2015-11-19 11:47:40 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-2122.html


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