Skip to content

Commit 88ee9f7

Browse files
mlok-nokiamssonicbld
authored andcommitted
[Nokia-IXR7250E] Modify the platform_reboot on the IXR7250E for PMON API reboot and Disable all SFPs (#17483)
Why I did it When Supervisor card is rebooted by using PMON API, it takes about 90 seconds to trigger the shutdown in down path. At this time linecards have been up. This delays linecards database initialization which is trying to PING/PONG the database-chassis. To address this issue, we modified the NDK to use the system call with "sudo reboot" when the request is from PMON API on Supervisor case. The NDK version is 22.9.20 and greater. This new NDK requires this modifcaiton of platform_reboot to work with. Work item tracking Microsoft ADO (number only): 26365734 How I did it Modify the platform_reboot In Supervisor not to reboot all IMMs since it has been done in the function reboot() in module.py. Also handle the reboot-cause.txt for on the Supervisor when the reboot is request from PMON API. Modify the Nokia platform specific platform_reboot in linecard to disable all SPFs. This PR works with NDK version 22.9.20 and above Signed-off-by: mlok <[email protected]>
1 parent 767944d commit 88ee9f7

File tree

2 files changed

+33
-5
lines changed

2 files changed

+33
-5
lines changed

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_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)