Add action to default rsyslog.conf so supervisor starts correctly the first time

This commit is contained in:
Christian Adams 2020-04-08 16:25:01 -04:00
parent f7dac8e68d
commit 5d54877183
5 changed files with 17 additions and 4 deletions

View File

@ -4,3 +4,4 @@ $IncludeConfig /var/lib/awx/rsyslog/conf.d/*.conf
$ModLoad imuxsock
input(type="imuxsock" Socket="/var/run/rsyslog/rsyslog.sock" unlink="on")
template(name="awx" type="string" string="%msg%")
action(type="omfile" file="/dev/null")

View File

@ -144,6 +144,13 @@
mode: '0700'
delegate_to: localhost
- name: Stage rsyslog.conf
copy:
src: rsyslog.conf
dest: "{{ docker_base_path }}/rsyslog.conf"
mode: '0700'
delegate_to: localhost
- name: Stage supervisor.conf
copy:
src: supervisor.conf

View File

@ -97,7 +97,7 @@ RUN cd /usr/local/bin && \
curl -L https://github.com/openshift/origin/releases/download/v3.11.0/openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit.tar.gz | \
tar -xz --strip-components=1 --wildcards --no-anchored 'oc'
ADD rsyslog.repo /etc/yum.repos.d/
ADD rsyslog.repo /etc/yum.repos.d/rsyslog.repo
RUN yum install -y rsyslog-omhttp
# Pre-create things that we need to write to
@ -115,10 +115,9 @@ RUN find /var/lib/awx -not -path '/var/lib/awx/venv*' | xargs chgrp root && \
chmod +rx /usr/bin/config-watcher && \
chmod u+s /usr/bin/bwrap # https://github.com/ansible/awx/issues/5224
# Create default awx rsyslog.conf
# Create default awx rsyslog config
ADD rsyslog.conf /var/lib/awx/rsyslog/rsyslog.conf
RUN ln -sf /dev/stdout /var/log/nginx/access.log && \
ln -sf /dev/stderr /var/log/nginx/error.log

View File

@ -6,4 +6,9 @@ metadata:
data:
rsyslog-config: |
$WorkDirectory /var/lib/awx/rsyslog
$MaxMessageSize 700000
$IncludeConfig /var/lib/awx/rsyslog/conf.d/*.conf
$ModLoad imuxsock
input(type="imuxsock" Socket="/var/run/rsyslog/rsyslog.sock" unlink="on")
template(name="awx" type="string" string="%msg%")
action(type="omfile" file="/dev/null")

View File

@ -4,3 +4,4 @@ $IncludeConfig /var/lib/awx/rsyslog/conf.d/*.conf
$ModLoad imuxsock
input(type="imuxsock" Socket="/var/run/rsyslog/rsyslog.sock" unlink="on")
template(name="awx" type="string" string="%msg%")
action(type="omfile" file="/dev/null")