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

Add special rsyslog filter for MSN2700 platform #112

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# This rsyslog configuration is intended to resolve the following error message that only appears on the MSN2700 platform:
keboliu marked this conversation as resolved.
Show resolved Hide resolved
# "ERR pmon#sensord: Error getting sensor data: dps460/#10: Can't read"
# This error is because of firmware issue with some type of PSU, we are not able to upgrade the FW online.
# Since there is no functional impact, this error log can be ignored safely.

if $programname contains "sensord" and $msg contains "Error getting sensor data: dps460/#" then stop
18 changes: 18 additions & 0 deletions files/image_config/platform/rc.local
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,21 @@ program_console_speed()
systemctl daemon-reload
}

handle_platform_specific_config()
{
# Mellanox MSN2700 platforms need a special rsyslog configuration to
# eliminate some non-functional error log.
# Copy this configuration file to /etc/rsyslog.d/ during first time boot.
platform_name=$1
src_file_name=/usr/share/sonic/device/$platform_name/01_mlnx_2700_syslog.conf
target_file_name=/etc/rsyslog.d/01_mlnx_2700_syslog.conf

if [ "$platform_name" = "x86_64-mlnx_msn2700a1-r0" ] || [ "$platform_name" = "x86_64-mlnx_msn2700-r0" ]; then
if [ -e $src_file_name ]; then
cp $src_file_name $target_file_name
fi
fi
}

#### Begin Main Body ####

Expand Down Expand Up @@ -396,6 +411,9 @@ if [ -f $FIRST_BOOT_FILE ]; then
# Kdump tools configuration
[ -f /etc/default/kdump-tools ] && sed -i -e "s/__PLATFORM__/$platform/g" /etc/default/kdump-tools

# Handle platform specific config
handle_platform_specific_config $platform

firsttime_exit
fi

Expand Down