Skip to content

Commit b540f5f

Browse files
authored
[fast-reboot] revert the change of disabling counter polling before fast-reboot (#1744)
What I did The change being removed was introduced with PR#1174 with the condition that flex counter polling will be enabled in the boot up path unconditionally. However, a change was made to enable_counters.py to only enable counters when the configuration is missing (sonic-buildimage PR#7735). After the later change, the disabled flex counters will not be enabled when fast-reboot into the same image. How to verify it run fast-reboot test and snmp test, without the fix, the snmp test would fail. With the fix, the snmp test passes. Signed-off-by: Ying Xie [email protected]
1 parent 54b74a2 commit b540f5f

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

scripts/fast-reboot

-14
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ EXIT_ORCHAGENT_SHUTDOWN=10
3636
EXIT_SYNCD_SHUTDOWN=11
3737
EXIT_FAST_REBOOT_DUMP_FAILURE=12
3838
EXIT_FILTER_FDB_ENTRIES_FAILURE=13
39-
EXIT_COUNTERPOLL_DISABLE_FAILURE=14
4039
EXIT_NO_CONTROL_PLANE_ASSISTANT=20
4140
EXIT_SONIC_INSTALLER_VERIFY_REBOOT=21
4241

@@ -671,19 +670,6 @@ then
671670
systemctl stop "$service_name"
672671
fi
673672
674-
if [[ "$REBOOT_TYPE" = "fast-reboot" ]]; then
675-
CONFIG_DB_FILE=/etc/sonic/config_db.json
676-
COUNTERPOLL_DISABLE_RC=0
677-
# Disable counters in config_db.json
678-
/usr/local/bin/counterpoll config-db disable $CONFIG_DB_FILE || COUNTERPOLL_DISABLE_RC=$?
679-
if [[ COUNTERPOLL_DISABLE_RC -ne 0 ]]; then
680-
error "Failed to disable counterpoll. Exit code: $COUNTERPOLL_DISABLE_RC"
681-
/usr/local/bin/counterpoll config-db enable $CONFIG_DB_FILE || COUNTERPOLL_DISABLE_RC=$?
682-
unload_kernel
683-
exit "${EXIT_COUNTERPOLL_DISABLE_FAILURE}"
684-
fi
685-
fi
686-
687673
# Update the reboot cause file to reflect that user issued this script
688674
# Upon next boot, the contents of this file will be used to determine the
689675
# cause of the previous reboot

0 commit comments

Comments
 (0)