Ask Your Question
0

How is the log directory changed in nova without writing to a single file?

asked 2016-11-15 16:27:00 -0600

thejon gravatar image

Running Mitaka, with nova/cinder/glance/neutron/horizon all on a single node (call it PoC, working out kinks in a lab setting). I'm working on setting up a log repo, and thought it would be helpful to have all openstack logs in /var/log/openstack, rather than /var/log/%service%/.

I created /var/log/openstack, assigned group ownership to 'openstack', and added service user accounts to that group.

In nova.conf, if I set log_dir = /var/log/openstack, the logs continue to write to their old address, with no complaints in any of the logs I can find. Am I misunderstanding the way this config option is to be used?

If I set log_file = /var/log/openstack/nova-api.log, every service that runs under nova writes to that single file.

It looks like I can use syslog, by using log_config_append to point to logging.conf, specify in that to send everything to syslog, and then setting a custom syslog conf specific for each service, but that seems like a really round-about way of doing it. Am I missing something obvious?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-11-16 23:35:36 -0600

silently gravatar image

I think ,configure this section in /etc/nova/nova.conf :

[oslo_concurrency]
lock_path=/var/log/nova
edit flag offensive delete link more

Comments

Appreciate the answer; but the lock path is not the same as the log path. The lock path is for situations where you have two processes running parallel, they will check for a lock to ensure they aren't accessing the same file / resource at the same time.

thejon gravatar imagethejon ( 2016-11-17 09:36:17 -0600 )edit

sorry, this time will be right: in file /etc/nova/nova.conf

[DEFAULT]
log_dir=/var/log/nova

log_file = /var/log/nova/nova.log

then restart your nova-... services.

silently gravatar imagesilently ( 2016-11-18 03:50:56 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2016-11-15 16:27:00 -0600

Seen: 59 times

Last updated: Nov 16 '16