Skip to content

Commit b1bff3d

Browse files
authored
Merge pull request #215 from gechiang/202205
Cherry-pick 17483 and 17378 from public master to msft/202205
2 parents c45c16d + 21c97d3 commit b1bff3d

File tree

5 files changed

+75
-7
lines changed

5 files changed

+75
-7
lines changed

device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/platform_ndk.json

+21-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
},
1515
{
1616
"key": "monitor_action",
17-
"stringval": "warn"
17+
"stringval": "reboot"
1818
},
1919
{
2020
"key": "grpc_thermal_monitor",
@@ -43,6 +43,26 @@
4343
{
4444
"key": "sonic_log_level",
4545
"stringval": "debug"
46+
},
47+
{
48+
"key": "thermal_low_margin_threshold",
49+
"intval": 10
50+
},
51+
{
52+
"key": "thermal_log_current_threshold",
53+
"intval": 2
54+
},
55+
{
56+
"key": "thermal_log_margin_threshold",
57+
"intval": 2
58+
},
59+
{
60+
"key": "thermal_log_min_threshold",
61+
"intval": 2
62+
},
63+
{
64+
"key": "thermal_log_max_threshold",
65+
"intval": 1
4666
}
4767
]
4868
}

device/nokia/x86_64-nokia_ixr7250e_36x400g-r0/platform_reboot

+4
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ update_reboot_cause()
1717
sync
1818
}
1919

20+
echo "Disable all SFPs"
21+
python3 -c 'import sonic_platform.platform; platform_chassis = sonic_platform.platform.Platform().get_chassis(); platform_chassis.tx_disable_all_sfps()'
22+
sleep 3
23+
2024
# update the reboot_cuase file when reboot is trigger by device-mgr
2125
update_reboot_cause
2226

device/nokia/x86_64-nokia_ixr7250e_sup-r0/platform_ndk.json

+20
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,26 @@
3131
{
3232
"key": "sonic_log_level",
3333
"stringval": "debug"
34+
},
35+
{
36+
"key": "thermal_low_margin_threshold",
37+
"intval": 10
38+
},
39+
{
40+
"key": "thermal_log_current_threshold",
41+
"intval": 3
42+
},
43+
{
44+
"key": "thermal_log_margin_threshold",
45+
"intval": 3
46+
},
47+
{
48+
"key": "thermal_log_min_threshold",
49+
"intval": 5
50+
},
51+
{
52+
"key": "thermal_log_max_threshold",
53+
"intval": 1
3454
}
3555
]
3656
}

device/nokia/x86_64-nokia_ixr7250e_sup-r0/platform_reboot

+29-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,39 @@
11
#!/bin/bash
2-
echo "Rebooting all Linecards"
3-
python3 -c 'import sonic_platform.platform; platform_chassis = sonic_platform.platform.Platform().get_chassis(); platform_chassis.reboot_imms()'
4-
sleep 3
2+
3+
DEVICE_MGR_REBOOT_FILE="/tmp/device_mgr_reboot"
4+
5+
update_reboot_cause()
6+
{
7+
DEVICE_MGR_REBOOT_FILE=/tmp/device_mgr_reboot
8+
REBOOT_CAUSE_FILE=/host/reboot-cause/reboot-cause.txt
9+
DEVICE_REBOOT_CAUSE_FILE=/etc/opt/srlinux/reboot-cause.txt
10+
if [ -e $DEVICE_MGR_REBOOT_FILE ]; then
11+
if [ -e $DEVICE_REBOOT_CAUSE_FILE ]; then
12+
cp -f $DEVICE_REBOOT_CAUSE_FILE $REBOOT_CAUSE_FILE
13+
fi
14+
rm -f $DEVICE_MGR_REBOOT_FILE
15+
else
16+
touch /etc/opt/srlinux/devmgr_reboot_cause.done
17+
rm -f $DEVICE_REBOOT_CAUSE_FILE &> /dev/null
18+
fi
19+
sync
20+
}
21+
22+
if [ ! -e $DEVICE_MGR_REBOOT_FILE ]; then
23+
echo "Rebooting all Linecards"
24+
python3 -c 'import sonic_platform.platform; platform_chassis = sonic_platform.platform.Platform().get_chassis(); platform_chassis.reboot_imms()'
25+
sleep 3
26+
fi
27+
28+
# update the reboot_cuase file when reboot is trigger by device-mgr
29+
update_reboot_cause
30+
531
systemctl stop nokia-watchdog.service
632
sleep 2
733
echo "w" > /dev/watchdog
834
kick_date=`date -u`
935
echo "last watchdog kick $kick_date" > /var/log/nokia-watchdog-last.log
1036
rm -f /sys/firmware/efi/efivars/dump-*
11-
touch /etc/opt/srlinux/devmgr_reboot_cause.done
12-
rm -f /etc/opt/srlinux/reboot-cause.txt
1337
echo "Shutdown midplane"
1438
ifconfig xe0 down
1539
sync

0 commit comments

Comments
 (0)