Description of problem: We deactivated the use of syslog in /etc/cinder/cinder.conf (use_syslog=False) on the controller nodes but we notice that cinder is still logging to `/var/log/messages` Steps to reproduce : 1/ Set use_syslog=False in /etc/cinder/cinder.conf on the controller nodes 2/ Restart cinder services. 3/ Search for cinder logs in /var/log/messages : [root@kilo1 ~]# grep -i cinder /var/log/messages |tail Feb 11 19:39:41 kilo1 cinder-volume: 2016-02-11 19:39:41.257 5263 INFO cinder.volume.manager [req-29e7a1c3-4aa3-47bb-9196-1d52b4e1e2c0 - - - - -] Updating volume status Feb 11 19:40:11 kilo1 cinder-volume: 2016-02-11 19:40:11.457 5202 INFO cinder.volume.manager [req-e024a072-5e5a-4ca5-a841-a7596915b7a2 - - - - -] Updating volume status Feb 11 19:40:27 kilo1 cinder-volume: 2016-02-11 19:40:27.481 5198 INFO cinder.volume.manager [req-d60c5210-f598-4942-a7c7-6e94ff9504dc - - - - -] Updating volume status Feb 11 19:40:41 kilo1 cinder-volume: 2016-02-11 19:40:41.258 5263 INFO cinder.volume.manager [req-7b1cfc68-05a2-423a-a9ea-31b448778f4a - - - - -] Updating volume status Feb 11 19:41:11 kilo1 cinder-volume: 2016-02-11 19:41:11.458 5202 INFO cinder.volume.manager [req-2fc90da1-987e-48ed-930b-c3d1d4c67ca5 - - - - -] Updating volume status Feb 11 19:41:27 kilo1 cinder-volume: 2016-02-11 19:41:27.481 5198 INFO cinder.volume.manager [req-66a66ec0-18ca-4ec3-afe9-6887500b5c95 - - - - -] Updating volume status Feb 11 19:41:41 kilo1 cinder-volume: 2016-02-11 19:41:41.256 5263 INFO cinder.volume.manager [req-015ec307-385d-4551-b10e-83a57bffee6e - - - - -] Updating volume status Feb 11 19:42:11 kilo1 cinder-volume: 2016-02-11 19:42:11.460 5202 INFO cinder.volume.manager [req-8867e567-eb76-4e20-8f95-6be386ffbab5 - - - - -] Updating volume status Feb 11 19:42:27 kilo1 cinder-volume: 2016-02-11 19:42:27.481 5198 INFO cinder.volume.manager [req-4f75eea7-bbcb-4a8d-aa81-0ed88e645412 - - - - -] Updating volume status Feb 11 19:42:41 kilo1 cinder-volume: 2016-02-11 19:42:41.256 5263 INFO cinder.volume.manager [req-21e0eda4-fef0-41dc-b54b-214088b4027f - - - - -] Updating volume status Version-Release number of selected component (if applicable): RHOS6,RHOS7 How reproducible: 100% Steps to Reproduce: 1. 2. 3. Actual results: cinder writes logs in `/var/log/messages` Expected results: No logs of Cinder in `/var/log/messages` Additional info:
To not see logs in /var/log/messages, set use_stderr=False in cinder.conf. This defaults to on, and the way our services are integrated with systemd means that stderr output is logged to syslog. (For any OpenStack service, this isn't Cinder-specific.)
Please, attach your /etc/cinder/cinder.conf.
Setting use_stderr=False fixes this for messages that come directly from Cinder. But, there are some messages that come from dependencies of Cinder that may need to be handled with additional code. For example, python-amqp issues messages with the "warnings" module. It looks like we will need to use logging.captureWarnings() via oslo.logging or Cinder to reroute those messages. The DeprecationWarning from oslo.i18n also falls in this category.
Tested using: python-cinderclient-1.2.1-1.el7ost.noarch python-cinder-2015.1.3-5.el7ost.noarch openstack-cinder-2015.1.3-5.el7ost.noarch Verification flow: 1. Set use_syslog=False in /etc/cinder/cinder.conf on the controller nodes [root@overcloud-controller-0 ~]# grep -i use_syslog /etc/cinder/cinder.conf use_syslog=False 2. Restart cinder services [root@overcloud-controller-0 ~]# for i in `systemctl | awk '{print$1}' | grep cinder`; do systemctl restart $i; done 3. Search for cinder logs in /var/log/messages [root@overcloud-controller-0 ~]# grep -i cinder /var/log/messages | tail [root@overcloud-controller-0 ~]#
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-2016-0688.html