This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 847789 - [RFE] Make subscription-manager log its actions into the sysloger
[RFE] Make subscription-manager log its actions into the sysloger
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager (Show other bugs)
7.0
All Linux
medium Severity medium
: beta
: 7.0
Assigned To: candlepin-bugs
Shwetha Kallesh
Petr Bokoc
: FutureFeature
Depends On:
Blocks: 1113520 1205796 rhsm-rhel72 1249537
  Show dependency treegraph
 
Reported: 2012-08-13 10:55 EDT by Clifford Perry
Modified: 2015-11-19 06:47 EST (History)
14 users (show)

See Also:
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.
Story Points: ---
Clone Of: 795136
Environment:
Last Closed: 2015-11-19 06:47:40 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 1444353 None None None Never

  None (edit)
Comment 1 Bryan Kearney 2014-02-03 15:32:01 EST
moving this to rhel 7.1
Comment 4 Adrian Likins 2015-05-08 13:50:38 EDT
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 11:50:55 EDT
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 06:19:23 EDT
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@redhat.com
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@redhat.com
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 06:47:40 EST
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.