diff --git a/device/mellanox/x86_64-mlnx_msn2700-r0/01_mlnx_2700_syslog.conf b/device/mellanox/x86_64-mlnx_msn2700-r0/01_mlnx_2700_syslog.conf new file mode 100644 index 000000000000..0f2ec71581de --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn2700-r0/01_mlnx_2700_syslog.conf @@ -0,0 +1,6 @@ +# This rsyslog configuration is intended to resolve the following error message that only appears on the MSN2700 platform: +# "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 diff --git a/device/mellanox/x86_64-mlnx_msn2700a1-r0/01_mlnx_2700_syslog.conf b/device/mellanox/x86_64-mlnx_msn2700a1-r0/01_mlnx_2700_syslog.conf new file mode 120000 index 000000000000..613b126c294c --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn2700a1-r0/01_mlnx_2700_syslog.conf @@ -0,0 +1 @@ +../x86_64-mlnx_msn2700-r0/01_mlnx_2700_syslog.conf \ No newline at end of file diff --git a/files/image_config/platform/rc.local b/files/image_config/platform/rc.local index 1848c56f3063..697e32c9d979 100755 --- a/files/image_config/platform/rc.local +++ b/files/image_config/platform/rc.local @@ -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 #### @@ -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