Ask Your Question

why dose openstack output errlog to /var/log/messages even setting use_syslog=False ? [closed]

asked 2015-08-26 07:52:19 -0500

xiangfei-ma gravatar image

updated 2016-02-15 02:40:04 -0500

On compute node(RHEL7), /var/log/messages

MM DD 03:46:44 osc-21 cinder-volume: 2015-12-21 03:46:44.033 21768 INFO cinder.volume.manager [req-7f198482-9a26-4131-95fb-3dc3b8e28cd3 - - - - -] Updating volume status  
MM DD 03:46:44 osc-21 cinder-volume: 2015-12-21 03:46:44.058 21768 INFO cinder.volume.drivers.san.hp.hp_3par_common [req-7f198482-9a26-4131-95fb-3dc3b8e28cd3 - - - - -] HP3PARCommon 2.0.40, hp3parclient 3.2.1  
MM DD 03:46:44 osc-21 cinder-volume: 2015-12-21 03:46:44.616 21768 INFO cinder.volume.drivers.san.hp.hp_3par_common [req-7f198482-9a26-4131-95fb-3dc3b8e28cd3 - - - - -] Disconnect from 3PAR REST and SSH 32041391-d5ca-4c04-a862-95298d98d379  
MM DD 03:46:44 osc-21 cinder-volume: 2015-12-21 03:46:44.638 21768 INFO cinder.volume.drivers.san.hp.hp_3par_common [req-7f198482-9a26-4131-95fb-3dc3b8e28cd3 - - - - -] logout Done 32041391-d5ca-4c04-a862-95298d98d379


The message itself is not important, I just want to know why dose openstack output log to /var/log/messages ?
I think the log just should be wrote to /var/log/cinder/volume.log as I configed.
Can someone plz tell me ? thanks a lot!

2015/10/16 update:

I found that whether OpenStack writing log to "/var/log/messages" depends on the config option "use_stderr".
This option--if it is set to ‘True’--seems will lead OpenStack to get a logger with a handler to write log to stderr.
And OpenStack somehow redirects stderr to "/var/log/messages".

Now my confusion is:
Obviously, the default value of "use_stderr" is 'True', and I can't find anywhere this value is overrided in OpenStack's source code if I don't change it in "/etc/xxx/xxx.conf".
But the print result clearly shows the value of "use_stderr" in nova is 'False' and in cinder is 'True'.
Can someone tell me why?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by xiangfei-ma
close date 2015-12-28 01:23:55.392350

2 answers

Sort by » oldest newest most voted

answered 2015-12-24 01:51:55 -0500

xiangfei-ma gravatar image

updated 2015-12-24 01:54:59 -0500

I finally found almost OpenStack components have 2 config file:
/etc/nova/nova.conf, /usr/share/nova/nova-dist.conf
/etc/cinder/cinder.conf, /usr/share/cinder/cinder-dist.conf
although the option "use_stderr" is not specified in /etc/xxx/xxx.conf, but it is specified in /usr/share/xxx/xxx-dist.conf except cinder by default.

That's why cinder used the default value "use_stderr = True" and write log to /var/log/messages.

edit flag offensive delete link more

answered 2015-08-31 22:10:13 -0500

nethawk gravatar image

Did you restart your ceilometer after changing the configuration?

edit flag offensive delete link more


Yes, of course I did restart the service.

xiangfei-ma gravatar imagexiangfei-ma ( 2015-09-01 21:44:25 -0500 )edit

buddy, I edited the question from about ceilometer to about cinder. The ceilometer log I asked at the very first time might be another problem. Anyway thank you a lot for your help!

xiangfei-ma gravatar imagexiangfei-ma ( 2015-12-24 02:00:44 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools


Asked: 2015-08-26 07:52:19 -0500

Seen: 577 times

Last updated: Feb 15 '16