Make Heka collect Ceph logs
Fix in stable/mitaka Closes-Bug: #1570529 Change-Id: I898837f25cf1c23aaf16055e6d4a0ed086c1ae9f
This commit is contained in:
parent
03670f9f83
commit
a24aefe83d
|
@ -50,6 +50,7 @@
|
||||||
volumes:
|
volumes:
|
||||||
- "{{ node_config_directory }}/ceph-osd/:{{ container_config_directory }}/:ro"
|
- "{{ node_config_directory }}/ceph-osd/:{{ container_config_directory }}/:ro"
|
||||||
- "/dev/:/dev/"
|
- "/dev/:/dev/"
|
||||||
|
- "kolla_logs:/var/log/kolla/"
|
||||||
with_indexed_items: osds_bootstrap|default([])
|
with_indexed_items: osds_bootstrap|default([])
|
||||||
|
|
||||||
- name: Bootstrapping Ceph Cache OSDs
|
- name: Bootstrapping Ceph Cache OSDs
|
||||||
|
@ -80,4 +81,5 @@
|
||||||
volumes:
|
volumes:
|
||||||
- "{{ node_config_directory }}/ceph-osd/:{{ container_config_directory }}/:ro"
|
- "{{ node_config_directory }}/ceph-osd/:{{ container_config_directory }}/:ro"
|
||||||
- "/dev/:/dev/"
|
- "/dev/:/dev/"
|
||||||
|
- "kolla_logs:/var/log/kolla/"
|
||||||
with_indexed_items: osds_cache_bootstrap|default([])
|
with_indexed_items: osds_cache_bootstrap|default([])
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
- "{{ node_config_directory }}/ceph-mon/:{{ container_config_directory }}/:ro"
|
- "{{ node_config_directory }}/ceph-mon/:{{ container_config_directory }}/:ro"
|
||||||
- "ceph_mon:/var/lib/ceph"
|
- "ceph_mon:/var/lib/ceph"
|
||||||
- "ceph_mon_config:/etc/ceph"
|
- "ceph_mon_config:/etc/ceph"
|
||||||
|
- "kolla_logs:/var/log/kolla/"
|
||||||
|
|
||||||
- include: start_mons.yml
|
- include: start_mons.yml
|
||||||
|
|
||||||
|
|
|
@ -12,3 +12,4 @@
|
||||||
- "{{ node_config_directory }}/ceph-mon/:{{ container_config_directory }}/:ro"
|
- "{{ node_config_directory }}/ceph-mon/:{{ container_config_directory }}/:ro"
|
||||||
- "ceph_mon:/var/lib/ceph"
|
- "ceph_mon:/var/lib/ceph"
|
||||||
- "ceph_mon_config:/etc/ceph"
|
- "ceph_mon_config:/etc/ceph"
|
||||||
|
- "kolla_logs:/var/log/kolla/"
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
- "{{ node_config_directory }}/ceph-osd/:{{ container_config_directory }}/:ro"
|
- "{{ node_config_directory }}/ceph-osd/:{{ container_config_directory }}/:ro"
|
||||||
- "/dev/:/dev/"
|
- "/dev/:/dev/"
|
||||||
- "/var/lib/ceph/osd/{{ item.1['fs_uuid'] }}:/var/lib/ceph/osd/ceph-{{ item.0.stdout }}"
|
- "/var/lib/ceph/osd/{{ item.1['fs_uuid'] }}:/var/lib/ceph/osd/ceph-{{ item.0.stdout }}"
|
||||||
|
- "kolla_logs:/var/log/kolla/"
|
||||||
with_together:
|
with_together:
|
||||||
- id.results
|
- id.results
|
||||||
- osds
|
- osds
|
||||||
|
|
|
@ -5,4 +5,6 @@
|
||||||
common_options: "{{ docker_common_options }}"
|
common_options: "{{ docker_common_options }}"
|
||||||
image: "{{ ceph_rgw_image_full }}"
|
image: "{{ ceph_rgw_image_full }}"
|
||||||
name: "ceph_rgw"
|
name: "ceph_rgw"
|
||||||
volumes: "{{ node_config_directory }}/ceph-rgw/:{{ container_config_directory }}/:ro"
|
volumes:
|
||||||
|
- "{{ node_config_directory }}/ceph-rgw/:{{ container_config_directory }}/:ro"
|
||||||
|
- "kolla_logs:/var/log/kolla/"
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
[global]
|
[global]
|
||||||
|
log file = /var/log/kolla/ceph/$cluster-$name.log
|
||||||
|
log to syslog = true
|
||||||
|
err to syslog = true
|
||||||
|
|
||||||
fsid = {{ ceph_cluster_fsid }}
|
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 %}
|
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]
|
[client.radosgw.gateway]
|
||||||
host = {{ hostvars[inventory_hostname]['ansible_' + storage_interface]['ipv4']['address'] }}
|
host = {{ hostvars[inventory_hostname]['ansible_' + storage_interface]['ipv4']['address'] }}
|
||||||
keyring = /etc/ceph/ceph.client.radosgw.keyring
|
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={{ hostvars[inventory_hostname]['ansible_' + storage_interface]['ipv4']['address'] }}:{{ rgw_port }}
|
rgw frontends = civetweb port={{ hostvars[inventory_hostname]['ansible_' + storage_interface]['ipv4']['address'] }}:{{ rgw_port }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -6,6 +6,6 @@ filename = "lua_decoders/os_openstack_log.lua"
|
||||||
type = "LogstreamerInput"
|
type = "LogstreamerInput"
|
||||||
decoder = "openstack_log_decoder"
|
decoder = "openstack_log_decoder"
|
||||||
log_directory = "/var/log/kolla"
|
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"]
|
priority = ["^Seq"]
|
||||||
differentiator = ["Service", "_", "Program"]
|
differentiator = ["Service", "_", "Program"]
|
||||||
|
|
|
@ -23,6 +23,9 @@ RUN apt-get install -y --no-install-recommends \
|
||||||
|
|
||||||
{% endif %}
|
{% 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 \
|
RUN useradd --user-group ceph \
|
||||||
&& mkdir -p /home/ceph \
|
&& mkdir -p /home/ceph \
|
||||||
&& chown -R ceph: /home/ceph
|
&& chown -R ceph: /home/ceph
|
||||||
|
|
|
@ -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
|
|
@ -7,6 +7,13 @@ KEYRING_RGW="/etc/ceph/ceph.client.radosgw.keyring"
|
||||||
MONMAP="/etc/ceph/ceph.monmap"
|
MONMAP="/etc/ceph/ceph.monmap"
|
||||||
MON_DIR="/var/lib/ceph/mon/ceph-${HOSTNAME}"
|
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
|
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
|
||||||
# of the KOLLA_BOOTSTRAP variable being set, including empty.
|
# of the KOLLA_BOOTSTRAP variable being set, including empty.
|
||||||
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
|
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
|
||||||
|
|
|
@ -1,5 +1,12 @@
|
||||||
#!/bin/bash
|
#!/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
|
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
|
||||||
# of the KOLLA_BOOTSTRAP variable being set, including empty.
|
# of the KOLLA_BOOTSTRAP variable being set, including empty.
|
||||||
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
|
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
|
||||||
|
|
Loading…
Reference in New Issue