Skip to content

Commit

Permalink
[fast-reboot]Avoid stopping masked services during fast-reboot (#2335)
Browse files Browse the repository at this point in the history
#### 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.
  • Loading branch information
dgsudharsan authored and yxieca committed Sep 8, 2022
1 parent f7d69d4 commit 55e8948
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/fast-reboot
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,12 @@ else
fi
for service in ${SERVICES_TO_STOP}; do
# Skip the masked services
state=$(systemctl is-enabled ${service})
if [[ $state == "masked" ]]; then
continue
fi
debug "Stopping ${service} ..."
# TODO: These exceptions for nat, sflow, lldp
Expand Down

0 comments on commit 55e8948

Please sign in to comment.