Make heka collect libvirtd.log in nova_libvirt container

Test results of this patch set are at:
http://paste.openstack.org/show/491382/

Change-Id: I1bc8bdb3180f30dc69af28a35fa057ac801bde0f
Closes-Bug: #1560298
This commit is contained in:
Vikram Hosakote 2016-03-22 02:00:50 +00:00
parent d68644386f
commit 7af0ab9ba9
4 changed files with 10 additions and 2 deletions

View File

@ -6,6 +6,6 @@ filename = "lua_decoders/os_openstack_log.lua"
type = "LogstreamerInput"
decoder = "openstack_log_decoder"
log_directory = "/var/log/kolla"
file_match = '(?P<Service>nova|glance|keystone|neutron|cinder|heat|murano|magnum|mistral|manila)/(?P<Program>.*)\.log\.?(?P<Seq>\d*)$'
file_match = '(?P<Service>nova|glance|keystone|neutron|cinder|heat|murano|magnum|mistral|manila|libvirtd)/(?P<Program>.*)\.log\.?(?P<Seq>\d*)$'
priority = ["^Seq"]
differentiator = ["Service", "_", "Program"]

View File

@ -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']

View File

@ -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'] }}"

View File

@ -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