Skip to content

Commit 3be2ad7

Browse files
authored
[fast-reboot]Avoid stopping masked services during fast-reboot (sonic-net#2335)
#### What I did During fast-reboot there were warnings for few services sudo fast-reboot Warning: The unit file, source configuration file or drop-ins of mux.service changed on disk. Run 'systemctl daemon-reload' to reload units. Dumping conntrack entries failed Warning: The unit file, source configuration file or drop-ins of nat.service changed on disk. Run 'systemctl daemon-reload' to reload units. Warning: The unit file, source configuration file or drop-ins of sflow.service changed on disk. Run 'systemctl daemon-reload' to reload units. Warning: Stopping docker.service, but it can still be activated by: docker.socket Watchdog armed for 180 seconds This is due to the fact that the services are masked and trying to stop them will throw warning systemctl is-enabled sflow.service masked systemctl stop sflow.service Warning: The unit file, source configuration file or drop-ins of sflow.service changed on disk. Run 'systemctl daemon-reload' to reload units. #### How I did it Added check to skip stopping the services in fast-reboot if the services are masked. #### How to verify it Execute fast-reboot with the fix and verify.
1 parent 0e1b0cf commit 3be2ad7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

scripts/fast-reboot

+6
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,12 @@ else
689689
fi
690690
691691
for service in ${SERVICES_TO_STOP}; do
692+
# Skip the masked services
693+
state=$(systemctl is-enabled ${service})
694+
if [[ $state == "masked" ]]; then
695+
continue
696+
fi
697+
692698
debug "Stopping ${service} ..."
693699
694700
# TODO: These exceptions for nat, sflow, lldp

0 commit comments

Comments
 (0)