Remove Rsyslog entirely

Partially implements: blueprint heka

Change-Id: I1322d2dc870e6f8fe052926995d993e8a08a25db
This commit is contained in:
Éric Lemoine 2016-02-22 08:13:58 -08:00
parent a2fe38bba5
commit 0417844b8d
12 changed files with 5 additions and 93 deletions

View File

@ -10,10 +10,6 @@ ansible_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_
ansible_tag: "{{ openstack_release }}" ansible_tag: "{{ openstack_release }}"
ansible_image_full: "{{ ansible_image }}:{{ ansible_tag }}" ansible_image_full: "{{ ansible_image }}:{{ ansible_tag }}"
rsyslog_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-rsyslog"
rsyslog_tag: "{{ openstack_release }}"
rsyslog_image_full: "{{ rsyslog_image }}:{{ rsyslog_tag }}"
heka_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-heka" heka_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-heka"
heka_tag: "{{ openstack_release }}" heka_tag: "{{ openstack_release }}"
heka_image_full: "{{ heka_image }}:{{ heka_tag }}" heka_image_full: "{{ heka_image }}:{{ heka_tag }}"

View File

@ -5,7 +5,6 @@
state: "directory" state: "directory"
recurse: yes recurse: yes
with_items: with_items:
- "rsyslog"
- "heka" - "heka"
- name: Copying over config.json files for services - name: Copying over config.json files for services
@ -13,16 +12,8 @@
src: "{{ item }}.json.j2" src: "{{ item }}.json.j2"
dest: "{{ node_config_directory }}/{{ item }}/config.json" dest: "{{ node_config_directory }}/{{ item }}/config.json"
with_items: with_items:
- "rsyslog"
- "heka" - "heka"
- name: Copying over rsyslog.conf
template:
src: "{{ item }}.conf.j2"
dest: "{{ node_config_directory }}/{{ item }}/{{ item }}.conf"
with_items:
- "rsyslog"
- name: Copying over heka config files - name: Copying over heka config files
template: template:
src: "heka-{{ item }}.toml.j2" src: "heka-{{ item }}.toml.j2"

View File

@ -1,10 +1,4 @@
--- ---
- name: Pulling rsyslog image
kolla_docker:
action: "pull_image"
common_options: "{{ docker_common_options }}"
image: "{{ rsyslog_image_full }}"
- name: Pulling kolla-toolbox image - name: Pulling kolla-toolbox image
kolla_docker: kolla_docker:
action: "pull_image" action: "pull_image"

View File

@ -1,19 +1,4 @@
--- ---
- name: Starting rsyslog container
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
environment:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
SKIP_LOG_SETUP:
image: "{{ rsyslog_image_full }}"
name: "rsyslog"
privileged: True
volumes:
- "{{ node_config_directory }}/rsyslog/:{{ container_config_directory }}/:ro"
- "rsyslog:/var/log"
- "rsyslog_socket:/var/lib/kolla/rsyslog/"
- name: Starting heka container - name: Starting heka container
kolla_docker: kolla_docker:
action: "start_container" action: "start_container"

View File

@ -1,14 +0,0 @@
# provides support for local system logging
$ModLoad imuxsock
$AddUnixListenSocket /var/lib/kolla/rsyslog/log
$ModLoad imklog
$KLogPermitNonKernelFacility on
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
$RepeatedMsgReduction on
$template DynFile,"/var/log/syslog.log"
*.* {
?DynFile
stop
}

View File

@ -1,11 +0,0 @@
{
"command": "/usr/sbin/rsyslogd -n",
"config_files": [
{
"source": "{{ container_config_directory }}/rsyslog.conf",
"dest": "/etc/rsyslog.conf",
"owner": "root",
"perm": "0644"
}
]
}

View File

@ -1,16 +1,6 @@
#!/bin/bash #!/bin/bash
set -o errexit set -o errexit
# TODO(SamYaple): After we merge Heka it should be possible to remove
# this symlink, investigate that after Heka is finalized
# NOTE(SamYaple): Setting up logging socket to /dev/log
if [[ ! "${!SKIP_LOG_SETUP[@]}" && -e /var/lib/kolla/rsyslog ]]; then
while [[ ! -S /var/lib/kolla/rsyslog/log ]]; do
sleep 1
done
sudo ln -sf /var/lib/kolla/rsyslog/log /dev/log
fi
# Wait for the log socket # Wait for the log socket
if [[ ! "${!SKIP_LOG_SETUP[@]}" && -e /var/lib/kolla/heka ]]; then if [[ ! "${!SKIP_LOG_SETUP[@]}" && -e /var/lib/kolla/heka ]]; then
while [[ ! -S /var/lib/kolla/heka/log ]]; do while [[ ! -S /var/lib/kolla/heka/log ]]; do

View File

