Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to support bcmsh and swss logs on multi npu platforms #4783

Closed
wants to merge 30 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
6a4d512
Changes to support bcmsh and swss logs on multi npu platforms
arlakshm Jun 16, 2020
ea3607f
minor fix
arlakshm Jun 16, 2020
8db1174
minor fix and bcmsh changes
arlakshm Jun 17, 2020
c660fc9
minor fixes
arlakshm Jun 17, 2020
5f16e96
Add the test signing certificates for secure boot (#4866)
xumia Jun 29, 2020
ef994a1
syslog changes Multi ASIC platforms (#4738)
arlakshm Jun 30, 2020
22bf545
[sonic-platform-common] Update submodule (#4871)
vboykox Jun 30, 2020
ba234ab
[mellanox]: Update SAI to 1.16.5 (#4873)
keboliu Jun 30, 2020
6e1ae35
Support for connecting to DB in namespace via TCP port in multi-asic …
judyjoseph Jun 30, 2020
ed7fafc
[sonic-sairedis] sonic-sairedis submodule update (#4847)
smaheshm Jun 30, 2020
2187144
[docker-nat]: Updated the NAT iptables patch for 4.19 buster (#4843)
AkhileshSamineni Jul 1, 2020
243268f
Fix in libsaibcm for high CPU utilization of syncd (#4874)
smaheshm Jul 1, 2020
e66cb47
[sonic-buildimage] Changes to make network specific sysctl common for…
abdosi Jul 1, 2020
2e0aa4f
[pfx_filter]: Add a prefix mask by default in pfx_filter, when there …
pavel-shirshov Jul 2, 2020
b72fed7
Tests of FRR templates which rendered by sonic-cfggen (#4875)
pavel-shirshov Jul 2, 2020
cae65a4
[config]: Loopback Interface changes for multi ASIC devices (#4825)
arlakshm Jul 2, 2020
a4253af
Added new pip packages, required by kube.py (kubernetes CLI). (#4884)
renukamanavalan Jul 2, 2020
5f31842
Revert "[config]: Loopback Interface changes for multi ASIC devices (…
lguohan Jul 3, 2020
c4b5b00
[docker-orchagent]: make build depends only on sairedis package (#4880)
lguohan Jul 3, 2020
eebca91
[Dell]: DellEMC S6100 disable pericom/xlinx chipset (#4868)
Jul 3, 2020
4240c8c
[sonic-platform-daemons] Update submodule (#4887)
jleveque Jul 3, 2020
0a260b7
[docker-orchagent]: upgrade docker-orchagent to buster (#4889)
lguohan Jul 3, 2020
90dcbe1
[barefoot][SAI v1.6.3] Update SAI and platform packages to 20200701 (…
vboykox Jul 3, 2020
405033b
Fix dpkg cache hash value relative to file path issue (#4894)
xumia Jul 4, 2020
20698aa
Skip thermalctld for arista platforms (#4893)
zzhiyuan Jul 5, 2020
e62b5f6
Merge remote-tracking branch 'arlakshm/master' into mnpu_bcmsh_fix
arlakshm Jul 5, 2020
969a914
Address review comments.
arlakshm Jul 6, 2020
eb90fa0
address review comment
arlakshm Jul 6, 2020
afa4f1a
address review comment
arlakshm Jul 6, 2020
32a34f9
address review comment
arlakshm Jul 6, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile.cache
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
# Run the 'touch cache.skip.common' command in the base directory to exclude the common files from caching
SONIC_COMMON_FILES_LIST := $(if $(wildcard cache.skip.common),, .platform slave.mk rules/functions Makefile.cache)
SONIC_COMMON_FLAGS_LIST := $(CONFIGURED_PLATFORM) \
$(SONIC_DPKG_CACHE_SOURCE) $(SONIC_DEBUGGING_ON) \
$(SONIC_DEBUGGING_ON) \
$(SONIC_PROFILING_ON) $(SONIC_ENABLE_SYNCD_RPC)
SONIC_COMMON_DPKG_LIST := debian/control debian/changelog debian/rules \
debian/compat debian/install debian/copyright
Expand Down
57 changes: 11 additions & 46 deletions build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -389,61 +389,26 @@ rm /files/lib/systemd/system/rsyslog.service/Service/ExecStart/arguments
set /files/lib/systemd/system/rsyslog.service/Service/ExecStart/arguments/1 -n
"

## Config sysctl
sudo mkdir -p $FILESYSTEM_ROOT/var/core

# Config sysctl
sudo augtool --autosave "
set /files/etc/sysctl.conf/kernel.core_pattern '|/usr/bin/coredump-compress %e %t %p'

set /files/etc/sysctl.conf/kernel.softlockup_panic 1
set /files/etc/sysctl.conf/kernel.panic 10
set /files/etc/sysctl.conf/vm.panic_on_oom 2
set /files/etc/sysctl.conf/fs.suid_dumpable 2
" -r $FILESYSTEM_ROOT

set /files/etc/sysctl.conf/net.ipv4.conf.default.forwarding 1
set /files/etc/sysctl.conf/net.ipv4.conf.all.forwarding 1
set /files/etc/sysctl.conf/net.ipv4.conf.eth0.forwarding 0

set /files/etc/sysctl.conf/net.ipv4.conf.default.arp_accept 0
set /files/etc/sysctl.conf/net.ipv4.conf.default.arp_announce 0
set /files/etc/sysctl.conf/net.ipv4.conf.default.arp_filter 0
set /files/etc/sysctl.conf/net.ipv4.conf.default.arp_notify 0
set /files/etc/sysctl.conf/net.ipv4.conf.default.arp_ignore 0
set /files/etc/sysctl.conf/net.ipv4.conf.all.arp_accept 0
set /files/etc/sysctl.conf/net.ipv4.conf.all.arp_announce 1
set /files/etc/sysctl.conf/net.ipv4.conf.all.arp_filter 0
set /files/etc/sysctl.conf/net.ipv4.conf.all.arp_notify 1
set /files/etc/sysctl.conf/net.ipv4.conf.all.arp_ignore 2

set /files/etc/sysctl.conf/net.ipv4.neigh.default.base_reachable_time_ms 1800000
set /files/etc/sysctl.conf/net.ipv6.neigh.default.base_reachable_time_ms 1800000
set /files/etc/sysctl.conf/net.ipv4.neigh.default.gc_thresh1 1024
set /files/etc/sysctl.conf/net.ipv6.neigh.default.gc_thresh1 1024
set /files/etc/sysctl.conf/net.ipv4.neigh.default.gc_thresh2 2048
set /files/etc/sysctl.conf/net.ipv6.neigh.default.gc_thresh2 2048
set /files/etc/sysctl.conf/net.ipv4.neigh.default.gc_thresh3 4096
set /files/etc/sysctl.conf/net.ipv6.neigh.default.gc_thresh3 4096

set /files/etc/sysctl.conf/net.ipv6.conf.default.forwarding 1
set /files/etc/sysctl.conf/net.ipv6.conf.all.forwarding 1
set /files/etc/sysctl.conf/net.ipv6.conf.eth0.forwarding 0

set /files/etc/sysctl.conf/net.ipv6.conf.default.accept_dad 0
set /files/etc/sysctl.conf/net.ipv6.conf.all.accept_dad 0
set /files/etc/sysctl.conf/net.ipv6.conf.eth0.accept_dad 0

set /files/etc/sysctl.conf/net.ipv6.conf.default.keep_addr_on_down 1
set /files/etc/sysctl.conf/net.ipv6.conf.all.keep_addr_on_down 1
set /files/etc/sysctl.conf/net.ipv6.conf.eth0.keep_addr_on_down 1

set /files/etc/sysctl.conf/net.ipv4.tcp_l3mdev_accept 1
set /files/etc/sysctl.conf/net.ipv4.udp_l3mdev_accept 1

set /files/etc/sysctl.conf/net.core.rmem_max 2097152
set /files/etc/sysctl.conf/net.core.wmem_max 2097152

set /files/etc/sysctl.conf/net.core.somaxconn 512
sysctl_net_cmd_string=""
while read line; do
[[ "$line" =~ ^#.*$ ]] && continue
sysctl_net_conf_key=`echo $line | awk -F '=' '{print $1}'`
sysctl_net_conf_value=`echo $line | awk -F '=' '{print $2}'`
sysctl_net_cmd_string=$sysctl_net_cmd_string"set /files/etc/sysctl.conf/$sysctl_net_conf_key $sysctl_net_conf_value"$'\n'
done < files/image_config/sysctl/sysctl-net.conf

" -r $FILESYSTEM_ROOT
sudo augtool --autosave "$sysctl_net_cmd_string" -r $FILESYSTEM_ROOT

## docker Python API package is needed by Ansible docker module
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip install 'docker==4.1.0'
Expand Down
10 changes: 9 additions & 1 deletion build_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,15 @@ elif [ "$IMAGE_TYPE" = "aboot" ]; then
if [ "$SONIC_ENABLE_IMAGE_SIGNATURE" = "y" ]; then
TARGET_CA_CERT="$TARGET_PATH/ca.cert"
rm -f "$TARGET_CA_CERT"
[ -f "$CA_CERT" ] && cp "$CA_CERT" "$TARGET_CA_CERT"

# If the ca certificate does not exist, the test certificate will be used to sign the image
if [ ! -f "$CA_CERT" ]; then
TEST_CERT_PATH=files/image_config/secureboot/test-certs
CA_CERT="${TEST_CERT_PATH}/ca.cert"
SIGNING_KEY="${TEST_CERT_PATH}/signing.key"
SIGNING_CERT="${TEST_CERT_PATH}/signing.cert"
fi
cp "$CA_CERT" "$TARGET_CA_CERT"
./scripts/sign_image.sh -i "$OUTPUT_ABOOT_IMAGE" -k "$SIGNING_KEY" -c "$SIGNING_CERT" -a "$TARGET_CA_CERT"
fi
else
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"skip_thermalctld": true
}

1 change: 1 addition & 0 deletions dockers/docker-database/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ COPY ["docker-database-init.sh", "/usr/local/bin/"]
COPY ["database_config.json.j2", "/usr/share/sonic/templates/"]
COPY ["database_global.json.j2", "/usr/share/sonic/templates/"]
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
COPY ["files/sysctl-net.conf", "/etc/sysctl.d/"]
COPY ["critical_processes", "/etc/supervisor"]

ENTRYPOINT ["/usr/local/bin/docker-database-init.sh"]
2 changes: 1 addition & 1 deletion dockers/docker-database/database_config.json.j2
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"INSTANCES": {
"redis":{
"hostname" : "127.0.0.1",
"hostname" : "{{HOST_IP}}",
"port" : 6379,
"unix_socket_path" : "/var/run/redis{{NAMESPACE_ID}}/redis.sock",
"persistence_for_warm_boot" : "yes"
Expand Down
19 changes: 18 additions & 1 deletion dockers/docker-database/docker-database-init.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,29 @@
#!/usr/bin/env bash

# For linux host namespace, in both single and multi ASIC platform use the loopback interface
# For other namespaces, use eth0 interface which is connected to the docker0 bridge in the host.
if [[ $NAMESPACE_ID == "" ]]
then
INTFC=lo
else
INTFC=eth0
fi

# Get the ip address of the interface
# if the ip address was not retrieved correctly, put localhost(127.0.0.1) as the default.
host_ip=$(ip -4 -o addr show $INTFC | awk '{print $4}' | cut -d'/' -f1 | head -1)
if [[ $host_ip == "" ]]
then
host_ip=127.0.0.1
fi

REDIS_DIR=/var/run/redis$NAMESPACE_ID
mkdir -p $REDIS_DIR/sonic-db

if [ -f /etc/sonic/database_config$NAMESPACE_ID.json ]; then
cp /etc/sonic/database_config$NAMESPACE_ID.json $REDIS_DIR/sonic-db/database_config.json
else
j2 /usr/share/sonic/templates/database_config.json.j2 > $REDIS_DIR/sonic-db/database_config.json
HOST_IP=$host_ip j2 /usr/share/sonic/templates/database_config.json.j2 > $REDIS_DIR/sonic-db/database_config.json
fi

mkdir -p /etc/supervisor/conf.d/
Expand Down
7 changes: 6 additions & 1 deletion dockers/docker-database/supervisord.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ stderr_logfile=syslog
{% if INSTANCES %}
{% for redis_inst, redis_items in INSTANCES.iteritems() %}
[program: {{ redis_inst }}]
command=/bin/bash -c "{ [[ -s /var/lib/{{ redis_inst }}/dump.rdb ]] || rm -f /var/lib/{{ redis_inst }}/dump.rdb; } && mkdir -p /var/lib/{{ redis_inst }} && exec /usr/bin/redis-server /etc/redis/redis.conf --port {{ redis_items['port'] }} --unixsocket {{ redis_items['unix_socket_path'] }} --pidfile /var/run/redis/{{ redis_inst }}.pid --dir /var/lib/{{ redis_inst }}"
{% if redis_items['hostname'] != '127.0.0.1' %}
{%- set LOOPBACK_IP = '127.0.0.1' -%}
{%- else -%}
{%- set LOOPBACK_IP = '' -%}
{%- endif -%}
command=/bin/bash -c "{ [[ -s /var/lib/{{ redis_inst }}/dump.rdb ]] || rm -f /var/lib/{{ redis_inst }}/dump.rdb; } && mkdir -p /var/lib/{{ redis_inst }} && exec /usr/bin/redis-server /etc/redis/redis.conf --bind {{ LOOPBACK_IP }} {{ redis_items['hostname'] }} --port {{ redis_items['port'] }} --unixsocket {{ redis_items['unix_socket_path'] }} --pidfile /var/run/redis/{{ redis_inst }}.pid --dir /var/lib/{{ redis_inst }}"
priority=2
autostart=true
autorestart=false
Expand Down
1 change: 1 addition & 0 deletions dockers/docker-fpm-frr/frr/bgpd/bgpd.main.conf.j2
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{% from "common/functions.conf.j2" import get_ipv4_loopback_address, get_ipv6_loopback_address %}
!
! template: bgpd/bgpd.main.conf.j2
!
Expand Down
2 changes: 1 addition & 1 deletion dockers/docker-orchagent/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %}
FROM docker-config-engine-stretch
FROM docker-config-engine-buster

ARG docker_container_name
RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf
Expand Down
27 changes: 26 additions & 1 deletion files/build_templates/docker_image_ctl.j2
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,22 @@ link_namespace() {
}
{%- endif %}

function updateSyslogConf()
{
# On multiNPU platforms, change the syslog target ip to docker0 ip to allow logs from containers
# running on the namespace to reach the rsyslog service running on the host
# Also update the container name
if [[ ($NUM_ASIC -gt 1) ]]; then
TARGET_IP=$(docker network inspect bridge --format={{ "'{{(index .IPAM.Config 0).Gateway}}'" }})
CONTAINER_NAME="{{docker_container_name}}$DEV"
TMP_FILE="/tmp/rsyslog.$CONTAINER_NAME.conf"

sonic-cfggen -t /usr/share/sonic/templates/rsyslog-container.conf.j2 -a "{\"target_ip\": \"$TARGET_IP\", \"container_name\": \"$CONTAINER_NAME\" }" > $TMP_FILE
docker cp $TMP_FILE {{docker_container_name}}$DEV:/etc/rsyslog.conf
rm -rf $TMP_FILE
fi
}

function getMountPoint()
{
echo $1 | python -c "import sys, json, os; mnts = [x for x in json.load(sys.stdin)[0]['Mounts'] if x['Destination'] == '/usr/share/sonic/hwsku']; print '' if len(mnts) == 0 else os.path.basename(mnts[0]['Source'])" 2>/dev/null
Expand Down Expand Up @@ -68,13 +84,14 @@ function preStartAction()
{%- else %}
: # nothing
{%- endif %}
updateSyslogConf
}

function postStartAction()
{
{%- if docker_container_name == "database" %}
if [ "$DEV" ]; then
docker exec -i database$DEV sysctl -w net.ipv6.conf.all.disable_ipv6=0
docker exec -i database$DEV sysctl --system -e
link_namespace $DEV
fi

Expand Down Expand Up @@ -282,6 +299,14 @@ start() {
--tmpfs /tmp \
{%- endif %}
{%- endif %}
{%- if sonic_asic_platform == "broadcom" %}
{%- if docker_container_name == "syncd" %}
-v /var/run/docker-syncd$DEV:/var/run/sswsyncd \
{%- endif %}
{%- endif %}
{%- if docker_container_name == "swss" %}
-v /var/log/swss$DEV:/var/log/swss:rw \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we know if logrotate works if changed the place?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added changes for logrotation in the latest commit

{%- endif %}
{%- if docker_container_name == "bgp" %}
-v /etc/sonic/frr/$DEV:/etc/frr:rw \
{%- endif %}
Expand Down
3 changes: 2 additions & 1 deletion files/build_templates/sonic_debian_extension.j2
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ echo "warmboot-finalizer.service" | sudo tee -a $GENERATED_SERVICE_FILE
sudo cp $IMAGE_CONFIGS/rsyslog/rsyslog-config.service $FILESYSTEM_ROOT_USR_LIB_SYSTEMD_SYSTEM
sudo cp $IMAGE_CONFIGS/rsyslog/rsyslog-config.sh $FILESYSTEM_ROOT/usr/bin/
sudo cp $IMAGE_CONFIGS/rsyslog/rsyslog.conf.j2 $FILESYSTEM_ROOT_USR_SHARE_SONIC_TEMPLATES/
sudo cp $IMAGE_CONFIGS/rsyslog/rsyslog-container.conf.j2 $FILESYSTEM_ROOT_USR_SHARE_SONIC_TEMPLATES/
sudo cp $IMAGE_CONFIGS/rsyslog/rsyslog.d/* $FILESYSTEM_ROOT/etc/rsyslog.d/
echo "rsyslog-config.service" | sudo tee -a $GENERATED_SERVICE_FILE

Expand All @@ -251,7 +252,7 @@ sudo cp $IMAGE_CONFIGS/syslog/host_umount.sh $FILESYSTEM_ROOT/usr/bin/

# Copy logrotate.d configuration files
sudo cp -f $IMAGE_CONFIGS/logrotate/logrotate.d/* $FILESYSTEM_ROOT/etc/logrotate.d/

sudo cp $IMAGE_CONFIGS/logrotate/logrotate-rsyslog.j2 $FILESYSTEM_ROOT_USR_SHARE_SONIC_TEMPLATES/
# Copy systemd-journald configuration files
sudo cp -f $IMAGE_CONFIGS/systemd/journald.conf $FILESYSTEM_ROOT/etc/systemd/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,15 @@
/var/log/telemetry.log
/var/log/quagga/bgpd.log
/var/log/quagga/zebra.log
{% if namespaces > 1 %}
{% for ns in range(namespaces) %}
/var/log/swss{{ns}}/sairedis.rec
/var/log/swss{{ns}}/swss.rec
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am curious about other logs such as quagga, teamd? they are also running in the each namespace? are we aggregating all of them into one log file?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i am not fan using templating everywhere. I think a better solution here is to add option to both swss and sairedis to allow specify the log file name, and we can use swss.asic{n}.rec, sairedis.asic{n}.rec. then, we do not need to use template for rsyslog file.

In the future, if we need to dynamically incrase the asic number of the platform, there is no need to change this file.

{% endfor %}
{% else %}
/var/log/swss/sairedis.rec
/var/log/swss/swss.rec
{% endif %}
{
size 1M
rotate 5000
Expand Down Expand Up @@ -84,10 +91,20 @@
done
endscript
postrotate
{% if namespaces > 1 %}
{% for ns in range(namespaces) %}
if [ $(echo $1 | grep -c "/var/log/swss{{ns}}/") -gt 0 ]; then
pgrep -x orchagent | xargs /bin/kill -HUP 2>/dev/null || true
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will this kill all orchagent instances?

Copy link
Collaborator

@lguohan lguohan Jul 8, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you probably do not need to do template here since, logrotate will pass the absolute path to the log file to this postrotate script, and from that absoluate path, you will know whethere it is multiasic or not, and which asic id it is if it is multi-asic.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe you should get into the container and do the pkill

else
/bin/kill -HUP $(cat /var/run/rsyslogd.pid)
fi
{% endfor %}
{% else %}
if [ $(echo $1 | grep -c "/var/log/swss/") -gt 0 ]; then
pgrep -x orchagent | xargs /bin/kill -HUP 2>/dev/null || true
else
/bin/kill -HUP $(cat /var/run/rsyslogd.pid)
fi
{% endif %}
endscript
}
24 changes: 23 additions & 1 deletion files/image_config/rsyslog/rsyslog-config.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,26 @@
#!/bin/bash

sonic-cfggen -d -t /usr/share/sonic/templates/rsyslog.conf.j2 >/etc/rsyslog.conf
PLATFORM=`sonic-cfggen -H -v DEVICE_METADATA.localhost.platform`

# Parse the device specific asic conf file, if it exists
ASIC_CONF=/usr/share/sonic/device/$PLATFORM/asic.conf
if [ -f "$ASIC_CONF" ]; then
source $ASIC_CONF
fi

# On Multi NPU platforms we need to start the rsyslog server on the docker0 ip address
# for the syslogs from the containers in the namespaces to work.
# on Single NPU platforms we continue to use loopback adddres

if [[ ($NUM_ASIC -gt 1) ]]; then
udp_server_ip=$(ip -o -4 addr list docker0 | awk '{print $4}' | cut -d/ -f1)
else
udp_server_ip=$(ip -o -4 addr list lo scope host | awk '{print $4}' | cut -d/ -f1)
fi

sonic-cfggen -d -t /usr/share/sonic/templates/rsyslog.conf.j2 -a "{\"udp_server_ip\": \"$udp_server_ip\"}" >/etc/rsyslog.conf

#Render the logrotate config files for rsyslog as well.
sonic-cfggen -d -t /usr/share/sonic/templates/logrotate-rsyslog.j2 -a "{\"namespaces\": $NUM_ASIC}" > /etc/logrotate.d/rsyslog

systemctl restart rsyslog