Skip to content

Commit

Permalink
sync docker-orchagent modifications
Browse files Browse the repository at this point in the history
  • Loading branch information
sonic-otn committed Oct 12, 2024
1 parent dde9ee7 commit bc91982
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
10 changes: 6 additions & 4 deletions dockers/docker-orchagent-ot/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,11 @@ RUN sonic-cfggen -t /usr/share/sonic/templates/docker-init.j2 > /usr/bin/docker-
RUN rm -f /usr/share/sonic/templates/docker-init.j2
RUN chmod 755 /usr/bin/docker-init.sh

# Create swss rsyslog_plugin conf file
RUN j2 -f json /etc/rsyslog.d/rsyslog_plugin.conf.j2 /etc/rsyslog.d/events_info.json > /etc/rsyslog.d/swss_events.conf
RUN rm -f /etc/rsyslog.d/rsyslog_plugin.conf.j2
RUN rm -f /etc/rsyslog.d/events_info.json
RUN mkdir -p /usr/share/sonic/templates/rsyslog_plugin

# Copy rsyslog plugin configuration file and regexes to docker
COPY ["swss_regex.json", "/etc/rsyslog.d/"]
COPY ["events_info.json", "/usr/share/sonic/templates/rsyslog_plugin/"]
COPY ["files/rsyslog_plugin.conf.j2", "/usr/share/sonic/templates/rsyslog_plugin/"]

ENTRYPOINT ["/usr/bin/docker-init.sh"]
3 changes: 3 additions & 0 deletions dockers/docker-orchagent-ot/docker-init.j2
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,7 @@ TZ=$(cat /etc/timezone)
rm -rf /etc/localtime
ln -sf /usr/share/zoneinfo/$TZ /etc/localtime

export EVENTD_STATE=$(sonic-db-cli -s CONFIG_DB HGET 'FEATURE|eventd' 'state')
j2 -f json --import-env=ENVIRONMENT /usr/share/sonic/templates/rsyslog_plugin/rsyslog_plugin.conf.j2 /usr/share/sonic/templates/rsyslog_plugin/events_info.json > /etc/rsyslog.d/swss_events.conf

exec /usr/local/bin/supervisord

0 comments on commit bc91982

Please sign in to comment.