I have installed Openstack Ussuri and Wallaby (two different VMs) using devstack on Ubuntu 18.04 and 20.04 machines (more than one). I'm capable of spawning instances (using openstack server create
) and all is good. However, I wish to see the logs of the system, which suppose to be at /var/logs/<service_name>
(according to this official doc). However, I have no such directories at all, even after getting an error on instance spawning.
I have checked, and at the nova.conf
I have: debug = True
, I do get the logs from the RabbitMQ, OpenVSwitch and so on, but not from any of the openstack services.
I even searched my entire filesystem for a file that contains nova
and log
and there is nothing.
You can still configure the services to log to a file, but keep in mind that you need to rotate the logs otherwise they will eventually fill up the disk.
To enable logs just add log_file
under the [DEFAULT]
section of the service configuration (e.g. /etc/nova/nova.conf
).
[DEFAULT]
log_file = /opt/stack/logs/nova.log
The configuration options are documented here.
You could also just read logs directly from journal, there are a bunch of libraries to assist with this. A better alternative is probably to have journald forward the logs to another service (e.g. rsyslog, splunk) and use those for your post processing.