diff --git a/ansible/roles/common/templates/heka-openstack.toml.j2 b/ansible/roles/common/templates/heka-openstack.toml.j2 index 9cf3782db5..9950edbcef 100644 --- a/ansible/roles/common/templates/heka-openstack.toml.j2 +++ b/ansible/roles/common/templates/heka-openstack.toml.j2 @@ -6,6 +6,6 @@ filename = "lua_decoders/os_openstack_log.lua" type = "LogstreamerInput" decoder = "openstack_log_decoder" log_directory = "/var/log/kolla" -file_match = '(?Pnova|glance|keystone|neutron|cinder|heat|murano|magnum|mistral|manila)/(?P.*)\.log\.?(?P\d*)$' +file_match = '(?Pnova|glance|keystone|neutron|cinder|heat|murano|magnum|mistral|manila|libvirtd)/(?P.*)\.log\.?(?P\d*)$' priority = ["^Seq"] differentiator = ["Service", "_", "Program"] diff --git a/ansible/roles/nova/tasks/start_compute.yml b/ansible/roles/nova/tasks/start_compute.yml index f88e3aa917..1540f4673f 100644 --- a/ansible/roles/nova/tasks/start_compute.yml +++ b/ansible/roles/nova/tasks/start_compute.yml @@ -12,6 +12,7 @@ - "/lib/modules:/lib/modules:ro" - "/run/:/run/" - "/sys/fs/cgroup:/sys/fs/cgroup" + - "kolla_logs:/var/log/kolla/" - "libvirtd:/var/lib/libvirt" - "nova_compute:/var/lib/nova/" when: inventory_hostname in groups['compute'] diff --git a/ansible/roles/nova/templates/libvirtd.conf.j2 b/ansible/roles/nova/templates/libvirtd.conf.j2 index 9b43fc7104..de891b8d28 100644 --- a/ansible/roles/nova/templates/libvirtd.conf.j2 +++ b/ansible/roles/nova/templates/libvirtd.conf.j2 @@ -2,5 +2,5 @@ listen_tcp = 1 auth_tcp = "none" ca_file = "" log_level = 3 -log_outputs = "3:file:/var/log/libvirt/libvirtd.log" +log_outputs = "3:file:/var/log/kolla/libvirt/libvirtd.log" listen_addr = "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}" diff --git a/docker/nova/nova-libvirt/extend_start.sh b/docker/nova/nova-libvirt/extend_start.sh index 20873d8b41..d0cdd4d1cd 100644 --- a/docker/nova/nova-libvirt/extend_start.sh +++ b/docker/nova/nova-libvirt/extend_start.sh @@ -12,3 +12,10 @@ fi if [[ $(lsmod | grep xenfs) ]]; then mount -t xenfs xenfs /proc/xen fi + +if [[ ! -d "/var/log/kolla/libvirt" ]]; then + mkdir -p /var/log/kolla/libvirt +fi +if [[ $(stat -c %a /var/log/kolla/libvirt) != "755" ]]; then + chmod 755 /var/log/kolla/libvirt +fi