Merge "Make Heka collect Ceph logs"

This commit is contained in:
Jenkins 2016-05-17 19:20:54 +00:00 committed by Gerrit Code Review
commit 8bf2017bb9
11 changed files with 37 additions and 2 deletions

View File

@ -51,6 +51,7 @@
- "{{ node_config_directory }}/ceph-osd/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "/dev/:/dev/"
- "kolla_logs:/var/log/kolla/"
with_indexed_items: osds_bootstrap|default([])
- name: Bootstrapping Ceph Cache OSDs
@ -82,4 +83,5 @@
- "{{ node_config_directory }}/ceph-osd/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "/dev/:/dev/"
- "kolla_logs:/var/log/kolla/"
with_indexed_items: osds_cache_bootstrap|default([])

View File

@ -19,6 +19,7 @@
- "/etc/localtime:/etc/localtime:ro"
- "ceph_mon:/var/lib/ceph"
- "ceph_mon_config:/etc/ceph"
- "kolla_logs:/var/log/kolla/"
- include: start_mons.yml

View File

@ -13,3 +13,4 @@
- "/etc/localtime:/etc/localtime:ro"
- "ceph_mon:/var/lib/ceph"
- "ceph_mon_config:/etc/ceph"
- "kolla_logs:/var/log/kolla/"

View File

@ -44,6 +44,7 @@
- "/etc/localtime:/etc/localtime:ro"
- "/dev/:/dev/"
- "/var/lib/ceph/osd/{{ item.1['fs_uuid'] }}:/var/lib/ceph/osd/ceph-{{ item.0.stdout }}"
- "kolla_logs:/var/log/kolla/"
with_together:
- id.results
- osds

View File

@ -8,3 +8,4 @@
volumes:
- "{{ node_config_directory }}/ceph-rgw/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "kolla_logs:/var/log/kolla/"

View File

@ -1,4 +1,8 @@
[global]
log file = /var/log/kolla/ceph/$cluster-$name.log
log to syslog = true
err to syslog = true
fsid = {{ ceph_cluster_fsid }}
mon initial members = {% for host in groups['ceph-mon'] %}{{ hostvars[host]['ansible_' + hostvars[host]['storage_interface']]['ipv4']['address'] }}{% if not loop.last %}, {% endif %}{% endfor %}
@ -19,6 +23,6 @@ mon compact on start = true
[client.radosgw.gateway]
host = {{ hostvars[inventory_hostname]['ansible_' + storage_interface]['ipv4']['address'] }}
keyring = /etc/ceph/ceph.client.radosgw.keyring
log file = /var/log/radosgw/client.radosgw.gateway.log
log file = /var/log/kolla/ceph/client.radosgw.gateway.log
rgw frontends = civetweb port={{ rgw_port }}
{% endif %}

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|ceph|cinder|heat|murano|magnum|mistral|manila)/(?P<Program>.*)\.log\.?(?P<Seq>\d*)$'
priority = ["^Seq"]
differentiator = ["Service", "_", "Program"]

View File

@ -23,6 +23,9 @@ RUN apt-get install -y --no-install-recommends \
{% endif %}
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN chmod 755 /usr/local/bin/kolla_extend_start
RUN useradd --user-group ceph \
&& mkdir -p /home/ceph \
&& chown -R ceph: /home/ceph

View File

@ -0,0 +1,8 @@
#!/bin/bash
if [[ ! -d "/var/log/kolla/ceph" ]]; then
mkdir -p /var/log/kolla/ceph
fi
if [[ $(stat -c %a /var/log/kolla/ceph) != "755" ]]; then
chmod 755 /var/log/kolla/ceph
fi

View File

@ -7,6 +7,13 @@ KEYRING_RGW="/etc/ceph/ceph.client.radosgw.keyring"
MONMAP="/etc/ceph/ceph.monmap"
MON_DIR="/var/lib/ceph/mon/ceph-${HOSTNAME}"
if [[ ! -d "/var/log/kolla/ceph" ]]; then
mkdir -p /var/log/kolla/ceph
fi
if [[ $(stat -c %a /var/log/kolla/ceph) != "755" ]]; then
chmod 755 /var/log/kolla/ceph
fi
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
# of the KOLLA_BOOTSTRAP variable being set, including empty.
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then

View File

@ -1,5 +1,12 @@
#!/bin/bash
if [[ ! -d "/var/log/kolla/ceph" ]]; then
mkdir -p /var/log/kolla/ceph
fi
if [[ $(stat -c %a /var/log/kolla/ceph) != "755" ]]; then
chmod 755 /var/log/kolla/ceph
fi
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
# of the KOLLA_BOOTSTRAP variable being set, including empty.
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then