handlers: restart only the wireguard vpn updater supervisor process (fixes #47) #83
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR improves deployment reliability by stopping Supervisor from restarting unrelated processes.
Replaces the global
supervisorctl reloadhandler with a targeted restart of the WireGuard VPN updater supervisor process to avoid unnecessary restarts of unrelated services.What was changed
handlers/main.yml:supervisorctl restart openwisp-flask-vpn-updater-{{ openwisp2_wireguard_vpn_uuid }}register,failed_when, andchanged_whenlogic so:notifystatements in tasks to use the new handler:tasks/flask.ymltasks/pip.ymltasks/uwsgi.ymlverify.ymlunchanged to avoid altering test behavior unnecessarilyWhy
Reloading supervisor triggers a restart of all managed processes, creating avoidable downtime.
Restarting only the affected process is safer, more efficient, and aligns with the request in issue #47.
How to verify
Run local QA checks:
(Already tested locally, passed successfully)
Closes #47
Happy to update the PR if needed. Thanks for reviewing!