@ -13,6 +13,6 @@ root ALL=(ALL) ALL
# anyone in the kolla group may run /usr/local/bin/kolla_set_configs as the # anyone in the kolla group may run /usr/local/bin/kolla_set_configs as the
# root user via sudo without password confirmation # root user via sudo without password confirmation
%kolla ALL=(root) NOPASSWD: /usr/local/bin/kolla_set_configs, /usr/bin/install, /bin/ln -sf /var/lib/kolla/rsyslog/log /dev/log %kolla ALL=(root) NOPASSWD: /usr/local/bin/kolla_set_configs, /usr/bin/install
#includedir /etc/sudoers.d #includedir /etc/sudoers.d

View File

@ -1,16 +0,0 @@
FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
MAINTAINER {{ maintainer }}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
RUN yum -y install rsyslog \
&& yum clean all
{% elif base_distro in ['ubuntu', 'debian'] %}
RUN apt-get install -y --no-install-recommends rsyslog \
&& apt-get clean
{% endif %}
{{ include_footer }}

View File

@ -27,8 +27,7 @@ _PROFILE_OPTS = [
cfg.ListOpt('infra', cfg.ListOpt('infra',
default=['ceph', 'mariadb', 'haproxy', default=['ceph', 'mariadb', 'haproxy',
'keepalived', 'kolla-toolbox', 'memcached', 'keepalived', 'kolla-toolbox', 'memcached',
'mongodb', 'openvswitch', 'rabbitmq', 'rsyslog', 'mongodb', 'openvswitch', 'rabbitmq', 'heka'],
'heka'],
help='Infra images'), help='Infra images'),
cfg.ListOpt('main', cfg.ListOpt('main',
default=['cinder', 'ceilometer', 'glance', 'heat', default=['cinder', 'ceilometer', 'glance', 'heat',
@ -43,12 +42,12 @@ _PROFILE_OPTS = [
default=['kolla-toolbox', 'glance', 'haproxy', default=['kolla-toolbox', 'glance', 'haproxy',
'heat', 'horizon', 'keepalived', 'keystone', 'heat', 'horizon', 'keepalived', 'keystone',
'memcached', 'mariadb', 'neutron', 'nova', 'memcached', 'mariadb', 'neutron', 'nova',
'openvswitch', 'rabbitmq', 'rsyslog', 'heka'], 'openvswitch', 'rabbitmq', 'heka'],
help='Default images'), help='Default images'),
cfg.ListOpt('gate', cfg.ListOpt('gate',
default=['glance', 'haproxy', 'keepalived', 'keystone', default=['glance', 'haproxy', 'keepalived', 'keystone',
'kolla-toolbox', 'mariadb', 'memcached', 'neutron', 'kolla-toolbox', 'mariadb', 'memcached', 'neutron',
'nova', 'openvswitch', 'rabbitmq', 'rsyslog', 'heka'], 'nova', 'openvswitch', 'rabbitmq', 'heka'],
help='Gate images'), help='Gate images'),
cfg.ListOpt('mesos', cfg.ListOpt('mesos',
default=['chronos', 'marathon', 'mesos-master', 'mesos-slave', default=['chronos', 'marathon', 'mesos-master', 'mesos-slave',

View File

@ -31,7 +31,6 @@ else
nova_{scheduler,novncproxy,consoleauth,conductor,api,compute,libvirt,spicehtml5proxy,compute_ironic} \ nova_{scheduler,novncproxy,consoleauth,conductor,api,compute,libvirt,spicehtml5proxy,compute_ironic} \
openvswitch_{vswitchd,db} \ openvswitch_{vswitchd,db} \
rabbitmq{,_bootstrap} \ rabbitmq{,_bootstrap} \
rsyslog \
heka \ heka \
swift_{account_{auditor,reaper,replicator,server},container_{auditor,replicator,server,updater},object_{auditor,expirer,replicator,server,updater},proxy_server,rsyncd} swift_{account_{auditor,reaper,replicator,server},container_{auditor,replicator,server,updater},object_{auditor,expirer,replicator,server,updater},proxy_server,rsyncd}
) )
@ -48,7 +47,6 @@ else
ceph_mon{,_config} \ ceph_mon{,_config} \
rabbitmq \ rabbitmq \
mongodb \ mongodb \
rsyslog{,_socket} \
haproxy_socket \ haproxy_socket \
heka{,_socket} \ heka{,_socket} \
kolla_logs kolla_logs

View File

@ -9,7 +9,7 @@ export KOLLA_BASE=$1
export KOLLA_TYPE=$2 export KOLLA_TYPE=$2
function copy_logs { function copy_logs {
docker cp rsyslog:/var/log/ /tmp/logs docker cp heka:/var/log/kolla /tmp/logs
} }
function check_failure { function check_failure {