diff --git a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/platform_ndk.json b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/platform_ndk.json index 4fbd84df39b6..f444a14a843c 100644 --- a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/platform_ndk.json +++ b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/platform_ndk.json @@ -14,7 +14,7 @@ }, { "key": "monitor_action", - "stringval": "warn" + "stringval": "reboot" }, { "key": "grpc_thermal_monitor", @@ -43,6 +43,26 @@ { "key": "sonic_log_level", "stringval": "debug" + }, + { + "key": "thermal_low_margin_threshold", + "intval": 10 + }, + { + "key": "thermal_log_current_threshold", + "intval": 2 + }, + { + "key": "thermal_log_margin_threshold", + "intval": 2 + }, + { + "key": "thermal_log_min_threshold", + "intval": 2 + }, + { + "key": "thermal_log_max_threshold", + "intval": 1 } ] } diff --git a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/platform_reboot b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/platform_reboot index 43aace70f7ee..eb0bebef0e54 100755 --- a/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/platform_reboot +++ b/device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/platform_reboot @@ -17,6 +17,10 @@ update_reboot_cause() sync } +echo "Disable all SFPs" +python3 -c 'import sonic_platform.platform; platform_chassis = sonic_platform.platform.Platform().get_chassis(); platform_chassis.tx_disable_all_sfps()' +sleep 3 + # update the reboot_cuase file when reboot is trigger by device-mgr update_reboot_cause diff --git a/device/nokia/x86_64-nokia_ixr7250e_sup-r0/platform_ndk.json b/device/nokia/x86_64-nokia_ixr7250e_sup-r0/platform_ndk.json index dddefb0bcf73..9d68aacc59cd 100644 --- a/device/nokia/x86_64-nokia_ixr7250e_sup-r0/platform_ndk.json +++ b/device/nokia/x86_64-nokia_ixr7250e_sup-r0/platform_ndk.json @@ -31,6 +31,26 @@ { "key": "sonic_log_level", "stringval": "debug" + }, + { + "key": "thermal_low_margin_threshold", + "intval": 10 + }, + { + "key": "thermal_log_current_threshold", + "intval": 3 + }, + { + "key": "thermal_log_margin_threshold", + "intval": 3 + }, + { + "key": "thermal_log_min_threshold", + "intval": 5 + }, + { + "key": "thermal_log_max_threshold", + "intval": 1 } ] } diff --git a/device/nokia/x86_64-nokia_ixr7250e_sup-r0/platform_reboot b/device/nokia/x86_64-nokia_ixr7250e_sup-r0/platform_reboot index 00ae76c9de86..dc4f934339c9 100755 --- a/device/nokia/x86_64-nokia_ixr7250e_sup-r0/platform_reboot +++ b/device/nokia/x86_64-nokia_ixr7250e_sup-r0/platform_reboot @@ -1,15 +1,39 @@ #!/bin/bash -echo "Rebooting all Linecards" -python3 -c 'import sonic_platform.platform; platform_chassis = sonic_platform.platform.Platform().get_chassis(); platform_chassis.reboot_imms()' -sleep 3 + +DEVICE_MGR_REBOOT_FILE="/tmp/device_mgr_reboot" + +update_reboot_cause() +{ + DEVICE_MGR_REBOOT_FILE=/tmp/device_mgr_reboot + REBOOT_CAUSE_FILE=/host/reboot-cause/reboot-cause.txt + DEVICE_REBOOT_CAUSE_FILE=/etc/opt/srlinux/reboot-cause.txt + if [ -e $DEVICE_MGR_REBOOT_FILE ]; then + if [ -e $DEVICE_REBOOT_CAUSE_FILE ]; then + cp -f $DEVICE_REBOOT_CAUSE_FILE $REBOOT_CAUSE_FILE + fi + rm -f $DEVICE_MGR_REBOOT_FILE + else + touch /etc/opt/srlinux/devmgr_reboot_cause.done + rm -f $DEVICE_REBOOT_CAUSE_FILE &> /dev/null + fi + sync +} + +if [ ! -e $DEVICE_MGR_REBOOT_FILE ]; then + echo "Rebooting all Linecards" + python3 -c 'import sonic_platform.platform; platform_chassis = sonic_platform.platform.Platform().get_chassis(); platform_chassis.reboot_imms()' + sleep 3 +fi + +# update the reboot_cuase file when reboot is trigger by device-mgr +update_reboot_cause + systemctl stop nokia-watchdog.service sleep 2 echo "w" > /dev/watchdog kick_date=`date -u` echo "last watchdog kick $kick_date" > /var/log/nokia-watchdog-last.log rm -f /sys/firmware/efi/efivars/dump-* -touch /etc/opt/srlinux/devmgr_reboot_cause.done -rm -f /etc/opt/srlinux/reboot-cause.txt echo "Shutdown midplane" ifconfig xe0 down sync diff --git a/platform/broadcom/sonic-platform-modules-nokia b/platform/broadcom/sonic-platform-modules-nokia index 6b07af449c4b..e82caa40d4ee 160000 --- a/platform/broadcom/sonic-platform-modules-nokia +++ b/platform/broadcom/sonic-platform-modules-nokia @@ -1 +1 @@ -Subproject commit 6b07af449c4b40e2a80e3154347ca0308817ebd5 +Subproject commit e82caa40d4eec59e574bd4acffb0e92fd7187da4